|
Joda System API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.xml.sax.helpers.DefaultHandler | +--org.joda.property.xml.SAXHandler
SAXHandler is the event handler class for SAX events. It can be used either with or without SAXBuilder.
The handler is used by creating a new instance and passing it to the SAX event source. After the events have been sent, the getBean() method can be used to get the created bean.
Constructor Summary | |
SAXHandler()
Create a new SAX event handler. |
|
SAXHandler(java.lang.Class rootClass)
Create a new SAX event handler. |
|
SAXHandler(java.lang.Class rootClass,
JodaFactory factory)
Create a new SAX event handler. |
Method Summary | |
void |
characters(char[] text,
int startIndex,
int length)
Handle the SAX event of text found within an element. |
void |
endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
Handle the SAX event of an element end tag. |
Bean |
getBean()
Get the Bean read in, typically used once parsing is complete. |
protected java.lang.String |
getID(XMLData data)
Get the id |
protected java.lang.String |
getIDREF(XMLData data)
Get the idref |
protected java.lang.String |
getMapKey(XMLData data)
Get the key into the map |
XMLMetaData |
getMetaData()
Gets the metadata for XML output. |
protected boolean |
getNull(XMLData data)
Get the null flag |
protected java.lang.Class |
getType(XMLData data)
Get the type of the bean |
void |
setMetaData(XMLMetaData metaData)
Sets the metaData for XML output. |
void |
startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
Handle the SAX event of an element start tag. |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, 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 SAXHandler() throws java.io.IOException
public SAXHandler(java.lang.Class rootClass) throws java.io.IOException
public SAXHandler(java.lang.Class rootClass, JodaFactory factory)
Method Detail |
public Bean getBean()
public XMLMetaData getMetaData()
public void setMetaData(XMLMetaData metaData)
metaData
- the metaData to usepublic void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts) throws org.xml.sax.SAXException
The data provided includes all the attributes, except those 'belonging to' XML.
startElement
in interface org.xml.sax.ContentHandler
startElement
in class org.xml.sax.helpers.DefaultHandler
namespaceURI
- namespace URI of the element, not supportedlocalName
- the unprefixed name of the elementqName
- the qualified name of the element, with the prefixatts
- SAX format attribute list
org.xml.sax.SAXException
- when an error occurspublic void characters(char[] text, int startIndex, int length) throws org.xml.sax.SAXException
characters
in interface org.xml.sax.ContentHandler
characters
in class org.xml.sax.helpers.DefaultHandler
text
- the text foundstartIndex
- start index in the text array of the textlength
- length of the text
org.xml.sax.SAXException
- when an error occurspublic void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException
endElement
in interface org.xml.sax.ContentHandler
endElement
in class org.xml.sax.helpers.DefaultHandler
namespaceURI
- namespace URI of the element, not supportedlocalName
- the unprefixed name of the elementqName
- the qualified name of the element, with the prefix
org.xml.sax.SAXException
- when an error occursprotected java.lang.Class getType(XMLData data) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected boolean getNull(XMLData data) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected java.lang.String getID(XMLData data) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected java.lang.String getIDREF(XMLData data) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected java.lang.String getMapKey(XMLData data) throws org.xml.sax.SAXException
org.xml.sax.SAXException
|
Joda System API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |