org.apache.ws.jaxme.xs.types
Class XSAnyType

java.lang.Object
  extended by org.apache.ws.jaxme.xs.types.AbstractBuiltinType
      extended by org.apache.ws.jaxme.xs.types.XSAnyType
All Implemented Interfaces:
XSComplexType, XSObject, XSOpenAttrs, XSType

public class XSAnyType
extends AbstractBuiltinType
implements XSComplexType

The "anyType" is a type with arbitrary content.

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.
 XSComplexType getComplexType()
          Returns the complex types information.
 XSType getExtendedType()
          If the element is an extension: Returns the extended type.
static XSAnyType getInstance()
           
 XsQName getName()
          If the type is global: Returns the types name.
 XSObject getParentObject()
          Returns either of the following: If the object is the schema itself, returns null.
 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.
 XSSimpleType getSimpleType()
          Returns the simple types information.
 boolean hasSimpleContent()
          Returns whether the complex type has simple content.
 boolean isBuiltin()
          Returns whether the type is a builtin type of XML Schema.
 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.
 boolean isSimple()
          Returns whether the type is simple or not.
 boolean isTopLevelObject()
          Returns whether the object is a top-level object.
 
Methods inherited from class org.apache.ws.jaxme.xs.types.AbstractBuiltinType
getAnnotations, getLocator, getOpenAttributes, getSchemaHeader, getXSSchema, isGlobal, setGlobal, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static final XSAnyType getInstance()

isSimple

public boolean isSimple()
Description copied from interface: XSType

Returns whether the type is simple or not.

Specified by:
isSimple in interface XSType

getSimpleType

public XSSimpleType getSimpleType()
                           throws org.xml.sax.SAXException
Description copied from interface: XSType

Returns the simple types information.

Specified by:
getSimpleType in interface XSType
Throws:
org.xml.sax.SAXException

getComplexType

public XSComplexType getComplexType()
                             throws org.xml.sax.SAXException
Description copied from interface: XSType

Returns the complex types information.

Specified by:
getComplexType in interface XSType
Throws:
org.xml.sax.SAXException

getName

public XsQName getName()
Description copied from interface: XSType

If the type is global: Returns the types name. Otherwise returns null.

Specified by:
getName in interface XSType

isTopLevelObject

public boolean isTopLevelObject()
Description copied from interface: XSObject

Returns whether the object is a top-level object. This is the case for the XsESchema itself and for all its childs only.

Specified by:
isTopLevelObject in interface XSObject

getParentObject

public XSObject getParentObject()
Description copied from interface: XSObject

Returns either of the following:

Specified by:
getParentObject in interface XSObject

hasSimpleContent

public boolean hasSimpleContent()
Description copied from interface: XSComplexType

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

Specified by:
hasSimpleContent in interface XSComplexType

isEmpty

public boolean isEmpty()
Description copied from interface: XSComplexType

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

Specified by:
isEmpty in interface XSComplexType
See Also:
XsComplexContentType.EMPTY

isElementOnly

public boolean isElementOnly()
Description copied from interface: XSComplexType

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

Specified by:
isElementOnly in interface XSComplexType
See Also:
XsComplexContentType.ELEMENT_ONLY

isMixed

public boolean isMixed()
Description copied from interface: XSComplexType

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

Specified by:
isMixed in interface XSComplexType
See Also:
XsComplexContentType.MIXED

getParticle

public XSParticle getParticle()
Description copied from interface: XSComplexType

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

Specified by:
getParticle in interface XSComplexType

getAttributes

public XSAttributable[] getAttributes()
Description copied from interface: XSComplexType

Returns the complex types attributes.

Specified by:
getAttributes in interface XSComplexType

isExtension

public boolean isExtension()
Description copied from interface: XSComplexType

Returns whether the element is a extension of another element.

Specified by:
isExtension in interface XSComplexType

getExtendedType

public XSType getExtendedType()
Description copied from interface: XSComplexType

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

Specified by:
getExtendedType in interface XSComplexType

isRestriction

public boolean isRestriction()
Description copied from interface: XSComplexType

Returns whether the element is a restriction of another element.

Specified by:
isRestriction in interface XSComplexType

getRestrictedType

public XSType getRestrictedType()
Description copied from interface: XSComplexType

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

Specified by:
getRestrictedType in interface XSComplexType

getComplexContentType

public XsComplexContentType getComplexContentType()
Description copied from interface: XSComplexType

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

Specified by:
getComplexContentType in interface XSComplexType
See Also:
XsComplexContentType.EMPTY, XsComplexContentType.ELEMENT_ONLY, XsComplexContentType.MIXED, XSComplexType.isEmpty(), XSComplexType.isElementOnly(), XSComplexType.isMixed()

getSimpleContent

public XSSimpleContentType getSimpleContent()
Description copied from interface: XSComplexType

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

Specified by:
getSimpleContent in interface XSComplexType

isBuiltin

public boolean isBuiltin()
Description copied from interface: XSType

Returns whether the type is a builtin type of XML Schema.

Specified by:
isBuiltin in interface XSType