Class TLcdXMLUnmarshallerAdapter<T>
java.lang.Object
com.luciad.format.xml.bind.schema.TLcdXMLUnmarshallerAdapter<T>
- Type Parameters:
T- The Java class handled by theILcdXMLTypeUnmarshallerto be wrapped.
- All Implemented Interfaces:
ILcdXMLUnmarshaller<T>
A wrapper class for
ILcdXMLTypeUnmarshaller that converts it into an
ILcdXMLUnmarshaller. The unmarshal() method of this adapter will first search for
a suitable object factory in the decoder, create an object using this object factory, and then
delegate further unmarshalling to the wrapped type marshaller.- Since:
- 9.0
-
Constructor Summary
ConstructorsConstructorDescriptionTLcdXMLUnmarshallerAdapter(ILcdXMLTypeUnmarshaller<T> aTypeUnmarshaller, TLcdXMLSchemaElement aSchemaElement, TLcdXMLSchemaTypeIdentifier aSchemaTypeIdentifier, Class<T> aClass, TLcdXMLSchemaBasedDecoder aDecoder) Creates a newTLcdXMLUnmarshallerAdapterfor the specifiedILcdXMLTypeUnmarshaller.TLcdXMLUnmarshallerAdapter(ILcdXMLTypeUnmarshaller<T> aTypeUnmarshaller, TLcdXMLSchemaElement aSchemaElement, Class<T> aClass, TLcdXMLSchemaBasedDecoder aDecoder) Creates a newTLcdXMLUnmarshallerAdapterfor the specifiedILcdXMLTypeUnmarshaller. -
Method Summary
Modifier and TypeMethodDescriptiontoString()unmarshal(XMLStreamReader aReader, ILcdXMLDocumentContext aContext) Unmarshals (deserializes) the XML element at the current cursor position of the specifiedXMLStreamReaderand returns the resulting Java object graph.
-
Constructor Details
-
TLcdXMLUnmarshallerAdapter
public TLcdXMLUnmarshallerAdapter(ILcdXMLTypeUnmarshaller<T> aTypeUnmarshaller, TLcdXMLSchemaElement aSchemaElement, Class<T> aClass, TLcdXMLSchemaBasedDecoder aDecoder) Creates a newTLcdXMLUnmarshallerAdapterfor the specifiedILcdXMLTypeUnmarshaller.- Parameters:
aTypeUnmarshaller- the type unmarshaller to be wrapped.aSchemaElement- the XML Schema element for which this adapter will be registered.aClass- the Java class to which the specified type unmarshaller will unmarshal.aDecoder- the decoder onto which this adapter will be registered.
-
TLcdXMLUnmarshallerAdapter
public TLcdXMLUnmarshallerAdapter(ILcdXMLTypeUnmarshaller<T> aTypeUnmarshaller, TLcdXMLSchemaElement aSchemaElement, TLcdXMLSchemaTypeIdentifier aSchemaTypeIdentifier, Class<T> aClass, TLcdXMLSchemaBasedDecoder aDecoder) Creates a newTLcdXMLUnmarshallerAdapterfor the specifiedILcdXMLTypeUnmarshaller.- Parameters:
aTypeUnmarshaller- the type unmarshaller to be wrapped.aSchemaElement- the XML Schema element for which this adapter will be registered.aSchemaTypeIdentifier- the schema identifier passed to the object factoryaClass- the Java class to which the specified type unmarshaller will unmarshal.aDecoder- the decoder onto which this adapter will be registered.
-
-
Method Details
-
toString
-
unmarshal
public T unmarshal(XMLStreamReader aReader, ILcdXMLDocumentContext aContext) throws XMLStreamException Description copied from interface:ILcdXMLUnmarshallerUnmarshals (deserializes) the XML element at the current cursor position of the specifiedXMLStreamReaderand returns the resulting Java object graph. At the moment this method is called, the cursor should be positioned at the start tag of the element to be unmarshalled. When this method returns, the cursor should be left at the end tag of the element which was unmarshalled.- Specified by:
unmarshalin interfaceILcdXMLUnmarshaller<T>- Parameters:
aReader- the StAX reader to unmarshal XML data from.aContext- aILcdXMLDocumentContextwhich can be used to store and retrieve information which is shared between multiple unmarshallers. This context is unique per unmarshalled XML document.- Returns:
- the newly created Java object graph representing the XML element that was unmarshalled.
- Throws:
XMLStreamException- if any unexpected content occurs within the XML element to be unmarshalled.
-