org.jibx.schema.codegen.custom
Class SchemaExtension

java.lang.Object
  extended by org.jibx.schema.codegen.custom.BaseExtension
      extended by org.jibx.schema.codegen.custom.SchemaExtension

public class SchemaExtension
extends BaseExtension

Extension information for a schema element.

Author:
Dennis M. Sosnoski

Field Summary
private  java.lang.String m_bindingFileName
          Binding file name (only allowed if single namespace, null if derived from schema name).
private  SchemaCustom m_custom
          Customization information for the schema.
private  ClassDecorator[] m_decorators
          Decorators to be used in code generation (null if none set at level).
private  boolean m_forceBinding
          Force a binding for this schema flag.
private  boolean m_forceTypes
          Always specify property types flag.
private  boolean m_inlineGroups
          Inline xs:group and xs:attributeGroup definitions by default.
private  NameConverter m_nameConverter
          Name converter instance (null if none set at level).
private  PackageHolder m_package
          Package to be used for class generation (may be null if no code generation).
private  boolean m_preferInline
          Prefer inline definitions.
private  java.lang.String m_prefix
          Prefix used for namespace (only allowed if single namespace, null if from schema).
private  java.util.Map m_schemaTypes
          Map from schema type name to Java type information.
private  boolean m_useInnerClasses
          Use inner classes for substructures.
 
Fields inherited from class org.jibx.schema.codegen.custom.BaseExtension
ARITY_OPTIONAL_COLLECTION, ARITY_OPTIONAL_SINGLETON, ARITY_REQUIRED_COLLECTION, ARITY_REQUIRED_SINGLETON
 
Constructor Summary
SchemaExtension(SchemaElement schema, SchemaCustom custom, PackageHolder pack)
          Constructor.
 
Method Summary
 java.lang.String getBindingFileName()
          Get binding definition file name.
 ClassDecorator[] getClassDecorators()
          Get code generation decorators used for this component.
 SchemaCustom getCustom()
          Get the containing global extension.
 NameConverter getNameConverter()
          Get name converter used for this component.
 PackageHolder getPackage()
          Get package for class generation.
 java.lang.String getPrefix()
          Get prefix used for namespace.
 java.util.Map getSchemaTypes()
          Get map from schema type local name to type information.
 boolean isForceBinding()
          Check if separate binding forced for schema.
 boolean isForceTypes()
          Check if type specifications forced for schema.
 boolean isInlineGroups()
          Check whether xs:group and xs:attributeGroup definitions should be inlined by default.
 boolean isPreferInline()
          Check if inlining of definition preferred.
 boolean isUseInnerClasses()
          Check if inner classes should be used for substructures.
 
Methods inherited from class org.jibx.schema.codegen.custom.BaseExtension
getComponent, getReplacementType, setTypeReplacer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_custom

private final SchemaCustom m_custom
Customization information for the schema.


m_schemaTypes

private java.util.Map m_schemaTypes
Map from schema type name to Java type information.


m_nameConverter

private NameConverter m_nameConverter
Name converter instance (null if none set at level).


m_decorators

private ClassDecorator[] m_decorators
Decorators to be used in code generation (null if none set at level).


m_package

private final PackageHolder m_package
Package to be used for class generation (may be null if no code generation).


m_forceBinding

private final boolean m_forceBinding
Force a binding for this schema flag.


m_bindingFileName

private final java.lang.String m_bindingFileName
Binding file name (only allowed if single namespace, null if derived from schema name).


m_prefix

private final java.lang.String m_prefix
Prefix used for namespace (only allowed if single namespace, null if from schema).


m_inlineGroups

private final boolean m_inlineGroups
Inline xs:group and xs:attributeGroup definitions by default.


m_preferInline

private final boolean m_preferInline
Prefer inline definitions.


m_useInnerClasses

private final boolean m_useInnerClasses
Use inner classes for substructures.


m_forceTypes

private boolean m_forceTypes
Always specify property types flag.

Constructor Detail

SchemaExtension

public SchemaExtension(SchemaElement schema,
                       SchemaCustom custom,
                       PackageHolder pack)
Constructor.

Parameters:
schema - root element of schema definition
custom - schema customizations
pack - package for code generated from schema
Method Detail

getCustom

public SchemaCustom getCustom()
Get the containing global extension.

Returns:
global

getSchemaTypes

public java.util.Map getSchemaTypes()
Get map from schema type local name to type information.

Returns:
map

getNameConverter

public NameConverter getNameConverter()
Get name converter used for this component.

Returns:
converter

getClassDecorators

public ClassDecorator[] getClassDecorators()
Get code generation decorators used for this component.

Returns:
converter

getPackage

public PackageHolder getPackage()
Get package for class generation.

Returns:
package

isForceBinding

public boolean isForceBinding()
Check if separate binding forced for schema.

Returns:
forced

getBindingFileName

public java.lang.String getBindingFileName()
Get binding definition file name. The binding name may not be set if more than one namespace is used in the schemas represented by this customization.

Returns:
name, null if to be derived from schema name

getPrefix

public java.lang.String getPrefix()
Get prefix used for namespace. The prefix may not be set if more than one namespace is used in the schemas represented by this customization.

Returns:
prefix, null if to be found from schema

isInlineGroups

public boolean isInlineGroups()
Check whether xs:group and xs:attributeGroup definitions should be inlined by default.

Returns:
generate unused flag

isPreferInline

public boolean isPreferInline()
Check if inlining of definition preferred.

Returns:
inline

isUseInnerClasses

public boolean isUseInnerClasses()
Check if inner classes should be used for substructures.

Returns:
inner

isForceTypes

public boolean isForceTypes()
Check if type specifications forced for schema.

Returns:
force


Project Web Site