public class SchemaLocator extends Object implements XSDSchemaLocator
This class works from a XSD
which contains a reference to the schema.
Example usage:
XSD xsd = ...;
String namespaceURI = xsd.getNamesapceURI();
SchemaLocator locator = new SchemaLocator( xsd );
XSDSchema schema = locator.locateSchema( null, namespaceURI, null, null);
Modifier and Type | Field and Description |
---|---|
protected static Logger |
LOGGER
logging instance
|
protected XSD |
xsd
The xsd instance.
|
Constructor and Description |
---|
SchemaLocator(XSD xsd)
Creates a new instance of the schema locator.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canHandle(XSDSchema schema,
String namespaceURI,
String rawSchemaLocationURI,
String resolvedSchemaLocationURI)
Determines if the locator can locate a schema for the specified namespace and location.
|
XSDSchema |
locateSchema(XSDSchema schema,
String namespaceURI,
String rawSchemaLocationURI,
String resolvedSchemaLocationURI)
Creates the schema, returning
null if the schema could not be created. |
String |
toString() |
protected static Logger LOGGER
protected XSD xsd
public SchemaLocator(XSD xsd)
xsd
- The XSD instance that references the schema to be "located".public boolean canHandle(XSDSchema schema, String namespaceURI, String rawSchemaLocationURI, String resolvedSchemaLocationURI)
public XSDSchema locateSchema(XSDSchema schema, String namespaceURI, String rawSchemaLocationURI, String resolvedSchemaLocationURI)
null
if the schema could not be created.
namespaceURI
should not be null
. All other parameters are ignored.locateSchema
in interface XSDSchemaLocator
XSDSchemaLocator.locateSchema(org.eclipse.xsd.XSDSchema, java.lang.String,
java.lang.String, java.lang.String)
Copyright © 1996–2019 Geotools. All rights reserved.