org.geotools.xml
Class AppSchemaXSDRegistry

Object
  extended by AppSchemaXSDRegistry
All Implemented Interfaces:
XSDSchemaLocator

public final class AppSchemaXSDRegistry
extends Object
implements XSDSchemaLocator

A singleton registry to store all XSD schema's that are created by app-schema. This registry has two purposes: (1) Reusing schema's that have already been built previously, so that schema content in memory isn't cluttered with multiple versions of the same schema (with respect to .

Author:
Niels Charlier (Curtin University of Technology)

Method Summary
 void dispose()
          Flush all schema's (remove all references to them from other schema's) and clear register
static AppSchemaXSDRegistry getInstance()
          Get lazy loaded singleton instance
 XSDSchema locateSchema(XSDSchema xsdSchema, String namespaceURI, String rawSchemaLocationURI, String resolvedSchemaLocationURI)
          Implements schema locator... creates and registers new schema if necessary
 XSDSchema lookUp(String schemaLocation)
          Look up schema in register
 void register(XSDSchema schema)
          Register schema
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static AppSchemaXSDRegistry getInstance()
Get lazy loaded singleton instance

Returns:
singleton instance

register

public void register(XSDSchema schema)
Register schema

Parameters:
schema - schema to be registered

lookUp

public XSDSchema lookUp(String schemaLocation)
Look up schema in register

Parameters:
schemaLocation - (resolved) schema location
Returns:
schema

dispose

public void dispose()
Flush all schema's (remove all references to them from other schema's) and clear register


locateSchema

public XSDSchema locateSchema(XSDSchema xsdSchema,
                              String namespaceURI,
                              String rawSchemaLocationURI,
                              String resolvedSchemaLocationURI)
Implements schema locator... creates and registers new schema if necessary

Specified by:
locateSchema in interface XSDSchemaLocator


Copyright © 1996-2014 Geotools. All Rights Reserved.