Class TLcdDWGModelDescriptor
- All Implemented Interfaces:
ILcdDataModelDescriptor,ILcdModelDescriptor,ILcdClassContentDescriptor,ILcdContentDescriptor,Serializable
ILcdModelDescriptor to describe data in
AutoCAD format (with the extension DWG).- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTLcdDWGModelDescriptor(String aSourceName, TLcdDWGLayer[] aDWGLayers, TLcdDWGLineType[] aDWGLineTypes) Creates a new TLcdDWGModelDescriptor with the given properties and a generic data model.TLcdDWGModelDescriptor(String aSourceName, String aDisplayName, TLcdDWGLayer[] aDWGLayers, TLcdDWGLineType[] aDWGLineTypes) Creates a new TLcdDWGModelDescriptor with the given properties and a generic data model. -
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.getDWGLayer(int aIndex) intgetDWGLineType(int aIndex) intReturns 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.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.model.ILcdModelDescriptor
getDisplayName, getSourceName, getTypeName
-
Constructor Details
-
TLcdDWGModelDescriptor
public TLcdDWGModelDescriptor(String aSourceName, TLcdDWGLayer[] aDWGLayers, TLcdDWGLineType[] aDWGLineTypes) Creates a new TLcdDWGModelDescriptor with the given properties and a generic data model. -
TLcdDWGModelDescriptor
public TLcdDWGModelDescriptor(String aSourceName, String aDisplayName, TLcdDWGLayer[] aDWGLayers, TLcdDWGLineType[] aDWGLineTypes) Creates a new TLcdDWGModelDescriptor with the given properties and a generic data model.
-
-
Method Details
-
getDWGLayerCount
public int getDWGLayerCount()- Returns:
- the number of layers of the DWG model.
-
getDWGLayer
- Parameters:
aIndex- a valid index of layer.- Returns:
- the specified layer of the DWG model.
-
getDWGLineTypeCount
public int getDWGLineTypeCount()- Returns:
- the number of line types of the DWG model.
-
getDWGLineType
- Parameters:
aIndex- a valid index of line type.- Returns:
- the specified line type of the DWG 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 (static) data object model associated with elements in a DWG model.
- See Also:
-
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:
- An empty set.
- See Also:
-
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:
- An empty set.
-