public class TLcdWFSProxyModelDescriptor extends TLcdModelDescriptor implementsILcdFeaturedDescriptorProvider, ILcdDataModelDescriptor, ILcdAnnotatedElement
TLcdWFSProxyModel
,
Serialized FormModifier and Type | Field and Description |
---|---|
static String |
TYPE
The type name used for this model descriptor.
|
Constructor and Description |
---|
TLcdWFSProxyModelDescriptor(String aSourceName,
String aDisplayName,
TLcdWFSCapabilities aCapabilities,
QName aFeatureTypeName)
Creates a new
TLcdWFSProxyModelDescriptor with the given parameters. |
TLcdWFSProxyModelDescriptor(String aSourceName,
String aDisplayName,
TLcdWFSCapabilities aCapabilities,
QName aFeatureTypeName,
ILcdDataModelDescriptor aDataModelDescriptor)
Creates a new
TLcdWFSProxyModelDescriptor with the given parameters. |
Modifier and Type | Method and Description |
---|---|
<T extends ILcdAnnotation> |
addAnnotation(ILcdAnnotation aAnnotation)
Adds the given annotation to this element.
|
<T extends ILcdAnnotation> |
getAnnotation(Class<T> aAnnotationClass)
Returns the element's annotation for the specified class if such an annotation is present,
else null.
|
Collection<ILcdAnnotation> |
getAnnotations()
Returns all annotations present on this element as an unmodifiable collection.
|
TLcdWFSCapabilities |
getCapabilities()
Returns the capabilities document based on which the WFS proxy model was created.
|
TLcdDataModel |
getDataModel()
Returns the data model that describes the elements of the model.
|
ILcdFeaturedDescriptor |
getFeaturedDescriptor(ILcdFeatured aObject)
Returns an
ILcdFeaturedDescriptor for an element of the WFS proxy model. |
QName |
getFeatureTypeName()
Returns the feature type name associated with the WFS proxy model.
|
Set<TLcdDataType> |
getModelElementTypes()
Returns a set containing all the data types of which instances can be elements in the model
associated with this descriptor.
|
Set<TLcdDataType> |
getModelTypes()
Returns a set containing all the types of which instances can be used (including both
top-level elements and child objects) in the model associated with this descriptor.
|
boolean |
isAnnotationPresent(Class<? extends ILcdAnnotation> aAnnotationClass)
Returns true if an annotation for the specified class is present on this element,
else false.
|
<T extends ILcdAnnotation> |
removeAnnotation(Class<T> aAnnotationClass)
Removes the annotation of the given class from this element.
|
getDisplayName, getSourceName, getTypeName, setDisplayName, setSourceName, setTypeName, sourceNameToDisplayName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDisplayName, getSourceName, getTypeName
public static final String TYPE
public TLcdWFSProxyModelDescriptor(String aSourceName, String aDisplayName, TLcdWFSCapabilities aCapabilities, QName aFeatureTypeName)
TLcdWFSProxyModelDescriptor
with the given parameters.
The type name is set to TYPE
.aSourceName
- the source name of the modelaDisplayName
- the display name of the modelaCapabilities
- the WFS capabilitiesaFeatureTypeName
- the feature type name associated with the WFS proxy modelpublic TLcdWFSProxyModelDescriptor(String aSourceName, String aDisplayName, TLcdWFSCapabilities aCapabilities, QName aFeatureTypeName, ILcdDataModelDescriptor aDataModelDescriptor)
TLcdWFSProxyModelDescriptor
with the given parameters.
The type name is set to TYPE
.aSourceName
- the source name of the modelaDisplayName
- the display name of the modelaCapabilities
- the WFS capabilitiesaFeatureTypeName
- the feature type name associated with the WFS proxy modelaDataModelDescriptor
- the data model descriptor which describes the data in the WFS proxy model.public TLcdWFSCapabilities getCapabilities()
public QName getFeatureTypeName()
public ILcdFeaturedDescriptor getFeaturedDescriptor(ILcdFeatured aObject)
ILcdFeaturedDescriptor
for an element of the WFS proxy model.
Note that with the default output format (GML), the elements of the WFS
proxy model are themselves ILcdFeaturedDescriptorProvider
s. If a custom
ILcdWFSModelDecoder
is used, this assertion does not necessarily hold
anymore. In that case, an IllegalArgumentException
is thrown.getFeaturedDescriptor
in interface ILcdFeaturedDescriptorProvider
aObject
- an element of a TLcdWFSProxyModel
ILcdFeaturedDescriptor
IllegalArgumentException
- if aObject is not an ILcdFeaturedDescriptorProvider
TLcdWFSProxyModel.Builder
public TLcdDataModel getDataModel()
ILcdDataModelDescriptor
Returns the data model that describes the elements of the model. Note that not necessarily all data in the model will be of a type of this data model. Very likely, types from the dependencies of the returned data model are used as well.
In case the model accepts objects from multiple data models, an anonymous
data model that depends on all these data models should be returned
(see TLcdDataModelBuilder.createAnonymousDataModel(java.util.Collection)
).
getDataModel
in interface ILcdDataModelDescriptor
public Set<TLcdDataType> getModelElementTypes()
ILcdDataModelDescriptor
Returns a set containing all the data types of which instances can be elements in the model associated with this descriptor. Implementations are free to limit the result to only include the types of which there are actually elements in the model; but they are not required to do so.
Implementations should return null
in case they don't know
which element types are present in the model.
For each element of the model associated with this model descriptor, the following holds true :
getModelElementTypes().contains( element.getDataType() )
.
getModelElementTypes
in interface ILcdDataModelDescriptor
public Set<TLcdDataType> getModelTypes()
ILcdDataModelDescriptor
Returns a set containing all the types of which instances can be used (including both top-level elements and child objects) in the model associated with this descriptor. Implementations are free to limit the result to only include the types of which there are actually instances in the model; but they are not required to do so.
A simple and correct implementation would be to return
getDataModel().getTypes()
. Implementations are encouraged to return a subset of
this set if they can do so without spending an unreasonable amount of resources.
Implementations should return null
in case they don't know
which types are present in the model.
getModelTypes
in interface ILcdDataModelDescriptor
public <T extends ILcdAnnotation> T addAnnotation(ILcdAnnotation aAnnotation)
ILcdAnnotatedElement
addAnnotation
in interface ILcdAnnotatedElement
aAnnotation
- the annotation to addpublic <T extends ILcdAnnotation> T getAnnotation(Class<T> aAnnotationClass)
ILcdAnnotatedElement
Returns the element's annotation for the specified class if such an annotation is present, else null.
Note that the exact annotation class needs to be passed as parameter.
In other words, in case the element
is only annotated with instances of subclasses of the given annotation class,
null
is returned.
getAnnotation
in interface ILcdAnnotatedElement
aAnnotationClass
- - the Class object corresponding to the annotation typepublic Collection<ILcdAnnotation> getAnnotations()
ILcdAnnotatedElement
getAnnotations
in interface ILcdAnnotatedElement
public boolean isAnnotationPresent(Class<? extends ILcdAnnotation> aAnnotationClass)
ILcdAnnotatedElement
Returns true if an annotation for the specified class is present on this element, else false. This method is designed primarily for convenient access to marker annotations.
Note that the exact annotation class needs to be passed as parameter.
In other words, in case the element
is only annotated with instances of subclasses of the given annotation class,
false
is returned.
isAnnotationPresent
in interface ILcdAnnotatedElement
aAnnotationClass
- the Class object corresponding to the annotation classpublic <T extends ILcdAnnotation> T removeAnnotation(Class<T> aAnnotationClass)
ILcdAnnotatedElement
Removes the annotation of the given class from this element.
Note that the exact annotation class needs to be passed as parameter.
In other words, in case the element
is only annotated with instances of subclasses of the given annotation class,
nothing is removed and null
is returned.
removeAnnotation
in interface ILcdAnnotatedElement
aAnnotationClass
- the class of annotation to remove