org.apache.ws.jaxme.xs
Interface XSSimpleType

All Known Subinterfaces:
JAXBSimpleType
All Known Implementing Classes:
AbstractSimpleType, JAXBSimpleTypeImpl, XSSimpleTypeImpl

public interface XSSimpleType

Details of a simple type.

Author:
Jochen Wiedmann

Method Summary
 XSAtomicType getAtomicType()
          Returns the atomic type details.
 XSEnumeration[] getEnumerations()
          Returns the values of the "enumeration" facets.
 XSListType getListType()
          Returns the list type details.
 java.lang.String[][] getPattern()
          Returns the value of the "pattern" facet or null, if the pattern has not been set.
 XSType getRestrictedType()
          If the simple type is a restriction, returns the restricted simple type.
 XSUnionType getUnionType()
          Returns the union type details.
 boolean isAtomic()
          Returns whether the simple type is atomic.
 boolean isList()
          Returns whether the simple type is a list.
 boolean isRestriction()
          Returns whether the type is a restriction of another simple type.
 boolean isUnion()
          Returns whether the simple type is a union.
 

Method Detail

isAtomic

public boolean isAtomic()

Returns whether the simple type is atomic.


getAtomicType

public XSAtomicType getAtomicType()

Returns the atomic type details.

Throws:
java.lang.IllegalStateException - The type is a list or union.

isList

public boolean isList()

Returns whether the simple type is a list.


getListType

public XSListType getListType()

Returns the list type details.

Throws:
java.lang.IllegalStateException - The type is atomic or a union.

isUnion

public boolean isUnion()

Returns whether the simple type is a union.


getUnionType

public XSUnionType getUnionType()

Returns the union type details.

Throws:
java.lang.IllegalStateException - The type is atomic or a list.

getPattern

public java.lang.String[][] getPattern()

Returns the value of the "pattern" facet or null, if the pattern has not been set.

The returned value is an array of pattern arrays. The latter arrays are the patterns defined in one restriction step. These have to be combined by "OR". The resulting, combined arrays are being grouped by an "AND". This is according to http://www.w3.org/TR/xmlschema-2/index.html#rf-pattern, 4.3.4.3.


getEnumerations

public XSEnumeration[] getEnumerations()

Returns the values of the "enumeration" facets.


isRestriction

public boolean isRestriction()

Returns whether the type is a restriction of another simple type. (Almost all simple types are, the exception being the ur type XSAnySimpleType.


getRestrictedType

public XSType getRestrictedType()

If the simple type is a restriction, returns the restricted simple type.

Throws:
java.lang.IllegalStateException - This type is no restriction of another simple type.