Class ExtendedBinding
java.lang.Object
org.exolab.castor.builder.binding.xml.Binding
org.exolab.castor.builder.binding.ExtendedBinding
- All Implemented Interfaces:
Serializable
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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final StringPrefix used to identify an attribute.static final StringPrefix used to identify a complexType.static final StringPrefix used to identify an enumeration.static final StringPrefix used to identify a model group.protected static final StringConstants needed to create the XPath.static final StringPrefix used to identity a simplyType. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanexistsExclusion(String localName) Indicates whether an <exclude> element has been specified in a binding file for the given 'local name' of an element definition.booleanexistsForce(String localName) Indicates whether an <force> element has been specified in a binding file for the given 'local name' of an element definition.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.getExclusion(String localName) Returns theExcludeinstance for the element identified by the given local name.Returns all <force> elements defined in the binding file.Methods inherited from class Binding
addAttributeBinding, addAttributeBinding, addComplexTypeBinding, addComplexTypeBinding, addComponentBinding, addComponentBinding, addElementBinding, addElementBinding, addEnumBinding, addEnumBinding, addGroupBinding, addGroupBinding, addInclude, addInclude, addPackage, addPackage, addSimpleTypeBinding, addSimpleTypeBinding, enumerateAttributeBinding, enumerateComplexTypeBinding, enumerateComponentBinding, enumerateElementBinding, enumerateEnumBinding, enumerateGroupBinding, enumerateInclude, enumeratePackage, enumerateSimpleTypeBinding, getAttributeBinding, getAttributeBinding, getAttributeBindingCount, getAutomaticNaming, getComplexTypeBinding, getComplexTypeBinding, getComplexTypeBindingCount, getComponentBinding, getComponentBinding, getComponentBindingCount, getDefaultBindingType, getElementBinding, getElementBinding, getElementBindingCount, getEnumBinding, getEnumBinding, getEnumBindingCount, getGroupBinding, getGroupBinding, getGroupBindingCount, getInclude, getInclude, getIncludeCount, getNamingXML, getPackage, getPackage, getPackageCount, getSimpleTypeBinding, getSimpleTypeBinding, getSimpleTypeBindingCount, isValid, iterateAttributeBinding, iterateComplexTypeBinding, iterateComponentBinding, iterateElementBinding, iterateEnumBinding, iterateGroupBinding, iterateInclude, iteratePackage, iterateSimpleTypeBinding, marshal, marshal, removeAllAttributeBinding, removeAllComplexTypeBinding, removeAllComponentBinding, removeAllElementBinding, removeAllEnumBinding, removeAllGroupBinding, removeAllInclude, removeAllPackage, removeAllSimpleTypeBinding, removeAttributeBinding, removeAttributeBindingAt, removeComplexTypeBinding, removeComplexTypeBindingAt, removeComponentBinding, removeComponentBindingAt, removeElementBinding, removeElementBindingAt, removeEnumBinding, removeEnumBindingAt, removeGroupBinding, removeGroupBindingAt, removeInclude, removeIncludeAt, removePackage, removePackageAt, removeSimpleTypeBinding, removeSimpleTypeBindingAt, setAttributeBinding, setAttributeBinding, setAutomaticNaming, setComplexTypeBinding, setComplexTypeBinding, setComponentBinding, setComponentBinding, setDefaultBindingType, setElementBinding, setElementBinding, setEnumBinding, setEnumBinding, setGroupBinding, setGroupBinding, setInclude, setInclude, setNamingXML, setPackage, setPackage, setSimpleTypeBinding, setSimpleTypeBinding, unmarshalBinding, validateModifier and TypeMethodDescriptionvoidaddAttributeBinding(int index, ComponentBindingType vAttributeBinding) voidaddAttributeBinding(ComponentBindingType vAttributeBinding) voidaddComplexTypeBinding(int index, ComponentBindingType vComplexTypeBinding) voidaddComplexTypeBinding(ComponentBindingType vComplexTypeBinding) voidaddComponentBinding(int index, ComponentBindingType vComponentBinding) voidaddComponentBinding(ComponentBindingType vComponentBinding) voidaddElementBinding(int index, ComponentBindingType vElementBinding) voidaddElementBinding(ComponentBindingType vElementBinding) voidaddEnumBinding(int index, ComponentBindingType vEnumBinding) voidaddEnumBinding(ComponentBindingType vEnumBinding) voidaddGroupBinding(int index, ComponentBindingType vGroupBinding) voidaddGroupBinding(ComponentBindingType vGroupBinding) voidaddInclude(int index, IncludeType vInclude) voidaddInclude(IncludeType vInclude) voidaddPackage(int index, PackageType vPackage) voidaddPackage(PackageType vPackage) voidaddSimpleTypeBinding(int index, ComponentBindingType vSimpleTypeBinding) voidaddSimpleTypeBinding(ComponentBindingType vSimpleTypeBinding) Method enumerateAttributeBinding.Method enumerateComplexTypeBinding.Method enumerateComponentBinding.Method enumerateElementBinding.Method enumerateEnumBinding.Method enumerateGroupBinding.Method enumerateInclude.Method enumeratePackage.Method enumerateSimpleTypeBinding.Method getAttributeBinding.Returns the contents of the collection in an Array.getAttributeBinding(int index) Method getAttributeBinding.intMethod getAttributeBindingCount.Returns the value of field 'automaticNaming'.Method getComplexTypeBinding.Returns the contents of the collection in an Array.getComplexTypeBinding(int index) Method getComplexTypeBinding.intMethod getComplexTypeBindingCount.Method getComponentBinding.Returns the contents of the collection in an Array.getComponentBinding(int index) Method getComponentBinding.intMethod getComponentBindingCount.Returns the value of field 'defaultBindingType'.Method getElementBinding.Returns the contents of the collection in an Array.getElementBinding(int index) Method getElementBinding.intMethod getElementBindingCount.Method getEnumBinding.Returns the contents of the collection in an Array.getEnumBinding(int index) Method getEnumBinding.intMethod getEnumBindingCount.Method getGroupBinding.Returns the contents of the collection in an Array.getGroupBinding(int index) Method getGroupBinding.intMethod getGroupBindingCount.Method getInclude.Returns the contents of the collection in an Array.getInclude(int index) Method getInclude.intMethod getIncludeCount.Returns the value of field 'namingXML'.Method getPackage.Returns the contents of the collection in an Array.getPackage(int index) Method getPackage.intMethod getPackageCount.Method getSimpleTypeBinding.Returns the contents of the collection in an Array.getSimpleTypeBinding(int index) Method getSimpleTypeBinding.intMethod getSimpleTypeBindingCount.booleanisValid()Method isValid.Method iterateAttributeBinding.Method iterateComplexTypeBinding.Method iterateComponentBinding.Method iterateElementBinding.Method iterateEnumBinding.Method iterateGroupBinding.Method iterateInclude.Method iteratePackage.Method iterateSimpleTypeBinding.voidvoidmarshal(ContentHandler handler) voidvoidvoidvoidvoidvoidvoidvoidvoidbooleanremoveAttributeBinding(ComponentBindingType vAttributeBinding) Method removeAttributeBinding.removeAttributeBindingAt(int index) Method removeAttributeBindingAt.booleanremoveComplexTypeBinding(ComponentBindingType vComplexTypeBinding) Method removeComplexTypeBinding.removeComplexTypeBindingAt(int index) Method removeComplexTypeBindingAt.booleanremoveComponentBinding(ComponentBindingType vComponentBinding) Method removeComponentBinding.removeComponentBindingAt(int index) Method removeComponentBindingAt.booleanremoveElementBinding(ComponentBindingType vElementBinding) Method removeElementBinding.removeElementBindingAt(int index) Method removeElementBindingAt.booleanremoveEnumBinding(ComponentBindingType vEnumBinding) Method removeEnumBinding.removeEnumBindingAt(int index) Method removeEnumBindingAt.booleanremoveGroupBinding(ComponentBindingType vGroupBinding) Method removeGroupBinding.removeGroupBindingAt(int index) Method removeGroupBindingAt.booleanremoveInclude(IncludeType vInclude) Method removeInclude.removeIncludeAt(int index) Method removeIncludeAt.booleanremovePackage(PackageType vPackage) Method removePackage.removePackageAt(int index) Method removePackageAt.booleanremoveSimpleTypeBinding(ComponentBindingType vSimpleTypeBinding) Method removeSimpleTypeBinding.removeSimpleTypeBindingAt(int index) Method removeSimpleTypeBindingAt.voidsetAttributeBinding(int index, ComponentBindingType vAttributeBinding) voidsetAttributeBinding(ComponentBindingType[] vAttributeBindingArray) voidsetAutomaticNaming(AutomaticNamingType automaticNaming) Sets the value of field 'automaticNaming'.voidsetComplexTypeBinding(int index, ComponentBindingType vComplexTypeBinding) voidsetComplexTypeBinding(ComponentBindingType[] vComplexTypeBindingArray) voidsetComponentBinding(int index, ComponentBindingType vComponentBinding) voidsetComponentBinding(ComponentBindingType[] vComponentBindingArray) voidsetDefaultBindingType(BindingType defaultBindingType) Sets the value of field 'defaultBindingType'.voidsetElementBinding(int index, ComponentBindingType vElementBinding) voidsetElementBinding(ComponentBindingType[] vElementBindingArray) voidsetEnumBinding(int index, ComponentBindingType vEnumBinding) voidsetEnumBinding(ComponentBindingType[] vEnumBindingArray) voidsetGroupBinding(int index, ComponentBindingType vGroupBinding) voidsetGroupBinding(ComponentBindingType[] vGroupBindingArray) voidsetInclude(int index, IncludeType vInclude) voidsetInclude(IncludeType[] vIncludeArray) voidsetNamingXML(NamingXMLType namingXML) Sets the value of field 'namingXML'.voidsetPackage(int index, PackageType vPackage) voidsetPackage(PackageType[] vPackageArray) voidsetSimpleTypeBinding(int index, ComponentBindingType vSimpleTypeBinding) voidsetSimpleTypeBinding(ComponentBindingType[] vSimpleTypeBindingArray) static BindingunmarshalBinding(Reader reader) Method unmarshalBinding.voidvalidate()
-
Field Details
-
PATH_SEPARATOR
-
ATTRIBUTE_PREFIX
-
COMPLEXTYPE_ID
-
SIMPLETYPE_ID
-
ENUMTYPE_ID
-
GROUP_ID
-
-
Constructor Details
-
ExtendedBinding
public ExtendedBinding()Default constructor.- See Also:
-
-
Method Details
-
getComponentBindingType
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.
-
existsExclusion
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
-
existsForce
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
-