|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
edu.harvard.hul.ois.jhove.XMPHandler
public class XMPHandler
This class encapsulates XMP metadata within a file. It makes use of an InputStream as a data source. This differs from normal XML handling in that it's necessary to process the xpacket processing instruction in order to determine the encoding of the XML. the processingInstruction function looks for xpacket, and throws a special SAXException if it's necessary to change encoding. We don't actually extract any information from the XMP, but simply check it for well-formedness. By convention, XMPHandler should be invoked on an XMPSource (TBW), which provides the ability to recapture the InputStream from which the XMP was obtained and put it into a property once it's verified here.
Constructor Summary | |
---|---|
XMPHandler()
|
Method Summary | |
---|---|
void |
endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String rawName)
Catches the end of an element. |
void |
fatalError(org.xml.sax.SAXParseException exception)
Catch a fatal error. |
boolean |
isPdfaCompliant()
Returns true if no violations of PDF/A compliance have been found, false if a problem was detected. |
void |
processingInstruction(java.lang.String target,
java.lang.String data)
|
void |
startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String rawName,
org.xml.sax.Attributes atts)
Catches the start of an element and, if it's one we care about, sets state information. |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
---|
characters, endDocument, endPrefixMapping, error, ignorableWhitespace, notationDecl, 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 |
Constructor Detail |
---|
public XMPHandler()
Method Detail |
---|
public boolean isPdfaCompliant()
public void processingInstruction(java.lang.String target, java.lang.String data) throws org.xml.sax.SAXException
processingInstruction
in interface org.xml.sax.ContentHandler
processingInstruction
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String rawName, org.xml.sax.Attributes atts) throws org.xml.sax.SAXException
startElement
in interface org.xml.sax.ContentHandler
startElement
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String rawName) throws org.xml.sax.SAXException
endElement
in interface org.xml.sax.ContentHandler
endElement
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public void fatalError(org.xml.sax.SAXParseException exception) throws org.xml.sax.SAXException
fatalError
in interface org.xml.sax.ErrorHandler
fatalError
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |