Class XsiTypeUnmarshaller

  extended bycom.openharbor.beck.unmarshal.DefaultUnmarshaller
      extended bycom.openharbor.beck.unmarshal.JavaBeanUnmarshaller
          extended bycom.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.

Field Summary
static XMLName XSI_TYPE
Fields inherited from class com.openharbor.beck.unmarshal.JavaBeanUnmarshaller
Fields inherited from class com.openharbor.beck.unmarshal.DefaultUnmarshaller
data, documentState, log
Constructor Summary
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.JavaBeanUnmarshaller
addChild, getChildClass, getSetter, setValue, startElement
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

Field Detail


public static final XMLName XSI_TYPE
Constructor Detail


public XsiTypeUnmarshaller()
Method Detail


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
startObject in class DefaultUnmarshaller