Verified Owner
Top Description Fields Constructors Methods
org.jabref.logic.xmp

public Class XmpUtilShared

extends Object
Class Inheritance
Imports
java.io.IOException, .InputStream, java.nio.file.Path, java.util.List, org.apache.xmpbox.XMPMetadata, org.apache.xmpbox.xml.DomXmpParser, .XmpParsingException, org.slf4j.Logger, .LoggerFactory

XMPUtilShared provides support for reading org.jabref.logic.xmp.XmpUtilReader and writing org.jabref.logic.xmp.XmpUtilWriter BibTeX data as XMP metadata in PDF-documents.

Field Summary

Modifier and TypeField and Description
public static final String
private DomXmpParser
private static final Logger

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static boolean

Returns:

whether a BibEntry was found in the given PDF.
hasMetadata
(Path
the path to the PDF.
path
)

Will try to read XMP metadata from the given file, returning whether metadata was found.

public XMPMetadata
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

BIBTEX_DI_FIELD_NAME_PREFIXback to summary
public static final String BIBTEX_DI_FIELD_NAME_PREFIX
DOM_XMP_PARSERback to summary
private DomXmpParser DOM_XMP_PARSER
LOGGERback to summary
private static final Logger LOGGER

Constructor Detail

XmpUtilSharedback to summary
public XmpUtilShared()

Method Detail

hasMetadataback to summary
public static boolean hasMetadata(Path path)

Will try to read XMP metadata from the given file, returning whether metadata was found.

Caution

This method is as expensive as it is reading the actual metadata itself from the PDF.

Parameters
path:Path

the path to the PDF.

Returns:boolean

whether a BibEntry was found in the given PDF.

parseXmpMetadataback to summary
public XMPMetadata parseXmpMetadata(InputStream is) throws IOException