Class TLcdGML3ElementNameProvider

java.lang.Object
com.luciad.format.gml3.name.TLcdGML3ElementNameProvider
All Implemented Interfaces:
ILcdXMLElementNameProvider

public class TLcdGML3ElementNameProvider extends Object
Deprecated.
This class has been deprecated. The GML decoders and encoders in the com.luciad.format.gml3.* packages are replaced by new decoders and encoders in the packages com.luciad.format.gml2.xml, com.luciad.format.gml31.xml and com.luciad.format.gml32.xml.
An ILcdXMLElementNameProvider that contains a list of default XML element names for GML objects. It also offers support for ILcdFeatured classes: it shall create new XML names for ILcdFeatured properties, and dynamically update the according schemas. Element names are chosen using the following criteria:
  • If the object implements the ILcdXMLElement interface, and the ILcdXMLElement's name is in the given substutition group (or the substituion group is null) this name is returned.
  • If it is a root element (the object stack's size is 1), the gml:FeatureCollection element is returned.
  • If the substitution group is null or the substituion group is gml:_Feature, and the object or its parent is ILcdFeatured, a name is generated, based on the corresponding ILcdFeaturedDescriptor.
  • If the substitution group is gml:_Feature, and the object is not ILcdFeatured, a default name is returned.
  • Otherwise, the substitution group is returned.
  • Constructor Details

    • TLcdGML3ElementNameProvider

      public TLcdGML3ElementNameProvider(ILcdXMLEditableSchemaProvider aSchemaProvider)
      Deprecated.
      Creates a new TLcdGML3ElementNameProvider, using the given schema provider.
      Parameters:
      aSchemaProvider - the schema provider from which to adapt the schemas if new XML element names are generated for ILcdFeatured objects.
  • Method Details

    • 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.

      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.
    • getSchemaType

      public TLcdXMLName getSchemaType(Class aClass)
      Deprecated.
      Returns the name of the global XML Schema type onto which the specified Java class should be mapped.
      Parameters:
      aClass - the Java class for which to return an XML Schema type.
      Returns:
      the name of the XML Schema type onto which the specified Java class should be mapped.
    • registerElementName

      public void registerElementName(Class aJavaClass, TLcdXMLName aElementName)
      Deprecated.
      Registers the given XML name for the given Java class.
      Parameters:
      aJavaClass -
      aElementName -
    • setTargetNamespace

      public void setTargetNamespace(String aNamespace)
      Deprecated.
      Sets the target namespace of the custom schema, in which dynamically created XML schema types and elements should be stored.
      Parameters:
      aNamespace -
    • getTargetNamespace

      public String getTargetNamespace()
      Deprecated.
      Returns the target namespace of the custom schema, in which dynamically created XML schema types and elements are stored.
      Returns:
      the target namespace of the custom schema.
      See Also:
    • createElementName

      public TLcdXMLName createElementName(ILcdFeaturedDescriptor aFeaturedDescriptor)
      Deprecated.
      Returns a suitable XML element name for objects, described by the given ILcdFeaturedDescriptor. The name should have as namespace the namespace of this element name provider.

      By default, returns an XML name consisting of the target namespace that was set on this element name provider, and the following local name:

      • If the ILcdFeaturedDescriptor implements ILcdModelDescriptor, the display name of the model.
      • Else, a new name will be created, consisting of the 'Feature' prefix, and a numbered suffix that is unique for the given ILcdFeaturedDescriptor.
      Parameters:
      aFeaturedDescriptor - the ILcdFeaturedDescriptor for which to return an XML element name.
      Returns:
      an XML element name for the given ILcdFeaturedDescriptor.
    • createFeatureNames

      public TLcdXMLName[] createFeatureNames(ILcdFeaturedDescriptor aDescriptor)
      Deprecated.
      Returns an array of XML names for the features in the ILcdFeaturedDescriptor that is provided. All names should have as namespace the target namespace of this element name provider.

      By default, the feature names are used.

      Parameters:
      aDescriptor - the ILcdFeaturedDescriptor for which to return XML feature names.
      Returns:
      a list of XML names, matching the features of the ILcdFeaturedDescriptor.