Class TLcdSHPModelDescriptor
- All Implemented Interfaces:
ILcdDataModelDescriptor
,ILcdModelDescriptor
,ILcdClassContentDescriptor
,ILcdContentDescriptor
,ILcdFeaturedDescriptor
,ILcdFeaturedDescriptorProvider
,Serializable
ILcdModelDescriptor
, ILcdFeaturedDescriptor
and
ILcdClassContentDescriptor
implementation for models containing ESRI shape data decoded with the
TLcdSHPModelDecoder
.
On top of the functionality described by these interfaces this descriptor contains the list of geometries present in
the model. The list is accessible through the property ShapeTypes as an array of integers which are
defined in this class.- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Indicates a multi-point whose points exists of (x,y) values.static final int
Indicates a multi-point whose points exists of (x,y) values and a measure value for each point.static final int
Indicates a multi-point whose points exists of (x,y,z) values and a measure value for each point.static final int
Indicates a empty ESRI shape.static final int
Indicates a point with a (x,y) coordinate.static final int
Indicates a point with a (x,y) coordinate and a measure value.static final int
Indicates a point with a (x,y,z) coordinate and a measure value.static final int
Indicates a multi-polygon whose points exists of (x,y) values.static final int
Indicates a multi-polygon whose points exists of (x,y) values and a measure value for each point.static final int
Indicates a multi-polygon whose points exists of (x,y,z) values and a measure value for each point.static final int
Indicates a multi-polyline whose points exists of (x,y) values.static final int
Indicates a multi-polyline whose points exists of (x,y) values and a measure value for each point.static final int
Indicates a multi-polyline whose points exists of (x,y,z) values and a measure value for each point.static final String
The name for ESRI SHP format data.static final int
Indicates an unknown ESRI shape.Fields inherited from class com.luciad.model.TLcdFeaturedModelDescriptor
fFeatureClasses, fFeatureNames
-
Constructor Summary
ConstructorDescriptionTLcdSHPModelDescriptor
(String aSourceName, String aDisplayName, int[] aShapeTypes, String[] aFeatureNames, Class[] aFeatureClasses) Constructs a model descriptor for models containing ESRI SHP data. -
Method Summary
Modifier and TypeMethodDescriptionboolean
contentContainsClass
(Class aClass) Returns whether the model contains an object of exactly the given class.getContentClass
(int aIndex) Returns the class at the given index.int
Returns the number of distinct classes of objects in the model.Returns the data model that describes the elements of the model.Returns a set containing the single type of which all model elements are instances.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.int[]
Returns the list geometries that occur in the model.Methods inherited from class com.luciad.model.TLcdFeaturedModelDescriptor
getFeatureClass, getFeatureCount, getFeaturedDescriptor, getFeatureIndex, getFeatureName
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
getFeatureClass, getFeatureCount, getFeatureIndex, getFeatureName, getFeatureUnitOfMeasure
Methods inherited from interface com.luciad.model.ILcdModelDescriptor
getDisplayName, getSourceName, getTypeName
-
Field Details
-
TYPE_NAME
The name for ESRI SHP format data.- See Also:
-
UNKNOWN_SHAPE
public static final int UNKNOWN_SHAPEIndicates an unknown ESRI shape.- See Also:
-
NULL_SHAPE
public static final int NULL_SHAPEIndicates a empty ESRI shape.- See Also:
-
POINT
public static final int POINTIndicates a point with a (x,y) coordinate.- See Also:
-
POLYLINE
public static final int POLYLINEIndicates a multi-polyline whose points exists of (x,y) values.- See Also:
-
POLYGON
public static final int POLYGONIndicates a multi-polygon whose points exists of (x,y) values.- See Also:
-
MULTI_POINT
public static final int MULTI_POINTIndicates a multi-point whose points exists of (x,y) values.- See Also:
-
POINT_Z
public static final int POINT_ZIndicates a point with a (x,y,z) coordinate and a measure value.- See Also:
-
POLYLINE_Z
public static final int POLYLINE_ZIndicates a multi-polyline whose points exists of (x,y,z) values and a measure value for each point.- See Also:
-
POLYGON_Z
public static final int POLYGON_ZIndicates a multi-polygon whose points exists of (x,y,z) values and a measure value for each point.- See Also:
-
MULTI_POINT_Z
public static final int MULTI_POINT_ZIndicates a multi-point whose points exists of (x,y,z) values and a measure value for each point.- See Also:
-
POINT_M
public static final int POINT_MIndicates a point with a (x,y) coordinate and a measure value.- See Also:
-
POLYLINE_M
public static final int POLYLINE_MIndicates a multi-polyline whose points exists of (x,y) values and a measure value for each point.- See Also:
-
POLYGON_M
public static final int POLYGON_MIndicates a multi-polygon whose points exists of (x,y) values and a measure value for each point.- See Also:
-
MULTI_POINT_M
public static final int MULTI_POINT_MIndicates a multi-point whose points exists of (x,y) values and a measure value for each point.- See Also:
-
-
Constructor Details
-
TLcdSHPModelDescriptor
public TLcdSHPModelDescriptor(String aSourceName, String aDisplayName, int[] aShapeTypes, String[] aFeatureNames, Class[] aFeatureClasses) Constructs a model descriptor for models containing ESRI SHP data.- Parameters:
aSourceName
- identifies the source name of the model.aDisplayName
- a display name for the model.aShapeTypes
- the ESRI geometries in the model.aFeatureNames
- the names of the features of the objects in the model.aFeatureClasses
- the classes of the features of the objects in the model.
-
-
Method Details
-
getShapeTypes
public int[] getShapeTypes()Returns the list geometries that occur in the model.- Returns:
- an array of integers that represents the geometries present in the source data.
-
getContentClassCount
public int getContentClassCount()Returns the number of distinct classes of objects in the model. 0 if not defined yet.- Specified by:
getContentClassCount
in interfaceILcdContentDescriptor
- Returns:
- the number of distinct classes of objects in the model. 0 if not defined yet.
-
getContentClass
Returns the class at the given index.- Specified by:
getContentClass
in interfaceILcdContentDescriptor
- Parameters:
aIndex
- the index for which the class is requested. This index should be smaller than the return value ofgetContentClassCount()
.- Returns:
- the class at the given index.
-
contentContainsClass
Returns whether the model contains an object of exactly the given class.- Specified by:
contentContainsClass
in interfaceILcdClassContentDescriptor
- Parameters:
aClass
- the class to check for.- Returns:
- true when the model contains an object of exactly that class, false otherwise.
-
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
Returns a set containing the single type of which all model elements are instances.- Specified by:
getModelElementTypes
in interfaceILcdDataModelDescriptor
- Returns:
- a set containing the single type of which all model elements are instances
-
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
-