Package org.mapfish.print.map.style
Class SLDParserPlugin
java.lang.Object
org.mapfish.print.map.style.SLDParserPlugin
- All Implemented Interfaces:
StyleParserPlugin
Basic implementation for loading and parsing an SLD style.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA 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
FieldsModifier and TypeFieldDescriptionstatic final StringThe separator between the path or url segment for loading the sld and an index of the style to obtain. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Optional<org.geotools.api.style.Style> parseStyle(Configuration configuration, org.springframework.http.client.ClientHttpRequestFactory clientHttpRequestFactory, String styleString) Using the string load a style.
-
Field Details
-
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:StyleParserPluginUsing 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:
parseStylein interfaceStyleParserPlugin- 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().
-