public class TLcdXMLTypeMarshallerProvider extends Object
ILcdXMLTypeMarshaller
's and ILcdXMLSchemaDatatypeMarshaller
's
that can marshal instances of a specified Java class to instances of an XML element with a
specified XML Schema type or datatype.
This provider maintains two lookup tables:
com.luciad.format.xml.bind package
documentation
for a general overview of the XML Binding Framework.ILcdXMLTypeMarshaller
,
ILcdXMLDatatypeMarshaller
,
ILcdXMLMarshaller
,
TLcdXMLSchemaBasedEncoder
Modifier and Type | Method and Description |
---|---|
Set<Class<?>> |
getDatatypeClasses(TLcdXMLSchemaTypeIdentifier aTypeId)
Returns for the specified XSD Schema datatype identifier a set of all Java classes for which a
schema type marshaller is registered.
|
Set<TLcdXMLSchemaTypeIdentifier> |
getDatatypeIdentifiers(Class<?> aClass)
Returns for the specified Java class a Set of all XSD Schema datatype identifiers for which a
schema type marshaller is registered.
|
<T> ILcdXMLDatatypeMarshaller<? super T> |
getDatatypeMarshaller(TLcdXMLSchemaTypeIdentifier aTypeId,
Class<T> aJavaClass)
Returns the datatype formatter which is capable of formatting instances of the specified Java
class to lexical representations of the corresponding XML value of the specified XML datatype.
|
Set<Class<?>> |
getTypeClasses(TLcdXMLSchemaTypeIdentifier aTypeId)
Returns for the specified XSD Schema type identifier a set of all Java classes for which a
schema type marshaller is registered.
|
Set<TLcdXMLSchemaTypeIdentifier> |
getTypeIdentifiers(Class<?> aClass)
Returns for the specified Java class a set of all XSD Schema type identifiers for which a
schema type marshaller is registered.
|
<T> ILcdXMLTypeMarshaller<? super T> |
getTypeMarshaller(TLcdXMLSchemaTypeIdentifier aTypeId,
Class<T> aJavaClass)
Returns the marshaller which is capable of marshalling instances of the specified Java class to
instances of an XML element of the specified XML Schema type.
|
<T> ILcdXMLTypeMarshaller<? super T> |
getTypeMarshaller(TLcdXMLSchemaTypeIdentifier aTypeId,
Class<T> aJavaClass,
boolean aAllowClassSubstitution)
Returns the marshaller which is capable of marshalling instances of the specified Java class to
instances of an XML element of the specified XML Schema type.
|
<T> void |
registerDatatypeMarshaller(TLcdXMLSchemaTypeIdentifier aTypeId,
Class<? extends T> aJavaClass,
ILcdXMLDatatypeMarshaller<T> aMarshaller)
Registers an
ILcdXMLDatatypeFormatter which is capable of formatting instances of the
specified Java class to lexical representations of the corresponding XML value of the specified
XML datatype. |
<T> void |
registerTypeMarshaller(TLcdXMLSchemaTypeIdentifier aTypeId,
Class<? extends T> aJavaClass,
ILcdXMLTypeMarshaller<T> aMarshaller)
Registers an
ILcdXMLTypeMarshaller which is capable of marshalling instances of a specified
Java class to instances of an XML element of the specified XML Schema type. |
String |
toString()
Returns a general description of this provider, containing a list of all [XML Schema type, Java
class] pairs with their corresponding marshaller and all [XML Schema simple type, Java class]
pairs with their corresponding datatype formatter.
|
public <T> void registerTypeMarshaller(TLcdXMLSchemaTypeIdentifier aTypeId, Class<? extends T> aJavaClass, ILcdXMLTypeMarshaller<T> aMarshaller)
ILcdXMLTypeMarshaller
which is capable of marshalling instances of a specified
Java class to instances of an XML element of the specified XML Schema type.aTypeId
- the XML Schema Type for which to register the marshaller.aJavaClass
- the Java class which instances the specified marshaller can marshal.aMarshaller
- the marshaller to be registered.NullPointerException
- if one of the arguments is null
.public <T> ILcdXMLTypeMarshaller<? super T> getTypeMarshaller(TLcdXMLSchemaTypeIdentifier aTypeId, Class<T> aJavaClass)
aTypeId
- the XML Schema type for which to register the marshaller.aJavaClass
- the Java class which instances the marshaller should marshal.null
if no
such marshaller was found.NullPointerException
- if one of the arguments is null
.public <T> ILcdXMLTypeMarshaller<? super T> getTypeMarshaller(TLcdXMLSchemaTypeIdentifier aTypeId, Class<T> aJavaClass, boolean aAllowClassSubstitution)
aTypeId
- the XML Schema type for which to register the marshaller.aJavaClass
- the Java class which instances the marshaller should marshal.aAllowClassSubstitution
- if true
, this marshaller provider will also search for marshallers
for super classes and/or interfaces of the specified Java class, if
no marshaller could be found for the specified class itself. The
TLcdXMLJavaClassResolver
of this provider is used to determine
for which super classes and/or interfaces to search, and in which order.null
if no
such marshaller was found.NullPointerException
- if one of the arguments is null
.public <T> void registerDatatypeMarshaller(TLcdXMLSchemaTypeIdentifier aTypeId, Class<? extends T> aJavaClass, ILcdXMLDatatypeMarshaller<T> aMarshaller)
ILcdXMLDatatypeFormatter
which is capable of formatting instances of the
specified Java class to lexical representations of the corresponding XML value of the specified
XML datatype.aTypeId
- the XML Schema simple type for which to register the formatter.aJavaClass
- the Java class which instances the specified formatter can format.aMarshaller
- the formatter to be registered.NullPointerException
- if one of the arguments is null
.public <T> ILcdXMLDatatypeMarshaller<? super T> getDatatypeMarshaller(TLcdXMLSchemaTypeIdentifier aTypeId, Class<T> aJavaClass)
aTypeId
- the XML Schema simple type of the returned marshalleraJavaClass
- the Java class which instances the returned marshaller can marshalnull
if no such marshaller was found.NullPointerException
- if one of the arguments is null
.public Set<Class<?>> getTypeClasses(TLcdXMLSchemaTypeIdentifier aTypeId)
aTypeId
- the XSD Schema type identifier for which to return the corresponding Java
classes.public Set<Class<?>> getDatatypeClasses(TLcdXMLSchemaTypeIdentifier aTypeId)
aTypeId
- the XSD Schema datatype identifier for which to return the corresponding Java
classes.public Set<TLcdXMLSchemaTypeIdentifier> getTypeIdentifiers(Class<?> aClass)
aClass
- the XSD Schema type identifier for which to return the corresponding Java
classes.public Set<TLcdXMLSchemaTypeIdentifier> getDatatypeIdentifiers(Class<?> aClass)
aClass
- the XSD Schema datatype identifier for which to return the corresponding Java
classes.public String toString()