Package org.apache.tika.sax
Class XMPContentHandler
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- org.apache.tika.sax.ContentHandlerDecorator
-
- org.apache.tika.sax.SafeContentHandler
-
- org.apache.tika.sax.XMPContentHandler
-
- All Implemented Interfaces:
org.xml.sax.ContentHandler
,org.xml.sax.DTDHandler
,org.xml.sax.EntityResolver
,org.xml.sax.ErrorHandler
public class XMPContentHandler extends SafeContentHandler
Content handler decorator that simplifies the task of producing XMP output.- Since:
- Apache Tika 1.0
-
-
Constructor Summary
Constructors Constructor Description XMPContentHandler(org.xml.sax.ContentHandler handler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
endDescription()
void
endDocument()
Ends the XMP document by writing the following footer and clearing the namespace mappings:void
metadata(Metadata metadata)
void
property(java.lang.String name, java.lang.String value)
void
startDescription(java.lang.String about, java.lang.String prefix, java.lang.String uri)
void
startDocument()
Starts an XMP document by setting up the namespace mappings and writing out the following header:-
Methods inherited from class org.apache.tika.sax.SafeContentHandler
characters, endElement, ignorableWhitespace, startElement
-
Methods inherited from class org.apache.tika.sax.ContentHandlerDecorator
endPrefixMapping, processingInstruction, setDocumentLocator, skippedEntity, startPrefixMapping, toString
-
-
-
-
Field Detail
-
RDF
public static final java.lang.String RDF
The RDF namespace URI- See Also:
- Constant Field Values
-
XMP
public static final java.lang.String XMP
The XMP namespace URI- See Also:
- Constant Field Values
-
-
Method Detail
-
startDocument
public void startDocument() throws org.xml.sax.SAXException
Starts an XMP document by setting up the namespace mappings and writing out the following header:<rdf:RDF>
- Specified by:
startDocument
in interfaceorg.xml.sax.ContentHandler
- Overrides:
startDocument
in classContentHandlerDecorator
- Throws:
org.xml.sax.SAXException
-
endDocument
public void endDocument() throws org.xml.sax.SAXException
Ends the XMP document by writing the following footer and clearing the namespace mappings:</rdf:RDF>
- Specified by:
endDocument
in interfaceorg.xml.sax.ContentHandler
- Overrides:
endDocument
in classSafeContentHandler
- Throws:
org.xml.sax.SAXException
-
startDescription
public void startDescription(java.lang.String about, java.lang.String prefix, java.lang.String uri) throws org.xml.sax.SAXException
- Throws:
org.xml.sax.SAXException
-
endDescription
public void endDescription() throws org.xml.sax.SAXException
- Throws:
org.xml.sax.SAXException
-
property
public void property(java.lang.String name, java.lang.String value) throws org.xml.sax.SAXException
- Throws:
org.xml.sax.SAXException
-
metadata
public void metadata(Metadata metadata) throws org.xml.sax.SAXException
- Throws:
org.xml.sax.SAXException
-
-