Class 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 Detail

      • XMPContentHandler

        public XMPContentHandler​(org.xml.sax.ContentHandler handler)
    • 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 interface org.xml.sax.ContentHandler
        Overrides:
        startDocument in class ContentHandlerDecorator
        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 interface org.xml.sax.ContentHandler
        Overrides:
        endDocument in class SafeContentHandler
        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