org.geotools.styling
Class FeatureTypeStyleImpl

java.lang.Object
  extended by org.geotools.styling.FeatureTypeStyleImpl
All Implemented Interfaces:
java.lang.Cloneable, org.opengis.style.FeatureTypeStyle

public class FeatureTypeStyleImpl
extends java.lang.Object
implements FeatureTypeStyle, org.opengis.util.Cloneable

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

Version:
$Id: FeatureTypeStyleImpl.java 35198 2010-04-09 12:56:20Z aaime $
Author:
James Macgill, Johann Sorel (Geomatys)

Constructor Summary
protected FeatureTypeStyleImpl()
          Creates a new instance of FeatureTypeStyleImpl
  FeatureTypeStyleImpl(org.opengis.style.FeatureTypeStyle fts)
           
protected FeatureTypeStyleImpl(java.util.List<Rule> arules)
           
protected FeatureTypeStyleImpl(Rule[] rules)
          Creates a new instance of FeatureTypeStyleImpl
 
Method Summary
 void accept(StyleVisitor visitor)
           
 java.lang.Object accept(org.opengis.style.StyleVisitor visitor, java.lang.Object data)
           
 void addRule(Rule rule)
          Deprecated. 
 java.lang.Object clone()
          Creates a deep copy clone of the FeatureTypeStyle.
 boolean equals(java.lang.Object oth)
          Compares this FeatureTypeStyleImpl with another.
 java.util.Set<org.opengis.feature.type.Name> featureTypeNames()
           
 java.lang.String getAbstract()
          Deprecated. 
 Description getDescription()
          Description for this style.
 org.opengis.filter.Id getFeatureInstanceIDs()
           
 java.lang.String getFeatureTypeName()
          Deprecated. 
 java.lang.String getName()
           
 org.opengis.metadata.citation.OnLineResource getOnlineResource()
           
 Rule[] getRules()
          Deprecated. 
 java.lang.String[] getSemanticTypeIdentifiers()
          Deprecated. 
 java.lang.String getTitle()
          Deprecated. 
 int hashCode()
          Overrides hashCode.
 java.util.List<Rule> rules()
          Rules govern the appearance of any given feature to be styled by this styler.
 java.util.Set<org.opengis.style.SemanticType> semanticTypeIdentifiers()
           
 void setAbstract(java.lang.String abstractStr)
          Deprecated. 
 void setFeatureTypeName(java.lang.String name)
          Deprecated. 
 void setName(java.lang.String name)
           
 void setOnlineResource(org.opengis.metadata.citation.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(java.lang.String[] types)
          Deprecated. 
 void setTitle(java.lang.String title)
          Deprecated. 
 java.lang.String toString()
           
 
Methods inherited from class java.lang.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(java.util.List<Rule> arules)

FeatureTypeStyleImpl

protected FeatureTypeStyleImpl()
Creates a new instance of FeatureTypeStyleImpl


FeatureTypeStyleImpl

public FeatureTypeStyleImpl(org.opengis.style.FeatureTypeStyle fts)
Method Detail

rules

public java.util.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 org.opengis.style.FeatureTypeStyle

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 java.util.Set<org.opengis.style.SemanticType> semanticTypeIdentifiers()
Specified by:
semanticTypeIdentifiers in interface org.opengis.style.FeatureTypeStyle

getSemanticTypeIdentifiers

@Deprecated
public java.lang.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(java.lang.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 java.util.Set<org.opengis.feature.type.Name> featureTypeNames()
Specified by:
featureTypeNames in interface org.opengis.style.FeatureTypeStyle

getFeatureTypeName

@Deprecated
public java.lang.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(java.lang.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 org.opengis.filter.Id getFeatureInstanceIDs()
Specified by:
getFeatureInstanceIDs in interface org.opengis.style.FeatureTypeStyle

getDescription

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

Specified by:
getDescription in interface org.opengis.style.FeatureTypeStyle
Returns:
Human readable description for use in user interfaces

getName

public java.lang.String getName()
Specified by:
getName in interface org.opengis.style.FeatureTypeStyle

setName

public void setName(java.lang.String name)

getAbstract

@Deprecated
public java.lang.String getAbstract()
Deprecated. 


setAbstract

@Deprecated
public void setAbstract(java.lang.String abstractStr)
Deprecated. 


getTitle

@Deprecated
public java.lang.String getTitle()
Deprecated. 


setTitle

@Deprecated
public void setTitle(java.lang.String title)
Deprecated. 


accept

public java.lang.Object accept(org.opengis.style.StyleVisitor visitor,
                               java.lang.Object data)
Specified by:
accept in interface org.opengis.style.FeatureTypeStyle

accept

public void accept(StyleVisitor visitor)

clone

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

Overrides:
clone in class java.lang.Object
See Also:
org.geotools.styling.FeatureTypeStyle#clone()

hashCode

public int hashCode()
Overrides hashCode.

Overrides:
hashCode in class java.lang.Object
Returns:
The hashcode.

equals

public boolean equals(java.lang.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 java.lang.Object
Parameters:
oth - The other FeatureTypeStyleImpl to compare with.
Returns:
True if this and oth are equal.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setOnlineResource

public void setOnlineResource(org.opengis.metadata.citation.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 org.opengis.metadata.citation.OnLineResource getOnlineResource()
Specified by:
getOnlineResource in interface org.opengis.style.FeatureTypeStyle


Copyright © 1996-2010 Geotools. All Rights Reserved.