org.jibx.binding.def
Class BindingBuilder

java.lang.Object
  extended by org.jibx.binding.def.BindingBuilder

public abstract class BindingBuilder
extends Object

Binding definition builder. This processes the binding definition file to generate the code generation structure.

Author:
Dennis M. Sosnoski

Constructor Summary
BindingBuilder()
           
 
Method Summary
static BindingDefinition unmarshalBindingDefinition(UnmarshallingContext ctx, String name, URL root)
          Unmarshal binding definition.
static void unmarshalInclude(UnmarshallingContext ctx, boolean precomp, BindingDefinition bdef, URL root, ArrayList nslist, HashSet paths, IBindingFactory factory, int[] nsxlate)
          Unmarshal included binding.
static IMapping unmarshalMapping(UnmarshallingContext ctx, IContainer parent, ArrayList nss, boolean uord)
          Unmarshal mapping definition.
static IComponent unmarshalStructure(UnmarshallingContext ctx, IContainer contain, IContextObj cobj, boolean coll, boolean uord, boolean implic)
          Unmarshal subclass instance for structure definition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BindingBuilder

public BindingBuilder()
Method Detail

unmarshalStructure

public static IComponent unmarshalStructure(UnmarshallingContext ctx,
                                            IContainer contain,
                                            IContextObj cobj,
                                            boolean coll,
                                            boolean uord,
                                            boolean implic)
                                     throws JiBXException
Unmarshal subclass instance for structure definition. This handles all combinations of attributes on the start tag, generating the appropriate structure of nested components and other classes to represent the binding information within the current element. This must be called with the parse positioned at the start tag of the element to be unmarshalled. TODO: At least split this up, or organize a better way to build binding

Parameters:
ctx - unmarshalling context information
contain - containing binding definition structure
cobj - context object information
coll - collection structure flag
uord - container is unordered structure flag
implic - property value implicit flag
Returns:
root of component tree constructed from binding
Throws:
JiBXException - if error in unmarshalling

unmarshalMapping

public static IMapping unmarshalMapping(UnmarshallingContext ctx,
                                        IContainer parent,
                                        ArrayList nss,
                                        boolean uord)
                                 throws JiBXException
Unmarshal mapping definition. This handles all combinations of attributes on the start tag, generating the appropriate structure of nested components and other classes to represent the binding information within the current element. This must be called with the parse positioned at the start tag of the element to be unmarshalled.

Parameters:
ctx - unmarshalling context information
parent - containing binding definition structure
nss - extra namespaces to be included in this mapping definition (may be null)
uord - container is unordered structure flag
Returns:
mapping definition constructed from binding
Throws:
JiBXException - if error in unmarshalling

unmarshalInclude

public static void unmarshalInclude(UnmarshallingContext ctx,
                                    boolean precomp,
                                    BindingDefinition bdef,
                                    URL root,
                                    ArrayList nslist,
                                    HashSet paths,
                                    IBindingFactory factory,
                                    int[] nsxlate)
                             throws JiBXException
Unmarshal included binding. This handles the actual include element along with the actual included binding. The current implementation allows for nested includes, but requires that all the included bindings use compatible settings for the attributes of the root element, and only allows mapping elements as children of the included bindings (no namespace or format elements).

Parameters:
ctx - unmarshalling context information
precomp - in precompiled bindings flag
bdef - binding definition at root of includes
root - base URL for binding, or null if unknown
nslist - list of namespaces defined
paths - set of binding paths processed
factory - precompiled binding factory (null if not in precompiled binding)
nsxlate - namespace translation table for precompiled binding (null if not in precompiled binding)
Throws:
JiBXException - if error in unmarshalling

unmarshalBindingDefinition

public static BindingDefinition unmarshalBindingDefinition(UnmarshallingContext ctx,
                                                           String name,
                                                           URL root)
                                                    throws JiBXException
Unmarshal binding definition. This handles the entire binding definition document.

Parameters:
ctx - unmarshalling context information
name - default name for binding
root - base URL for binding, or null if unknown
Returns:
binding definition
Throws:
JiBXException - if error in unmarshalling


Copyright © 2005-2011 jibx.org. All Rights Reserved.