Class TLcdXMLSchemaBasedUnmarshallerProvider

java.lang.Object
com.luciad.format.xml.bind.TLcdXMLUnmarshallerProvider
com.luciad.format.xml.bind.schema.TLcdXMLSchemaBasedUnmarshallerProvider

public class TLcdXMLSchemaBasedUnmarshallerProvider extends TLcdXMLUnmarshallerProvider
Extended TLcdXMLUnmarshallerProvider that also allows unmarshallers to be registered and retrieved for local elements.
  • Constructor Details

    • TLcdXMLSchemaBasedUnmarshallerProvider

      public TLcdXMLSchemaBasedUnmarshallerProvider(TLcdXMLSchemaBasedDecoder aDecoder)
      Creates a new instance for the given decoder.
      Parameters:
      aDecoder - the decoder for which to create a new instance
  • Method Details

    • getUnmarshaller

      public <T> ILcdXMLUnmarshaller<? extends T> getUnmarshaller(TLcdXMLSchemaElementIdentifier aElementId, Class<T> aClass)
      Gets an unmarshaller for the given element and class. This method is typically used for elements for which no substitution is possible. If no unmarshaller is registered for the given element and class, returns an adapter around the corresponding type unmarshaller.
      Parameters:
      aElementId - the identifier of the element that the unmarshaller should be able to unmarshal
      aClass - the class of which instances should be returned by the unmarshaller
      Returns:
      an unmarshaller for the given element and class
    • registerUnmarshaller

      public <T> void registerUnmarshaller(TLcdXMLSchemaElementIdentifier aElementId, Class<T> aJavaClass, ILcdXMLUnmarshaller<? extends T> aMarshaller)
      Registers the unmarshaller for the given element and java class.
      Parameters:
      aElementId - the identifier of the element for which the unmarshaller is to be registered
      aJavaClass - the class of which instances are unmarshalled
      aMarshaller - the unmarshaller for the given element identifier and class
    • getUnmarshaller

      public <T> ILcdXMLUnmarshaller<? extends T> getUnmarshaller(QName aXMLGlobalElementName, Class<T> aJavaClass)
      Description copied from class: TLcdXMLUnmarshallerProvider
      Returns an unmarshaller which is capable of unmarshalling the specified XML element into an instance of a Java class which is assignable to a field of the specified Java class.
      Overrides:
      getUnmarshaller in class TLcdXMLUnmarshallerProvider
      Parameters:
      aXMLGlobalElementName - the XML element which can be unmarshalled by the unmarshaller to be returned.
      aJavaClass - the Java class of the field to which the unmarshalled Java object should be assignable.
      Returns:
      an unmarshaller for unmarshalling the specified XML element to an instance of the specified Java class, or null if no such unmarshaller was found.