org.geotools.xml
Class XSD

Object
  extended by XSD
Direct Known Subclasses:
ApplicationSchemaXSD, GMD, GML, GML, GML, GMX, KML, OGC, OGC, OGC, OWS, OWS, SLD, SMIL20, SMIL20LANG, StubbedGMLXSD, WFS, 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
Module:
modules/extension/xsd-core (gt-xsd-core.jar)

Field Summary
protected static Logger LOGGER
          logging instance
protected  XSDSchema schema
          schema contents
protected  Schema typeMappingProfile
          type mapping profile
protected  Schema typeSchema
          type schema
 
Constructor Summary
protected XSD()
           
 
Method Summary
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()
           
 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.
 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.
 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.
 String toString()
           
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

LOGGER

protected static Logger LOGGER
logging instance


schema

protected XSDSchema schema
schema contents


typeSchema

protected Schema typeSchema
type schema


typeMappingProfile

protected Schema typeMappingProfile
type mapping profile

Constructor Detail

XSD

protected XSD()
Method Detail

buildTypeSchema

protected Schema buildTypeSchema()
Sets up the schema which maps xml schema types to attribute types.


buildTypeMappingProfile

protected Schema buildTypeMappingProfile(Schema typeSchema)
Sets up a profile which uniquely maps a set of java classes to a schema element.


name

protected 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.

getTypeSchema

public final Schema getTypeSchema()
Returns the schema containing AttributeType's for all xml types.


getTypeMappingProfile

public final Schema getTypeMappingProfile()
Returns the sbuset of getTypeSchema() which maintains a unique java class to xml type mapping.


getNamespaceURI

public abstract String getNamespaceURI()
The namespace uri of the schema.


getSchemaLocation

public abstract String getSchemaLocation()
The location on the local disk of the top level .xsd file which defines the schema.


getDependencies

public final Set<XSD> getDependencies()
The dependencies of this schema.


getAllDependencies

public List<XSD> getAllDependencies()
Returns all dependencies , direct and transitive that this xsd depends on.


allDependencies

protected List allDependencies()

addDependencies

protected void addDependencies(Set dependencies)
Subclass hook to add additional dependencies.


getSchema

public final XSDSchema getSchema()
                          throws IOException
Returns the XSD object representing the contents of the schema.

Throws:
IOException

buildSchema

protected XSDSchema buildSchema()
                         throws IOException
Builds the schema from the .xsd file specified by getSchemaLocation()

This method may be extended, but should not be overridden.

Throws:
IOException

createSchemaLocator

public SchemaLocator createSchemaLocator()

createSchemaLocationResolver

public SchemaLocationResolver createSchemaLocationResolver()

equals

public final boolean equals(Object obj)
Implementation of equals, equality is based soley on getNamespaceURI().

Overrides:
equals in class Object

hashCode

public final int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 1996-2009 Geotools. All Rights Reserved.