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
Nested ClassesModifier and TypeClassDescriptionstatic classA builder for SLD Feature Type Styles. -
Constructor Summary
ConstructorsConstructorDescriptionEmpty 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 TypeMethodDescriptionvoidaddRule(TLcdSLDRule aRule) Adds a rule.voidaddSemanticTypeIdentifier(String aSemanticTypeIdentifier) Adds a semantic type identifier.Returns the value of the property that maps to theDescriptionelement.Returns the feature type name.getName()Returns the value of the property that maps to theNameelement.getRule(int aIndex) Gets the rule at a given position.intReturns the number of rules.Returns the value of the property that maps to theSemanticTypeIdentifierelement.getSemanticTypeIdentifier(int aIndex) Gets the semantic type identifier at a given position.intReturns the semantic type identifier count.Returns the value of the property that maps to theversionattribute.voidinsertRuleAt(TLcdSLDRule aRule, int aIndex) Inserts a rule in the list of rules at the given index.booleanisRuleInline(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.voidremoveRule(TLcdSLDRule aRule) Removes a rule.voidremoveSemanticTypeIdentifier(String aSemanticTypeIdentifier) Removes a given semantic type identifier.voidsetDescription(TLcdSLDDescription aValue) Sets the value of the property that maps to theDescriptionelement.voidsetFeatureTypeName(String aFeatureTypeName) Sets the feature type name.voidSets the value of the property that maps to theNameelement.voidsetVersion(String aValue) Sets the value of the property that maps to theversionattribute.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:
toStringin 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 theversionattribute.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_PROPERTYproperty.
-
setVersion
Sets the value of the property that maps to theversionattribute.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_PROPERTYproperty.
-
getName
Returns the value of the property that maps to theNameelement.- Returns:
- the value of the
NAME_PROPERTYproperty.
-
setName
Sets the value of the property that maps to theNameelement.- Parameters:
aValue- the value to set for theNAME_PROPERTYproperty.
-
getDescription
Returns the value of the property that maps to theDescriptionelement.A "Description" gives human-readable descriptive information for the object it is included within.
- Returns:
- the value of the
DESCRIPTION_PROPERTYproperty.
-
setDescription
Sets the value of the property that maps to theDescriptionelement.A "Description" gives human-readable descriptive information for the object it is included within.
- Parameters:
aValue- the value to set for theDESCRIPTION_PROPERTYproperty.
-
getSemanticTypeIdentifier
Returns the value of the property that maps to theSemanticTypeIdentifierelement.- Returns:
- the value of the
SEMANTIC_TYPE_IDENTIFIER_PROPERTYproperty.
-