com.openharbor.beck.unmarshal
Class XsiTypeUnmarshaller
java.lang.Object
com.openharbor.beck.unmarshal.DefaultUnmarshaller
com.openharbor.beck.unmarshal.JavaBeanUnmarshaller
com.openharbor.beck.unmarshal.XsiTypeUnmarshaller
- All Implemented Interfaces:
- MapFromXML.Aware, Unmarshaller
- public class XsiTypeUnmarshaller
- extends JavaBeanUnmarshaller
Maps an element to a Java class, using the element's xsi:type attribute
(as though it were an element name) to compute the class name.
xsi:type is often used to represent polymorphism in XML; that is,
a situation in which the XML type of an element is not strictly
a function of its element name. This unmarshaller attempts to
map such an element to Java polymorphism. It relies on the MapFromXML
(which usually delegates to a Namer) to map the xsi:type name to
a Java class name.
Method Summary |
void |
startObject(java.util.Map documentState,
Unmarshaller parent,
XMLThing source)
Begin mapping an object from an XML element or attribute. |
Methods inherited from class com.openharbor.beck.unmarshal.DefaultUnmarshaller |
addToParent, addValue, afterEndObject, disengage, disengaged, endElement, endObject, engage, getMap, getMapFromXML, getObject, getObjectClass, getParent, getSource, getSourceXPath, getXMLContext, getXName, getXPath, isEngaged, newObject, processAttributes, referToThis, reset, rethrow, setMapFromXML, setObject, setObjectClass, setParentAndSource, setXMLContext, toString, trim |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XSI_TYPE
public static final XMLName XSI_TYPE
XsiTypeUnmarshaller
public XsiTypeUnmarshaller()
startObject
public void startObject(java.util.Map documentState,
Unmarshaller parent,
XMLThing source)
throws java.lang.Exception
- Description copied from interface:
Unmarshaller
- Begin mapping an object from an XML element or attribute.
- Specified by:
startObject
in interface Unmarshaller
- Overrides:
startObject
in class DefaultUnmarshaller
- Throws:
java.lang.Exception