Package org.jibx.binding
Class SchemaGenerator
- java.lang.Object
-
- org.jibx.binding.SchemaGenerator
-
public class SchemaGenerator extends Object
Binding generator. This loads the specified input classes and processes them to generate a default binding definition.- Author:
- Dennis M. Sosnoski
-
-
Constructor Summary
Constructors Constructor Description SchemaGenerator(boolean verbose, boolean equal, boolean aqual, ArrayList paths)
Constructor with settings specified.SchemaGenerator(ArrayList paths)
Constructor with only paths supplied.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
generate(BindingElement binding)
Process a binding definition for schema generation.DefinitionContext
getDefinitions()
Get innermost containing definition context.Element[]
getSchemas()
Get array of generated schemas.static void
main(String[] args)
Main method for running compiler as application.void
setAttributeQualified(boolean qual)
Set control flag for attribute qualified default schema.void
setElementQualified(boolean qual)
Set control flag for element qualified default schema.void
setVerbose(boolean verbose)
Set control flag for verbose processing reports.
-
-
-
Field Detail
-
XML_URI
public static final String XML_URI
Fixed XML namespace.- See Also:
- Constant Field Values
-
XMLNS_URI
public static final String XMLNS_URI
Fixed XML namespace namespace.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SchemaGenerator
public SchemaGenerator(ArrayList paths)
Constructor with only paths supplied. This just initializes all other options disabled.- Parameters:
paths
- class paths to be checked for classes referenced by bindings
-
SchemaGenerator
public SchemaGenerator(boolean verbose, boolean equal, boolean aqual, ArrayList paths)
Constructor with settings specified.- Parameters:
verbose
- report binding details and resultsequal
- use element form default qualified flagaqual
- use attribute form default qualified flagpaths
- class paths to be checked for classes referenced by bindings
-
-
Method Detail
-
setVerbose
public void setVerbose(boolean verbose)
Set control flag for verbose processing reports.- Parameters:
verbose
- report verbose information in processing bindings flag
-
setElementQualified
public void setElementQualified(boolean qual)
Set control flag for element qualified default schema.- Parameters:
qual
- element qualified default schemas flag
-
setAttributeQualified
public void setAttributeQualified(boolean qual)
Set control flag for attribute qualified default schema.- Parameters:
qual
- attribute qualified default schemas flag
-
getSchemas
public Element[] getSchemas()
Get array of generated schemas.- Returns:
- array of schema elements
-
getDefinitions
public DefinitionContext getDefinitions()
Get innermost containing definition context.- Returns:
- innermost definition context containing this element
-
generate
public void generate(BindingElement binding) throws org.jibx.runtime.JiBXException
Process a binding definition for schema generation. This first validates the binding definition, and if it is valid then handles schema generation from the binding.- Parameters:
binding
- root element of binding- Throws:
org.jibx.runtime.JiBXException
- if error in generating the schema
-
main
public static void main(String[] args)
Main method for running compiler as application.- Parameters:
args
- command line arguments
-
-