public class TLcdVPFModelDescriptor extends TLcdModelDescriptor implements ILcdDataModelDescriptor,ILcdFeaturedDescriptor
This model descriptor provides some extra information about the VPF model:
TLcdVPFModelDecoder.ModelType
for more information on
VPF model types).POINT, LINE, AREA, TEXT
or COMPLEX
).ILcdFeatured
attributes, via the ILcdFeaturedDescriptor
interface.Modifier and Type | Field and Description |
---|---|
static int |
AREA
Constant to indicate that the described model contains only VPF area features.
|
static int |
COMPLEX
Constant to indicate that the described model contains only VPF complex features.
|
static int |
EMPTY_MODEL
Deprecated.
replaced by ON_THE_FLY_MODEL_TYPE
|
static int |
FULL_MODEL
Deprecated.
replaced by IN_MEMORY_MODEL_TYPE
|
protected int |
fVPFFeatureType
Deprecated.
Don't access this variable directly. Use
getFeatureType() instead. |
static int |
HYBRID_MODEL_TYPE
Constant to indicate that the model is a hybrid model, each feature being loaded
dynamically when it is needed, with caching enabled.
|
static int |
IN_MEMORY_MODEL_TYPE
Constant to indicate that the model is an in-memory model, with all features loaded in
memory.
|
static int |
LINE
Constant to indicate that the described model contains only VPF line features.
|
static int |
MULTIPLE_TYPE
Constant to indicate that the described model contains VPF features of multiple types.
|
static int |
ON_THE_FLY_MODEL_TYPE
Constant to indicate that the model is an on-the-fly model, each feature being loaded
dynamically when it is needed.
|
static int |
POINT
Constant to indicate that the described model contains only VPF point features.
|
static int |
TEXT
Constant to indicate that the described model contains only VPF text features.
|
static String |
TYPE_NAME
Type name identifying the VPF format type.
|
Constructor and Description |
---|
TLcdVPFModelDescriptor()
Constructs a new, empty
TLcdVPFModelDescriptor . |
TLcdVPFModelDescriptor(String aSourceName,
String aDisplayName)
Constructs a new
TLcdVPFModelDescriptor . |
TLcdVPFModelDescriptor(String aSourceName,
String aTypeName,
String aDisplayName,
TLcdVPFFeatureClass aVPFFeatureClass)
Constructs a new
TLcdVPFModelDescriptor . |
TLcdVPFModelDescriptor(String aSourceName,
String aTypeName,
String aDisplayName,
TLcdVPFFeatureClass aVPFFeatureClass,
int aModelType)
Constructs a new
TLcdVPFModelDescriptor . |
Modifier and Type | Method and Description |
---|---|
ILcdBounds |
getBounds()
Deprecated.
All VPF models implement the
ILcd2DBoundsIndexedModel interface. use the
moddel.getBounds() method to retrieve the model's bounds. |
TLcdDataModel |
getDataModel()
Returns the data model that describes the elements of the model.
|
Class |
getFeatureClass(int aIndex)
Returns the
Class of the feature at the given index. |
int |
getFeatureCount()
Returns the number of features.
|
int |
getFeatureIndex(String aName)
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.
|
int |
getModelType()
Returns the model type of this model (
IN_MEMORY_MODEL_TYPE or
ON_THE_FLY_MODEL_TYPE ). |
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.
|
TLcdVPFFeatureClass |
getVPFFeatureClass()
Returns the VPF feature class of the features contained in this model descriptor's model.
|
int |
getVPFFeatureType()
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).
|
getDisplayName, getSourceName, getTypeName, setDisplayName, setSourceName, setTypeName, sourceNameToDisplayName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDisplayName, getSourceName, getTypeName
getFeatureUnitOfMeasure
public static final String TYPE_NAME
public static final int POINT
public static final int LINE
public static final int AREA
public static final int TEXT
public static final int COMPLEX
public static final int MULTIPLE_TYPE
public static final int FULL_MODEL
public static final int EMPTY_MODEL
public static final int IN_MEMORY_MODEL_TYPE
public static final int ON_THE_FLY_MODEL_TYPE
public static final int HYBRID_MODEL_TYPE
protected int fVPFFeatureType
getFeatureType()
instead.public TLcdVPFModelDescriptor()
TLcdVPFModelDescriptor
.public TLcdVPFModelDescriptor(String aSourceName, String aDisplayName)
TLcdVPFModelDescriptor
.aSourceName
- the name of the data source.aDisplayName
- the display name of the data source.public TLcdVPFModelDescriptor(String aSourceName, String aTypeName, String aDisplayName, TLcdVPFFeatureClass aVPFFeatureClass)
TLcdVPFModelDescriptor
.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.public TLcdVPFModelDescriptor(String aSourceName, String aTypeName, String aDisplayName, TLcdVPFFeatureClass aVPFFeatureClass, int aModelType)
TLcdVPFModelDescriptor
.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. See TLcdVPFModelDecoder.ModelType
for more
information on VPF model types.public int getModelType()
IN_MEMORY_MODEL_TYPE
or
ON_THE_FLY_MODEL_TYPE
).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 Class getFeatureClass(int aIndex)
ILcdFeaturedDescriptor
Class
of the feature at the given index.getFeatureClass
in interface ILcdFeaturedDescriptor
aIndex
- a valid feature index.Class
of the feature at the given index.public int getFeatureCount()
ILcdFeaturedDescriptor
getFeatureCount
in interface ILcdFeaturedDescriptor
public int getFeatureIndex(String aName)
ILcdFeaturedDescriptor
getFeatureIndex
in interface ILcdFeaturedDescriptor
aName
- a feature name.public String getFeatureName(int aIndex)
ILcdFeaturedDescriptor
getFeatureName
in interface ILcdFeaturedDescriptor
aIndex
- a valid feature index.public int getVPFFeatureType()
POINT
, LINE
,
AREA
, TEXT
, COMPLEX
or MULTIPLE TYPE
.public TLcdVPFFeatureClass getVPFFeatureClass()
public ILcdBounds getBounds()
ILcd2DBoundsIndexedModel
interface. use the
moddel.getBounds()
method to retrieve the model's bounds.public void setDefaultFeatureCount(int aDefaultFeatureCount)
aDefaultFeatureCount
- the default feature count to be used.