Package org.jibx.binding.def
Class BindingBuilder
- java.lang.Object
-
- 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
Constructors Constructor Description BindingBuilder()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BindingDefinitionunmarshalBindingDefinition(org.jibx.runtime.impl.UnmarshallingContext ctx, String name, URL root)Unmarshal binding definition.static voidunmarshalInclude(org.jibx.runtime.impl.UnmarshallingContext ctx, boolean precomp, BindingDefinition bdef, URL root, ArrayList nslist, HashSet paths, org.jibx.runtime.IBindingFactory factory, int[] nsxlate)Unmarshal included binding.static IMappingunmarshalMapping(org.jibx.runtime.impl.UnmarshallingContext ctx, IContainer parent, ArrayList nss, boolean uord)Unmarshal mapping definition.static IComponentunmarshalStructure(org.jibx.runtime.impl.UnmarshallingContext ctx, IContainer contain, IContextObj cobj, boolean coll, boolean uord, boolean implic)Unmarshal subclass instance for structure definition.
-
-
-
Method Detail
-
unmarshalStructure
public static IComponent unmarshalStructure(org.jibx.runtime.impl.UnmarshallingContext ctx, IContainer contain, IContextObj cobj, boolean coll, boolean uord, boolean implic) throws org.jibx.runtime.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 informationcontain- containing binding definition structurecobj- context object informationcoll- collection structure flaguord- container is unordered structure flagimplic- property value implicit flag- Returns:
- root of component tree constructed from binding
- Throws:
org.jibx.runtime.JiBXException- if error in unmarshalling
-
unmarshalMapping
public static IMapping unmarshalMapping(org.jibx.runtime.impl.UnmarshallingContext ctx, IContainer parent, ArrayList nss, boolean uord) throws org.jibx.runtime.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 informationparent- containing binding definition structurenss- extra namespaces to be included in this mapping definition (may benull)uord- container is unordered structure flag- Returns:
- mapping definition constructed from binding
- Throws:
org.jibx.runtime.JiBXException- if error in unmarshalling
-
unmarshalInclude
public static void unmarshalInclude(org.jibx.runtime.impl.UnmarshallingContext ctx, boolean precomp, BindingDefinition bdef, URL root, ArrayList nslist, HashSet paths, org.jibx.runtime.IBindingFactory factory, int[] nsxlate) throws org.jibx.runtime.JiBXExceptionUnmarshal 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 informationprecomp- in precompiled bindings flagbdef- binding definition at root of includesroot- base URL for binding, ornullif unknownnslist- list of namespaces definedpaths- set of binding paths processedfactory- precompiled binding factory (nullif not in precompiled binding)nsxlate- namespace translation table for precompiled binding (nullif not in precompiled binding)- Throws:
org.jibx.runtime.JiBXException- if error in unmarshalling
-
unmarshalBindingDefinition
public static BindingDefinition unmarshalBindingDefinition(org.jibx.runtime.impl.UnmarshallingContext ctx, String name, URL root) throws org.jibx.runtime.JiBXException
Unmarshal binding definition. This handles the entire binding definition document.- Parameters:
ctx- unmarshalling context informationname- default name for bindingroot- base URL for binding, ornullif unknown- Returns:
- binding definition
- Throws:
org.jibx.runtime.JiBXException- if error in unmarshalling
-
-