Class TLcdMIFModelDescriptor
- All Implemented Interfaces:
ILcdDataModelDescriptor,ILcdModelDescriptor,ILcdClassContentDescriptor,ILcdContentDescriptor,ILcdFeaturedDescriptor,ILcdFeaturedDescriptorProvider,Serializable
This ILcdModelDescriptor can be used to describe model constructed from MapInfo Interchange Format data.
This class implements both the ILcdFeaturedDescriptor and the ILcdDataModelDescriptor
interfaces. ILcdFeaturedDescriptor is included for backwards compatibility, but it is recommended to use
the methods from the ILcdDataModelDescriptor interface when possible.
In addition to the functionality described by these interfaces this descriptor contains the lists of geometry types and classes that are present in the model.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final shortThe identifier for the ARC type.static final shortThe identifier for the COLLECTION type.static final shortThe identifier for the ELLIPSE type.static final shortThe identifier for the LINE type.static final shortThe identifier for the MULTIPOINT type.static final shortThe identifier for the PLINE type.static final shortThe identifier for the POINT type.static final shortThe identifier for the RECT type.static final shortThe identifier for the REGION type.static final shortThe identifier for the ROUNDRECT type.static final shortThe identifier for the TEXT type.static final StringThe model type, "MIF".Fields inherited from class com.luciad.model.TLcdFeaturedModelDescriptor
fFeatureClasses, fFeatureNames -
Constructor Summary
ConstructorsConstructorDescriptionTLcdMIFModelDescriptor(String aSourceName, String aDisplayName, short[] aMIFGeometryTypes, TLcdDataType aDataType) Constructs a descriptor for a model containing MapInfo Interchange Format data.TLcdMIFModelDescriptor(String aSourceName, String aDisplayName, short[] aMIFGeometryTypes, String[] aFeatureNames) Deprecated.TLcdMIFModelDescriptor(String aSourceName, String aDisplayName, short[] aMIFGeometryTypes, String[] aFeatureNames, Class[] aFeatureClasses) -
Method Summary
Modifier and TypeMethodDescriptionbooleancontentContainsClass(Class aClass) Returns whether at least one object in the container is an instance of the given class.getContentClass(int aIndex) Returns the content class at index aIndex in the object container..intReturns the number of distinct Classes contained in an object container..Returns the data model that describes the elements of the model.short[]Returns the property MIFGeometryTypes.Returns a set containing all the data types of which instances can be elements in the model associated with this descriptor.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.short[]Deprecated.short[]Deprecated.Methods inherited from class com.luciad.model.TLcdFeaturedModelDescriptor
getFeatureClass, getFeatureCount, getFeaturedDescriptor, getFeatureIndex, getFeatureNameMethods 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
getFeatureClass, getFeatureCount, getFeatureIndex, getFeatureName, getFeatureUnitOfMeasureMethods inherited from interface com.luciad.model.ILcdModelDescriptor
getDisplayName, getSourceName, getTypeName
-
Field Details
-
TYPE_NAME
The model type, "MIF".- See Also:
-
POINT
public static final short POINTThe identifier for the POINT type.- See Also:
-
LINE
public static final short LINEThe identifier for the LINE type.- See Also:
-
PLINE
public static final short PLINEThe identifier for the PLINE type.- See Also:
-
REGION
public static final short REGIONThe identifier for the REGION type.- See Also:
-
ARC
public static final short ARCThe identifier for the ARC type.- See Also:
-
TEXT
public static final short TEXTThe identifier for the TEXT type.- See Also:
-
RECT
public static final short RECTThe identifier for the RECT type.- See Also:
-
ROUNDRECT
public static final short ROUNDRECTThe identifier for the ROUNDRECT type.- See Also:
-
ELLIPSE
public static final short ELLIPSEThe identifier for the ELLIPSE type.- See Also:
-
MULTIPOINT
public static final short MULTIPOINTThe identifier for the MULTIPOINT type.- See Also:
-
COLLECTION
public static final short COLLECTIONThe identifier for the COLLECTION type.- See Also:
-
-
Constructor Details
-
TLcdMIFModelDescriptor
@Deprecated public TLcdMIFModelDescriptor(String aSourceName, String aDisplayName, short[] aMIFGeometryTypes, String[] aFeatureNames) Constructs a descriptor for a model containing MapInfo Interchange Format data.- Parameters:
aSourceName- identifies the source of the models data.aDisplayName- the display name of the model.aMIFGeometryTypes- an array of shorts representing the geometries present in the source.aFeatureNames- an array with the names of the features the data holds.
-
TLcdMIFModelDescriptor
@Deprecated public TLcdMIFModelDescriptor(String aSourceName, String aDisplayName, short[] aMIFGeometryTypes, String[] aFeatureNames, Class[] aFeatureClasses) Constructs a descriptor for a model containing MapInfo Interchange Format data.- Parameters:
aSourceName- identifies the source of the models data.aDisplayName- the display name of the model.aMIFGeometryTypes- an array of shorts representing the geometries present in the source.aFeatureNames- an array with the names of the features the data holds.aFeatureClasses- an array with the classes of the features.
-
TLcdMIFModelDescriptor
public TLcdMIFModelDescriptor(String aSourceName, String aDisplayName, short[] aMIFGeometryTypes, TLcdDataType aDataType) Constructs a descriptor for a model containing MapInfo Interchange Format data.- Parameters:
aSourceName- identifies the source of the models data.aDisplayName- the display name of the model.aMIFGeometryTypes- an array of shorts representing the geometries present in the source.aDataType- the data model of the model descriptor
-
-
Method Details
-
getShapeType
public short[] getShapeType()Deprecated.Returns the property MIFGeometryTypes.- Returns:
- an array of short integers that represents the types present in the model.
-
getShapeTypes
public short[] getShapeTypes()Deprecated.Returns the property MIFGeometryTypes.- Returns:
- an array of short integers that represents the types present in the model.
-
getMIFGeometryTypes
public short[] getMIFGeometryTypes()Returns the property MIFGeometryTypes.- Returns:
- an array of short integers that represents the types present in the model.
-
getContentClassCount
public int getContentClassCount()Description copied from interface:ILcdContentDescriptorReturns the number of distinct Classes contained in an object container..- Specified by:
getContentClassCountin interfaceILcdContentDescriptor- Returns:
- the number of distinct Classes contained in an object container..
-
getContentClass
Description copied from interface:ILcdContentDescriptorReturns the content class at index aIndex in the object container..- Specified by:
getContentClassin interfaceILcdContentDescriptor- Parameters:
aIndex- the number of the content class.- Returns:
- the content class at index aIndex in the object container..
-
contentContainsClass
Description copied from interface:ILcdClassContentDescriptorReturns whether at least one object in the container is an instance of the given class.- Specified by:
contentContainsClassin interfaceILcdClassContentDescriptor- Parameters:
aClass- the class to check.- Returns:
- true when at least one instance of the class is in the object container.
-
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
-
TLcdMIFModelDescriptor(String, String, short[], com.luciad.datamodel.TLcdDataType)