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 voidendDescription()voidendDocument()Ends the XMP document by writing the following footer and clearing the namespace mappings:voidmetadata(Metadata metadata)voidproperty(java.lang.String name, java.lang.String value)voidstartDescription(java.lang.String about, java.lang.String prefix, java.lang.String uri)voidstartDocument()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.SAXExceptionStarts an XMP document by setting up the namespace mappings and writing out the following header:<rdf:RDF>
- Specified by:
startDocumentin interfaceorg.xml.sax.ContentHandler- Overrides:
startDocumentin classContentHandlerDecorator- Throws:
org.xml.sax.SAXException
-
endDocument
public void endDocument() throws org.xml.sax.SAXExceptionEnds the XMP document by writing the following footer and clearing the namespace mappings:</rdf:RDF>
- Specified by:
endDocumentin interfaceorg.xml.sax.ContentHandler- Overrides:
endDocumentin 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
-
-