Package org.apache.tika.parser.xmp
Class XMPMetadataExtractor
- java.lang.Object
-
- org.apache.tika.parser.xmp.XMPMetadataExtractor
-
public class XMPMetadataExtractor extends Object
XMP Metadata Extractor based on Apache XmpBox.
-
-
Constructor Summary
Constructors Constructor Description XMPMetadataExtractor()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidextractDublinCoreSchema(org.apache.xmpbox.XMPMetadata xmp, org.apache.tika.metadata.Metadata metadata)Extracts Dublin Core.static voidextractXMPBasicSchema(org.apache.xmpbox.XMPMetadata xmp, org.apache.tika.metadata.Metadata metadata)Extracts basic schema metadata from XMP.static voidextractXMPMM(org.apache.xmpbox.XMPMetadata xmp, org.apache.tika.metadata.Metadata metadata)Extracts Media Management metadata from XMP.static intgetMaxXMPMMHistory()static voidparse(InputStream stream, org.apache.tika.metadata.Metadata metadata)Parse the XMP Packets.static voidsetMaxXMPMMHistory(int maxEvents)Maximum number of events to extract from the event history in the XMP Media Management (XMPMM) section.
-
-
-
Method Detail
-
parse
public static void parse(InputStream stream, org.apache.tika.metadata.Metadata metadata) throws IOException, org.apache.tika.exception.TikaException
Parse the XMP Packets.- Parameters:
stream- the stream to parser.metadata- the metadata collection to update- Throws:
IOException- on any IO error.org.apache.tika.exception.TikaException- on any Tika error.
-
extractDublinCoreSchema
public static void extractDublinCoreSchema(org.apache.xmpbox.XMPMetadata xmp, org.apache.tika.metadata.Metadata metadata) throws IOExceptionExtracts Dublin Core. Silently swallows exceptions.- Parameters:
xmp- the XMP Metadata object.metadata- the metadata map- Throws:
IOException
-
extractXMPBasicSchema
public static void extractXMPBasicSchema(org.apache.xmpbox.XMPMetadata xmp, org.apache.tika.metadata.Metadata metadata) throws IOExceptionExtracts basic schema metadata from XMP. Silently swallows exceptions.- Parameters:
xmp- the XMP Metadata object.metadata- the metadata map- Throws:
IOException
-
getMaxXMPMMHistory
public static int getMaxXMPMMHistory()
- Returns:
- maximum number of events to extract from the XMPMM history.
-
setMaxXMPMMHistory
public static void setMaxXMPMMHistory(int maxEvents)
Maximum number of events to extract from the event history in the XMP Media Management (XMPMM) section. The extractor will silently stop adding events after it has reached this threshold.The default is 1024.
- Parameters:
maxEvents-
-
extractXMPMM
public static void extractXMPMM(org.apache.xmpbox.XMPMetadata xmp, org.apache.tika.metadata.Metadata metadata)Extracts Media Management metadata from XMP.Silently swallows exceptions.
- Parameters:
xmp-metadata-
-
-