Class TLcdHashedFeaturedModelDescriptor
- All Implemented Interfaces:
ILcdDataModelDescriptor
,ILcdModelDescriptor
,ILcdFeaturedDescriptor
,Serializable
- Direct Known Subclasses:
TLcdAerodromeModelDescriptor
,TLcdAirspaceModelDescriptor
,TLcdATSRouteModelDescriptor
,TLcdDMEModelDescriptor
,TLcdGeoborderModelDescriptor
,TLcdGlidePathModelDescriptor
,TLcdHelipadModelDescriptor
,TLcdHeliportModelDescriptor
,TLcdHoldingModelDescriptor
,TLcdILSDMEModelDescriptor
,TLcdILSModelDescriptor
,TLcdLocalizerModelDescriptor
,TLcdMarkerModelDescriptor
,TLcdMilitaryTrainingRouteModelDescriptor
,TLcdNDBModelDescriptor
,TLcdObstacleModelDescriptor
,TLcdOrtcaModelDescriptor
,TLcdParachuteJumpAreaModelDescriptor
,TLcdProcedureModelDescriptor
,TLcdProcedureTrajectoryModelDescriptor
,TLcdRefuelingAirspaceModelDescriptor
,TLcdRefuelingTrackModelDescriptor
,TLcdRunwayModelDescriptor
,TLcdServiceModelDescriptor
,TLcdSpecialUseAirspaceModelDescriptor
,TLcdTACANModelDescriptor
,TLcdVFRAerodromeModelDescriptor
,TLcdVFROffsetModelDescriptor
,TLcdVFRRouteModelDescriptor
,TLcdVORModelDescriptor
,TLcdWayPointModelDescriptor
ILcdModelDescriptor
that is also an ILcdFeaturedDescriptor
. It has a list of
feature names, along with their corresponding classes. Internally, a hashtable is
used to provide an efficient mapping from feature names to feature indices.
All elements of the corresponding model shall be ILcdFeatured
and shall have the same features.
Note that this model descriptor is a specific implementation to be used in the context of AIS. It is not a general purpose implementation that can be used to create a featured descriptor given a data type.
- See Also:
-
Constructor Summary
ConstructorDescriptionTLcdHashedFeaturedModelDescriptor
(String aSourceName, String aTypeName, String aDisplayName, TLcdDataType aElementType) Constructs a newTLcdHashedFeaturedModelDescriptor
object.TLcdHashedFeaturedModelDescriptor
(String aSourceName, String aTypeName, String aDisplayName, ILcdFeaturedDescriptor aModelDescriptor) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionReturns the data model that describes the elements of the model.getFeatureClass
(int aIndex) Returns theClass
of the feature at the given index.int
Returns the number of features.int
getFeatureIndex
(String aName) Returns the index of the given feature name if it exists, -1 otherwise.getFeatureName
(int aIndex) Returns the name of the feature at the given index.Returns a singleton set that contains the type with which this object was created.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.Methods inherited from class com.luciad.model.TLcdModelDescriptor
getDisplayName, getSourceName, getTypeName, setDisplayName, setSourceName, setTypeName, sourceNameToDisplayName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.luciad.util.ILcdFeaturedDescriptor
getFeatureUnitOfMeasure
Methods inherited from interface com.luciad.model.ILcdModelDescriptor
getDisplayName, getSourceName, getTypeName
-
Constructor Details
-
TLcdHashedFeaturedModelDescriptor
@Deprecated public TLcdHashedFeaturedModelDescriptor(String aSourceName, String aTypeName, String aDisplayName, String[] aFeatureNames, Class[] aFeatureClasses) Constructs a newTLcdHashedFeaturedModelDescriptor
object.- Parameters:
aSourceName
- the name of the data sourceaTypeName
- the type name of the data sourceaDisplayName
- the display name of the data sourceaFeatureNames
- the feature namesaFeatureClasses
- the feature classes
-
TLcdHashedFeaturedModelDescriptor
@Deprecated public TLcdHashedFeaturedModelDescriptor(String aSourceName, String aTypeName, String aDisplayName, ILcdFeaturedDescriptor aModelDescriptor) Constructs a newTLcdHashedFeaturedModelDescriptor
object. This constructor is used to reuse an existing model descriptor, but change the source, type and display name.- Parameters:
aSourceName
-aTypeName
-aDisplayName
-aModelDescriptor
-
-
TLcdHashedFeaturedModelDescriptor
public TLcdHashedFeaturedModelDescriptor(String aSourceName, String aTypeName, String aDisplayName, TLcdDataType aElementType) Constructs a newTLcdHashedFeaturedModelDescriptor
object. TheaElementType
parameter will be used to determine the names and classes of the features of the model elements.- Parameters:
aSourceName
- the name of the data sourceaTypeName
- the type name of the data sourceaDisplayName
- the display name of the data sourceaElementType
- the data type of the elements that will be contained in the model that uses this descriptor.
-
-
Method Details
-
getDataModel
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)
).- Specified by:
getDataModel
in interfaceILcdDataModelDescriptor
- Returns:
- the data model that describes the elements of the model
-
getModelElementTypes
Returns a singleton set that contains the type with which this object was created. In case the object was created using one of the deprecated constructors that don't take a type parameter, theTLcdUnknownDataTypes.UNKOWN_TYPE
is returned.- Specified by:
getModelElementTypes
in interfaceILcdDataModelDescriptor
- Returns:
- a set containing the single model element type of this model descriptor
-
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. 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.- Specified by:
getModelTypes
in interfaceILcdDataModelDescriptor
- Returns:
- a set containing all the data types of which instances can be used in the model associated with this descriptor
-
getFeatureCount
public int getFeatureCount()Description copied from interface:ILcdFeaturedDescriptor
Returns the number of features.- Specified by:
getFeatureCount
in interfaceILcdFeaturedDescriptor
- Returns:
- the number of features.
-
getFeatureName
Description copied from interface:ILcdFeaturedDescriptor
Returns the name of the feature at the given index.- Specified by:
getFeatureName
in interfaceILcdFeaturedDescriptor
- Parameters:
aIndex
- a valid feature index.- Returns:
- the name of the feature at the given index.
-
getFeatureIndex
Description copied from interface:ILcdFeaturedDescriptor
Returns the index of the given feature name if it exists, -1 otherwise.- Specified by:
getFeatureIndex
in interfaceILcdFeaturedDescriptor
- Parameters:
aName
- a feature name.- Returns:
- the index of the given feature name if it exists, -1 otherwise.
-
getFeatureClass
Description copied from interface:ILcdFeaturedDescriptor
Returns theClass
of the feature at the given index.- Specified by:
getFeatureClass
in interfaceILcdFeaturedDescriptor
- Parameters:
aIndex
- a valid feature index.- Returns:
- the
Class
of the feature at the given index.
-
TLcdHashedFeaturedModelDescriptor(String, String, String, TLcdDataType)