org.geotools.styling
Interface FeatureTypeStyle

All Superinterfaces:
FeatureTypeStyle

public interface FeatureTypeStyle
extends FeatureTypeStyle

How to style a feature type. This is introduced as a convenient package that can be used independently for feature types, for example in GML Default Styling. The "layer" concept is discarded inside of this element and all processing is relative to feature types. The FeatureTypeName is allowed to be optional, but only one feature type may be in context and it must match the syntax and semantics of all attribute references inside of the FeatureTypeStyle.

The details of this object are taken from the OGC Styled-Layer Descriptor Report (OGC 02-070) version 1.0.0.:


 <xsd:element name="FeatureTypeStyle">
 <xsd:annotation>
   <xsd:documentation>
     A FeatureTypeStyle contains styling information specific to one
    feature type.  This is the SLD level that separates the 'layer'
     handling from the 'feature' handling.
   </xsd:documentation>
   </xsd:annotation>
   <xsd:complexType>
     <xsd:sequence>
       <xsd:element ref="sld:Name" minOccurs="0"/>
       <xsd:element ref="sld:Title" minOccurs="0"/>
       <xsd:element ref="sld:Abstract" minOccurs="0"/>
       <xsd:element ref="sld:FeatureTypeName" minOccurs="0"/>
       <xsd:element ref="sld:SemanticTypeIdentifier" minOccurs="0"
                   maxOccurs="unbounded"/>
       <xsd:element ref="sld:Rule" maxOccurs="unbounded"/>
     </xsd:sequence>
   </xsd:complexType>
 </xsd:element>
 

Author:
James Macgill, CCG

Method Summary
 void accept(StyleVisitor visitor)
           
 void addRule(Rule rule)
          Deprecated. Please use rules().add( rule )
 String getAbstract()
          Deprecated. use getDescription().getAbstract().toString()
 Description getDescription()
          Description for this style.
 String getFeatureTypeName()
          Deprecated. this method is replaced by a live set featureTypeNames()
 Rule[] getRules()
          Deprecated. use rules().toArray( new Rule[0] )
 String[] getSemanticTypeIdentifiers()
          Deprecated. this method is replaced by a live set semanticIdentifiers()
 String getTitle()
          Deprecated. use getDescription.getTitle().toString()
 Expression getTransformation()
          The eventual transformation to be applied before rendering the data (should be an expression taking a feature collection or a grid coverage as the evaluation context and returns a feature collection or a grid coverage as an output)
 List<Rule> rules()
          Rules govern the appearance of any given feature to be styled by this styler.
 void setAbstract(String abstractStr)
          Deprecated. Please use getDescription().setAbstract( new SimpleInternationalString( abstractStr ))
 void setFeatureTypeName(String name)
          Deprecated. Use featureTypeNames().clear() and featureTypeNames.add( new NameImpl( name ))
 void setName(String name)
           
 void setOnlineResource(OnLineResource online)
          It is common to have a style coming from a external xml file, this method provide a way to get the original source if there is one.
 void setRules(Rule[] rules)
          Deprecated. Please use rules().clear(); rules.addAll( rules )
 void setSemanticTypeIdentifiers(String[] types)
          Deprecated. Please use semanticIdentifiers().addAll()
 void setTitle(String title)
          Deprecated. please use getDescription.setTitle( new SimpleInternationalString( title ))
 void setTransformation(Expression transformation)
          Sets the eventual transformation to be applied before rendering the data (should be an expression taking a feature collection or a grid coverage as an input and returns a feature collection or a grid coverage as an output)
 
Methods inherited from interface FeatureTypeStyle
accept, featureTypeNames, getFeatureInstanceIDs, getName, getOnlineResource, semanticTypeIdentifiers
 

Method Detail

setName

void setName(String name)

getTitle

String getTitle()
Deprecated. use getDescription.getTitle().toString()


setTitle

void setTitle(String title)
Deprecated. please use getDescription.setTitle( new SimpleInternationalString( title ))

Parameters:
title -

getDescription

Description getDescription()
Description for this style.

Specified by:
getDescription in interface FeatureTypeStyle
Returns:
Human readable description for use in user interfaces
Since:
2.5.x

getAbstract

String getAbstract()
Deprecated. use getDescription().getAbstract().toString()


setAbstract

void setAbstract(String abstractStr)
Deprecated. Please use getDescription().setAbstract( new SimpleInternationalString( abstractStr ))

Parameters:
abstractStr -

getFeatureTypeName

String getFeatureTypeName()
Deprecated. this method is replaced by a live set featureTypeNames()

Only features with the type name returned by this method should be styled by this feature type styler.

Returns:
The name of types that this styler applies to

setFeatureTypeName

void setFeatureTypeName(String name)
Deprecated. Use featureTypeNames().clear() and featureTypeNames.add( new NameImpl( name ))

Sets the type name of the features that this styler should be applied to.

Parameters:
name - The TypeName of the features to be styled by this instance.
TODO:
REVISIT: should a set method be declared in this interface at all?

getSemanticTypeIdentifiers

String[] getSemanticTypeIdentifiers()
Deprecated. this method is replaced by a live set semanticIdentifiers()

The SemanticTypeIdentifiers is experimental and is intended to be used to identify, using a community-controlled name(s), what the style is suitable to be used for. For example, a single style may be suitable to use with many different feature types. The syntax of the SemanticTypeIdentifiers string is undefined, but the strings "generic:line_string", "generic:polygon", "generic:point", "generic:text", "generic:raster", and "generic:any" are reserved to indicate that a FeatureTypeStyle may be used with any feature type with the corresponding default geometry type (i.e., no feature properties are referenced in the feature type style).

This method will be replaced by a live set semanticIdentifiers() in 2.6.x

Returns:
An array of strings representing systematic types which could be styled by this instance.

setSemanticTypeIdentifiers

void setSemanticTypeIdentifiers(String[] types)
Deprecated. Please use semanticIdentifiers().addAll()

The SemanticTypeIdentifiers is experimental and is intended to be used to identify, using a community-controlled name(s), what the style is suitable to be used for. For example, a single style may be suitable to use with many different feature types. The syntax of the SemanticTypeIdentifiers string is undefined, but the strings "generic:line_string", "generic:polygon", "generic:point", "generic:text", "generic:raster", and "generic:any" are reserved to indicate that a FeatureTypeStyle may be used with any feature type with the corresponding default geometry type (i.e., no feature properties are referenced in the feature type style).

Parameters:
types - An array of strings representing systematic types which could be styled by this instance.

getRules

Rule[] getRules()
Deprecated. use rules().toArray( new Rule[0] )

Rules govern the appearance of any given feature to be styled by this styler. Each rule contains conditions based on scale and feature attribute values. In addition, rules contain the symbolizers which should be applied when the rule holds true.

Returns:
The full set of rules contained in this styler.

setRules

void setRules(Rule[] rules)
Deprecated. Please use rules().clear(); rules.addAll( rules )

Rules govern the appearance of any given feature to be styled by this styler. Each rule contains conditions based on scale and feature attribute values. In addition, rules contain the symbolizers which should be applied when the rule holds true.

Parameters:
rules - The set of rules to be set for this styler.

addRule

void addRule(Rule rule)
Deprecated. Please use rules().add( rule )


rules

List<Rule> rules()
Rules govern the appearance of any given feature to be styled by this styler.

This is *the* list being used to manage the rules!

Specified by:
rules in interface FeatureTypeStyle
Returns:
the list of rules. can not be null but can be empty.
Since:
GeoTools 2.2.M3, GeoAPI 2.0

setOnlineResource

void setOnlineResource(OnLineResource online)
It is common to have a style coming from a external xml file, this method provide a way to get the original source if there is one.

Parameters:
online - location external file defining this style, or null if not available

accept

void accept(StyleVisitor visitor)

getTransformation

Expression getTransformation()
The eventual transformation to be applied before rendering the data (should be an expression taking a feature collection or a grid coverage as the evaluation context and returns a feature collection or a grid coverage as an output)

Returns:

setTransformation

void setTransformation(Expression transformation)
Sets the eventual transformation to be applied before rendering the data (should be an expression taking a feature collection or a grid coverage as an input and returns a feature collection or a grid coverage as an output)



Copyright © 1996-2014 Geotools. All Rights Reserved.