public class TLcdXMLTypeUnmarshallerProvider extends Object
ILcdXMLTypeUnmarshaller
's and ILcdXMLSchemaDatatypeUnmarshaller
's
that can unmarshal a specified XML Schema type or datatype to instances of a specified Java
class.
This provider maintains two lookup tables: com.luciad.format.xml.bind package
documentation
for a general overview of the XML Binding Framework.ILcdXMLTypeUnmarshaller
,
ILcdXMLDatatypeUnmarshaller
,
ILcdXMLUnmarshaller
,
TLcdXMLSchemaBasedDecoder
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 unmarshaller 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 unmarshaller is registered.
|
<T> ILcdXMLDatatypeUnmarshaller<? extends T> |
getDatatypeUnmarshaller(TLcdXMLSchemaTypeIdentifier aTypeId,
Class<T> aJavaClass)
Returns the datatype parser which is capable of parsing XML elements of the specified XML
Schema simple type to instances of the specified Java class.
|
Set<Class<?>> |
getTypeClasses(TLcdXMLSchemaTypeIdentifier aTypeId)
Returns for the specified XSD Schema type identifier a set of all Java classes for which a
schema type unmarshaller 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 unmarshaller is registered.
|
<T> ILcdXMLTypeUnmarshaller<T> |
getTypeUnmarshaller(TLcdXMLSchemaTypeIdentifier aTypeId,
Class<T> aJavaClass)
Returns the unmarshaller which is capable of unmarshalling XML elements of the specified XML
Schema type to instances of the specified Java class.
|
<T> ILcdXMLTypeUnmarshaller<? super T> |
getTypeUnmarshaller(TLcdXMLSchemaTypeIdentifier aTypeId,
Class<T> aJavaClass,
boolean aAllowClassSubstitution)
Returns the unmarshaller which is capable of unmarshalling XML elements of the specified XML
Schema type to instances of the specified Java class.
|
<T> void |
registerDatatypeUnmarshaller(TLcdXMLSchemaTypeIdentifier aTypeId,
Class<T> aJavaClass,
ILcdXMLDatatypeUnmarshaller<? extends T> aDatatypeUnmarshaller)
Registers an
ILcdXMLSchemaDatatypeUnmarshaller which is capable of parsing XML elements
of the specified XML Schema simple type to instances of the specified Java class. |
<T> void |
registerTypeUnmarshaller(TLcdXMLSchemaTypeIdentifier aTypeId,
Class<T> aJavaClass,
ILcdXMLTypeUnmarshaller<T> aUnmarshaller)
Registers an
ILcdXMLUnmarshaller which is capable of unmarshalling XML elements of the
specified XML Schema type to instances of the specified Java class. |
String |
toString()
Returns a general description of this provider, containing a set of all [XML Schema type, Java
class] pairs with their corresponding unmarshaller and all [XML Schema simple type, Java class]
pairs with their corresponding datatype parser.
|
public <T> void registerTypeUnmarshaller(TLcdXMLSchemaTypeIdentifier aTypeId, Class<T> aJavaClass, ILcdXMLTypeUnmarshaller<T> aUnmarshaller)
ILcdXMLUnmarshaller
which is capable of unmarshalling XML elements of the
specified XML Schema type to instances of the specified Java class.aTypeId
- the XML Schema Type for which to register the unmarshaller.aJavaClass
- the Java class to which XML elements will be unmarshalled.aUnmarshaller
- the unmarshaller to be registered.NullPointerException
- if one of the arguments is null
.public <T> ILcdXMLTypeUnmarshaller<T> getTypeUnmarshaller(TLcdXMLSchemaTypeIdentifier aTypeId, Class<T> aJavaClass)
aTypeId
- the XML Schema type for which to register the unmarshaller.aJavaClass
- the Java class to which XML elements will be unmarshalled.null
if no such
unmarshaller was found.NullPointerException
- if one of the arguments is null
.public <T> ILcdXMLTypeUnmarshaller<? super T> getTypeUnmarshaller(TLcdXMLSchemaTypeIdentifier aTypeId, Class<T> aJavaClass, boolean aAllowClassSubstitution)
aTypeId
- the XML Schema type for which to register the unmarshaller.aJavaClass
- the Java class to which XML elements will be unmarshalled.aAllowClassSubstitution
- if true
, this unmarshaller provider will also search for unmarshallers
for super classes and/or interfaces of the specified Java class, if
no unmarshaller 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
unmarshaller was found.NullPointerException
- if one of the arguments is null
.public <T> void registerDatatypeUnmarshaller(TLcdXMLSchemaTypeIdentifier aTypeId, Class<T> aJavaClass, ILcdXMLDatatypeUnmarshaller<? extends T> aDatatypeUnmarshaller)
ILcdXMLSchemaDatatypeUnmarshaller
which is capable of parsing XML elements
of the specified XML Schema simple type to instances of the specified Java class.aTypeId
- the XML Schema simple type for which to register the parser.aJavaClass
- the Java class to which XML elements will be parsed.aDatatypeUnmarshaller
- the parser to be registered.NullPointerException
- if one of the arguments is null
.public <T> ILcdXMLDatatypeUnmarshaller<? extends T> getDatatypeUnmarshaller(TLcdXMLSchemaTypeIdentifier aTypeId, Class<T> aJavaClass)
aTypeId
- the XML Schema simple type for which to register the datatype parser.aJavaClass
- the Java class to which XML elements will be parser.null
if no such
parser 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()