|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Objectorg.xml.sax.helpers.DefaultHandler
condor.classad.ClassAdSAXHandler
A handler for SAX (Simple API for XML) events from a SAXParser. It uses those events to build up an Expr object. Note that this class is not public; it may only be referenced within the condor.classad package. It should only be referenced by ClassAdParser.
ClassAdParser
Field Summary | |
(package private) Locator |
locator
Handle on the original document for reporting the locations of errors. |
Constructor Summary | |
(package private) |
ClassAdSAXHandler()
|
Method Summary | |
void |
characters(char[] ch,
int start,
int length)
Called by SAXParser after recognizing some "PCDATA" (parsed character data). |
void |
endElement(String uri,
String localName,
String name)
Called by the SAXParser after parsing the end tag of an element. |
void |
error(SAXParseException e)
Called by SAXParser if it discovers a (non-fatal) error. |
Expr |
getResult()
Get and remove the result of the most recent parse, if any. |
(package private) void |
printMessage(String msg)
Print a message, decorated with the current line and column number. |
void |
setDocumentLocator(Locator locator)
Called by SAXParser to deliver a locator. |
(package private) void |
setVerbosity(int level,
PrintStream dest)
Sets the verbosity and error output stream. |
void |
startElement(String uri,
String localName,
String name,
Attributes attrs)
Called by SAXParser at the start of an element after parsing the start tag. |
void |
warning(SAXParseException e)
Called by SAXParser to announce warnings. |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endDocument, endPrefixMapping, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl |
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
Locator locator
Constructor Detail |
ClassAdSAXHandler()
Method Detail |
public Expr getResult()
public void setDocumentLocator(Locator locator)
locator
- An object that can return the location of any SAX
document event.public void warning(SAXParseException e)
e
- The warning information encoded as an exception.public void error(SAXParseException e)
public void characters(char[] ch, int start, int length)
ch
- The characters.start
- The start position in the character array.length
- The number of characters to use from the character array.public void startElement(String uri, String localName, String name, Attributes attrs) throws SAXException
uri
- currenly not documented; appears always to be ''.localName
- The local name (without prefix), or the empty string if
Namespace processing is not being performed. Currently
ignored.name
- The qualified name (with prefix), or the empty string if
qualified names are not available.attrs
- The specified or defaulted attributes. For classad.dtd,
there is at most one attribute per tag.
SAXException
- if something goes wrong.public void endElement(String uri, String localName, String name)
uri
- currenly not documented; appears always to be ''.localName
- The local name (without prefix), or the empty string if
Namespace processing is not being performed. Currently
ignored.name
- The qualified name (with prefix), or the empty string if
qualified names are not available.void printMessage(String msg)
msg
- the message to print.void setVerbosity(int level, PrintStream dest)
ClassAdParser
. No sanity checking is
done here.
level
- the new verbosity.dest
- the new error stream.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |