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:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
public class XMPContentHandler extends SafeContentHandler
Content handler decorator that simplifies the task of producing XMP output.- Since:
- Apache Tika 1.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.tika.sax.SafeContentHandler
SafeContentHandler.Output
-
-
Constructor Summary
Constructors Constructor Description XMPContentHandler(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(String name, String value)
void
startDescription(String about, String prefix, 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, isInvalid, startElement, writeReplacement
-
Methods inherited from class org.apache.tika.sax.ContentHandlerDecorator
endPrefixMapping, error, fatalError, handleException, processingInstruction, setContentHandler, setDocumentLocator, skippedEntity, startPrefixMapping, toString, warning
-
Methods inherited from class org.xml.sax.helpers.DefaultHandler
notationDecl, resolveEntity, unparsedEntityDecl
-
-
-
-
Field Detail
-
RDF
public static final String RDF
The RDF namespace URI- See Also:
- Constant Field Values
-
XMP
public static final String XMP
The XMP namespace URI- See Also:
- Constant Field Values
-
-
Constructor Detail
-
XMPContentHandler
public XMPContentHandler(ContentHandler handler)
-
-
Method Detail
-
startDocument
public void startDocument() throws SAXException
Starts an XMP document by setting up the namespace mappings and writing out the following header:<rdf:RDF>
- Specified by:
startDocument
in interfaceContentHandler
- Overrides:
startDocument
in classContentHandlerDecorator
- Throws:
SAXException
-
endDocument
public void endDocument() throws SAXException
Ends the XMP document by writing the following footer and clearing the namespace mappings:</rdf:RDF>
- Specified by:
endDocument
in interfaceContentHandler
- Overrides:
endDocument
in classSafeContentHandler
- Throws:
SAXException
-
startDescription
public void startDescription(String about, String prefix, String uri) throws SAXException
- Throws:
SAXException
-
endDescription
public void endDescription() throws SAXException
- Throws:
SAXException
-
property
public void property(String name, String value) throws SAXException
- Throws:
SAXException
-
metadata
public void metadata(Metadata metadata) throws SAXException
- Throws:
SAXException
-
-