Package com.luciad.ogc.sld.model
Class TLcdSLDFeatureTypeStyle
java.lang.Object
com.luciad.datamodel.TLcdDataObject
com.luciad.ogc.sld.model.TLcdSLDFeatureTypeStyle
- All Implemented Interfaces:
ILcdDataObject
,ILcdCloneable
,ILcdDeepCloneable
,Cloneable
A FeatureTypeStyle contains styling information specific to one feature type.
This is the SLD level that separates the 'layer' handling from the 'feature' handling.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A builder for SLD Feature Type Styles. -
Constructor Summary
ConstructorDescriptionEmpty constructor.TLcdSLDFeatureTypeStyle
(TLcdDataType aDataType) Empty constructor.TLcdSLDFeatureTypeStyle
(String aName, TLcdSLDDescription aDescription, String aFeatureTypeName, TLcdSLDRule[] aRules, String[] aSemanticTypeIdentifiers, String aVersion) Constructor for given parameters. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addRule
(TLcdSLDRule aRule) Adds a rule.void
addSemanticTypeIdentifier
(String aSemanticTypeIdentifier) Adds a semantic type identifier.Returns the value of the property that maps to theDescription
element.Returns the feature type name.getName()
Returns the value of the property that maps to theName
element.getRule
(int aIndex) Gets the rule at a given position.int
Returns the number of rules.Returns the value of the property that maps to theSemanticTypeIdentifier
element.getSemanticTypeIdentifier
(int aIndex) Gets the semantic type identifier at a given position.int
Returns the semantic type identifier count.Returns the value of the property that maps to theversion
attribute.void
insertRuleAt
(TLcdSLDRule aRule, int aIndex) Inserts a rule in the list of rules at the given index.boolean
isRuleInline
(int aIndex) Returns whether the rule at the given index is given in line in the symbology encoding.Creates a new builder with the default values.newBuilder
(TLcdDataType aDataType) Creates a new builder for the given data type with the default values.void
removeRule
(TLcdSLDRule aRule) Removes a rule.void
removeSemanticTypeIdentifier
(String aSemanticTypeIdentifier) Removes a given semantic type identifier.void
setDescription
(TLcdSLDDescription aValue) Sets the value of the property that maps to theDescription
element.void
setFeatureTypeName
(String aFeatureTypeName) Sets the feature type name.void
Sets the value of the property that maps to theName
element.void
setVersion
(String aValue) Sets the value of the property that maps to theversion
attribute.toString()
Returns the description title if it exists.Methods inherited from class com.luciad.datamodel.TLcdDataObject
clone, clone, getDataType, getValue, getValue, hasValue, hasValue, setValue, setValue
-
Constructor Details
-
TLcdSLDFeatureTypeStyle
public TLcdSLDFeatureTypeStyle()Empty constructor. The version will be set to the default version used by LuciadLightspeed which is currently 1.1.0. If a specific, fixed version is needed, it should be set explicitly. -
TLcdSLDFeatureTypeStyle
public TLcdSLDFeatureTypeStyle(String aName, TLcdSLDDescription aDescription, String aFeatureTypeName, TLcdSLDRule[] aRules, String[] aSemanticTypeIdentifiers, String aVersion) Constructor for given parameters.- Parameters:
aName
- the given name of the style.aDescription
- the given description of the style.aFeatureTypeName
- the given feature type to which the style applies.aRules
- the given rules to be applied.aSemanticTypeIdentifiers
- the given semantic identifiers.aVersion
- the given version of the style.
-
TLcdSLDFeatureTypeStyle
Empty constructor.
-
-
Method Details
-
setFeatureTypeName
Sets the feature type name.- Parameters:
aFeatureTypeName
- the feature type name.- See Also:
-
getFeatureTypeName
Returns the feature type name. The FeatureTypeName identifies the specific feature type that the feature-type style is for. It is allowed to be optional.- Returns:
- the feature type name.
-
getRuleCount
public int getRuleCount()Returns the number of rules.- Returns:
- the number of rules.
-
getRule
Gets the rule at a given position.- Parameters:
aIndex
- the index of the given position.- Returns:
- the rule at a given position.
-
addRule
Adds a rule.- Parameters:
aRule
- the given rule.
-
insertRuleAt
Inserts a rule in the list of rules at the given index. All rules which had an index higher than or equal to the index passed will be moved back one position.- Parameters:
aRule
- the rule to insert.aIndex
- the index at which to enter the rule. The index should be less than or equal to the value returned bygetRuleCount()
.
-
isRuleInline
public boolean isRuleInline(int aIndex) Returns whether the rule at the given index is given in line in the symbology encoding. If it is in line, the rule at that position will be aTLcdSLDRule
. This is always the case for SLD 1.0.0.- Parameters:
aIndex
- the index of the rule to check.- Returns:
- whether the rule at the given index is given in line in the symbology encoding.
-
removeRule
Removes a rule.- Parameters:
aRule
- the rule to be removed.
-
addSemanticTypeIdentifier
Adds a semantic type identifier.- Parameters:
aSemanticTypeIdentifier
- the given semantic type identifier.
-
removeSemanticTypeIdentifier
Removes a given semantic type identifier.- Parameters:
aSemanticTypeIdentifier
- the semantic type identifier to be removed.
-
getSemanticTypeIdentifierCount
public int getSemanticTypeIdentifierCount()Returns the semantic type identifier count.- Returns:
- the semantic type identifier count.
-
getSemanticTypeIdentifier
Gets the semantic type identifier at a given position.- Parameters:
aIndex
- the index of the given position.- Returns:
- the semantic type identifier at a given position.
-
toString
Returns the description title if it exists.- Overrides:
toString
in classTLcdDataObject
- Returns:
- the description title if it exists.
-
newBuilder
Creates a new builder with the default values.- Returns:
- the new builder.
- Since:
- 2012.1
-
newBuilder
public static TLcdSLDFeatureTypeStyle.Builder<TLcdSLDFeatureTypeStyle> newBuilder(TLcdDataType aDataType) Creates a new builder for the given data type with the default values.- Parameters:
aDataType
- The feature type for which this style is created. This type is used to construct XPath expressions.- Returns:
- the new builder.
- Since:
- 2012.1
-
getVersion
Returns the value of the property that maps to theversion
attribute.The version identifies the Symbology Encoding number this feature type style corresponds to. Depending on the version some properties may not need to be defined.
- Returns:
- the value of the
VERSION_PROPERTY
property.
-
setVersion
Sets the value of the property that maps to theversion
attribute.The version identifies the Symbology Encoding number this feature type style corresponds to. Depending on the version some properties may not need to be defined.
- Parameters:
aValue
- the value to set for theVERSION_PROPERTY
property.
-
getName
Returns the value of the property that maps to theName
element.- Returns:
- the value of the
NAME_PROPERTY
property.
-
setName
Sets the value of the property that maps to theName
element.- Parameters:
aValue
- the value to set for theNAME_PROPERTY
property.
-
getDescription
Returns the value of the property that maps to theDescription
element.A "Description" gives human-readable descriptive information for the object it is included within.
- Returns:
- the value of the
DESCRIPTION_PROPERTY
property.
-
setDescription
Sets the value of the property that maps to theDescription
element.A "Description" gives human-readable descriptive information for the object it is included within.
- Parameters:
aValue
- the value to set for theDESCRIPTION_PROPERTY
property.
-
getSemanticTypeIdentifier
Returns the value of the property that maps to theSemanticTypeIdentifier
element.- Returns:
- the value of the
SEMANTIC_TYPE_IDENTIFIER_PROPERTY
property.
-