The conversion of a BibEntry to the XMP data (using Dublin Core) is done at
DublinCoreExtractor#fillDublinCoreSchema()
| Modifier and Type | Field and Description |
|---|---|
| private static final Logger | |
| private final UnprotectTermsFormatter | |
| private static final String | |
| private static final XmpUtilShared | |
| private final XmpPreferences |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | Returns: If something goes wrong (e.g. an exception is thrown), the method returns an empty string, otherwise it returns the xmp metadata without metadata description as a string in dublin core format.A list of entries, which are added to the dublin core metadata. entries)This method generates an xmp metadata string in dublin core format without the
metadata section |
| private String | Returns: If something goes wrong (e.g. an exception is thrown), the method returns an empty string, otherwise it returns the xmp metadata as a string in dublin core format.A list of entries, which are added to the dublin core metadata. entries)This method generates an xmp metadata string in dublin core format. |
| private BibEntry | |
| public static void | removeXmpMetadata(Path
The file from which metadata has to be removed. path)Removes all XMP metadata associated with the given PDF file. |
| private void | writeDocumentInformation(PDDocument
The pdf document to write to. document, BibEntry The BibEntry that is written into the PDF properties. entry, BibDatabase An optional database which the given bibtex entries belong to, which will be used to resolve strings. If the database is null the strings will not be resolved. database)Try to write the given BibTexEntry in the Document Information (the properties of the pdf). |
| private void | writeDublinCore(PDDocument
The pdf document to write to. document, List<BibEntry> The BibTeX entries that are written as schemas entries, BibDatabase An optional database which the given BibTeX entries belong to, which will be used to esolve strings. If the database is null the strings will not be resolved. database)Try to write the given BibTexEntries as DublinCore XMP Schemas Existing DublinCore schemas in the document are removed |
| private void | writeToDCSchema(DublinCoreSchema
Dublin core schema, which is filled with the bib entry. dcSchema, BibEntry The entry, which is added to the dublin core metadata. entry)Writes the information of the bib entry to the dublin core schema using a custom extractor. |
| public void | writeXmp(Path
The path to write to. file, BibEntry The entry to write. entry, BibDatabase An optional database which the given bibtex entries belong to, which will be used to resolve strings. If the database is null the strings will not be resolved. database)Try to write the given BibTexEntry in the XMP-stream of the given PDF-file. |
| public void | writeXmp(Path
The file to write the entries to. path, List<BibEntry> The entries to write to the file. * bibtexEntries, BibDatabase An optional database which the given bibtex entries belong to, which will be used to resolve strings. If the database is null the strings will not be resolved. database)Try to write the given BibTexEntry in the XMP-stream of the given PDF-file. |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| unprotectTermsFormatter | back to summary |
|---|---|
| private final UnprotectTermsFormatter unprotectTermsFormatter | |
| XMP_BEGIN_END_TAG | back to summary |
|---|---|
| private static final String XMP_BEGIN_END_TAG | |
| XMP_UTIL_SHARED | back to summary |
|---|---|
| private static final XmpUtilShared XMP_UTIL_SHARED | |
| xmpPreferences | back to summary |
|---|---|
| private final XmpPreferences xmpPreferences | |
| XmpUtilWriter | back to summary |
|---|---|
| public XmpUtilWriter(XmpPreferences xmpPreferences) | |
| generateXmpStringWithoutXmpDeclaration | back to summary |
|---|---|
| public String generateXmpStringWithoutXmpDeclaration(List<BibEntry> entries) This method generates an xmp metadata string in dublin core format without the
metadata section
| |
| generateXmpStringWithXmpDeclaration | back to summary |
|---|---|
| private String generateXmpStringWithXmpDeclaration(List<BibEntry> entries) This method generates an xmp metadata string in dublin core format. | |
| getDefaultOrDatabaseEntry | back to summary |
|---|---|
| private BibEntry getDefaultOrDatabaseEntry(BibEntry defaultEntry, BibDatabase database) | |
| removeXmpMetadata | back to summary |
|---|---|
| public static void removeXmpMetadata(Path path) throws IOException, TransformerException Removes all XMP metadata associated with the given PDF file.
| |
| writeDocumentInformation | back to summary |
|---|---|
| private void writeDocumentInformation(PDDocument document, BibEntry entry, BibDatabase database) Try to write the given BibTexEntry in the Document Information (the properties of the pdf). Existing fields values are overridden if the bibtex entry has the corresponding value set. The method to write DublinCore is
| |
| writeDublinCore | back to summary |
|---|---|
| private void writeDublinCore(PDDocument document, List<BibEntry> entries, BibDatabase database) throws IOException, TransformerException Try to write the given BibTexEntries as DublinCore XMP Schemas Existing DublinCore schemas in the document are removed
| |
| writeToDCSchema | back to summary |
|---|---|
| private void writeToDCSchema(DublinCoreSchema dcSchema, BibEntry entry) Writes the information of the bib entry to the dublin core schema using a custom extractor.
| |
| writeXmp | back to summary |
|---|---|
| public void writeXmp(Path file, BibEntry entry, BibDatabase database) throws IOException, TransformerException Try to write the given BibTexEntry in the XMP-stream of the given PDF-file. Throws an IOException if the file cannot be read or written, so the user can remove a lock or cancel the operation. The method will overwrite existing BibTeX-XMP-data, but keep other existing metadata. This is a convenience method for writeXMP(File, Collection).
| |
| writeXmp | back to summary |
|---|---|
| public void writeXmp(Path path, List<BibEntry> bibtexEntries, BibDatabase database) throws IOException, TransformerException Try to write the given BibTexEntry in the XMP-stream of the given PDF-file. Throws an IOException if the file cannot be read or written, so the user can remove a lock or cancel the operation. The method will overwrite existing BibTeX-XMP-data, but keep other existing metadata. The code for using PDFBox is also used at
| |