public class ValidationUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
(package private) static String |
ROOT_PKG |
| Constructor and Description |
|---|
ValidationUtils() |
| Modifier and Type | Method and Description |
|---|---|
static org.opengis.cite.validation.SchematronValidator |
buildSchematronValidator(String schemaRef,
String phase)
Constructs a SchematronValidator that will check an XML resource against
the rules defined in a Schematron schema.
|
static LSResourceResolver |
createSchemaResolver(URI schemaLanguage)
Creates a resource resolver suitable for locating schemas using an entity
catalog.
|
static Schema |
createWFSSchema()
Creates a single Schema object representing the complete set of XML
Schema constraints that apply to WFS 2.0 message entities.
|
static URI |
extractSchemaReference(Source source,
String baseURI)
Extracts an XML Schema reference from a source XML document.
|
static final String ROOT_PKG
public static LSResourceResolver createSchemaResolver(URI schemaLanguage)
schemaLanguage - A URI that identifies a schema language by namespace name.LSResourceResolver object that is configured to use an
OASIS entity catalog.public static org.opengis.cite.validation.SchematronValidator buildSchematronValidator(String schemaRef, String phase)
schemaRef - A reference to a Schematron schema; this is expected to be a
relative or absolute URI value, possibly matching the system
identifier for some entry in an entity catalog.phase - The name of the phase to invoke.null if the validator
cannot be constructed (e.g. invalid schema reference or phase
name).public static URI extractSchemaReference(Source source, String baseURI) throws XMLStreamException
source - The source instance to read from; its base URI (systemId)
should be set. The document element is expected to include the
standard xsi:schemaLocation attribute.baseURI - An alternative base URI to use if the source does not have a
system identifier set or if its system id is a file
URI. This will usually be the URI used to retrieve the
resource; it may be null.null if no reference is found.XMLStreamException - If an error occurs while reading the source instance.public static Schema createWFSSchema()
null if one cannot be
constructed.Copyright © 2020 Open Geospatial Consortium. All rights reserved.