Public Member Functions | |
ExtendedBinding () | |
ComponentBindingType | getComponentBindingType (Annotated annotated) |
Static Public Member Functions | |
static String | getSchemaLocation (Structure structure) |
Static Protected Attributes | |
static final String | PATH_SEPARATOR = "/" |
static final String | ATTRIBUTE_PREFIX = "@" |
static final String | COMPLEXTYPE_ID = "complexType:" |
static final String | GROUP_ID = "group:" |
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: <blockquote>
<xsd:element name="foo"> <xsd:complextype> <xsd:attribute name="bar" type="xsd:string"/> </xsd:complextype> </xsd:element>>
</blockquote> The path to identify the attribute 'bar' will be: <blockquote>
/foo/
</blockquote> The keywords complexType
and group
are used to identify respectively an XML Schema ComplexType and a Model Group definition.
org.exolab.castor.builder.binding.ExtendedBinding.ExtendedBinding | ( | ) |
Default constructor.
ComponentBindingType org.exolab.castor.builder.binding.ExtendedBinding.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.
annotated | the XML Schema annotated structure for which to query the Binding object for a ComponentBinding. |
References org.exolab.castor.xml.schema.Structure.ATTRIBUTE, org.exolab.castor.xml.schema.AttributeDecl.getReference(), org.exolab.castor.xml.schema.ElementDecl.getReference(), org.exolab.castor.builder.binding.ExtendedBinding.getSchemaLocation(), org.exolab.castor.xml.schema.Structure.getStructureType(), org.exolab.castor.xml.schema.AttributeDecl.isReference(), and org.exolab.castor.xml.schema.ElementDecl.isReference().
Referenced by org.exolab.castor.builder.binding.XMLBindingComponent.setView().
static String org.exolab.castor.builder.binding.ExtendedBinding.getSchemaLocation | ( | Structure | structure | ) | [static] |
Returns a string representation of an XML Schema Component. This representation is directly adapted from XPath and will used as a key to store the component bindings.
The location of a structure is composed of two parts:
The local location is defined by:
Note that only top-level groups and complexTypes are named and thus will
structure | the structure for which to return a representation. |
Referenced by org.exolab.castor.builder.binding.ExtendedBinding.getComponentBindingType().
final String org.exolab.castor.builder.binding.ExtendedBinding.ATTRIBUTE_PREFIX = "@" [static, protected] |
final String org.exolab.castor.builder.binding.ExtendedBinding.COMPLEXTYPE_ID = "complexType:" [static, protected] |
final String org.exolab.castor.builder.binding.ExtendedBinding.GROUP_ID = "group:" [static, protected] |
final String org.exolab.castor.builder.binding.ExtendedBinding.PATH_SEPARATOR = "/" [static, protected] |
Constants needed to create the XPath