Class SLDValidator
- java.lang.Object
-
- org.hortonmachine.gears.utils.style.sld.SLDValidator
-
public class SLDValidator extends Object
-
-
Constructor Summary
Constructors Constructor Description SLDValidator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description EntityResolvergetEntityResolver()static StringgetErrorMessage(InputStream xml, List errors)static StringgetErrorMessage(Reader xml, List errors)returns a better formated error message - suitable for framing.voidsetEntityResolver(EntityResolver entityResolver)ListvalidateSLD(InputStream xml)validates against the SLD schema in the classpathListvalidateSLD(InputStream xml, String baseUrl)Deprecated.ListvalidateSLD(InputSource xml)validate a .sld against the schemaListvalidateSLD(InputSource xml, String baseUrl)Deprecated.
-
-
-
Method Detail
-
validateSLD
@Deprecated public List validateSLD(InputStream xml, String baseUrl)
Deprecated.validates against the SLD schema in the classpath- Parameters:
xml-baseUrl- GeoServer base URL
-
validateSLD
public List validateSLD(InputStream xml)
validates against the SLD schema in the classpath- Parameters:
xml-baseUrl- GeoServer base URL
-
getEntityResolver
public EntityResolver getEntityResolver()
-
setEntityResolver
public void setEntityResolver(EntityResolver entityResolver)
-
getErrorMessage
public static String getErrorMessage(InputStream xml, List errors)
-
getErrorMessage
public static String getErrorMessage(Reader xml, List errors)
returns a better formated error message - suitable for framing. There's a more complex version in StylesEditorAction. This will kick out a VERY LARGE errorMessage.- Parameters:
xml-errors-- Returns:
- DOCUMENT ME!
-
validateSLD
@Deprecated public List validateSLD(InputSource xml, String baseUrl)
Deprecated.validate a .sld against the schema- Parameters:
xml- input stream representing the .sld filebaseURL-SchemaUrl- location of the schemas. Normally use ".../schemas/sld/StyleLayerDescriptor.xsd"- Returns:
- list of SAXExceptions (0 if the file's okay)
-
validateSLD
public List validateSLD(InputSource xml)
validate a .sld against the schema- Parameters:
xml- input stream representing the .sld file- Returns:
- list of SAXExceptions (0 if the file's okay)
-
-