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 EntityResolverprotected static Loggerlogging instanceprotected XSDSchemaschema contentsprotected Schematype mapping profileprotected Schematype schema -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddDependencies(Set<XSD> dependencies) Subclass hook to add additional dependencies.protected XSDSchemaBuilds the schema from the .xsd file specified bygetSchemaLocation()protected SchemabuildTypeMappingProfile(Schema typeSchema) Sets up a profile which uniquely maps a set of java classes to a schema element.protected SchemaSets up the schema which maps xml schema types to attribute types.voiddispose()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 booleanImplementation 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 StringThe namespace uri of the schema.final XSDSchemaReturns the XSD object representing the contents of the schema.abstract StringThe location on the local disk of the top level .xsd file which defines the schema.XSDSchemaLocatorOptionally, a schema locator that helps locating (other) schema's used for includes/imports that might already exist but are not in dependenciesfinal SchemaReturns the subset ofgetTypeSchema()which maintains a unique java class to xml type mapping.final SchemaReturns the schema containingAttributeType's for all xml types.final inthashCode()protected NameConvenience 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
-