|
|||||||||
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.module.xml.XmlModuleHandler
public class XmlModuleHandler
This handler does the parsing work of the XML module.
Constructor Summary | |
---|---|
XmlModuleHandler()
Constructor. |
Method Summary | |
---|---|
void |
characters(char[] ch,
int start,
int length)
Processes PCData characters. |
void |
endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
The only action taken here is some bookkeeping in connection with the HTML metadata. |
void |
error(org.xml.sax.SAXParseException e)
Processes a parsing exception. |
java.util.Set<java.lang.String> |
getAttributeValues()
Returns the set of attribute values. |
java.lang.String |
getDTDURI()
Returns the DTD URI. |
HtmlMetadata |
getHtmlMetadata()
Returns the HTML metadata object. |
java.util.List<Message> |
getMessages()
Returns the List of messages generated during the parse. |
java.util.Map<java.lang.String,java.lang.String> |
getNamespaces()
Returns the map of prefixes to namespaces. |
java.util.List<java.lang.String[]> |
getNotations()
Returns the list of notations. |
java.util.List<ProcessingInstructionInfo> |
getProcessingInstructions()
Returns the List of processing instructions. |
java.lang.String |
getRoot()
Returns the qualified name of the root element. |
java.util.List<SchemaInfo> |
getSchemas()
Returns the list of schemas. |
boolean |
getSigFlag()
Returns true if we have seen an element or a
processing instruction, which implies that we've seen an
XML declaration. |
java.util.List<java.lang.String[]> |
getUnparsedEntities()
Returns the list of unparsed entities. |
boolean |
hasSchemaURI(SchemaInfo newinfo)
|
boolean |
isValid()
Returns the validity state. |
void |
notationDecl(java.lang.String name,
java.lang.String publicID,
java.lang.String systemID)
Puts all notations into the notation list. |
void |
processingInstruction(java.lang.String target,
java.lang.String data)
Handles a processing instruction. |
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicId,
java.lang.String systemId)
Overrides standard resolveEntity. |
void |
setLocalSchemas(java.util.Map<java.lang.String,java.io.File> schemas)
Sets a map of schema URIs to local files. |
void |
setXhtmlFlag(boolean flag)
Sets the value of the XHTML flag. |
void |
startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qualifiedName,
org.xml.sax.Attributes atts)
Looks for the first element encountered. |
void |
startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
Begin the scope of a prefix-URI Namespace mapping. |
void |
unparsedEntityDecl(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId,
java.lang.String notationName)
Picks up unparsed entity declarations, after calling the superclass's unparsedEntityDecl, and puts their information into the unparsed entity declaration list as an array of four strings: [ name, publicId, systemId, notationName]. |
void |
warning(org.xml.sax.SAXParseException e)
Processes a warning. |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
---|
endDocument, endPrefixMapping, fatalError, ignorableWhitespace, setDocumentLocator, skippedEntity, startDocument |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XmlModuleHandler()
Method Detail |
---|
public void setXhtmlFlag(boolean flag)
public void setLocalSchemas(java.util.Map<java.lang.String,java.io.File> schemas)
public HtmlMetadata getHtmlMetadata()
public void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qualifiedName, 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 qName)
endElement
in interface org.xml.sax.ContentHandler
endElement
in class org.xml.sax.helpers.DefaultHandler
public void characters(char[] ch, int start, int length)
characters
in interface org.xml.sax.ContentHandler
characters
in class org.xml.sax.helpers.DefaultHandler
public void startPrefixMapping(java.lang.String prefix, java.lang.String uri) throws org.xml.sax.SAXException
startPrefixMapping
in interface org.xml.sax.ContentHandler
startPrefixMapping
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public void processingInstruction(java.lang.String target, java.lang.String data) throws org.xml.sax.SAXException
getProcessingInstructions
.
Each element of the list is an array of two Strings. Element 0 of
the array is the target, and element 1 is the data.
processingInstruction
in interface org.xml.sax.ContentHandler
processingInstruction
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public void notationDecl(java.lang.String name, java.lang.String publicID, java.lang.String systemID) throws org.xml.sax.SAXException
notationDecl
in interface org.xml.sax.DTDHandler
notationDecl
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId) throws org.xml.sax.SAXException
resolveEntity
in interface org.xml.sax.EntityResolver
resolveEntity
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public void unparsedEntityDecl(java.lang.String name, java.lang.String publicId, java.lang.String systemId, java.lang.String notationName) throws org.xml.sax.SAXException
unparsedEntityDecl
in interface org.xml.sax.DTDHandler
unparsedEntityDecl
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public void warning(org.xml.sax.SAXParseException e)
warning
in interface org.xml.sax.ErrorHandler
warning
in class org.xml.sax.helpers.DefaultHandler
public void error(org.xml.sax.SAXParseException e)
error
in interface org.xml.sax.ErrorHandler
error
in class org.xml.sax.helpers.DefaultHandler
public java.util.Set<java.lang.String> getAttributeValues()
public java.util.List<SchemaInfo> getSchemas()
public java.util.List<java.lang.String[]> getUnparsedEntities()
public java.util.Map<java.lang.String,java.lang.String> getNamespaces()
public java.lang.String getDTDURI()
public java.util.List<ProcessingInstructionInfo> getProcessingInstructions()
public java.util.List<java.lang.String[]> getNotations()
public java.lang.String getRoot()
public java.util.List<Message> getMessages()
public boolean isValid()
error
has been called, the return value will be false
.
public boolean getSigFlag()
true
if we have seen an element or a
processing instruction, which implies that we've seen an
XML declaration.
public boolean hasSchemaURI(SchemaInfo newinfo)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |