org.geotools.xml
Class XSD

java.lang.Object
  extended by org.geotools.xml.XSD
Direct Known Subclasses:
ApplicationSchemaXSD, AppSchemaXSD, 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 java.lang.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 Summary
protected static java.util.logging.Logger LOGGER
          logging instance
protected  org.eclipse.xsd.XSDSchema schema
          schema contents
protected  org.opengis.feature.type.Schema typeMappingProfile
          type mapping profile
protected  org.opengis.feature.type.Schema typeSchema
          type schema
 
Constructor Summary
protected XSD()
           
 
Method Summary
protected  void addDependencies(java.util.Set dependencies)
          Subclass hook to add additional dependencies.
protected  java.util.List allDependencies()
           
protected  org.eclipse.xsd.XSDSchema buildSchema()
          Builds the schema from the .xsd file specified by getSchemaLocation()
protected  org.opengis.feature.type.Schema buildTypeMappingProfile(org.opengis.feature.type.Schema typeSchema)
          Sets up a profile which uniquely maps a set of java classes to a schema element.
protected  org.opengis.feature.type.Schema buildTypeSchema()
          Sets up the schema which maps xml schema types to attribute types.
 SchemaLocationResolver createSchemaLocationResolver()
           
 SchemaLocator createSchemaLocator()
           
 boolean equals(java.lang.Object obj)
          Implementation of equals, equality is based soley on getNamespaceURI().
 java.util.List<XSD> getAllDependencies()
          Returns all dependencies , direct and transitive that this xsd depends on.
 java.util.Set<XSD> getDependencies()
          The dependencies of this schema.
abstract  java.lang.String getNamespaceURI()
          The namespace uri of the schema.
 org.eclipse.xsd.XSDSchema getSchema()
          Returns the XSD object representing the contents of the schema.
abstract  java.lang.String getSchemaLocation()
          The location on the local disk of the top level .xsd file which defines the schema.
 org.opengis.feature.type.Schema getTypeMappingProfile()
          Returns the sbuset of getTypeSchema() which maintains a unique java class to xml type mapping.
 org.opengis.feature.type.Schema getTypeSchema()
          Returns the schema containing AttributeType's for all xml types.
 int hashCode()
           
protected  org.opengis.feature.type.Name name(javax.xml.namespace.QName qName)
          Convenience method to turn a QName into a Name.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

LOGGER

protected static java.util.logging.Logger LOGGER
logging instance


schema

protected org.eclipse.xsd.XSDSchema schema
schema contents


typeSchema

protected org.opengis.feature.type.Schema typeSchema
type schema


typeMappingProfile

protected org.opengis.feature.type.Schema typeMappingProfile
type mapping profile

Constructor Detail

XSD

protected XSD()
Method Detail

buildTypeSchema

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


buildTypeMappingProfile

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


name

protected org.opengis.feature.type.Name name(javax.xml.namespace.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 org.opengis.feature.type.Schema getTypeSchema()
Returns the schema containing AttributeType's for all xml types.


getTypeMappingProfile

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


getNamespaceURI

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


getSchemaLocation

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


getDependencies

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


getAllDependencies

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


allDependencies

protected java.util.List allDependencies()

addDependencies

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


getSchema

public final org.eclipse.xsd.XSDSchema getSchema()
                                          throws java.io.IOException
Returns the XSD object representing the contents of the schema.

Throws:
java.io.IOException

buildSchema

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

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

Throws:
java.io.IOException

createSchemaLocator

public SchemaLocator createSchemaLocator()

createSchemaLocationResolver

public SchemaLocationResolver createSchemaLocationResolver()

equals

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

Overrides:
equals in class java.lang.Object

hashCode

public final int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 1996-2010 Geotools. All Rights Reserved.