Package org.mapfish.print.map.style.json
Class JsonStyleParserHelper
- java.lang.Object
-
- org.mapfish.print.map.style.json.JsonStyleParserHelper
-
public final class JsonStyleParserHelper extends java.lang.Object
Methods shared by various style versions for creating geotools SLD styles from the json format mapfish supports.
-
-
Constructor Summary
Constructors Constructor Description JsonStyleParserHelper(Configuration configuration, org.springframework.http.client.ClientHttpRequestFactory requestFactory, org.geotools.styling.StyleBuilder styleBuilder, boolean allowNullSymbolizer)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.geotools.api.style.LineSymbolizer
createLineSymbolizer(PJsonObject styleJson)
Add a line symbolizer definition to the rule.org.geotools.api.style.PointSymbolizer
createPointSymbolizer(PJsonObject styleJson)
Add a point symbolizer definition to the rule.protected org.geotools.api.style.PolygonSymbolizer
createPolygonSymbolizer(PJsonObject styleJson)
Add a polygon symbolizer definition to the rule.org.geotools.api.style.Style
createStyle(java.util.List<org.geotools.api.style.Rule> styleRules)
Create a style from a list of rules.protected org.geotools.api.style.TextSymbolizer
createTextSymbolizer(PJsonObject styleJson)
Add a text symbolizer definition to the rule.
-
-
-
Constructor Detail
-
JsonStyleParserHelper
public JsonStyleParserHelper(@Nullable Configuration configuration, @Nonnull org.springframework.http.client.ClientHttpRequestFactory requestFactory, @Nonnull org.geotools.styling.StyleBuilder styleBuilder, boolean allowNullSymbolizer)
Constructor.- Parameters:
configuration
- the configuration to use for resolving relative files or other settings.requestFactory
- Request factory for making the request.styleBuilder
- a style builder to use for creating the style objects.allowNullSymbolizer
- If true then create*Symbolizer() methods can return null if expected params are missing.
-
-
Method Detail
-
createStyle
public org.geotools.api.style.Style createStyle(java.util.List<org.geotools.api.style.Rule> styleRules)
Create a style from a list of rules.- Parameters:
styleRules
- the rules
-
createPointSymbolizer
@Nullable public org.geotools.api.style.PointSymbolizer createPointSymbolizer(PJsonObject styleJson)
Add a point symbolizer definition to the rule.- Parameters:
styleJson
- The old style.
-
createLineSymbolizer
@Nullable protected org.geotools.api.style.LineSymbolizer createLineSymbolizer(PJsonObject styleJson)
Add a line symbolizer definition to the rule.- Parameters:
styleJson
- The old style.
-
createPolygonSymbolizer
@Nullable protected org.geotools.api.style.PolygonSymbolizer createPolygonSymbolizer(PJsonObject styleJson)
Add a polygon symbolizer definition to the rule.- Parameters:
styleJson
- The old style.
-
createTextSymbolizer
protected org.geotools.api.style.TextSymbolizer createTextSymbolizer(PJsonObject styleJson)
Add a text symbolizer definition to the rule.- Parameters:
styleJson
- The old style.
-
-