net.sf.uadetector.internal.data
Class XmlDataHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
net.sf.uadetector.internal.data.XmlDataHandler
- All Implemented Interfaces:
- org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler
public final class XmlDataHandler
- extends org.xml.sax.helpers.DefaultHandler
|
Field Summary |
protected static java.lang.String |
UASDATA_DEF
Path to the internal Document Type Definition (DTD) of UAS data files to be able to work completely offline |
protected static java.lang.String |
UASDATA_DEF_URL
URL to the Document Type Definition (DTD) of UAS data files |
|
Method Summary |
void |
characters(char[] ch,
int start,
int length)
|
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String tagName)
|
void |
error(org.xml.sax.SAXParseException e)
|
void |
fatalError(org.xml.sax.SAXParseException e)
|
boolean |
hasError()
Gets the flag whether an error occurred while parsing the document. |
boolean |
hasWarning()
Gets the flag whether an warning occurred while parsing the document. |
protected static void |
logParsingIssue(java.lang.String prefix,
org.xml.sax.SAXParseException e)
Logs an issue while parsing XML. |
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicId,
java.lang.String systemId)
|
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String tagName,
org.xml.sax.Attributes attributes)
|
void |
warning(org.xml.sax.SAXParseException e)
|
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endDocument, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UASDATA_DEF
protected static final java.lang.String UASDATA_DEF
- Path to the internal Document Type Definition (DTD) of UAS data files to be able to work completely offline
- See Also:
- Constant Field Values
UASDATA_DEF_URL
protected static final java.lang.String UASDATA_DEF_URL
- URL to the Document Type Definition (DTD) of UAS data files
- See Also:
- Constant Field Values
XmlDataHandler
public XmlDataHandler(@Nonnull
DataBuilder builder)
logParsingIssue
protected static void logParsingIssue(java.lang.String prefix,
org.xml.sax.SAXParseException e)
- Logs an issue while parsing XML.
- Parameters:
prefix - log level as string to add at the beginning of the messagee - exception to log
characters
public void characters(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
- Specified by:
characters in interface org.xml.sax.ContentHandler- Overrides:
characters in class org.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
endElement
public void endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String tagName)
throws org.xml.sax.SAXException
- Specified by:
endElement in interface org.xml.sax.ContentHandler- Overrides:
endElement in class org.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
error
public void error(org.xml.sax.SAXParseException e)
throws org.xml.sax.SAXException
- Specified by:
error in interface org.xml.sax.ErrorHandler- Overrides:
error in class org.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
fatalError
public void fatalError(org.xml.sax.SAXParseException e)
throws org.xml.sax.SAXException
- Specified by:
fatalError in interface org.xml.sax.ErrorHandler- Overrides:
fatalError in class org.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
hasError
public boolean hasError()
- Gets the flag whether an error occurred while parsing the document.
- Returns:
true if an error occurred otherwise false
hasWarning
public boolean hasWarning()
- Gets the flag whether an warning occurred while parsing the document.
- Returns:
true if an warning occurred otherwise false
resolveEntity
public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
java.lang.String systemId)
throws java.io.IOException,
org.xml.sax.SAXException
- Specified by:
resolveEntity in interface org.xml.sax.EntityResolver- Overrides:
resolveEntity in class org.xml.sax.helpers.DefaultHandler
- Throws:
java.io.IOException
org.xml.sax.SAXException
startElement
public void startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String tagName,
org.xml.sax.Attributes attributes)
throws org.xml.sax.SAXException
- Specified by:
startElement in interface org.xml.sax.ContentHandler- Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
warning
public void warning(org.xml.sax.SAXParseException e)
throws org.xml.sax.SAXException
- Specified by:
warning in interface org.xml.sax.ErrorHandler- Overrides:
warning in class org.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
Copyright © 2011-2014. All Rights Reserved.