Class SchemaExtension

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

public class SchemaExtension extends BaseExtension
Extension information for a schema element.
Author:
Dennis M. Sosnoski
  • Field Details

    • m_custom

      private final SchemaCustom m_custom
      Customization information for the schema.
    • m_schemaTypes

      private 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 String m_bindingFileName
      Binding file name (only allowed if single namespace, null if derived from schema name).
    • m_prefix

      private final 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 Details

    • 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 Details

    • getCustom

      public SchemaCustom getCustom()
      Get the containing global extension.
      Returns:
      global
    • getSchemaTypes

      public 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 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 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