org.geotools.styling
Class FeatureTypeStyleImpl

Object
  extended by FeatureTypeStyleImpl
All Implemented Interfaces:
Cloneable, FeatureTypeStyle

public class FeatureTypeStyleImpl
extends Object
implements FeatureTypeStyle, Cloneable

Implementation of Feature Type Style; care is taken to ensure everything is mutable.

Author:
James Macgill, Johann Sorel (Geomatys)

Constructor Summary
protected FeatureTypeStyleImpl()
          Creates a new instance of FeatureTypeStyleImpl
  FeatureTypeStyleImpl(FeatureTypeStyle fts)
           
protected FeatureTypeStyleImpl(List<Rule> arules)
           
protected FeatureTypeStyleImpl(Rule[] rules)
          Creates a new instance of FeatureTypeStyleImpl
 
Method Summary
 void accept(StyleVisitor visitor)
           
 Object accept(StyleVisitor visitor, Object data)
          calls the visit method of a StyleVisitor
 void addRule(Rule rule)
          Deprecated. 
 Object clone()
          Creates a deep copy clone of the FeatureTypeStyle.
 boolean equals(Object oth)
          Compares this FeatureTypeStyleImpl with another.
 Set<Name> featureTypeNames()
           Returns the names of the feature type that this style is meant to act upon.
 String getAbstract()
          Deprecated. 
 Description getDescription()
          Description for this style.
 Id getFeatureInstanceIDs()
          Returns a collection of Object identifying features object.
 String getFeatureTypeName()
          Deprecated. 
 String getName()
          Returns a name for this style.
 OnLineResource getOnlineResource()
          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.
 Rule[] getRules()
          Deprecated. 
 String[] getSemanticTypeIdentifiers()
          Deprecated. 
 String getTitle()
          Deprecated. 
 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)
 int hashCode()
          Overrides hashCode.
 List<Rule> rules()
          Rules govern the appearance of any given feature to be styled by this styler.
 Set<SemanticType> semanticTypeIdentifiers()
          Returns a collection that identifies the more general "type" of geometry that this style is meant to act upon.
 void setAbstract(String abstractStr)
          Deprecated. 
 void setFeatureTypeName(String name)
          Deprecated. 
 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[] newRules)
          Deprecated. 
 void setSemanticTypeIdentifiers(String[] types)
          Deprecated. 
 void setTitle(String title)
          Deprecated. 
 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)
 String toString()
           
 
Methods inherited from class Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FeatureTypeStyleImpl

protected FeatureTypeStyleImpl(Rule[] rules)
Creates a new instance of FeatureTypeStyleImpl

Parameters:
rules - DOCUMENT ME!

FeatureTypeStyleImpl

protected FeatureTypeStyleImpl(List<Rule> arules)

FeatureTypeStyleImpl

protected FeatureTypeStyleImpl()
Creates a new instance of FeatureTypeStyleImpl


FeatureTypeStyleImpl

public FeatureTypeStyleImpl(FeatureTypeStyle fts)
Method Detail

rules

public List<Rule> rules()
Description copied from interface: FeatureTypeStyle
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.

getRules

@Deprecated
public Rule[] getRules()
Deprecated. 

Description copied from interface: FeatureTypeStyle
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

@Deprecated
public void setRules(Rule[] newRules)
Deprecated. 

Description copied from interface: FeatureTypeStyle
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:
newRules - The set of rules to be set for this styler.

addRule

@Deprecated
public void addRule(Rule rule)
Deprecated. 


semanticTypeIdentifiers

public Set<SemanticType> semanticTypeIdentifiers()
Description copied from interface: FeatureTypeStyle
Returns a collection that identifies the more general "type" of geometry that this style is meant to act upon. In the current OGC SE specifications, this is an experimental element and can take only one of the following values:

Specified by:
semanticTypeIdentifiers in interface FeatureTypeStyle

getSemanticTypeIdentifiers

@Deprecated
public String[] getSemanticTypeIdentifiers()
Deprecated. 

Description copied from interface: FeatureTypeStyle
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

@Deprecated
public void setSemanticTypeIdentifiers(String[] types)
Deprecated. 

Description copied from interface: FeatureTypeStyle
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.

featureTypeNames

public Set<Name> featureTypeNames()
Description copied from interface: FeatureTypeStyle

Returns the names of the feature type that this style is meant to act upon.

In OGC Symbology Encoding define this method to return a single String, and ISO 19117 use a Collection of String. We've choosen ISO because it is more logic that a featureTypeStyle can be applied to multiple featuretypes and not limited to a single one.

Specified by:
featureTypeNames in interface FeatureTypeStyle
Returns:
the name of the feature type that this style is meant to act upon.

getFeatureTypeName

@Deprecated
public String getFeatureTypeName()
Deprecated. 

Description copied from interface: FeatureTypeStyle
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

@Deprecated
public void setFeatureTypeName(String name)
Deprecated. 

Description copied from interface: FeatureTypeStyle
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.

getFeatureInstanceIDs

public Id getFeatureInstanceIDs()
Description copied from interface: FeatureTypeStyle
Returns a collection of Object identifying features object.

ISO 19117 extends FeatureTypeStyle be providing this method. This method enable the possibility to use a feature type style on a given list of features only, which is not possible in OGC SE.

Specified by:
getFeatureInstanceIDs in interface FeatureTypeStyle
Returns:
Collection

getDescription

public Description getDescription()
Description copied from interface: FeatureTypeStyle
Description for this style.

Specified by:
getDescription in interface FeatureTypeStyle
Returns:
Human readable description for use in user interfaces

getName

public String getName()
Description copied from interface: FeatureTypeStyle
Returns a name for this style. This can be any string that uniquely identifies this style within a given canvas. It is not meant to be human-friendly. (The "title" property is meant to be human friendly.)

Specified by:
getName in interface FeatureTypeStyle
Returns:
a name for this style.

setName

public void setName(String name)

getAbstract

@Deprecated
public String getAbstract()
Deprecated. 


setAbstract

@Deprecated
public void setAbstract(String abstractStr)
Deprecated. 


getTitle

@Deprecated
public String getTitle()
Deprecated. 


setTitle

@Deprecated
public void setTitle(String title)
Deprecated. 


accept

public Object accept(StyleVisitor visitor,
                     Object data)
Description copied from interface: FeatureTypeStyle
calls the visit method of a StyleVisitor

Specified by:
accept in interface FeatureTypeStyle
Parameters:
visitor - the style visitor

accept

public void accept(StyleVisitor visitor)

clone

public Object clone()
Creates a deep copy clone of the FeatureTypeStyle.

Overrides:
clone in class Object
Returns:
A copy of this object.
See Also:
org.geotools.styling.FeatureTypeStyle#clone()

hashCode

public int hashCode()
Overrides hashCode.

Overrides:
hashCode in class Object
Returns:
The hashcode.

equals

public boolean equals(Object oth)
Compares this FeatureTypeStyleImpl with another.

Two FeatureTypeStyles are equal if they contain equal properties and an equal list of Rules.

Overrides:
equals in class Object
Parameters:
oth - The other FeatureTypeStyleImpl to compare with.
Returns:
True if this and oth are equal.

toString

public String toString()
Overrides:
toString in class Object

setOnlineResource

public void setOnlineResource(OnLineResource online)
Description copied from interface: FeatureTypeStyle
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

getOnlineResource

public OnLineResource getOnlineResource()
Description copied from interface: FeatureTypeStyle
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. OGC SLD specification can use this method to know if a style must be written completely or if writing the online resource path is enough.

Specified by:
getOnlineResource in interface FeatureTypeStyle
Returns:
OnlineResource or null

getTransformation

public Expression getTransformation()
Description copied from interface: FeatureTypeStyle
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

public void setTransformation(Expression transformation)
Description copied from interface: FeatureTypeStyle
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.