Class TLcdXMLTypeUnmarshallerProvider
java.lang.Object
com.luciad.format.xml.bind.schema.TLcdXMLTypeUnmarshallerProvider
Provider of
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: - a lookup table from each [XML Schema type, Java class] pair to its corresponding type unmarshaller
- a lookup table from each [XML Schema simple type, Java class] pair to its corresponding datatype unmarshaller
com.luciad.format.xml.bind package
documentation
for a general overview of the XML Binding Framework.- Since:
- 9.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns for the specified XSD Schema datatype identifier a set of all Java classes for which a schema type unmarshaller is registered.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.Returns for the specified XSD Schema type identifier a set of all Java classes for which a schema type unmarshaller is registered.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 anILcdXMLSchemaDatatypeUnmarshaller
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 anILcdXMLUnmarshaller
which is capable of unmarshalling XML elements of the specified XML Schema type to instances of the specified Java class.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.
-
Method Details
-
registerTypeUnmarshaller
public <T> void registerTypeUnmarshaller(TLcdXMLSchemaTypeIdentifier aTypeId, Class<T> aJavaClass, ILcdXMLTypeUnmarshaller<T> aUnmarshaller) Registers anILcdXMLUnmarshaller
which is capable of unmarshalling XML elements of the specified XML Schema type to instances of the specified Java class.- Parameters:
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.- Throws:
NullPointerException
- if one of the arguments isnull
.
-
getTypeUnmarshaller
public <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.- Parameters:
aTypeId
- the XML Schema type for which to register the unmarshaller.aJavaClass
- the Java class to which XML elements will be unmarshalled.- Returns:
- the unmarshaller which is capable of unmarshalling XML elements of the specified XML
Schema type to instances of the specified Java class, or
null
if no such unmarshaller was found. - Throws:
NullPointerException
- if one of the arguments isnull
.
-
getTypeUnmarshaller
public <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.- Parameters:
aTypeId
- the XML Schema type for which to register the unmarshaller.aJavaClass
- the Java class to which XML elements will be unmarshalled.aAllowClassSubstitution
- iftrue
, 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. TheTLcdXMLJavaClassResolver
of this provider is used to determine for which super classes and/or interfaces to search, and in which order.- Returns:
- the unmarshaller which is capable of unmarshalling XML elements of the specified XML
Schema type to instances of the specified Java class, or
null
if no such unmarshaller was found. - Throws:
NullPointerException
- if one of the arguments isnull
.
-
registerDatatypeUnmarshaller
public <T> void registerDatatypeUnmarshaller(TLcdXMLSchemaTypeIdentifier aTypeId, Class<T> aJavaClass, ILcdXMLDatatypeUnmarshaller<? extends T> aDatatypeUnmarshaller) Registers anILcdXMLSchemaDatatypeUnmarshaller
which is capable of parsing XML elements of the specified XML Schema simple type to instances of the specified Java class.- Parameters:
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.- Throws:
NullPointerException
- if one of the arguments isnull
.
-
getDatatypeUnmarshaller
public <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.- Parameters:
aTypeId
- the XML Schema simple type for which to register the datatype parser.aJavaClass
- the Java class to which XML elements will be parser.- 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, or
null
if no such parser was found. - Throws:
NullPointerException
- if one of the arguments isnull
.
-
getTypeClasses
Returns for the specified XSD Schema type identifier a set of all Java classes for which a schema type unmarshaller is registered.- Parameters:
aTypeId
- the XSD Schema type identifier for which to return the corresponding Java classes.- Returns:
- a set of all Java classes for which a schema type unmarshaller is registered for the specified XSD Schema type.
-
getDatatypeClasses
Returns for the specified XSD Schema datatype identifier a set of all Java classes for which a schema type unmarshaller is registered.- Parameters:
aTypeId
- the XSD Schema datatype identifier for which to return the corresponding Java classes.- Returns:
- a set of all Java classes for which a schema type unmarshaller is registered for the specified XSD Schema datatype.
-
getTypeIdentifiers
Returns for the specified Java class a Set of all XSD Schema type identifiers for which a schema type unmarshaller is registered.- Parameters:
aClass
- the XSD Schema type identifier for which to return the corresponding Java classes.- Returns:
- a set of all XSD Schema type identifiers for which a schema type unmarshaller is registered for the specified Java class.
-
getDatatypeIdentifiers
Returns for the specified Java class a Set of all XSD Schema datatype identifiers for which a schema type unmarshaller is registered.- Parameters:
aClass
- the XSD Schema datatype identifier for which to return the corresponding Java classes.- Returns:
- a set of all XSD Schema type identifiers for which a schema datatype unmarshaller is registered for the specified Java class.
-
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. The exact details of the representation are unspecified and are subject to change.
-