Package com.luciad.ogc.sld.model
Class TLcdSLDParameterValue
java.lang.Object
com.luciad.datamodel.TLcdDataObject
com.luciad.ogc.sld.model.TLcdSLDParameterValue
- All Implemented Interfaces:
ILcdDataObject
,ILcdGenericExpression
,ILcdCloneable
,ILcdDeepCloneable
,Cloneable
The "ParameterValue" uses OGC Filter expressions to give values for SLD
graphic parameters. A "mixed" element-content model is used with textual
substitution for values. E.g. the value for a color consists of 6 hexadecimal
digits preceded by a #. This could be given by
<CssParameter name="fill">#00<ogc:PropertyName>greenband</ogc:PropertyName>FF</CssParameter>If you want to retrieve the actual value for a given object, you can construct an
ILcdEvaluator
using the
TLcdSLDFunctionEvaluatorFactory
.-
Constructor Summary
ConstructorDescriptionEmpty constructorTLcdSLDParameterValue
(ILcdOGCExpression aOGCExpression) Constructor for the simple case where the contents only consists of an expression.TLcdSLDParameterValue
(String aTextContent) Constructor for the simple case where the contents consists only of text.TLcdSLDParameterValue
(Vector aContents) Constructs a parameterized value. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addContent
(int aIndex, Object aContent) Inserts a content at a given position.void
addContent
(Object aContent) Adds a content.clone()
Returns a deep clone of this object.Returns the value of the content property.getContent
(int aIndex) Gets the content at a given position.int
Gets the content count.getExpression
(int aContentIndex) Gets the expression at a given position.getText
(int aContentIndex) Gets the text at a given position.boolean
isContentExpression
(int aIndex) Checks whether the content at a given position is an expression or not.boolean
isContentText
(int aIndex) Checks whether the content at a given position is a text or not.void
removeContent
(int aIndex) Removes the content at the specified index.toString()
Methods inherited from class com.luciad.datamodel.TLcdDataObject
clone, getDataType, getValue, getValue, hasValue, hasValue, setValue, setValue
-
Constructor Details
-
TLcdSLDParameterValue
Constructs a parameterized value.- Parameters:
aContents
- the contents that should be evaluated. The contents can be mixed, i.e., a combination of text and expressions. The Vector should therefore only contain String or ILcdOGCExpression objects.
-
TLcdSLDParameterValue
Constructor for the simple case where the contents only consists of an expression.- Parameters:
aOGCExpression
- the given expression.
-
TLcdSLDParameterValue
Constructor for the simple case where the contents consists only of text.- Parameters:
aTextContent
-
-
TLcdSLDParameterValue
public TLcdSLDParameterValue()Empty constructor
-
-
Method Details
-
getContentCount
public int getContentCount()Gets the content count.- Returns:
- the content count.
-
getContent
Gets the content at a given position.- Parameters:
aIndex
- the index of the given position.- Returns:
- the content at a given position.
-
isContentExpression
public boolean isContentExpression(int aIndex) Checks whether the content at a given position is an expression or not.- Parameters:
aIndex
- the index of the given position.- Returns:
true
if the content at a given position is an expression.false
if not.
-
isContentText
public boolean isContentText(int aIndex) Checks whether the content at a given position is a text or not.- Parameters:
aIndex
- the index of the given position.- Returns:
true
if the content at a given position is a text.false
if not.
-
removeContent
public void removeContent(int aIndex) Removes the content at the specified index.- Parameters:
aIndex
- the index of the content to remove.
-
getExpression
Gets the expression at a given position.- Parameters:
aContentIndex
- the index of the given position.- Returns:
- the expression at a given position.
-
getText
Gets the text at a given position.- Parameters:
aContentIndex
- the index of the given position.- Returns:
- the text at a given position.
-
addContent
Adds a content. The content must be either anILcdOGCExpression
or aString
.- Parameters:
aContent
- the content to be added.
-
addContent
Inserts a content at a given position. The content must be either anILcdOGCExpression
or aString
.- Parameters:
aIndex
- the index of the given position.aContent
- the content to be added.
-
clone
Description copied from class:TLcdDataObject
Returns a deep clone of this object. This method delegates toTLcdDataObject.clone(Map)
.- Specified by:
clone
in interfaceILcdCloneable
- Overrides:
clone
in classTLcdDataObject
- Returns:
- a deep clone of this object
- See Also:
-
toString
- Overrides:
toString
in classTLcdDataObject
-
getContent
Returns the value of the content property.- Returns:
- the value of the
CONTENT_PROPERTY
property.
-