org.exolab.castor.builder.binding

Class ExtendedBinding

Implemented Interfaces:
java.io.Serializable

public 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: 1.2 $ $Date: 2003/03/03 09:57:15 $
Author:
Arnaud Blandin
See Also:
Serialized Form

Field Summary

protected static String
ATTRIBUTE_PREFIX
protected static String
COMPLEXTYPE_ID
protected static String
GROUP_ID
protected static String
PATH_SEPARATOR
Constants needed to create the XPath

Constructor Summary

ExtendedBinding()
Default constructor.

Method Summary

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.

Methods inherited from class org.exolab.castor.builder.binding.Binding

addAttributeBinding, addAttributeBinding, addComplexTypeBinding, addComplexTypeBinding, addElementBinding, addElementBinding, addGroupBinding, addGroupBinding, addInclude, addInclude, addPackage, addPackage, enumerateAttributeBinding, enumerateComplexTypeBinding, enumerateElementBinding, enumerateGroupBinding, enumerateInclude, enumeratePackage, getAttributeBinding, getAttributeBinding, getAttributeBindingCount, getComplexTypeBinding, getComplexTypeBinding, getComplexTypeBindingCount, getDefaultBindingType, getElementBinding, getElementBinding, getElementBindingCount, getGroupBinding, getGroupBinding, getGroupBindingCount, getInclude, getInclude, getIncludeCount, getNamingXML, getPackage, getPackage, getPackageCount, isValid, marshal, marshal, removeAllAttributeBinding, removeAllComplexTypeBinding, removeAllElementBinding, removeAllGroupBinding, removeAllInclude, removeAllPackage, removeAttributeBinding, removeComplexTypeBinding, removeElementBinding, removeGroupBinding, removeInclude, removePackage, setAttributeBinding, setAttributeBinding, setComplexTypeBinding, setComplexTypeBinding, setDefaultBindingType, setElementBinding, setElementBinding, setGroupBinding, setGroupBinding, setInclude, setInclude, setNamingXML, setPackage, setPackage, unmarshalBinding, validate

Field Details

ATTRIBUTE_PREFIX

protected static final String ATTRIBUTE_PREFIX

COMPLEXTYPE_ID

protected static final String COMPLEXTYPE_ID

GROUP_ID

protected static final String GROUP_ID

PATH_SEPARATOR

protected static final String PATH_SEPARATOR
Constants needed to create the XPath

Constructor Details

ExtendedBinding

public ExtendedBinding()
Default constructor. * @see java.lang.Object#Object()

Method Details

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.

Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com