Package com.luciad.format.xml.bind
Class TLcdXMLMapping
java.lang.Object
com.luciad.format.xml.bind.TLcdXMLMapping
Contains a set of object factories that can be used to create a Java instance representing an element from the XML document.
Please refer tothis 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 Summary
ConstructorsConstructorDescriptionCreates a new, emptyTLcdXMLMapping.TLcdXMLMapping(ILcdXMLMappingLibrary aLibrary) Creates a newTLcdXMLMappingand configures it with the specified mapping library.TLcdXMLMapping(ILcdXMLMappingLibrary... aLibrary) Creates a newTLcdXMLMappingfor the specified mapping libraries.TLcdXMLMapping(List<ILcdXMLMappingLibrary> aLibrary) Creates a newTLcdXMLMappingand configures it with the specified mapping libraries. -
Method Summary
Modifier and TypeMethodDescription<T> TcreateObject(QName aElementName, Class<T> aClass, ILcdXMLDocumentContext aDocumentContext) Creates a new object instance for the specified XML element name, of the specified class (or subclass).Returns theTLcdXMLJavaClassResolverused by this mapping.Returns the set of namespaces which are supported by this mapping.Returns the object factory provider of this mapping.getProperty(String aName) Returns the custom property with the specified name.voidregisterNamespaceURI(String aNamespaceURI) Registers the specified namespace on this mapping.voidsetProperty(String aName, Object aValue) Sets the specified custom property on this, to be shared among users of this mapping.
-
Constructor Details
-
TLcdXMLMapping
public TLcdXMLMapping()Creates a new, emptyTLcdXMLMapping. -
TLcdXMLMapping
Creates a newTLcdXMLMappingand configures it with the specified mapping library.- Parameters:
aLibrary- the mapping library to configure the mapping with.
-
TLcdXMLMapping
Creates a newTLcdXMLMappingand configures it with the specified mapping libraries.- Parameters:
aLibrary- the mapping libraries with which the mapping is to be configured.
-
TLcdXMLMapping
Creates a newTLcdXMLMappingfor 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 thecreateObject()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
Returns the object factory provider of this mapping.- Returns:
- the object factory provider of this mapping.
-
getJavaClassResolver
Returns theTLcdXMLJavaClassResolverused by this mapping. SeeTLcdXMLJavaClassResolverfor more information.- Returns:
- the
TLcdXMLJavaClassResolverused by this mapping.
-
getProperty
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
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
Returns the set of namespaces which are supported by this mapping.- Returns:
- the set of namespaces which are supported by this mapping.
-
registerNamespaceURI
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.
-