|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.maven.xmlcodegen.AbstractGenerator
org.geotools.maven.xmlcodegen.SchemaGenerator
public class SchemaGenerator
Parses an XML schema to procuce an instance of
Schema
.
Constructor Summary | |
---|---|
SchemaGenerator(org.eclipse.xsd.XSDSchema schema)
|
Method Summary | |
---|---|
void |
addImport(org.opengis.feature.type.Schema imported)
Adds an imported schema to be used for type lookups. |
void |
addTypeMapping(java.lang.String namespace,
java.lang.String name,
org.opengis.feature.type.AttributeType gtType)
Provide an explicit mapping from an XSD type |
void |
generate()
Generates the Geotools schema from the XML schema. |
org.opengis.feature.type.Schema |
getImport(java.lang.String namespace)
Returns an imported schema for a particular namespace. |
java.util.Collection |
getImports()
|
org.eclipse.xsd.XSDSchema |
getSchema()
|
java.util.Map<org.opengis.feature.type.Name,java.lang.String> |
getTypeBindings()
|
org.eclipse.xsd.XSDTypeDefinition |
getXSDType(org.opengis.feature.type.AttributeType type)
|
static void |
main(java.lang.String[] args)
|
void |
setComplexTypes(boolean complexTypes)
|
void |
setFollowComplexTypes(boolean followComplexTypes)
Indicates to generator wether to follow the type definitons of complex types. |
void |
setIncludes(java.lang.String[] includes)
Sets the type names for which to include in the generated schema. |
void |
setMaxRecursionDepth(int maxDepth)
Sets the max depth the generator will recurse into the schema. |
void |
setPrintRecursionPaths(boolean printRecursionPaths)
Sets the flag controlling whether paths are printed out as the generator recurses through the schema. |
void |
setSimpleTypes(boolean simpleTypes)
|
void |
setTypeBindings(TypeBinding[] typeBindings)
Add the explicit bindings of XSD types to fully-qualified class names. |
java.util.List |
sort()
Returns a list of the types in the generated schema sorted as follows: |
Methods inherited from class org.geotools.maven.xmlcodegen.AbstractGenerator |
---|
copy, execute, findSchemaFile, getPackageBase, included, outputLocation, setIncluded, setOverwriting, setPackageBase, setResourceLocation, setSchemaLookupDirectories, setSchemaSourceDirectory, setSourceLocation, setTestLocation, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SchemaGenerator(org.eclipse.xsd.XSDSchema schema)
Method Detail |
---|
public org.eclipse.xsd.XSDSchema getSchema()
public void setComplexTypes(boolean complexTypes)
complexTypes
- Flag indicating wether or not to process complex
types in the supplied schema.public void setSimpleTypes(boolean simpleTypes)
simpleTypes
- Flag indicating wether or not to process complex
types in the supplied schema.public void setFollowComplexTypes(boolean followComplexTypes)
Warning, setting this flag to true
will result in all
generated complex types being empty.
public void setIncludes(java.lang.String[] includes)
public void setPrintRecursionPaths(boolean printRecursionPaths)
public void setMaxRecursionDepth(int maxDepth)
public void addTypeMapping(java.lang.String namespace, java.lang.String name, org.opengis.feature.type.AttributeType gtType)
namespace
- name
- public void setTypeBindings(TypeBinding[] typeBindings)
typeBindings
- public java.util.Map<org.opengis.feature.type.Name,java.lang.String> getTypeBindings()
public void addImport(org.opengis.feature.type.Schema imported)
public org.opengis.feature.type.Schema getImport(java.lang.String namespace)
public java.util.Collection getImports()
public org.eclipse.xsd.XSDTypeDefinition getXSDType(org.opengis.feature.type.AttributeType type)
type
- Geotools attribute type.
type
.public void generate() throws java.lang.Exception
java.lang.Exception
public java.util.List sort()
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |