org.geotools.data.complex.config
Class EmfAppSchemaReader

java.lang.Object
  extended by org.geotools.data.complex.config.EmfAppSchemaReader

public class EmfAppSchemaReader
extends java.lang.Object

Parses an application schema given by a gtxml Configuration into a set of AttributeTypes and AttributeDescriptors.

All the XSD schema locations that comprise the application schema are obtained from the main Configuration and its dependencies.

Of particular interest might be the ApplicationSchemaConfiguration object, which allows to provide the location of the root xsd schema for a given application schema.

Since:
2.4
Version:
$Id: EmfAppSchemaReader.java 35576 2010-05-25 05:47:07Z bencaradocdavies $
Author:
Gabriel Roldan

Method Summary
 AppSchemaResolver getResolver()
           
static EmfAppSchemaReader newInstance()
           
 SchemaIndex parse(Configuration configuration)
          Parses the GML schema represented by the configuration's schema location into a SchemaIndex.
 SchemaIndex parse(java.net.URL location, java.util.Map<java.lang.String,java.lang.String> resolvedSchemaLocations)
          Parses the gml schema referenced by location into a SchemaIndex
 void setResolver(AppSchemaResolver resolver)
           
 void setResolver(java.net.URL catalogLocation)
          Set resolver based on catalog.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getResolver

public AppSchemaResolver getResolver()

setResolver

public void setResolver(AppSchemaResolver resolver)

setResolver

public void setResolver(java.net.URL catalogLocation)
Set resolver based on catalog. Use this for testing only, because it does not support cached downloads.

Parameters:
catalogLocation -

parse

public SchemaIndex parse(Configuration configuration)
                  throws java.io.IOException
Parses the GML schema represented by the configuration's schema location into a SchemaIndex.

Parameters:
configuration - configuration object used to access the XSDSchema to parse. This configuration object might contain Bindings
Throws:
java.io.IOException

parse

public SchemaIndex parse(java.net.URL location,
                         java.util.Map<java.lang.String,java.lang.String> resolvedSchemaLocations)
                  throws java.io.IOException
Parses the gml schema referenced by location into a SchemaIndex

Parameters:
location - the phisical location of the root xsd schema that comprises the application schema to parse.
resolvedSchemaLocations - A map to hold schema URI location for each element name space so they can be imported in DescribeFeatureType
Throws:
java.io.IOException - if any non recoverable problem occurs while parsing the application schema pointed out by location or one of its dependencies.

newInstance

public static EmfAppSchemaReader newInstance()


Copyright © 1996-2010 Geotools. All Rights Reserved.