Package org.geotools.styling
Class FeatureTypeStyleImpl
- Object
- 
- FeatureTypeStyleImpl
 
- 
- All Implemented Interfaces:
- Cloneable,- FeatureTypeStyle,- Cloneable
 
 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)
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface FeatureTypeStyleFeatureTypeStyle.RenderingSelectionOptions
 
- 
 - 
Field SummaryFields Modifier and Type Field Description static StringKEY_EVALUATION_MODEThis option influences how multiple rules matching the same feature are evaluatedprotected Map<String,String>optionsstatic StringVALUE_EVALUATION_MODE_ALLThe standard behavior, all the matching rules are executedstatic StringVALUE_EVALUATION_MODE_FIRSTOnly the first matching rule gets executed, all the others are skipped- 
Fields inherited from interface FeatureTypeStyleCOMPOSITE, COMPOSITE_BASE, MAX_SCALE_DENOMINATOR, MIN_SCALE_DENOMINATOR, RT_OVERASAMPLE, SORT_BY, SORT_BY_GROUP, VENDOR_OPTION_INCLUSION, VT_ATTRIBUTES, VT_COALESCE, VT_LABEL_ATTRIBUTES, VT_LABELS
 
- 
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedFeatureTypeStyleImpl()Creates a new instance of FeatureTypeStyleImplprotectedFeatureTypeStyleImpl(List<Rule> arules)FeatureTypeStyleImpl(FeatureTypeStyle fts)protectedFeatureTypeStyleImpl(Rule... rules)Creates a new instance of FeatureTypeStyleImpl
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(StyleVisitor visitor)Objectaccept(TraversingStyleVisitor visitor, Object data)calls the visit method of a StyleVisitorObjectclone()Creates a deep copy clone of the FeatureTypeStyle.booleanequals(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.DescriptiongetDescription()Description for this style.IdgetFeatureInstanceIDs()Returns a collection of Object identifying features object.StringgetName()Returns a name for this style.OnLineResourcegetOnlineResource()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.Map<String,String>getOptions()Map of vendor options for the symbolizer.ExpressiongetTransformation()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)inthashCode()Overrides hashCode.booleanhasOption(String key)Determines if a vendor option with the specific key has been set on this symbolizer.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.voidsetName(String name)voidsetOnlineResource(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.voidsetTransformation(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)StringtoString()
 
- 
- 
- 
Field Detail- 
KEY_EVALUATION_MODEpublic static String KEY_EVALUATION_MODE This option influences how multiple rules matching the same feature are evaluated
 - 
VALUE_EVALUATION_MODE_ALLpublic static String VALUE_EVALUATION_MODE_ALL The standard behavior, all the matching rules are executed
 - 
VALUE_EVALUATION_MODE_FIRSTpublic static String VALUE_EVALUATION_MODE_FIRST Only the first matching rule gets executed, all the others are skipped
 
- 
 - 
Constructor Detail- 
FeatureTypeStyleImplprotected FeatureTypeStyleImpl(Rule... rules) Creates a new instance of FeatureTypeStyleImpl
 - 
FeatureTypeStyleImplprotected FeatureTypeStyleImpl() Creates a new instance of FeatureTypeStyleImpl
 - 
FeatureTypeStyleImplpublic FeatureTypeStyleImpl(FeatureTypeStyle fts) 
 
- 
 - 
Method Detail- 
rulespublic List<Rule> rules() Description copied from interface:FeatureTypeStyleRules 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:
- rulesin interface- FeatureTypeStyle
 
 - 
semanticTypeIdentifierspublic Set<SemanticType> semanticTypeIdentifiers() Description copied from interface:FeatureTypeStyleReturns 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:- generic:point
- generic:line
- generic:polygon
- generic:text
- generic:raster
- generic:any
 - Specified by:
- semanticTypeIdentifiersin interface- FeatureTypeStyle
 
 - 
featureTypeNamespublic Set<Name> featureTypeNames() Description copied from interface:FeatureTypeStyleReturns 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:
- featureTypeNamesin interface- FeatureTypeStyle
- Returns:
- the name of the feature type that this style is meant to act upon.
 
 - 
getFeatureInstanceIDspublic Id getFeatureInstanceIDs() Description copied from interface:FeatureTypeStyleReturns 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:
- getFeatureInstanceIDsin interface- FeatureTypeStyle
- Returns:
- Collection
 
 - 
getDescriptionpublic Description getDescription() Description copied from interface:FeatureTypeStyleDescription for this style.- Specified by:
- getDescriptionin interface- FeatureTypeStyle
- Returns:
- Human readable description for use in user interfaces
 
 - 
getNamepublic String getName() Description copied from interface:FeatureTypeStyleReturns 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:
- getNamein interface- FeatureTypeStyle
- Returns:
- a name for this style.
 
 - 
setNamepublic void setName(String name) - Specified by:
- setNamein interface- FeatureTypeStyle
 
 - 
acceptpublic Object accept(TraversingStyleVisitor visitor, Object data) Description copied from interface:FeatureTypeStylecalls the visit method of a StyleVisitor- Specified by:
- acceptin interface- FeatureTypeStyle
- Parameters:
- visitor- the style visitor
 
 - 
acceptpublic void accept(StyleVisitor visitor) - Specified by:
- acceptin interface- FeatureTypeStyle
 
 - 
clonepublic Object clone() Creates a deep copy clone of the FeatureTypeStyle.- Specified by:
- clonein interface- Cloneable
- Overrides:
- clonein class- Object
- Returns:
- A copy of this object.
- See Also:
- Object.clone()
 
 - 
hashCodepublic int hashCode() Overrides hashCode.
 - 
equalspublic boolean equals(Object oth) Compares this FeatureTypeStyleImpl with another.Two FeatureTypeStyles are equal if they contain equal properties and an equal list of Rules. 
 - 
setOnlineResourcepublic void setOnlineResource(OnLineResource online) Description copied from interface:FeatureTypeStyleIt 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.- Specified by:
- setOnlineResourcein interface- FeatureTypeStyle
- Parameters:
- online- location external file defining this style, or null if not available
 
 - 
getOnlineResourcepublic OnLineResource getOnlineResource() Description copied from interface:FeatureTypeStyleIt 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:
- getOnlineResourcein interface- FeatureTypeStyle
- Returns:
- OnlineResource or null
 
 - 
getTransformationpublic Expression getTransformation() Description copied from interface:FeatureTypeStyleThe 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)- Specified by:
- getTransformationin interface- FeatureTypeStyle
 
 - 
setTransformationpublic void setTransformation(Expression transformation) Description copied from interface:FeatureTypeStyleSets 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)- Specified by:
- setTransformationin interface- FeatureTypeStyle
 
 - 
hasOptionpublic boolean hasOption(String key) Description copied from interface:FeatureTypeStyleDetermines if a vendor option with the specific key has been set on this symbolizer.- Specified by:
- hasOptionin interface- FeatureTypeStyle
 
 - 
getOptionspublic Map<String,String> getOptions() Description copied from interface:FeatureTypeStyleMap of vendor options for the symbolizer.Client code looking for the existence of a single option should use FeatureTypeStyle.hasOption(String)- Specified by:
- getOptionsin interface- FeatureTypeStyle
 
 
- 
 
-