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
.public class TLcdGML3ElementNameProvider extends Object
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:
ILcdXMLElement
interface, and the
ILcdXMLElement
's name is in the given substutition group (or the substituion
group is null
) this name is returned.gml:FeatureCollection
element is returned.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
.gml:_Feature
, and the object is not
ILcdFeatured
, a default name is returned.Constructor and Description |
---|
TLcdGML3ElementNameProvider(ILcdXMLEditableSchemaProvider aSchemaProvider)
Deprecated.
Creates a new
TLcdGML3ElementNameProvider , using the given schema provider. |
Modifier and Type | Method and Description |
---|---|
TLcdXMLName |
createElementName(ILcdFeaturedDescriptor aFeaturedDescriptor)
Deprecated.
Returns a suitable XML element name for objects, described by the given
ILcdFeaturedDescriptor . |
TLcdXMLName[] |
createFeatureNames(ILcdFeaturedDescriptor aDescriptor)
Deprecated.
Returns an array of XML names for the features in the
ILcdFeaturedDescriptor
that is provided. |
TLcdXMLName |
getElementNameForObject(ILcdXMLNameStack aParentElementNameStack,
ILcdXMLObjectStack aParentObjectStack,
TLcdXMLName aSubstitutionGroup,
Object aObject,
TLcdXMLName aTypeName)
Deprecated.
Returns the
TLcdXMLName that best matches the object, specified by the given
name/object stack, substitution group and object. |
TLcdXMLName |
getSchemaType(Class aClass)
Deprecated.
Returns the name of the global XML Schema type onto which the specified Java class should be mapped.
|
String |
getTargetNamespace()
Deprecated.
Returns the target namespace of the custom schema, in which dynamically created XML schema
types and elements are stored.
|
void |
registerElementName(Class aJavaClass,
TLcdXMLName aElementName)
Deprecated.
Registers the given XML name for the given Java class.
|
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.
|
public TLcdGML3ElementNameProvider(ILcdXMLEditableSchemaProvider aSchemaProvider)
TLcdGML3ElementNameProvider
, using the given schema provider.aSchemaProvider
- the schema provider from which to adapt the schemas if new XML element
names are generated for ILcdFeatured objects.public TLcdXMLName getElementNameForObject(ILcdXMLNameStack aParentElementNameStack, ILcdXMLObjectStack aParentObjectStack, TLcdXMLName aSubstitutionGroup, Object aObject, TLcdXMLName aTypeName)
ILcdXMLElementNameProvider
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.
aParentElementNameStack
- the XML name stack, containing all XML names from the root
element up to the parent element nameaParentObjectStack
- the XML object stack, containing all XML objects from the root
element up to the parent elementaSubstitutionGroup
- 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.public TLcdXMLName getSchemaType(Class aClass)
aClass
- the Java class for which to return an XML Schema type.public void registerElementName(Class aJavaClass, TLcdXMLName aElementName)
aJavaClass
- aElementName
- public void setTargetNamespace(String aNamespace)
aNamespace
- public String getTargetNamespace()
setTargetNamespace(String)
public TLcdXMLName createElementName(ILcdFeaturedDescriptor aFeaturedDescriptor)
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:
ILcdFeaturedDescriptor
implements ILcdModelDescriptor
,
the display name of the model.ILcdFeaturedDescriptor
.
aFeaturedDescriptor
- the ILcdFeaturedDescriptor
for which to return an XML
element name.ILcdFeaturedDescriptor
.public TLcdXMLName[] createFeatureNames(ILcdFeaturedDescriptor aDescriptor)
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.aDescriptor
- the ILcdFeaturedDescriptor
for which to return XML feature names.ILcdFeaturedDescriptor
.