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
 
 public abstract class XSD extends Object 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 SummaryFields Modifier and Type Field Description protected EntityResolverentityResolverprotected static LoggerLOGGERlogging instanceprotected XSDSchemaschemaschema contentsprotected SchematypeMappingProfiletype mapping profileprotected SchematypeSchematype schema
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedXSD()
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidaddDependencies(Set<XSD> dependencies)Subclass hook to add additional dependencies.protected List<XSD>allDependencies()protected XSDSchemabuildSchema()Builds 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 SchemabuildTypeSchema()Sets up the schema which maps xml schema types to attribute types.SchemaLocationResolvercreateSchemaLocationResolver()SchemaLocatorcreateSchemaLocator()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 foreverbooleanequals(Object obj)Implementation of equals, equality is based soley ongetNamespaceURI().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 StringgetNamespaceURI()The namespace uri of the schema.XSDSchemagetSchema()Returns the XSD object representing the contents of the schema.abstract StringgetSchemaLocation()The location on the local disk of the top level .xsd file which defines the schema.XSDSchemaLocatorgetSupplementarySchemaLocator()Optionally, a schema locator that helps locating (other) schema's used for includes/imports that might already exist but are not in dependenciesSchemagetTypeMappingProfile()Returns the subset ofgetTypeSchema()which maintains a unique java class to xml type mapping.SchemagetTypeSchema()Returns the schema containingAttributeType's for all xml types.inthashCode()protected Namename(QName qName)Convenience method to turn a QName into a Name.QNameqName(String local)Returns the qualified name for the specified local part.StringtoString()
 
- 
- 
- 
Field Detail- 
LOGGERprotected static Logger LOGGER logging instance
 - 
schemaprotected volatile XSDSchema schema schema contents
 - 
typeSchemaprotected Schema typeSchema type schema
 - 
typeMappingProfileprotected Schema typeMappingProfile type mapping profile
 - 
entityResolverprotected EntityResolver entityResolver 
 
- 
 - 
Method Detail- 
buildTypeSchemaprotected Schema buildTypeSchema() Sets up the schema which maps xml schema types to attribute types.
 - 
buildTypeMappingProfileprotected Schema buildTypeMappingProfile(Schema typeSchema) Sets up a profile which uniquely maps a set of java classes to a schema element.
 - 
nameprotected Name name(QName qName) Convenience method to turn a QName into a Name.Useful for building type mapping profiles. - Parameters:
- qName- The name to transform.
 
 - 
getTypeSchemapublic final Schema getTypeSchema() Returns the schema containingAttributeType's for all xml types.
 - 
getTypeMappingProfilepublic final Schema getTypeMappingProfile() Returns the subset ofgetTypeSchema()which maintains a unique java class to xml type mapping.
 - 
getAllTypeMappingProfilespublic final List<Schema> getAllTypeMappingProfiles() Transitively returns the type mapping profile for this schema and all schemas that this schema depends on.
 - 
getNamespaceURIpublic abstract String getNamespaceURI() The namespace uri of the schema.
 - 
getSchemaLocationpublic abstract String getSchemaLocation() The location on the local disk of the top level .xsd file which defines the schema.
 - 
getAllDependenciespublic List<XSD> getAllDependencies() Returns all dependencies , direct and transitive that this xsd depends on.
 - 
addDependenciesprotected void addDependencies(Set<XSD> dependencies) Subclass hook to add additional dependencies.
 - 
getSchemapublic final XSDSchema getSchema() throws IOExceptionReturns the XSD object representing the contents of the schema.- Throws:
- IOException
 
 - 
buildSchemaprotected XSDSchema buildSchema() throws IOExceptionBuilds the schema from the .xsd file specified bygetSchemaLocation()This method may be extended, but should not be overridden. - Throws:
- IOException
 
 - 
createSchemaLocatorpublic SchemaLocator createSchemaLocator() 
 - 
createSchemaLocationResolverpublic SchemaLocationResolver createSchemaLocationResolver() 
 - 
qNamepublic QName qName(String local) Returns the qualified name for the specified local part.- Returns:
- The QName, built by simply prepending the namespace for this xsd.
 
 - 
equalspublic final boolean equals(Object obj) Implementation of equals, equality is based soley ongetNamespaceURI().
 - 
getSupplementarySchemaLocatorpublic 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
 
 - 
disposepublic 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
 
- 
 
-