org.apache.ws.jaxme.xs.impl
Class XSElementImpl

java.lang.Object
  extended by org.apache.ws.jaxme.xs.impl.XSObjectImpl
      extended by org.apache.ws.jaxme.xs.impl.XSOpenAttrsImpl
          extended by org.apache.ws.jaxme.xs.impl.XSElementImpl
All Implemented Interfaces:
XSElement, XSObject, XSOpenAttrs
Direct Known Subclasses:
JAXBElementImpl

public class XSElementImpl
extends XSOpenAttrsImpl
implements XSElement

Author:
Jochen Wiedmann

Constructor Summary
protected XSElementImpl(XSObject pParent, XsTElement pBaseElement)
           
 
Method Summary
 XSAnnotation[] getAnnotations()
          Returns the array of annotations.
 java.lang.String getDefault()
          Returns the elements "default" value or null, if no such attribute is set.
 java.lang.String getFixed()
          Returns the elements "fixed" value or null, if no such attribute is set.
 XSIdentityConstraint[] getIdentityConstraints()
          Fetch all of the identity constraints that this element places upon its child tags.
 XSKeyRef[] getKeyRefs()
          Fetch all of the keyref's declared by this element.
 XsQName getName()
          Returns the elements name.
 XSGroup getSubstitutionGroup()
          If the element may be substituted by other elements (in other words: if it is the head of a substitution group), returns the choice group of all the elements that may be used to replace the element.
 XsQName getSubstitutionGroupName()
          Returns the name of an element, which may be substituted by this element.
 XSType getType()
          Returns the elements type.
protected  XsTElement getXsTElement()
           
 boolean isAbstract()
          Returns whether the element is abstract or not.
 boolean isBlockedForSubstitution()
          Returns whether this element is blocked for substitution.
 boolean isGlobal()
          Returns whether the element is global or not.
protected  boolean isInnerComplexType()
           
protected  boolean isInnerSimpleType()
           
 boolean isNillable()
          Returns whether the element is nillable or not.
 boolean isReference()
          Returns, whether the element is created by referencing another element.
protected  boolean isValidated()
           
 void setSubstitutionGroup(XSGroup pGroup)
          If the element may be substituted by other elements (in other words: if it is the head of a substitution group), sets the choice group of all the elements that may be used to replace the element.
 void validate()
          Validates the objects internal state.
 
Methods inherited from class org.apache.ws.jaxme.xs.impl.XSOpenAttrsImpl
getOpenAttributes
 
Methods inherited from class org.apache.ws.jaxme.xs.impl.XSObjectImpl
getLocator, getParentObject, getXsObject, getXSSchema, isTopLevelObject, validateAllIn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.ws.jaxme.xs.XSOpenAttrs
getOpenAttributes
 
Methods inherited from interface org.apache.ws.jaxme.xs.XSObject
getLocator, getParentObject, getXSSchema, isTopLevelObject
 

Constructor Detail

XSElementImpl

protected XSElementImpl(XSObject pParent,
                        XsTElement pBaseElement)
                 throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException
Method Detail

getXsTElement

protected XsTElement getXsTElement()

isReference

public boolean isReference()
Description copied from interface: XSElement
Returns, whether the element is created by referencing another element.

Specified by:
isReference in interface XSElement

isInnerSimpleType

protected boolean isInnerSimpleType()

isInnerComplexType

protected boolean isInnerComplexType()

isGlobal

public boolean isGlobal()
Description copied from interface: XSElement

Returns whether the element is global or not.

Specified by:
isGlobal in interface XSElement

isNillable

public boolean isNillable()
Description copied from interface: XSElement

Returns whether the element is nillable or not.

Specified by:
isNillable in interface XSElement

getName

public XsQName getName()
Description copied from interface: XSElement

Returns the elements name. Note that, unlike types, an element always has a name.

Specified by:
getName in interface XSElement

getType

public XSType getType()
Description copied from interface: XSElement

Returns the elements type.

Specified by:
getType in interface XSElement

isValidated

protected boolean isValidated()

validate

public void validate()
              throws org.xml.sax.SAXException
Description copied from interface: XSObject

Validates the objects internal state.

Specified by:
validate in interface XSObject
Overrides:
validate in class XSObjectImpl
Throws:
org.xml.sax.SAXException

getAnnotations

public XSAnnotation[] getAnnotations()
Description copied from interface: XSElement

Returns the array of annotations.

Specified by:
getAnnotations in interface XSElement

getDefault

public java.lang.String getDefault()
Description copied from interface: XSElement

Returns the elements "default" value or null, if no such attribute is set.

Specified by:
getDefault in interface XSElement

getFixed

public java.lang.String getFixed()
Description copied from interface: XSElement

Returns the elements "fixed" value or null, if no such attribute is set.

Specified by:
getFixed in interface XSElement

getSubstitutionGroupName

public XsQName getSubstitutionGroupName()
Description copied from interface: XSElement

Returns the name of an element, which may be substituted by this element.

Specified by:
getSubstitutionGroupName in interface XSElement

isBlockedForSubstitution

public boolean isBlockedForSubstitution()
Description copied from interface: XSElement

Returns whether this element is blocked for substitution.

Specified by:
isBlockedForSubstitution in interface XSElement

isAbstract

public boolean isAbstract()
Description copied from interface: XSElement

Returns whether the element is abstract or not.

Specified by:
isAbstract in interface XSElement

setSubstitutionGroup

public void setSubstitutionGroup(XSGroup pGroup)
Description copied from interface: XSElement

If the element may be substituted by other elements (in other words: if it is the head of a substitution group), sets the choice group of all the elements that may be used to replace the element. The element itself is part of the substitution group if, and only if, the element is not abstract.

Specified by:
setSubstitutionGroup in interface XSElement

getSubstitutionGroup

public XSGroup getSubstitutionGroup()
Description copied from interface: XSElement

If the element may be substituted by other elements (in other words: if it is the head of a substitution group), returns the choice group of all the elements that may be used to replace the element. The element itself is part of the substitution group if, and only if, the element is not abstract.

Specified by:
getSubstitutionGroup in interface XSElement

getIdentityConstraints

public XSIdentityConstraint[] getIdentityConstraints()
Description copied from interface: XSElement
Fetch all of the identity constraints that this element places upon its child tags. Note that a single xs:unique or xs:key tag may expand to several elements in this array depending on their xpath fields.

Specified by:
getIdentityConstraints in interface XSElement

getKeyRefs

public XSKeyRef[] getKeyRefs()
Description copied from interface: XSElement
Fetch all of the keyref's declared by this element.

Specified by:
getKeyRefs in interface XSElement