Class 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 Detail

      • BindingBuilder

        public BindingBuilder()
    • 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 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:
        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 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:
        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.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:
        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 information
        name - default name for binding
        root - base URL for binding, or null if unknown
        Returns:
        binding definition
        Throws:
        org.jibx.runtime.JiBXException - if error in unmarshalling