org.geotools.gml3
Class ApplicationSchemaXSD

java.lang.Object
  extended by org.geotools.xml.XSD
      extended by org.geotools.gml3.ApplicationSchemaXSD

public class ApplicationSchemaXSD
extends XSD

XSD instance for an application schema.

Author:
Justin Deoliveira, The Open Planning Project

Field Summary
 
Fields inherited from class org.geotools.xml.XSD
LOGGER, schema, typeMappingProfile, typeSchema
 
Constructor Summary
ApplicationSchemaXSD(java.lang.String namespaceURI, java.lang.String schemaLocation)
           
 
Method Summary
protected  void addDependencies(java.util.Set dependencies)
          Subclass hook to add additional dependencies.
 SchemaLocationResolver createSchemaLocationResolver()
          Uses the schema.getSchemaLocation()'s parent folder as the base folder to resolve location as a relative URI of.
 java.lang.String getNamespaceURI()
          The namespace uri of the schema.
 java.lang.String getSchemaLocation()
          The location on the local disk of the top level .xsd file which defines the schema.
 
Methods inherited from class org.geotools.xml.XSD
allDependencies, buildSchema, buildTypeMappingProfile, buildTypeSchema, createSchemaLocator, equals, getAllDependencies, getDependencies, getSchema, getTypeMappingProfile, getTypeSchema, hashCode, name, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ApplicationSchemaXSD

public ApplicationSchemaXSD(java.lang.String namespaceURI,
                            java.lang.String schemaLocation)
Method Detail

addDependencies

protected void addDependencies(java.util.Set dependencies)
Description copied from class: XSD
Subclass hook to add additional dependencies.

Overrides:
addDependencies in class XSD

getNamespaceURI

public java.lang.String getNamespaceURI()
Description copied from class: XSD
The namespace uri of the schema.

Specified by:
getNamespaceURI in class XSD

getSchemaLocation

public java.lang.String getSchemaLocation()
Description copied from class: XSD
The location on the local disk of the top level .xsd file which defines the schema.

Specified by:
getSchemaLocation in class XSD

createSchemaLocationResolver

public SchemaLocationResolver createSchemaLocationResolver()
Uses the schema.getSchemaLocation()'s parent folder as the base folder to resolve location as a relative URI of.

This way, application schemas splitted over multiple files can be resolved based on the relative location of a given import or include.

Overrides:
createSchemaLocationResolver in class XSD
Parameters:
schema - the schema being resolved
uri - not used as it might be an empty string when location refers to an include
location - the xsd location, either of schema, an import or an include, for which to try resolving it as a relative path of the schema location.
Returns:
a file: style uri with the resolved schema location for the given one, or null if location can't be resolved as a relative path of the schema location.


Copyright © 1996-2010 Geotools. All Rights Reserved.