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.ModelTypefor more information on VPF model types). - The VPF feature class.
- The type of feature (
POINT, LINE, AREA, TEXTorCOMPLEX). - Descriptions of the
ILcdFeaturedattributes, via theILcdFeaturedDescriptorinterface.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intConstant to indicate that the described model contains only VPF area features.static final intConstant to indicate that the described model contains only VPF complex features.static final intDeprecated.replaced by ON_THE_FLY_MODEL_TYPEstatic final intDeprecated.replaced by IN_MEMORY_MODEL_TYPEprotected intDeprecated.Don't access this variable directly.static final intConstant to indicate that the model is a hybrid model, each feature being loaded dynamically when it is needed, with caching enabled.static final intConstant to indicate that the model is an in-memory model, with all features loaded in memory.static final intConstant to indicate that the described model contains only VPF line features.static final intConstant to indicate that the described model contains VPF features of multiple types.static final intConstant to indicate that the model is an on-the-fly model, each feature being loaded dynamically when it is needed.static final intConstant to indicate that the described model contains only VPF point features.static final intConstant to indicate that the described model contains only VPF text features.static final StringType name identifying the VPF format type. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs 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 theILcd2DBoundsIndexedModelinterface.Returns the data model that describes the elements of the model.getFeatureClass(int aIndex) Returns theClassof the feature at the given index.intReturns the number of features.intgetFeatureIndex(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.intReturns the model type of this model (IN_MEMORY_MODEL_TYPEorON_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.intReturns the type of the VPF feature contained in this model.voidsetDefaultFeatureCount(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, sourceNameToDisplayNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.luciad.util.ILcdFeaturedDescriptor
getFeatureUnitOfMeasureMethods 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.ModelTypefor more information on VPF model types.
-
-
Method Details
-
getModelType
public int getModelType()Returns the model type of this model (IN_MEMORY_MODEL_TYPEorON_THE_FLY_MODEL_TYPE).- Returns:
- the model type of this model.
-
getDataModel
Description copied from interface:ILcdDataModelDescriptorReturns 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:
getDataModelin interfaceILcdDataModelDescriptor- Returns:
- the data model that describes the elements of the model
-
getModelElementTypes
Description copied from interface:ILcdDataModelDescriptorReturns 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
nullin 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:
getModelElementTypesin 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:ILcdDataModelDescriptorReturns 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
nullin case they don't know which types are present in the model.- Specified by:
getModelTypesin 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:ILcdFeaturedDescriptorReturns theClassof the feature at the given index.- Specified by:
getFeatureClassin interfaceILcdFeaturedDescriptor- Parameters:
aIndex- a valid feature index.- Returns:
- the
Classof the feature at the given index.
-
getFeatureCount
public int getFeatureCount()Description copied from interface:ILcdFeaturedDescriptorReturns the number of features.- Specified by:
getFeatureCountin interfaceILcdFeaturedDescriptor- Returns:
- the number of features.
-
getFeatureIndex
Description copied from interface:ILcdFeaturedDescriptorReturns the index of the given feature name if it exists, -1 otherwise.- Specified by:
getFeatureIndexin interfaceILcdFeaturedDescriptor- Parameters:
aName- a feature name.- Returns:
- the index of the given feature name if it exists, -1 otherwise.
-
getFeatureName
Description copied from interface:ILcdFeaturedDescriptorReturns the name of the feature at the given index.- Specified by:
getFeatureNamein 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,COMPLEXorMULTIPLE 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 theILcd2DBoundsIndexedModelinterface. 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.
-