org.geotools.gml2
Class ApplicationSchemaXSD

Object
  extended by XSD
      extended by ApplicationSchemaXSD

public class ApplicationSchemaXSD
extends XSD

XSD instance for an application schema.

Copied from org.geotools.gml3 making use of addDependencies with our gml2.GML instance.

Author:
Justin Deoliveira, The Open Planning Project

Field Summary
 
Fields inherited from class XSD
LOGGER, schema, typeMappingProfile, typeSchema
 
Constructor Summary
ApplicationSchemaXSD(String namespaceURI, String schemaLocation)
           
 
Method Summary
protected  void addDependencies(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.
 String getNamespaceURI()
          The namespace uri of the schema.
 String getSchemaLocation()
          The location on the local disk of the top level .xsd file which defines the schema.
 
Methods inherited from class XSD
allDependencies, buildSchema, buildTypeMappingProfile, buildTypeSchema, createSchemaLocator, dispose, equals, getAllDependencies, getAllTypeMappingProfiles, getDependencies, getSchema, getSupplementarySchemaLocator, getTypeMappingProfile, getTypeSchema, hashCode, name, qName, toString
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ApplicationSchemaXSD

public ApplicationSchemaXSD(String namespaceURI,
                            String schemaLocation)
Method Detail

addDependencies

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

Overrides:
addDependencies in class XSD

getNamespaceURI

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

Specified by:
getNamespaceURI in class XSD

getSchemaLocation

public 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-2014 Geotools. All Rights Reserved.