Class JsonStyleParserHelper

java.lang.Object
org.mapfish.print.map.style.json.JsonStyleParserHelper

public final class JsonStyleParserHelper extends Object
Methods shared by various style versions for creating geotools SLD styles from the json format mapfish supports.
  • Constructor Details

    • 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 Details

    • createStyle

      public org.geotools.api.style.Style createStyle(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.