|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exolab.castor.builder.binding.XMLBindingComponent
public final class XMLBindingComponent
This class is the implementation of BindingComponent from an XML Schema point of view. This specific implementation wraps an XML Schema annotated structure.
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.
BindingComponent
Field Summary |
---|
Fields inherited from interface org.exolab.castor.builder.BindingComponent |
---|
CLASS, CONTENT_MEMBER_TYPE, ENUM_TYPE, INTERFACE, MEMBER |
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(java.lang.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. |
java.lang.String |
getCollectionType()
Returns the collection name specified in the binding file. |
protected org.exolab.castor.builder.binding.xml.ComponentBindingType |
getComponentBinding()
Returns the ComponentBinding used in that XMLBindingComponent to retrieve customized information. |
java.lang.String |
getContentMemberName()
Returns the name 'override' of a content member as specified in a binding file. |
org.exolab.castor.builder.binding.xml.EnumBindingType |
getEnumBinding()
Returns the EnumBindingType instance for the active binding component. |
java.lang.String |
getExtends()
Returns the name of a super class for the current XMLBinding. |
java.lang.String[] |
getImplements()
Returns an array of the different interface names implemented by the class that will represent the current XMLBindingComponent. |
java.lang.String |
getJavaClassName()
Returns a valid Java Class Name corresponding to this XMLBindingComponent. |
java.lang.String |
getJavaMemberName()
Returns a valid Java Member Name corresponding to this XMLBindingComponent. |
java.lang.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. |
java.lang.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. |
java.lang.String |
getSchemaLocation()
Returns the schemaLocation of the parent schema of the wrapped structure. |
java.lang.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. |
java.lang.String |
getValidator()
Returns the fully qualified name of the Validator to use. |
java.lang.String |
getValue()
Returns the value specified in the XML Schema for the XML Schema component wrapped in this XMLBindingComponent. |
java.lang.String |
getVisiblity()
Returns the visibility of the Java member to generate. |
java.lang.String |
getXMLFieldHandler()
Returns the fully qualified name of the XMLFieldHandler to use. |
java.lang.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. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLBindingComponent(BuilderConfiguration config, GroupNaming groupNaming)
config
- the BuilderConfiguration instance (must not be null).groupNaming
- The group naming scheme to be used.Method Detail |
---|
public ExtendedBinding getBinding()
public void setBinding(ExtendedBinding binding)
binding
- the Extended Binding Object Model that wraps the
information located in a binding filepublic void setView(Annotated annotated)
annotated
- an Annotated XML Schema structure.Annotated
public boolean equals(java.lang.Object object)
equals
in interface BindingComponent
equals
in class java.lang.Object
object
- the object to compare to this instance
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in interface BindingComponent
hashCode
in class java.lang.Object
Object.hashCode()
protected org.exolab.castor.builder.binding.xml.ComponentBindingType getComponentBinding()
public Annotated getAnnotated()
public boolean createGroupItem()
public java.lang.String getSchemaLocation()
public java.lang.String getTargetNamespace()
public Schema getSchema()
public XMLType getXMLType()
public java.lang.String getXMLName()
public java.lang.String getValue()
getValue
in interface BindingComponent
public java.lang.String getJavaClassName()
getJavaClassName
in interface BindingComponent
getQualifiedName()
public java.lang.String getJavaMemberName()
getJavaMemberName
in interface BindingComponent
getQualifiedName()
public java.lang.String getQualifiedName()
The fully qualified name is computed according the following priority order:
getQualifiedName
in interface BindingComponent
public java.lang.String getJavaPackage()
getJavaPackage
in interface BindingComponent
public int getUpperBound()
In the case of an XML Schema component, the upper bound corresponds to the XML Schema maxOccurs attribute, if any.
getUpperBound
in interface BindingComponent
public int getLowerBound()
getLowerBound
in interface BindingComponent
public java.lang.String getExtends()
getExtends
in interface BindingComponent
public java.lang.String[] getImplements()
getImplements
in interface BindingComponent
public boolean hasBoundProperties()
hasBoundProperties
in interface BindingComponent
public boolean hasEquals()
hasEquals
in interface BindingComponent
public boolean isAbstract()
isAbstract
in interface BindingComponent
public boolean isFinal()
isFinal
in interface BindingComponent
public boolean isFixed()
public boolean isNillable()
public boolean useWrapper()
useWrapper
in interface BindingComponent
public XSType getJavaType()
If a name of java type is specified then this name will have higher priority than the simpleType resolution.
getJavaType
in interface BindingComponent
public java.lang.String getCollectionType()
getCollectionType
in interface BindingComponent
public java.lang.String getValidator()
getValidator
in interface BindingComponent
public java.lang.String getXMLFieldHandler()
getXMLFieldHandler
in interface BindingComponent
public java.lang.String getVisiblity()
public short getType()
-1 is returned if the component binding is null.
getType
in interface BindingComponent
public org.exolab.castor.builder.binding.xml.EnumBindingType getEnumBinding()
getEnumBinding
in interface BindingComponent
public java.lang.String getContentMemberName()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |