Class TLcdXMLTypedElementNameProvider

java.lang.Object
com.luciad.format.xml.schema.TLcdXMLTypedElementNameProvider
All Implemented Interfaces:
ILcdXMLElementNameProvider

public class TLcdXMLTypedElementNameProvider extends Object implements ILcdXMLElementNameProvider
Deprecated.
Use of the com.format.xml.schema API has been deprecated. Instead, use the com.format.xml.bind.schema API.
Default implementation of ILcdXMLElementNameProvider.

Element names need only be registered for types; the provider will automatically perform mappings from element stacks to types, as well as mappings from types to their supertypes, based on the XML schema information provided by a ILcdXMLSchemaProvider.

  • Constructor Details

    • TLcdXMLTypedElementNameProvider

      public TLcdXMLTypedElementNameProvider(ILcdXMLSchemaProvider aSchemaProvider)
      Deprecated.
      Creates a new, empty element name provider.
      Parameters:
      aSchemaProvider - the schema provider to be used by this provider. The schema provider will be used to look up the type and possible supertypes of an element.
  • Method Details

    • registerElementName

      public void registerElementName(Class aJavaClass, TLcdXMLName aElementName)
      Deprecated.
      Registers the given element name for the given Java type.
      Parameters:
      aJavaClass - the Java class for which the given element name is to be registered.
      aElementName - the element name to be registered.
      Throws:
      NullPointerException - if one of the arguments is null.
    • getElementNameForObject

      public TLcdXMLName getElementNameForObject(ILcdXMLNameStack aParentElementNameStack, ILcdXMLObjectStack aParentObjectStack, TLcdXMLName aSubstitutionGroup, Object aObject, TLcdXMLName aTypeName)
      Deprecated.
      Description copied from interface: ILcdXMLElementNameProvider
      Returns the TLcdXMLName that best matches the object, specified by the given name/object stack, substitution group and object.

      Note that in some cases, more than one name can be returned. E.g., the object for which to return a name can implement multiple interfaces, each having a corresponding XML element name. It is up to the implementation to decide which name is most suited for the current situation, taking into account the name and object stack, the available element names and the XML type and substitution group that are provided.

      Specified by:
      getElementNameForObject in interface ILcdXMLElementNameProvider
      Parameters:
      aParentElementNameStack - the XML name stack, containing all XML names from the root element up to the parent element name
      aParentObjectStack - the XML object stack, containing all XML objects from the root element up to the parent element
      aSubstitutionGroup - the substitution group the returned element should belong to, if there is one (null otherwise).
      aObject - the element for which to return a name.
      aTypeName - the name of the global type from which the type of the returned element name should inherit, or null if the element has an anonymous type.
      Returns:
      the element name that best matches the specified element.