Class TreeXmlUnmarshaller.HandlerImpl
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- net.officefloor.plugin.xml.unmarshall.tree.TreeXmlUnmarshaller.HandlerImpl
-
- All Implemented Interfaces:
org.xml.sax.ContentHandler,org.xml.sax.DTDHandler,org.xml.sax.EntityResolver,org.xml.sax.ErrorHandler
- Enclosing class:
- TreeXmlUnmarshaller
public static class TreeXmlUnmarshaller.HandlerImpl extends org.xml.sax.helpers.DefaultHandlerHandler to load XML values onto target object.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringelementValueElement value.protected XmlStatestateState of the XML unmarshalling.
-
Constructor Summary
Constructors Constructor Description HandlerImpl(XmlState state)Initiate with state of XML unmarshalling.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcharacters(char[] ch, int start, int length)Handles obtain the value for the element.voidendElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)Handles loading the value onto the target value.voidsetTargetObject(java.lang.Object targetObject)Sets the target object.voidstartElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes)Handles loading the attribute value on the target value.
-
-
-
Field Detail
-
state
protected final XmlState state
State of the XML unmarshalling.
-
elementValue
protected java.lang.String elementValue
Element value.
-
-
Constructor Detail
-
HandlerImpl
public HandlerImpl(XmlState state)
Initiate with state of XML unmarshalling.- Parameters:
state- State of XML unmarshalling.
-
-
Method Detail
-
setTargetObject
public void setTargetObject(java.lang.Object targetObject)
Sets the target object.- Parameters:
targetObject- Target object to have values loaded to it.
-
startElement
public void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes) throws org.xml.sax.SAXExceptionHandles loading the attribute value on the target value.- Specified by:
startElementin interfaceorg.xml.sax.ContentHandler- Overrides:
startElementin classorg.xml.sax.helpers.DefaultHandler- Throws:
org.xml.sax.SAXException
-
characters
public void characters(char[] ch, int start, int length) throws org.xml.sax.SAXExceptionHandles obtain the value for the element.- Specified by:
charactersin interfaceorg.xml.sax.ContentHandler- Overrides:
charactersin classorg.xml.sax.helpers.DefaultHandler- Throws:
org.xml.sax.SAXException
-
endElement
public void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXExceptionHandles loading the value onto the target value.- Specified by:
endElementin interfaceorg.xml.sax.ContentHandler- Overrides:
endElementin classorg.xml.sax.helpers.DefaultHandler- Throws:
org.xml.sax.SAXException
-
-