public abstract class XSD extends Object
This class should is subclasses for the xs, gml, filter, sld, etc... schemas. Subclasses should be implemented as singletons.
Modifier and Type | Field and Description |
---|---|
protected static Logger |
LOGGER
logging instance
|
protected XSDSchema |
schema
schema contents
|
protected Schema |
typeMappingProfile
type mapping profile
|
protected Schema |
typeSchema
type schema
|
Modifier | Constructor and Description |
---|---|
protected |
XSD() |
Modifier and Type | Method and Description |
---|---|
protected void |
addDependencies(Set dependencies)
Subclass hook to add additional dependencies.
|
protected List |
allDependencies() |
protected XSDSchema |
buildSchema()
Builds the schema from the .xsd file specified by
getSchemaLocation()
This method may be extended, but should not be overridden. |
protected Schema |
buildTypeMappingProfile(Schema typeSchema)
Sets up a profile which uniquely maps a set of java classes to a schema element.
|
protected Schema |
buildTypeSchema()
Sets up the schema which maps xml schema types to attribute types.
|
SchemaLocationResolver |
createSchemaLocationResolver() |
SchemaLocator |
createSchemaLocator() |
void |
dispose()
Remove all references to this schema, and all schemas built in the same resource set It is
important to call this method for every dynamic schema created that is not needed anymore,
because references in the static schema's will otherwise keep it alive forever
|
boolean |
equals(Object obj)
Implementation of equals, equality is based soley on
getNamespaceURI() . |
List<XSD> |
getAllDependencies()
Returns all dependencies , direct and transitive that this xsd depends on.
|
List<Schema> |
getAllTypeMappingProfiles()
Transitively returns the type mapping profile for this schema and all schemas that this
schema depends on.
|
Set<XSD> |
getDependencies()
The dependencies of this schema.
|
abstract String |
getNamespaceURI()
The namespace uri of the schema.
|
XSDSchema |
getSchema()
Returns the XSD object representing the contents of the schema.
|
abstract String |
getSchemaLocation()
The location on the local disk of the top level .xsd file which defines the schema.
|
XSDSchemaLocator |
getSupplementarySchemaLocator()
Optionally, a schema locator that helps locating (other) schema's used for includes/imports
that might already exist but are not in dependencies
|
Schema |
getTypeMappingProfile()
Returns the sbuset of
getTypeSchema() which maintains a unique java class to xml
type mapping. |
Schema |
getTypeSchema()
Returns the schema containing
AttributeType 's for all xml types. |
int |
hashCode() |
protected Name |
name(QName qName)
Convenience method to turn a QName into a Name.
|
QName |
qName(String local)
Returns the qualified name for the specified local part.
|
String |
toString() |
protected static Logger LOGGER
protected XSDSchema schema
protected Schema typeSchema
protected Schema typeMappingProfile
protected Schema buildTypeSchema()
protected Schema buildTypeMappingProfile(Schema typeSchema)
protected Name name(QName qName)
Useful for building type mapping profiles.
qName
- The name to transform.public final Schema getTypeSchema()
AttributeType
's for all xml types.public final Schema getTypeMappingProfile()
getTypeSchema()
which maintains a unique java class to xml
type mapping.public final List<Schema> getAllTypeMappingProfiles()
public abstract String getNamespaceURI()
public abstract String getSchemaLocation()
public List<XSD> getAllDependencies()
protected List allDependencies()
protected void addDependencies(Set dependencies)
public final XSDSchema getSchema() throws IOException
IOException
protected XSDSchema buildSchema() throws IOException
getSchemaLocation()
This method may be extended, but should not be overridden.
IOException
public SchemaLocator createSchemaLocator()
public SchemaLocationResolver createSchemaLocationResolver()
public QName qName(String local)
public final boolean equals(Object obj)
getNamespaceURI()
.public XSDSchemaLocator getSupplementarySchemaLocator()
public void dispose()
Copyright © 1996–2019 Geotools. All rights reserved.