org.apache.ws.jaxme.xs
Interface XSComplexType

All Known Implementing Classes:
XSAnyType, XSTypeImpl.XSAllComplexTypeImpl, XSTypeImpl.XSBasicComplexTypeImpl, XSTypeImpl.XSChoiceComplexTypeImpl, XSTypeImpl.XSComplexContentImpl, XSTypeImpl.XSComplexTypeImpl, XSTypeImpl.XSGroupComplexTypeImpl, XSTypeImpl.XSSequenceComplexTypeImpl, XSTypeImpl.XSSimpleContentImpl

public interface XSComplexType

Details of a complex type.

Author:
Jochen Wiedmann

Method Summary
 XSAttributable[] getAttributes()
          Returns the complex types attributes.
 XsComplexContentType getComplexContentType()
          If the element hasn't simple content: Returns the element contents type.
 XSType getExtendedType()
          If the element is an extension: Returns the extended type.
 XSParticle getParticle()
          If the element hasn't simple content: Returns the complex elements particle.
 XSType getRestrictedType()
          If the element is an restriction: Returns the restricted type.
 XSSimpleContentType getSimpleContent()
          If the complex type has simple content, returns the contents type.
 boolean hasSimpleContent()
          Returns whether the complex type has simple content.
 boolean isElementOnly()
          If the element hasn't simple content: Returns whether the elements content is elementOnly.
 boolean isEmpty()
          If the element hasn't simple content: Returns whether the elements content is empty.
 boolean isExtension()
          Returns whether the element is a extension of another element.
 boolean isMixed()
          If the element hasn't simple content: Returns whether the elements content is mixed.
 boolean isRestriction()
          Returns whether the element is a restriction of another element.
 

Method Detail

hasSimpleContent

boolean hasSimpleContent()

Returns whether the complex type has simple content. If so, you may use the method getSimpleContent() to fetch the simple contents type. If not, you may use getComplexContentType(), isEmpty(), isElementOnly(), isMixed(), and getParticle(). The method getAttributes() is always valid.


getSimpleContent

XSSimpleContentType getSimpleContent()

If the complex type has simple content, returns the contents type. This is, of course, a simple type.


getComplexContentType

XsComplexContentType getComplexContentType()
                                           throws org.xml.sax.SAXException

If the element hasn't simple content: Returns the element contents type.

Throws:
java.lang.IllegalStateException - The element does not have complex content
org.xml.sax.SAXException
See Also:
XsComplexContentType.EMPTY, XsComplexContentType.ELEMENT_ONLY, XsComplexContentType.MIXED, isEmpty(), isElementOnly(), isMixed()

isEmpty

boolean isEmpty()
                throws org.xml.sax.SAXException

If the element hasn't simple content: Returns whether the elements content is empty. Shortcut for getComplexContentType().equals(EMPTY).

Throws:
java.lang.IllegalStateException - The element does not have complex content
org.xml.sax.SAXException
See Also:
XsComplexContentType.EMPTY

isElementOnly

boolean isElementOnly()
                      throws org.xml.sax.SAXException

If the element hasn't simple content: Returns whether the elements content is elementOnly. Shortcut for getComplexContentType().equals(ELEMENT_ONLY).

Throws:
java.lang.IllegalStateException - The element does not have complex content
org.xml.sax.SAXException
See Also:
XsComplexContentType.ELEMENT_ONLY

isMixed

boolean isMixed()
                throws org.xml.sax.SAXException

If the element hasn't simple content: Returns whether the elements content is mixed. Shortcut for getComplexContentType().equals(MIXED).

Throws:
java.lang.IllegalStateException - The element does not have complex content
org.xml.sax.SAXException
See Also:
XsComplexContentType.MIXED

getParticle

XSParticle getParticle()
                       throws org.xml.sax.SAXException

If the element hasn't simple content: Returns the complex elements particle.

Throws:
java.lang.IllegalStateException - The element has simple content
org.xml.sax.SAXException

getAttributes

XSAttributable[] getAttributes()
                               throws org.xml.sax.SAXException

Returns the complex types attributes.

Throws:
org.xml.sax.SAXException

isExtension

boolean isExtension()
                    throws org.xml.sax.SAXException

Returns whether the element is a extension of another element.

Throws:
org.xml.sax.SAXException

getExtendedType

XSType getExtendedType()
                       throws org.xml.sax.SAXException

If the element is an extension: Returns the extended type.

Throws:
java.lang.IllegalStateException - The element is no extension.
org.xml.sax.SAXException

isRestriction

boolean isRestriction()

Returns whether the element is a restriction of another element.


getRestrictedType

XSType getRestrictedType()

If the element is an restriction: Returns the restricted type.

Throws:
java.lang.IllegalStateException - The element is no restriction.