Package org.apache.xmlgraphics.xmp
Class XMPHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.apache.xmlgraphics.xmp.XMPHandler
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
Passive XMP parser implemented as a SAX DefaultHandler. After the XML document has been parsed
the Metadata object can be retrieved.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stack
private StringBuffer
private Stack
private Metadata
private Stack
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
characters
(char[] ch, int start, int length) void
endElement
(String uri, String localName, String qName) private XMPArray
getCurrentArray
(boolean required) private PropertyAccess
private QName
private XMPStructure
private boolean
private QName
void
startElement
(String uri, String localName, String qName, Attributes attributes) private void
private void
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.xml.sax.ContentHandler
declaration
-
Field Details
-
meta
-
-
attributesStack
-
nestingInfoStack
-
contextStack
-
-
Constructor Details
-
XMPHandler
public XMPHandler()
-
-
Method Details
-
getMetadata
- Returns:
- the parsed metadata, available after the parsing.
-
hasComplexContent
private boolean hasComplexContent() -
getCurrentProperties
-
getCurrentPropName
-
popCurrentPropName
- Throws:
SAXException
-
getCurrentStructure
-
getCurrentArray
- Throws:
SAXException
-
startElement
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException - Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDefaultHandler
- Throws:
SAXException
-
startStructure
private void startStructure() -
startThinStructure
private void startThinStructure() -
endElement
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classDefaultHandler
- Throws:
SAXException
-
characters
- Specified by:
characters
in interfaceContentHandler
- Overrides:
characters
in classDefaultHandler
- Throws:
SAXException
-