Class TLcdXMLTypeObjectFactoryProvider

java.lang.Object
com.luciad.format.xml.bind.schema.TLcdXMLTypeObjectFactoryProvider

public class TLcdXMLTypeObjectFactoryProvider extends Object
Provider of com.luciad.format.xml.bind.schema.ILcdXMLSchemaObjectFactory's that can create Java instances for XML types and datatypes.

This provider maintains two lookup tables:

  • a lookup table from each [XML Schema type, Java class] pair to its corresponding object factory
  • a lookup table from each [XML Schema simple type, Java class] pair to its corresponding object factory

Please refer to the com.luciad.format.xml.bind package documentation for a general overview of the XML Binding Framework.

Since:
9.0
See Also:
  • Method Details

    • registerTypeObjectFactory

      public <T> void registerTypeObjectFactory(TLcdXMLSchemaTypeIdentifier aTypeId, Class<T> aJavaClass, ILcdXMLObjectFactory<T> aSchemaObjectFactory)
      Registers an ILcdXMLSchemaObjectFactory which is capable of creating Java instances of the specified class for the specified XML Schema type.
      Parameters:
      aTypeId - the XML Schema Type for which to register the object factory.
      aJavaClass - the Java class of which instances will be created.
      aSchemaObjectFactory - the object factory to be registered.
      Throws:
      NullPointerException - if one of the arguments is null.
    • getTypeObjectFactory

      public <T> ILcdXMLObjectFactory<T> getTypeObjectFactory(TLcdXMLSchemaTypeIdentifier aTypeId, Class<T> aJavaClass)
      Returns an ILcdXMLObjectFactory that is capable of creating instances of the specified Java class for the specified XML Schema type.
      Parameters:
      aTypeId - the XML Schema type for which to register the factory.
      aJavaClass - the Java class of which the factory creates instances.
      Returns:
      a factory that is capable of creating XML elements instances of the specified Java class for the specified XML Schema type to, or null if no such factory was found.
      Throws:
      NullPointerException - if one of the arguments is null.
    • getTypeObjectFactory

      public <T> ILcdXMLObjectFactory<? extends T> getTypeObjectFactory(TLcdXMLSchemaTypeIdentifier aTypeId, Class<T> aJavaClass, boolean aAllowClassSubstitution)
    • getTypeClasses

      public Set<Class<?>> getTypeClasses(TLcdXMLSchemaTypeIdentifier aTypeId)
      Returns for the specified XSD Schema type identifier a set of all Java classes for which an object factory 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 an object factory is registered for the specified XSD Schema type.
    • getTypeIdentifiers

      public Set<TLcdXMLSchemaTypeIdentifier> getTypeIdentifiers(Class<?> aClass)
      Returns for the specified Java class a Set of all XSD Schema type identifiers for which an object factory 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 an object factory is registered for the specified Java class.
    • registerDatatypeObjectFactory

      public <T> void registerDatatypeObjectFactory(TLcdXMLSchemaTypeIdentifier aTypeId, Class<T> aJavaClass, ILcdXMLObjectFactory<T> aSchemaObjectFactory)
      Registers an ILcdXMLObjectFactory which is capable of creating Java instances assignable to the specified java class and corresponding to the specified XML Schema data type.
      Parameters:
      aTypeId - the XML Schema Type for which to register the factory.
      aJavaClass - the Java class to which the objects created by the factory will be assignable.
      aSchemaObjectFactory - the factory to be registered.
      Throws:
      NullPointerException - if one of the arguments is null.
    • getDatatypeObjectFactory

      public <T> ILcdXMLObjectFactory<T> getDatatypeObjectFactory(TLcdXMLSchemaTypeIdentifier aTypeId, Class<T> aJavaClass)
      Returns an ILcdXMLObjectFactory which is capable of creating Java instances assignable to the specified Java class and corresponding to the specified XML Schema type.
      Parameters:
      aTypeId - the XML Schema type for which to register the factory.
      aJavaClass - the Java class to which the objects created by the factory will be assignable.
      Returns:
      a factory that is capable of creating instances assignable to the specified Java class and representing the specified XML Schema type, or null if no such factory can be found.
      Throws:
      NullPointerException - if one of the arguments is null.
    • getDatatypeClasses

      public Set<Class<?>> getDatatypeClasses(TLcdXMLSchemaTypeIdentifier aTypeId)
      Returns for the specified XSD Schema type identifier a set of all Java classes for which an object factory 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 an object factory is registered for the specified XSD Schema type.
    • getDatatypeIdentifiers

      public Set<TLcdXMLSchemaTypeIdentifier> getDatatypeIdentifiers(Class<?> aClass)
      Returns for the specified Java class a Set of all XSD Schema type identifiers for which an object factory 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 an object factory is registered for the specified Java class.
    • toString

      public String toString()
      Returns a general description of this provider, containing a set of all [XML Schema type, Java class] pairs with their corresponding factories 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.

      Overrides:
      toString in class Object