Class FlatXmlUnmarshaller.HandlerImpl
java.lang.Object
org.xml.sax.helpers.DefaultHandler
net.officefloor.plugin.xml.unmarshall.flat.FlatXmlUnmarshaller.HandlerImpl
- All Implemented Interfaces:
ContentHandler,DTDHandler,EntityResolver,ErrorHandler
- Enclosing class:
- FlatXmlUnmarshaller
Handler to load XML values onto target object.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final charSeparator of the attribute and element name for loading.protected StringElement value.protected final FlatXmlUnmarshallerMetaDataMeta-data to load the target object.protected ObjectTarget object to load XML values on. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] ch, int start, int length) Handles obtain the value for the element.voidendElement(String uri, String localName, String qName) Handles loading the value onto the target value.voidsetTargetObject(Object targetObject) Sets the target object.voidstartElement(String uri, String localName, String qName, Attributes attributes) Handles loading the attribute value on the target value.Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warningMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.xml.sax.ContentHandler
declaration
-
Field Details
-
ATTRIBUTE_SEPARATOR
protected static final char ATTRIBUTE_SEPARATORSeparator of the attribute and element name for loading.- See Also:
-
metaData
Meta-data to load the target object. -
targetObject
Target object to load XML values on. -
elementValue
Element value.
-
-
Constructor Details
-
HandlerImpl
Initiate with meta-data.- Parameters:
metaData- Meta-data for unmarshalling the XML.
-
-
Method Details
-
setTargetObject
Sets the target object.- Parameters:
targetObject- Target object to have values loaded to it.
-
startElement
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException Handles loading the attribute value on the target value.- Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classDefaultHandler- Throws:
SAXException
-
characters
Handles obtain the value for the element.- Specified by:
charactersin interfaceContentHandler- Overrides:
charactersin classDefaultHandler- Throws:
SAXException
-
endElement
Handles loading the value onto the target value.- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classDefaultHandler- Throws:
SAXException
-