public class TLcyDrawingModelDescriptor extends TLcdFeaturedModelDescriptor
The ILcdModelDescriptor
used by the models created by the TLcyDrawingFormat
when
specified in the configuration file of the drawing add-on.
The default ILcdModelDescriptor
for drawing models is the TLcyDrawingDataModelDescriptor
.
fFeatureClasses
Constructor and Description |
---|
TLcyDrawingModelDescriptor(String aSourceName,
String aDisplayName)
Constructs a new
TLcyDrawingModelDescriptor with the given parameters |
TLcyDrawingModelDescriptor(String aSourceName,
String aDisplayName,
TLcyDrawingStyleRepository aDrawingModelStyle)
Constructs a new
TLcyDrawingModelDescriptor with the given parameters |
Modifier and Type | Method and Description |
---|---|
void |
addFeature(String aFeatureName,
Class aFeatureType)
Add an extra feature to the model
|
TLcyDrawingStyleRepository |
getDrawingStyleRepository()
Returns the
TLcyDrawingStyleRepository , associated with this model, and which contains
all the permanent available styles |
Class |
getFeatureClass(int i)
Returns the
Class of the feature at the given index. |
int |
getFeatureCount()
Returns the number of features.
|
int |
getFeatureIndex(String s)
Returns the index of the given feature name if it exists, -1 otherwise.
|
String |
getFeatureName(int i)
Returns the name of the feature at the given index.
|
void |
removeFeature(int index)
Removes the feature at index
index |
void |
setFeature(int index,
String aFeatureName,
Class aFeatureType)
Edit an existing feature
|
getFeaturedDescriptor
getDisplayName, getSourceName, getTypeName, setDisplayName, setSourceName, setTypeName, sourceNameToDisplayName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDisplayName, getSourceName, getTypeName
getFeatureUnitOfMeasure
public TLcyDrawingModelDescriptor(String aSourceName, String aDisplayName)
TLcyDrawingModelDescriptor
with the given parametersaSourceName
- the source nameaDisplayName
- the display namepublic TLcyDrawingModelDescriptor(String aSourceName, String aDisplayName, TLcyDrawingStyleRepository aDrawingModelStyle)
TLcyDrawingModelDescriptor
with the given parametersaSourceName
- the source nameaDisplayName
- the display nameaDrawingModelStyle
- Repository containing SLD styles which can be used by the domain objectspublic int getFeatureCount()
ILcdFeaturedDescriptor
getFeatureCount
in interface ILcdFeaturedDescriptor
getFeatureCount
in class TLcdFeaturedModelDescriptor
public String getFeatureName(int i)
ILcdFeaturedDescriptor
getFeatureName
in interface ILcdFeaturedDescriptor
getFeatureName
in class TLcdFeaturedModelDescriptor
i
- a valid feature index.public int getFeatureIndex(String s)
ILcdFeaturedDescriptor
getFeatureIndex
in interface ILcdFeaturedDescriptor
getFeatureIndex
in class TLcdFeaturedModelDescriptor
s
- a feature name.public Class getFeatureClass(int i)
ILcdFeaturedDescriptor
Class
of the feature at the given index.getFeatureClass
in interface ILcdFeaturedDescriptor
getFeatureClass
in class TLcdFeaturedModelDescriptor
i
- a valid feature index.Class
of the feature at the given index.public void addFeature(String aFeatureName, Class aFeatureType)
aFeatureName
- the name of the new featureaFeatureType
- the type of the new featurepublic void setFeature(int index, String aFeatureName, Class aFeatureType)
index
- the index of the feature which will be editedaFeatureName
- the new name for the feature at index index
aFeatureType
- the new type for the feature at index index
ArrayIndexOutOfBoundsException
- if the index does not exist.public void removeFeature(int index)
index
index
- the index of the feature which will be removedArrayIndexOutOfBoundsException
- if the index does not exist.public TLcyDrawingStyleRepository getDrawingStyleRepository()
TLcyDrawingStyleRepository
, associated with this model, and which contains
all the permanent available stylesTLcyDrawingStyleRepository
, associated with this model