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 Stackprivate StringBufferprivate Stackprivate Metadataprivate Stack -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] ch, int start, int length) voidendElement(String uri, String localName, String qName) private XMPArraygetCurrentArray(boolean required) private PropertyAccessprivate QNameprivate XMPStructureprivate booleanprivate QNamevoidstartElement(String uri, String localName, String qName, Attributes attributes) private voidprivate voidMethods inherited from class DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warningMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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:
startElementin interfaceContentHandler- Overrides:
startElementin classDefaultHandler- Throws:
SAXException
-
startStructure
private void startStructure() -
startThinStructure
private void startThinStructure() -
endElement
- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classDefaultHandler- Throws:
SAXException
-
characters
- Specified by:
charactersin interfaceContentHandler- Overrides:
charactersin classDefaultHandler- Throws:
SAXException
-