com.openharbor.beck.unmarshal
Class XsiTypeUnmarshaller

java.lang.Object
  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
STRING_PARAMETER
 
Fields inherited from class com.openharbor.beck.unmarshal.DefaultUnmarshaller
data, documentState, log
 
Constructor Summary
XsiTypeUnmarshaller()
           
 
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

XSI_TYPE

public static final XMLName XSI_TYPE
Constructor Detail

XsiTypeUnmarshaller

public XsiTypeUnmarshaller()
Method Detail

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