org.exolab.castor.builder.binding
public class XMLBindingComponent extends Object implements BindingComponent
The XML Schema structure can be only of four different types:
The three first items can be customized using a binding file. Thus the XMLBindingComponent class takes into account the presence or not of a custom binding document in the computation of the needed information for the Source Generator to generate java classes from an XML Schema.
The customizable items are detailled in the binding file documentation.
This class acts like a window on a particular XML Schema structure that the user controls by changing the view on the Annotated Structure he is interested in.
TODO: add the link to the documentation.
Version: $Revision: 6343 $ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $
Constructor Summary | |
---|---|
XMLBindingComponent(BuilderConfiguration config, GroupNaming groupNaming)
Constructs an XMLBindingComponent from an XML Schema Component.
|
Method Summary | |
---|---|
boolean | createGroupItem()
Returns true if the binding of this XMLBindingComponent will require the
generation of 2 java classes. |
boolean | equals(Object object)
Returns true if the given Object is equal to this instance of
XMLBindingComponent.
|
Annotated | getAnnotated()
Returns the XML Schema annotated structure used in this XMLBindingComponent.
|
ExtendedBinding | getBinding()
Returns the Binding Object Model on which this XMLBindingComponent will
query information.
|
String | getCollectionType()
Returns the collection name specified in the binding file. |
protected ComponentBindingType | getComponentBinding()
Returns the ComponentBinding used in that XMLBindingComponent
to retrieve customized information.
|
String | getExtends()
Returns the name of a super class for the current XMLBinding. |
String[] | getImplements()
Returns an array of the different interface names implemented by the
class that will represent the current XMLBindingComponent. |
String | getJavaClassName()
Returns a valid Java Class Name corresponding to this XMLBindingComponent.
|
String | getJavaMemberName()
Returns a valid Java Member Name corresponding to this XMLBindingComponent.
|
String | getJavaPackage()
Returns the java package associated with this XML BindingComponent. |
XSType | getJavaType()
Returns the XSType that corresponds to the Java type chosen to represent
the XML Schema component represented by this XMLBindingComponent. |
int | getLowerBound()
Returns the lower bound of the collection that is generated from this
BindingComponent. |
String | getQualifiedName()
Returns the fully qualified name used for generating a java name that
represents this XMLBindingComponent.
|
Schema | getSchema()
Returns the underlying Schema of the wrapped structure.
|
String | getSchemaLocation()
Returns the schemaLocation of the parent schema of the wrapped structure.
|
String | getTargetNamespace()
Returns the targetNamespace of the parent schema of the wrapped structure.
|
short | getType()
Returns the type of this component binding. |
int | getUpperBound()
Returns the upper bound of the collection that is generated from this
BindingComponent. |
String | getValidator()
Returns the fully qualified name of the Validator to use.
|
String | getValue()
Returns the value specified in the XML Schema for the XML Schema
component wrapped in this XMLBindingComponent. |
String | getXMLFieldHandler()
Returns the fully qualified name of the XMLFieldHandler to use.
|
String | getXMLName()
Returns the XML name declared in the XML Schema for this XMLBindingComponent.
|
XMLType | getXMLType()
Returns the XMLType of the underlying structure. |
boolean | hasBoundProperties()
Returns true if bound properties must be generated for the class that
will represent the current XMLBindingComponent.
|
boolean | hasEquals()
Returns true if equal method must be generated for the class that will
represent the current XMLBindingComponent.
|
int | hashCode()
Returns the hashCode value for this object.
|
boolean | isAbstract()
Returns true if the class that will represent the current
XMLBindingComponent must be abstract.
|
boolean | isFinal()
Returns true if the class that will represent the current XMLBindingComponent
must be final.
|
boolean | isFixed()
Returns true if the wrapped XML Schema component is fixed (i.e the value
used is fixed).
|
boolean | isNillable()
Returns true if the wrapped XML Schema component is nillable.
|
void | setBinding(ExtendedBinding binding)
Sets the Binding Object Model on which this XMLBindingComponent will
query information.
|
void | setView(Annotated annotated)
Sets the window on the given Annotated XML Schema structure. |
boolean | useWrapper()
Returns true if the member represented by that XMLBindingComponent is to
be represented by an Object wrapper. |
Parameters: config the BuilderConfiguration instance (must not be null). groupNaming The group naming scheme to be used.
Returns: true if the binding of this XMLBindingComponent will require the generation of 2 java classes.
Parameters: object {@inheritDoc }
Returns: true if the given Object is equal to this instance of XMLBindingComponent.
See Also: java.lang.Object#equals(java.lang.Object)
Returns: the XML Schema annotated structure used in this XMLBindingComponent.
Returns: the Extended Binding Object Model that wraps the information located in a binding file
Returns: a string that represents the collection name specified in the binding file. If no collection was specified, null will be returned and the default collection settings will be used.
Returns: the ComponentBinding used in that XMLBinding.
Returns: the name of a super class for the current XMLBinding. Null is returned if this XMLBinding is not meant to be mapped to a java class
Returns: array of interface names
Returns: a valid Java Class Name corresponding to this XMLBindingComponent. This name is not qualified, this is only a local Java class name.
See Also: XMLBindingComponent
Returns: a valid Java Member Name corresponding to this XMLBindingComponent. This name is not qualified, this is only a local Java member name.
See Also: XMLBindingComponent
Returns: the java package associated with this XML BindingComponent.
If a name of java type is specified then this name will have higher priority than the simpleType resolution.
Returns: an XSType
Returns: an int representing the lower bound of the collection generated from this BindingComponent. 0 is returned by default.
The fully qualified name is computed according the following priority order:
Returns: the fully qualified name used for generating a java name that represents this XMLBindingComponent.
Returns: the parent schema of the wrapped structure.
Returns: the schemaLocation of the parent schema of the wrapped structure.
Returns: the targetNamespace of the parent schema of the wrapped structure.
-1 is returned if the component binding is null.
Returns: the type of this component binding.
In the case of an XML Schema component, the upper bound corresponds to the XML Schema maxOccurs attribute, if any.
Returns: an int representing the lower bound of the collection generated from this BindingComponent. -1 is returned to indicate that the upper bound is unbounded. 1 is the default value.
Returns: the fully qualified name of the Validator to use.
Returns: the value specified in the XML Schema for the XML Schema annotated structure wrapped in this XMLBindingComponent.
Returns: the fully qualified name of the XMLFieldHandler to use.
Returns: the XML name declared in the XML Schema for this XMLBindingComponent.
Returns: the XMLType of the underlying structure.
Returns: true if bound properties must be generated for the class the class that will represent the current XMLBindingComponent.
Returns: true if equal method must be generated for the class the class that will represent the current XMLBindingComponent.
Returns: the hashcode value for this object.
See Also: java.lang.Object#hashCode()
Returns: true if the class that will represent the current XMLBindingComponent must be abstract.
Returns: true if the class that will represent the current XMLBindingComponent must be final.
Returns: true if the wrapped XML Schema component is fixed (i.e the value used is fixed).
Returns: true if the wrapped XML Schema component is nillable.
Parameters: binding the Extended Binding Object Model that wraps the information located in a binding file
Parameters: annotated an Annotated XML Schema structure.
See Also: Annotated
Returns: true if the member represented by that XMLBindingComponent is to be represented by an Object wrapper.