org.apache.tika.sax
Class XMPContentHandler

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by org.apache.tika.sax.ContentHandlerDecorator
          extended by org.apache.tika.sax.SafeContentHandler
              extended by 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
 
Field Summary
static String RDF
          The RDF namespace URI
static String XMP
          The XMP namespace URI
 
Constructor Summary
XMPContentHandler(ContentHandler handler)
           
 
Method Summary
 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, handleException, processingInstruction, setContentHandler, setDocumentLocator, skippedEntity, startPrefixMapping, toString
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
error, fatalError, notationDecl, resolveEntity, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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 interface ContentHandler
Overrides:
startDocument in class ContentHandlerDecorator
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 interface ContentHandler
Overrides:
endDocument in class SafeContentHandler
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


Copyright © 2007-2011 The Apache Software Foundation. All Rights Reserved.