public class CitationDocument extends Object
| Constructor and Description |
|---|
CitationDocument() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
canGenerateCitationVersion(Bitstream bitstream) |
int |
drawStringWordWrap(org.apache.pdfbox.pdmodel.PDPage page,
org.apache.pdfbox.pdmodel.edit.PDPageContentStream contentStream,
String text,
int startX,
int startY,
org.apache.pdfbox.pdmodel.font.PDFont pdfFont,
float fontSize) |
static void |
drawTable(org.apache.pdfbox.pdmodel.PDPage page,
org.apache.pdfbox.pdmodel.edit.PDPageContentStream contentStream,
float y,
float margin,
String[][] content,
org.apache.pdfbox.pdmodel.font.PDFont font,
int fontSize,
boolean cellBorders) |
String |
getAllMetadataSeparated(Item item,
String metadataKey) |
String |
getOwningCollection(Item item) |
String |
getOwningCommunity(Item item) |
static Boolean |
isCitationEnabledForBitstream(Bitstream bitstream,
Context context)
Repository policy can specify to have a custom citation cover/tail page to the document, which embeds metadata.
|
File |
makeCitedDocument(Bitstream bitstream)
Creates a
cited document from the given bitstream of the given item.
|
public static Boolean isCitationEnabledForBitstream(Bitstream bitstream, Context context) throws SQLException
bitstream - SQLExceptionpublic static boolean canGenerateCitationVersion(Bitstream bitstream)
public File makeCitedDocument(Bitstream bitstream) throws IOException, SQLException, AuthorizeException, org.apache.pdfbox.exceptions.COSVisitorException
The Process for adding a cover page is as follows:
bitstream - The source bitstream being cited. This must be a PDF.FileNotFoundExceptionSQLExceptionAuthorizeExceptionIOExceptionorg.apache.pdfbox.exceptions.COSVisitorExceptionpublic int drawStringWordWrap(org.apache.pdfbox.pdmodel.PDPage page,
org.apache.pdfbox.pdmodel.edit.PDPageContentStream contentStream,
String text,
int startX,
int startY,
org.apache.pdfbox.pdmodel.font.PDFont pdfFont,
float fontSize)
throws IOException
IOExceptionpublic static void drawTable(org.apache.pdfbox.pdmodel.PDPage page,
org.apache.pdfbox.pdmodel.edit.PDPageContentStream contentStream,
float y,
float margin,
String[][] content,
org.apache.pdfbox.pdmodel.font.PDFont font,
int fontSize,
boolean cellBorders)
throws IOException
page - contentStream - y - the y-coordinate of the first rowmargin - the padding on left and right of tablecontent - a 2d array containing the table dataIOExceptionCopyright © 2014 DuraSpace. All Rights Reserved.