Class SLDParserPlugin

java.lang.Object
org.mapfish.print.map.style.SLDParserPlugin
All Implemented Interfaces:
StyleParserPlugin

public class SLDParserPlugin extends Object implements StyleParserPlugin
Basic implementation for loading and parsing an SLD style.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    A default error handler to avoid that error messages like "[Fatal Error] :1:1: Content is not allowed in prolog." are directly printed to STDERR.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The separator between the path or url segment for loading the sld and an index of the style to obtain.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final Optional<org.geotools.api.style.Style>
    parseStyle(Configuration configuration, org.springframework.http.client.ClientHttpRequestFactory clientHttpRequestFactory, String styleString)
    Using the string load a style.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • STYLE_INDEX_REF_SEPARATOR

      public static final String STYLE_INDEX_REF_SEPARATOR
      The separator between the path or url segment for loading the sld and an index of the style to obtain.

      SLDs can contains multiple styles. Because of this there needs to be a way to indicate which style is referred to. That is the purpose of the style index.

      See Also:
  • Constructor Details

    • SLDParserPlugin

      public SLDParserPlugin()
  • Method Details

    • parseStyle

      public final Optional<org.geotools.api.style.Style> parseStyle(@Nullable Configuration configuration, @Nonnull org.springframework.http.client.ClientHttpRequestFactory clientHttpRequestFactory, @Nonnull String styleString)
      Description copied from interface: StyleParserPlugin
      Using the string load a style. The string can be from a URL, xml, css, whatever. If the string references a file it MUST be within a subdirectory of the configuration directory.
      Specified by:
      parseStyle in interface StyleParserPlugin
      Parameters:
      configuration - the configuration being used for the current print.
      clientHttpRequestFactory - an factory for making http requests.
      styleString - the string that provides the information for loading the style.
      Returns:
      if this plugin can create a style form the string then return the style otherwise Optional.absent().