deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.graphics.sld
Class CssParameter

java.lang.Object
  extended by org.deegree.graphics.sld.CssParameter
All Implemented Interfaces:
Marshallable

public class CssParameter
extends java.lang.Object
implements Marshallable

The simple SVG/CSS2 styling parameters are given with the CssParameter element, which is defined as follows:


   <xs:element name="CssParameter" type="sld:ParameterValueType"/>
      <xs:complexType name="ParameterValueType" mixed="true">
         <xs:choice minOccurs="0" maxOccurs="unbounded">
              <xs:element ref="wfs:expression"/>
          </xs:choice>
   </xs:complexType>

 
The parameter values are allowed to be complex expressions for maximum flexibility. The mixed="true" definition means that regular text may be mixed in with various sub-expressions, implying a text-substitution model for parameter values. Numeric and character-string data types are not distinguished, which may cause some complications.

Here are some usage examples:

  1. <CssParameter name="stroke-width">3</CssParameter>
  2. <CssParameter name="stroke-width">
          <wfs:Literal>3</wfs:Literal>
     </CssParameter>
  3. <CssParameter name="stroke-width">
          <wfs:Add>
              <wfs:PropertyName>/A</wfs:PropertyName>
              <wfs:Literal>2</wfs:Literal>
          </wfs:Add>
     </CssParameter>
  4. <Label>This is city "<wfs:PropertyName>/NAME</wfs:PropertyName>"
  of state <wfs:PropertyName>/STATE</wfs:PropertyName></Label>

 
The allowed SVG/CSS styling parameters for a stroke are: stroke (color), stroke-opacity, stroke-width, stroke-linejoin, stroke-linecap, stroke-dasharray, and stroke-dashoffset. The chosen parameter is given by the name attribute of the CssParameter element.

Version:
$Revision: 18195 $ $Date: 2009-06-18 17:55:39 +0200 (Do, 18 Jun 2009) $
Author:
Andreas Poth , Markus Schneider

Constructor Summary
CssParameter(java.lang.String name, ParameterValueType pvt)
          constructor initializing the class with the
 
Method Summary
 java.lang.String exportAsXML()
          exports the content of the CssParameter as XML formated String
(package private)  java.lang.String getName()
          Returns the name attribute's value of the CssParameter.
 ParameterValueType getValue()
          Returns the value of the CssParameter as an ParameterValueType.
(package private)  java.lang.String getValue(Feature feature)
          Returns the (evaluated) value of the CssParameter as a simple String.
 PropertyName getValueAsPropertyName()
          Returns the value of the CssParameter as an PropertyName.
(package private)  void setName(java.lang.String name)
          Sets the name attribute's value of the CssParameter.
(package private)  void setValue(ParameterValueType value)
          Sets the value of the CssParameter as an ParameterValueType.
(package private)  void setValue(java.lang.String value)
          Sets the value of the CssParameter as a simple String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CssParameter

public CssParameter(java.lang.String name,
                    ParameterValueType pvt)
constructor initializing the class with the

Parameters:
name -
pvt -
Method Detail

getName

java.lang.String getName()
Returns the name attribute's value of the CssParameter.

Returns:
the value of the name attribute of the CssParameter

setName

void setName(java.lang.String name)
Sets the name attribute's value of the CssParameter.

Parameters:
name - the value of the name attribute of the CssParameter

getValue

public ParameterValueType getValue()
Returns the value of the CssParameter as an ParameterValueType.

Returns:
the mixed content of the element

setValue

void setValue(ParameterValueType value)
Sets the value of the CssParameter as an ParameterValueType.

Parameters:
value - the mixed content of the element

getValue

java.lang.String getValue(Feature feature)
                    throws FilterEvaluationException
Returns the (evaluated) value of the CssParameter as a simple String.

Parameters:
feature - specifies the Feature to be used for evaluation of the underlying 'sld:ParameterValueType'
Returns:
the (evaluated) String value of the parameter
Throws:
FilterEvaluationException - if the evaluations fails

getValueAsPropertyName

public PropertyName getValueAsPropertyName()
Returns the value of the CssParameter as an PropertyName.

Returns:
the value of the parameter as an PropertyName

setValue

void setValue(java.lang.String value)
Sets the value of the CssParameter as a simple String.

Parameters:
value - CssParameter-Value to be set

exportAsXML

public java.lang.String exportAsXML()
exports the content of the CssParameter as XML formated String

Specified by:
exportAsXML in interface Marshallable
Returns:
xml representation of the CssParameter

deegree 2.5 (2011/06/29 09:44 build-8-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org