public abstract class ALcdASTERIXModelDescriptor extends Object implements ILcdModelDescriptor,ILcdFeaturedDescriptor,ILcdFeaturedDescriptorProvider, ILcdDataModelDescriptor, ILcdDataSourceModelDescriptor<TLcdASTERIXDataSource>
ILcdModelDescriptor
s that are used to
represent data of some type. Note that the decoders use a
TLcdModelList
, and that every sub model of that model list
corresponds to the data of one user application profile. Such a sub model has a model descriptor that is an
extension of this abstract model descriptor.
This model descriptor is a ILcdDataModelDescriptor
. As such, it can
be used to retrieve information on the TLcdDataModel
used to model the
data in the domain objects. All ASTERIX domain object implement the ILcdDataObject
interface to model attributes such as "Ground speed", "Type", "Received Power",... The values for those properties
are stored in the domain objects, using the ILcdDataObject
interface.
To obtain all possible data types of the model element of this model, use the
getModelElementTypes() method. The getModelTypes() can be
used to obtain all data types in the entire data model.
For reasons of backwards compatibility, this model descriptor is also a
ILcdFeaturedDescriptor
. Next to ILcdDataObject
, ASTERIX
domain objects also implement the ILcdFeatured
interface to model
their additional attributes. Additional meta-information about
those features (such as their descriptive name or feature class) can be retrieved using the
methods of the ILcdFeaturedDescriptor
interface that is
implemented by this model descriptor. Certain feature values (retrieved
using ILcdFeatured.getFeature(int)
) of an ASTERIX domain object
(such as TLcdASTERIXTrack
) can again return an
ILcdFeatured
object. That object also needs an
ILcdFeaturedDescriptor
to be able to specify all meta data. That
ILcdFeaturedDescriptor
can be retrieved from this model
descriptor through its ILcdFeaturedDescriptorProvider
interface.
Simply invoke getFeaturedDescriptor(com.luciad.util.ILcdFeatured)
for that featured object to obtain the associated
ILcdFeaturedDescriptor
.Constructor and Description |
---|
ALcdASTERIXModelDescriptor(String aSourceName,
String aTypeName,
String aDisplayName,
ALcdASTERIXCategory aCategory,
ALcdASTERIXUserApplicationProfile aUAP,
ALcdASTERIXTransformationProvider aTransformationProvider,
ALcdASTERIXScalingFactorProvider aScalingFactorProvider,
TLcdDataType aDataType)
Constructs a new
ALcdASTERIXModelDescriptor that supports ILcdDataModelDescriptor . |
ALcdASTERIXModelDescriptor(String aSourceName,
String aTypeName,
String aDisplayName,
String[] aFeatureNames,
Class[] aFeatureClasses,
ALcdASTERIXCategory aCategory,
ALcdASTERIXUserApplicationProfile aUAP,
ALcdASTERIXTransformationProvider aTransformationProvider,
ALcdASTERIXScalingFactorProvider aScalingFactorProvider)
|
ALcdASTERIXModelDescriptor(TLcdASTERIXDataSource aDataSource,
String aTypeName,
String aDisplayName,
ALcdASTERIXCategory aCategory,
ALcdASTERIXUserApplicationProfile aUAP,
ALcdASTERIXTransformationProvider aTransformationProvider,
ALcdASTERIXScalingFactorProvider aScalingFactorProvider,
TLcdDataType aDataType)
Constructs a new
ALcdASTERIXModelDescriptor that supports ILcdDataModelDescriptor . |
ALcdASTERIXModelDescriptor(TLcdASTERIXDataSource aDataSource,
String aTypeName,
String aDisplayName,
String[] aFeatureNames,
Class[] aFeatureClasses,
ALcdASTERIXCategory aCategory,
ALcdASTERIXUserApplicationProfile aUAP,
ALcdASTERIXTransformationProvider aTransformationProvider,
ALcdASTERIXScalingFactorProvider aScalingFactorProvider)
|
Modifier and Type | Method and Description |
---|---|
ALcdASTERIXCategory |
getCategory()
Returns the ASTERIX category that corresponds with the data in the model.
|
TLcdDataModel |
getDataModel()
Returns the data model that describes the elements of the model.
|
TLcdASTERIXDataSource |
getDataSource()
Returns the data source containing the source names that were decoded.
|
String |
getDisplayName()
Returns a displayable name for the data source, suitable for usage in user interfaces.
|
Class |
getFeatureClass(int aIndex)
Returns the
Class of the feature at the given index. |
int |
getFeatureCount()
Returns the number of features.
|
ILcdFeaturedDescriptor |
getFeaturedDescriptor(ILcdFeatured aFeatured)
Gets a
ILcdFeaturedDescriptor that describes the ILcdFeatured passed. |
int |
getFeatureIndex(String aFeatureName)
Returns the index of the given feature name if it exists, -1 otherwise.
|
String |
getFeatureName(int aIndex)
Returns the name of the feature at the given index.
|
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.
|
ALcdASTERIXScalingFactorProvider |
getScalingFactorProvider()
Returns the
ALcdASTERIXScalingFactorProvider that corresponds with the data in the model. |
String |
getSourceName()
Returns the full name that uniquely identifies the data source.
|
ALcdASTERIXTransformationProvider |
getTransformationProvider()
Returns the
ALcdASTERIXTransformationProvider that corresponds with the data in the model. |
String |
getTypeName()
Returns the type/format name of the data source.
|
ALcdASTERIXUserApplicationProfile |
getUAP()
Returns the ASTERIX UAP that corresponds with the data in the model.
|
void |
setDataSource(TLcdASTERIXDataSource aDataSource)
Updates the data source of this model descriptor.
|
void |
setDisplayName(String aDisplayName)
Sets a new display name for this model descriptor.
|
void |
setSourceName(String aSourceName)
Sets a new source name for this model descriptor.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFeatureUnitOfMeasure
@Deprecated public ALcdASTERIXModelDescriptor(String aSourceName, String aTypeName, String aDisplayName, String[] aFeatureNames, Class[] aFeatureClasses, ALcdASTERIXCategory aCategory, ALcdASTERIXUserApplicationProfile aUAP, ALcdASTERIXTransformationProvider aTransformationProvider, ALcdASTERIXScalingFactorProvider aScalingFactorProvider)
ALcdASTERIXModelDescriptor
.aSourceName
- The name of the source.aTypeName
- The type of data.aDisplayName
- The display name for the model.aFeatureNames
- The features names.aFeatureClasses
- The feature classes.aCategory
- The ASTERIX category that corresponds with the data.aUAP
- The User Application Profile (UAP) that corresponds with the data.aTransformationProvider
- The transformation provider used for this data source.aScalingFactorProvider
- The scaling factor provider used for this data source.@Deprecated public ALcdASTERIXModelDescriptor(TLcdASTERIXDataSource aDataSource, String aTypeName, String aDisplayName, String[] aFeatureNames, Class[] aFeatureClasses, ALcdASTERIXCategory aCategory, ALcdASTERIXUserApplicationProfile aUAP, ALcdASTERIXTransformationProvider aTransformationProvider, ALcdASTERIXScalingFactorProvider aScalingFactorProvider)
ALcdASTERIXModelDescriptor
.aDataSource
- The data source containing the source names that were decoded.aTypeName
- The type of data.aDisplayName
- The display name for the model.aFeatureNames
- The features names.aFeatureClasses
- The feature classes.aCategory
- The ASTERIX category that corresponds with the data.aUAP
- The User Application Profile (UAP) that corresponds with the data.aTransformationProvider
- The transformation provider used for this data source.aScalingFactorProvider
- The scaling factor provider used for this data source.public ALcdASTERIXModelDescriptor(String aSourceName, String aTypeName, String aDisplayName, ALcdASTERIXCategory aCategory, ALcdASTERIXUserApplicationProfile aUAP, ALcdASTERIXTransformationProvider aTransformationProvider, ALcdASTERIXScalingFactorProvider aScalingFactorProvider, TLcdDataType aDataType)
ALcdASTERIXModelDescriptor
that supports ILcdDataModelDescriptor
.aSourceName
- The name of the source.aTypeName
- The type of data.aDisplayName
- The display name for the model.aCategory
- The ASTERIX category that corresponds with the data.aUAP
- The User Application Profile (UAP) that corresponds with the data.aTransformationProvider
- The transformation provider used for this data source.aScalingFactorProvider
- The scaling factor provider used for this data source.aDataType
- The data type used by all elements of this model.public ALcdASTERIXModelDescriptor(TLcdASTERIXDataSource aDataSource, String aTypeName, String aDisplayName, ALcdASTERIXCategory aCategory, ALcdASTERIXUserApplicationProfile aUAP, ALcdASTERIXTransformationProvider aTransformationProvider, ALcdASTERIXScalingFactorProvider aScalingFactorProvider, TLcdDataType aDataType)
ALcdASTERIXModelDescriptor
that supports ILcdDataModelDescriptor
.aDataSource
- The data source containing the source names that were decoded.aTypeName
- The type of data.aDisplayName
- The display name for the model.aCategory
- The ASTERIX category that corresponds with the data.aUAP
- The User Application Profile (UAP) that corresponds with the data.aTransformationProvider
- The transformation provider used for this data source.aScalingFactorProvider
- The scaling factor provider used for this data source.aDataType
- The data type used by all elements of this model.public TLcdASTERIXDataSource getDataSource()
getDataSource
in interface ILcdDataSourceModelDescriptor<TLcdASTERIXDataSource>
TLcdASTERIXDataSource
object, or null
if the source is unspecified.ILcdModelDecoder
public void setDataSource(TLcdASTERIXDataSource aDataSource)
null
, the source name will also be set to null
.null
.aDataSource
- The new data source for this descriptor. This may be null
.public ALcdASTERIXCategory getCategory()
public ALcdASTERIXUserApplicationProfile getUAP()
public ALcdASTERIXTransformationProvider getTransformationProvider()
ALcdASTERIXTransformationProvider
that corresponds with the data in the model.ALcdASTERIXTransformationProvider
that corresponds with the data in the model.public ALcdASTERIXScalingFactorProvider getScalingFactorProvider()
ALcdASTERIXScalingFactorProvider
that corresponds with the data in the model.ALcdASTERIXScalingFactorProvider
that corresponds with the data in the model.public ILcdFeaturedDescriptor getFeaturedDescriptor(ILcdFeatured aFeatured)
ILcdFeaturedDescriptor
that describes the ILcdFeatured
passed.
Please refer to the class comment for additional
information.getFeaturedDescriptor
in interface ILcdFeaturedDescriptorProvider
aFeatured
- a featured object to retrieve a featured descriptor for.ILcdFeaturedDescriptor
that describes the ILcdFeatured
passed.public String getTypeName()
ILcdModelDescriptor
getTypeName
in interface ILcdModelDescriptor
public String getDisplayName()
ILcdModelDescriptor
getDisplayName
in interface ILcdModelDescriptor
public String getSourceName()
ILcdModelDescriptor
getSourceName
in interface ILcdModelDescriptor
public void setDisplayName(String aDisplayName)
aDisplayName
- the new display namepublic void setSourceName(String aSourceName)
aSourceName
- the new source name. May be null
to indicate that the source is unknown.public int getFeatureCount()
getFeatureCount
in interface ILcdFeaturedDescriptor
public String getFeatureName(int aIndex)
getFeatureName
in interface ILcdFeaturedDescriptor
aIndex
- a valid feature index.public int getFeatureIndex(String aFeatureName)
getFeatureIndex
in interface ILcdFeaturedDescriptor
aFeatureName
- a feature name.public Class getFeatureClass(int aIndex)
Class
of the feature at the given index.
Please refer to the class comment for additional
information.getFeatureClass
in interface ILcdFeaturedDescriptor
aIndex
- a valid feature index.Class
of the feature at the given index.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