Class TLcdXMLMapping

java.lang.Object
com.luciad.format.xml.bind.TLcdXMLMapping

public class TLcdXMLMapping extends Object

Contains a set of object factories that can be used to create a Java instance representing an element from the XML document.

Please refer to this package's documentation and the com.luciad.format.xml.bind package documentation for a general overview of the XML Binding Framework.
Since:
9.0
  • Constructor Details

    • TLcdXMLMapping

      public TLcdXMLMapping()
      Creates a new, empty TLcdXMLMapping.
    • TLcdXMLMapping

      public TLcdXMLMapping(ILcdXMLMappingLibrary aLibrary)
      Creates a new TLcdXMLMapping and configures it with the specified mapping library.
      Parameters:
      aLibrary - the mapping library to configure the mapping with.
    • TLcdXMLMapping

      public TLcdXMLMapping(List<ILcdXMLMappingLibrary> aLibrary)
      Creates a new TLcdXMLMapping and configures it with the specified mapping libraries.
      Parameters:
      aLibrary - the mapping libraries with which the mapping is to be configured.
    • TLcdXMLMapping

      public TLcdXMLMapping(ILcdXMLMappingLibrary... aLibrary)
      Creates a new TLcdXMLMapping for the specified mapping libraries.
      Parameters:
      aLibrary - the mapping libraries with which the mapping is to be configured.
  • Method Details

    • createObject

      public <T> T createObject(QName aElementName, Class<T> aClass, ILcdXMLDocumentContext aDocumentContext)
      Creates a new object instance for the specified XML element name, of the specified class (or subclass).

      This method will retrieve the object factory for the specified [XML Schema type, Java class] pair and call the createObject() method of this factory.

      Type Parameters:
      T - the class the created object should be assignable to.
      Parameters:
      aElementName - the XML element name for which to create an object.
      aClass - the Java class the created object should be assignable to.
      aDocumentContext - the document context providing additional information about the document in which the object will be included.
      Returns:
      a new object instance for the specified XML Schema type and Java class.
    • getObjectFactoryProvider

      public TLcdXMLObjectFactoryProvider getObjectFactoryProvider()
      Returns the object factory provider of this mapping.
      Returns:
      the object factory provider of this mapping.
    • getJavaClassResolver

      public TLcdXMLJavaClassResolver getJavaClassResolver()
      Returns the TLcdXMLJavaClassResolver used by this mapping. See TLcdXMLJavaClassResolver for more information.
      Returns:
      the TLcdXMLJavaClassResolver used by this mapping.
    • getProperty

      public Object getProperty(String aName)
      Returns the custom property with the specified name.
      Parameters:
      aName - the name of the custom property to be returned.
      Returns:
      the custom property registered with the specified name.
    • setProperty

      public void setProperty(String aName, Object aValue)
      Sets the specified custom property on this, to be shared among users of this mapping.
      Parameters:
      aName - the name of the custom property to be set.
      aValue - the property to be set.
    • getNamespaceURIs

      public Set<String> getNamespaceURIs()
      Returns the set of namespaces which are supported by this mapping.
      Returns:
      the set of namespaces which are supported by this mapping.
    • registerNamespaceURI

      public void registerNamespaceURI(String aNamespaceURI)
      Registers the specified namespace on this mapping. Namespaces should be registered to indicate that they are supported by this mapping.
      Parameters:
      aNamespaceURI - the namespace for which object factories and additional information are registered on this mapping.