Class TLcdVPFModelDescriptor
- All Implemented Interfaces:
ILcdDataModelDescriptor
,ILcdModelDescriptor
,ILcdFeaturedDescriptor
,Serializable
This model descriptor provides some extra information about the VPF model:
- The model type (see
TLcdVPFModelDecoder.ModelType
for more information on VPF model types). - The VPF feature class.
- The type of feature (
POINT, LINE, AREA, TEXT
orCOMPLEX
). - Descriptions of the
ILcdFeatured
attributes, via theILcdFeaturedDescriptor
interface.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Constant to indicate that the described model contains only VPF area features.static final int
Constant to indicate that the described model contains only VPF complex features.static final int
Deprecated.replaced by ON_THE_FLY_MODEL_TYPEstatic final int
Deprecated.replaced by IN_MEMORY_MODEL_TYPEprotected int
Deprecated.Don't access this variable directly.static final int
Constant to indicate that the model is a hybrid model, each feature being loaded dynamically when it is needed, with caching enabled.static final int
Constant to indicate that the model is an in-memory model, with all features loaded in memory.static final int
Constant to indicate that the described model contains only VPF line features.static final int
Constant to indicate that the described model contains VPF features of multiple types.static final int
Constant to indicate that the model is an on-the-fly model, each feature being loaded dynamically when it is needed.static final int
Constant to indicate that the described model contains only VPF point features.static final int
Constant to indicate that the described model contains only VPF text features.static final String
Type name identifying the VPF format type. -
Constructor Summary
ConstructorDescriptionConstructs a new, emptyTLcdVPFModelDescriptor
.TLcdVPFModelDescriptor
(String aSourceName, String aDisplayName) Constructs a newTLcdVPFModelDescriptor
.TLcdVPFModelDescriptor
(String aSourceName, String aTypeName, String aDisplayName, TLcdVPFFeatureClass aVPFFeatureClass) Constructs a newTLcdVPFModelDescriptor
.TLcdVPFModelDescriptor
(String aSourceName, String aTypeName, String aDisplayName, TLcdVPFFeatureClass aVPFFeatureClass, int aModelType) Constructs a newTLcdVPFModelDescriptor
. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.All VPF models implement theILcd2DBoundsIndexedModel
interface.Returns 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 set containing all the data types of which instances can be elements in the model associated with this descriptor.int
Returns the model type of this model (IN_MEMORY_MODEL_TYPE
orON_THE_FLY_MODEL_TYPE
).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.Returns the VPF feature class of the features contained in this model descriptor's model.int
Returns the type of the VPF feature contained in this model.void
setDefaultFeatureCount
(int aDefaultFeatureCount) Sets the default feature count that should be returned if no feature class is associated with this model (default value is zero).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
-
Field Details
-
TYPE_NAME
Type name identifying the VPF format type.- See Also:
-
POINT
public static final int POINTConstant to indicate that the described model contains only VPF point features.- See Also:
-
LINE
public static final int LINEConstant to indicate that the described model contains only VPF line features.- See Also:
-
AREA
public static final int AREAConstant to indicate that the described model contains only VPF area features.- See Also:
-
TEXT
public static final int TEXTConstant to indicate that the described model contains only VPF text features.- See Also:
-
COMPLEX
public static final int COMPLEXConstant to indicate that the described model contains only VPF complex features.- See Also:
-
MULTIPLE_TYPE
public static final int MULTIPLE_TYPEConstant to indicate that the described model contains VPF features of multiple types.- See Also:
-
FULL_MODEL
public static final int FULL_MODELDeprecated.replaced by IN_MEMORY_MODEL_TYPEConstant to indicate that the described model contains an element for every vpf feature the user wants to handle.- See Also:
-
EMPTY_MODEL
public static final int EMPTY_MODELDeprecated.replaced by ON_THE_FLY_MODEL_TYPEConstant to indicate that the described model contains elements that don't relate one to one to the vpf features the user wants to handle.- See Also:
-
IN_MEMORY_MODEL_TYPE
public static final int IN_MEMORY_MODEL_TYPEConstant to indicate that the model is an in-memory model, with all features loaded in memory.- See Also:
-
ON_THE_FLY_MODEL_TYPE
public static final int ON_THE_FLY_MODEL_TYPEConstant to indicate that the model is an on-the-fly model, each feature being loaded dynamically when it is needed.- See Also:
-
HYBRID_MODEL_TYPE
public static final int HYBRID_MODEL_TYPEConstant to indicate that the model is a hybrid model, each feature being loaded dynamically when it is needed, with caching enabled.- See Also:
-
fVPFFeatureType
protected int fVPFFeatureTypeDeprecated.Don't access this variable directly. UsegetFeatureType()
instead.VPF feature type.
-
-
Constructor Details
-
TLcdVPFModelDescriptor
public TLcdVPFModelDescriptor()Constructs a new, emptyTLcdVPFModelDescriptor
. -
TLcdVPFModelDescriptor
Constructs a newTLcdVPFModelDescriptor
.- Parameters:
aSourceName
- the name of the data source.aDisplayName
- the display name of the data source.
-
TLcdVPFModelDescriptor
public TLcdVPFModelDescriptor(String aSourceName, String aTypeName, String aDisplayName, TLcdVPFFeatureClass aVPFFeatureClass) Constructs a newTLcdVPFModelDescriptor
.- Parameters:
aSourceName
- the name of the data source.aTypeName
- the type name of the data source.aDisplayName
- the display name of the data source.aVPFFeatureClass
- the VPF feature class of the model.
-
TLcdVPFModelDescriptor
public TLcdVPFModelDescriptor(String aSourceName, String aTypeName, String aDisplayName, TLcdVPFFeatureClass aVPFFeatureClass, int aModelType) Constructs a newTLcdVPFModelDescriptor
.- Parameters:
aSourceName
- the name of the data source.aTypeName
- the type name of the data source.aDisplayName
- the display name of the data source.aVPFFeatureClass
- the VPF feature class of the model.aModelType
- the model type of the model. SeeTLcdVPFModelDecoder.ModelType
for more information on VPF model types.
-
-
Method Details
-
getModelType
public int getModelType()Returns the model type of this model (IN_MEMORY_MODEL_TYPE
orON_THE_FLY_MODEL_TYPE
).- Returns:
- the model type of this model.
-
getDataModel
Description copied from interface: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)
).- Specified by:
getDataModel
in interfaceILcdDataModelDescriptor
- Returns:
- the data model that describes the elements of the model
-
getModelElementTypes
Description copied from interface: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() )
.- Specified by:
getModelElementTypes
in interfaceILcdDataModelDescriptor
- Returns:
- a set containing all the data types of which instances can be elements in the model associated with this descriptor
-
getModelTypes
Description copied from interface: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.- 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
-
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.
-
getFeatureCount
public int getFeatureCount()Description copied from interface:ILcdFeaturedDescriptor
Returns the number of features.- Specified by:
getFeatureCount
in interfaceILcdFeaturedDescriptor
- Returns:
- the number of features.
-
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.
-
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.
-
getVPFFeatureType
public int getVPFFeatureType()Returns the type of the VPF feature contained in this model. This is eitherPOINT
,LINE
,AREA
,TEXT
,COMPLEX
orMULTIPLE TYPE
.- Returns:
- the type of the VPF feature contained in this model.
-
getVPFFeatureClass
Returns the VPF feature class of the features contained in this model descriptor's model.- Returns:
- the VPF feature class of the features contained in this model descriptor's model.
-
getBounds
Deprecated.All VPF models implement theILcd2DBoundsIndexedModel
interface. use themoddel.getBounds()
method to retrieve the model's bounds.Returns the bounds of this model descriptor's model, in model coordinates.- Returns:
- the bounds of this model descriptor's model, in model coordinates.
-
setDefaultFeatureCount
public void setDefaultFeatureCount(int aDefaultFeatureCount) Sets the default feature count that should be returned if no feature class is associated with this model (default value is zero).- Parameters:
aDefaultFeatureCount
- the default feature count to be used.
-