Class ExtendedBinding

  • All Implemented Interfaces:
    java.io.Serializable

    public final class ExtendedBinding
    extends Binding
    This class adds the necessary logic to a Binding Object to bring the gap between the XML Schema Object Model and the Binding File. It queries the Binding Object to retrieve the the associated ComponentBinding.

    An "XPath like" representation of an XML Schema structure is built to lookup the component bindings in their storage structure. The algorithm used to build the "XPath like" representation is summarized in the following example: Given the XML schema declaration:

            <xsd:element name="foo">
                <xsd:complextype>
                    <xsd:attribute name="bar" type="xsd:string"/>
                </xsd:complextype>
            </xsd:element>
     
    The path to identify the attribute 'bar' will be:
            /foo/@bar
     
    The keywords complexType and group are used to identify respectively an XML Schema ComplexType and a Model Group definition.
    Version:
    $Revision: 7943 $ $Date: 2005-03-05 06:42:06 -0700 (Sat, 05 Mar 2005) $
    Author:
    Arnaud Blandin
    See Also:
    Serialized Form
    • Field Detail

      • PATH_SEPARATOR

        protected static final java.lang.String PATH_SEPARATOR
        Constants needed to create the XPath.
        See Also:
        Constant Field Values
      • ATTRIBUTE_PREFIX

        protected static final java.lang.String ATTRIBUTE_PREFIX
        Prefix used to identify an attribute.
        See Also:
        Constant Field Values
      • COMPLEXTYPE_ID

        public static final java.lang.String COMPLEXTYPE_ID
        Prefix used to identify a complexType.
        See Also:
        Constant Field Values
      • SIMPLETYPE_ID

        public static final java.lang.String SIMPLETYPE_ID
        Prefix used to identity a simplyType.
        See Also:
        Constant Field Values
      • ENUMTYPE_ID

        public static final java.lang.String ENUMTYPE_ID
        Prefix used to identify an enumeration.
        See Also:
        Constant Field Values
      • GROUP_ID

        public static final java.lang.String GROUP_ID
        Prefix used to identify a model group.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ExtendedBinding

        public ExtendedBinding()
        Default constructor.
        See Also:
        Object()
    • Method Detail

      • getComponentBindingType

        public ComponentBindingType getComponentBindingType​(Annotated annotated)
        Returns the ComponentBinding that corresponds to the given Annotated XML Schema structure An Schema location will be built for the given Annotated XML schema structure.
        Parameters:
        annotated - the XML Schema annotated structure for which to query the Binding object for a ComponentBinding.
        Returns:
        the ComponentBinding that corresponds to the given Annotated XML Schema structure.
      • handleAutomaticNaming

        void handleAutomaticNaming​(AutomaticNamingType type)
        Process automatic name conflict resolution section, and memorize definitions.
        Parameters:
        type - AutomaticNamingType instance
      • existsExclusion

        public boolean existsExclusion​(java.lang.String localName)
        Indicates whether an <exclude> element has been specified in a binding file for the given 'local name' of an element definition.
        Parameters:
        localName - 'local name' of an element definition
        Returns:
        True if an <exclude> element has been specified
      • getExclusion

        public Exclude getExclusion​(java.lang.String localName)
        Returns the Exclude instance for the element identified by the given local name.
        Parameters:
        localName - Local name for an element (definition).
        Returns:
        The Exclude instance.
      • existsForce

        public boolean existsForce​(java.lang.String localName)
        Indicates whether an <force> element has been specified in a binding file for the given 'local name' of an element definition.
        Parameters:
        localName - 'local name' of an element definition
        Returns:
        True if an <force> element has been specified
      • getForces

        public java.util.Set<java.lang.String> getForces()
        Returns all <force> elements defined in the binding file.
        Returns:
        all <force> elements defined in the binding file