Package org.geotools.xsd
Class XSD
Object
XSD
- Direct Known Subclasses:
ApplicationSchemaXSD
,ApplicationSchemaXSD
,AppSchemaXSD
,CSW
,DC
,DCT
,FES
,GML
,GML
,GML
,GML
,GML.DelegatingXSD
,GPKG
,Interpolation
,KML
,KML
,OGC
,OGC
,OGC
,OWS
,OWS
,OWS
,RangeSubset
,Scaling
,SE
,SLD
,SLD
,SMIL20
,SMIL20LANG
,WCS
,WCS
,WCS
,WCSEO
,WFS
,WFS
,WFSCapabilities
,WMS
,WMTS
,WPS
,WPS
,XLINK
,XML
,XMLMOD
,XS
Xml Schema for a particular namespace.
This class should is subclasses for the xs, gml, filter, sld, etc... schemas. Subclasses should be implemented as singletons.
- Since:
- 2.5
- Author:
- Justin Deoliveira, The Open Planning Project
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected EntityResolver
protected static Logger
logging instanceprotected XSDSchema
schema contentsprotected Schema
type mapping profileprotected Schema
type schema -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addDependencies
(Set<XSD> dependencies) Subclass hook to add additional dependencies.protected XSDSchema
Builds the schema from the .xsd file specified bygetSchemaLocation()
protected Schema
buildTypeMappingProfile
(Schema typeSchema) Sets up a profile which uniquely maps a set of java classes to a schema element.protected Schema
Sets up the schema which maps xml schema types to attribute types.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 foreverfinal boolean
Implementation of equals, equality is based soley ongetNamespaceURI()
.Returns all dependencies , direct and transitive that this xsd depends on.Transitively returns the type mapping profile for this schema and all schemas that this schema depends on.The dependencies of this schema.abstract String
The namespace uri of the schema.final XSDSchema
Returns the XSD object representing the contents of the schema.abstract String
The location on the local disk of the top level .xsd file which defines the schema.XSDSchemaLocator
Optionally, a schema locator that helps locating (other) schema's used for includes/imports that might already exist but are not in dependenciesfinal Schema
Returns the subset ofgetTypeSchema()
which maintains a unique java class to xml type mapping.final Schema
Returns the schema containingAttributeType
's for all xml types.final int
hashCode()
protected Name
Convenience method to turn a QName into a Name.Returns the qualified name for the specified local part.toString()
-
Field Details
-
LOGGER
logging instance -
schema
protected volatile XSDSchema schemaschema contents -
typeSchema
type schema -
typeMappingProfile
type mapping profile -
entityResolver
-
-
Constructor Details
-
XSD
protected XSD()
-
-
Method Details
-
buildTypeSchema
Sets up the schema which maps xml schema types to attribute types. -
buildTypeMappingProfile
Sets up a profile which uniquely maps a set of java classes to a schema element. -
name
Convenience method to turn a QName into a Name.Useful for building type mapping profiles.
- Parameters:
qName
- The name to transform.
-
getTypeSchema
Returns the schema containingAttributeType
's for all xml types. -
getTypeMappingProfile
Returns the subset ofgetTypeSchema()
which maintains a unique java class to xml type mapping. -
getAllTypeMappingProfiles
Transitively returns the type mapping profile for this schema and all schemas that this schema depends on. -
getNamespaceURI
The namespace uri of the schema. -
getSchemaLocation
The location on the local disk of the top level .xsd file which defines the schema. -
getDependencies
The dependencies of this schema. -
getAllDependencies
Returns all dependencies , direct and transitive that this xsd depends on. -
allDependencies
-
addDependencies
Subclass hook to add additional dependencies. -
getSchema
Returns the XSD object representing the contents of the schema.- Throws:
IOException
-
buildSchema
Builds the schema from the .xsd file specified bygetSchemaLocation()
This method may be extended, but should not be overridden.
- Throws:
IOException
-
createSchemaLocator
-
createSchemaLocationResolver
-
qName
Returns the qualified name for the specified local part.- Returns:
- The QName, built by simply prepending the namespace for this xsd.
-
equals
Implementation of equals, equality is based soley ongetNamespaceURI()
. -
hashCode
public final int hashCode() -
toString
-
getSupplementarySchemaLocator
public 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- Returns:
- Schema Locator
-
dispose
public 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
-