| java.lang.Object org.geotools.maven.xmlcodegen.AbstractGenerator org.geotools.maven.xmlcodegen.SchemaGenerator
SchemaGenerator | public class SchemaGenerator extends AbstractGenerator (Code) | | Parses an XML schema to procuce an instance of
org.opengis.feature.type.Schema .
author: Justin Deoliveira, The Open Planning Project, jdeolive@openplans.org |
Field Summary | |
boolean | complexTypes Flag indiciating wether complex types should be processed. | boolean | followComplexTypes Flag indicating wether to follow type references within
complex type definitions. | HashMap | imports Mapping of schemas imported by the schema being processed, indexed by
namespace. | Logger | logger | XSDSchema | schema The xsd schema from which gt types will be
generated. | boolean | simpleTypes Flag indicating wether simple types should be processed. | HashMap | types Mapping from XSD types to Geotools types. |
complexTypes | boolean complexTypes(Code) | | Flag indiciating wether complex types should be processed.
|
followComplexTypes | boolean followComplexTypes(Code) | | Flag indicating wether to follow type references within
complex type definitions.
|
imports | HashMap imports(Code) | | Mapping of schemas imported by the schema being processed, indexed by
namespace.
|
schema | XSDSchema schema(Code) | | The xsd schema from which gt types will be
generated.
|
simpleTypes | boolean simpleTypes(Code) | | Flag indicating wether simple types should be processed.
|
types | HashMap types(Code) | | Mapping from XSD types to Geotools types.
|
SchemaGenerator | public SchemaGenerator(XSDSchema schema)(Code) | | |
addImport | public void addImport(Schema imported)(Code) | | Adds an imported schema to be used for type lookups.
|
addTypeMapping | public void addTypeMapping(String namespace, String name, AttributeType gtType)(Code) | | Provide an explicit mapping from an XSD type
Parameters: namespace - Parameters: name - |
generate | public void generate() throws Exception(Code) | | Generates the Geotools schema from the XML schema.
|
getImport | public Schema getImport(String namespace)(Code) | | Returns an imported schema for a particular namespace.
The imported schema, or null if non exists. |
getImports | public Collection getImports()(Code) | | The collection of schemas imported by the schema being generated. |
getSchema | public XSDSchema getSchema()(Code) | | The parsed xml schema. |
getXSDType | public XSDTypeDefinition getXSDType(AttributeType type)(Code) | | Parameters: type - Geotools attribute type. the XSD type associated with type . |
setComplexTypes | public void setComplexTypes(boolean complexTypes)(Code) | | Parameters: complexTypes - Flag indicating wether or not to process complextypes in the supplied schema. |
setFollowComplexTypes | public void setFollowComplexTypes(boolean followComplexTypes)(Code) | | Indicates to generator wether to follow the type definitons of
complex types.
Warning, setting this flag to true will result in all
generated complex types being empty.
|
setSimpleTypes | public void setSimpleTypes(boolean simpleTypes)(Code) | | Parameters: simpleTypes - Flag indicating wether or not to process complextypes in the supplied schema. |
|
|