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

java.lang.Object
  extended by org.apache.ws.jaxme.xs.impl.XSSimpleTypeImpl
      extended by org.apache.ws.jaxme.xs.impl.XSUnionTypeImpl
All Implemented Interfaces:
XSSimpleType, XSUnionType

public class XSUnionTypeImpl
extends XSSimpleTypeImpl
implements XSUnionType

Author:
Jochen Wiedmann

Constructor Summary
XSUnionTypeImpl(XSType pOwner, XsEUnion pBaseUnion)
           
 
Method Summary
 XSEnumeration[] getEnumerations()
          Returns the values of the "enumeration" facets.
 XSType[] getMemberTypes()
          Returns the array of member types.
 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 isRestriction()
          Returns whether the type is a restriction of another simple type.
 boolean isUnion()
          Returns whether the simple type is a union.
 
Methods inherited from class org.apache.ws.jaxme.xs.impl.XSSimpleTypeImpl
getAtomicType, getListType, isAtomic, isList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XSUnionTypeImpl

public XSUnionTypeImpl(XSType pOwner,
                       XsEUnion pBaseUnion)
                throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException
Method Detail

isUnion

public boolean isUnion()
Description copied from interface: XSSimpleType

Returns whether the simple type is a union.

Specified by:
isUnion in interface XSSimpleType
Overrides:
isUnion in class XSSimpleTypeImpl

isRestriction

public boolean isRestriction()
Description copied from interface: XSSimpleType

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

Specified by:
isRestriction in interface XSSimpleType

getRestrictedType

public XSType getRestrictedType()
Description copied from interface: XSSimpleType

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

Specified by:
getRestrictedType in interface XSSimpleType

getUnionType

public XSUnionType getUnionType()
Description copied from interface: XSSimpleType

Returns the union type details.

Specified by:
getUnionType in interface XSSimpleType
Overrides:
getUnionType in class XSSimpleTypeImpl

getPattern

public java.lang.String[][] getPattern()
Description copied from interface: XSSimpleType

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.

Specified by:
getPattern in interface XSSimpleType

getEnumerations

public XSEnumeration[] getEnumerations()
Description copied from interface: XSSimpleType

Returns the values of the "enumeration" facets.

Specified by:
getEnumerations in interface XSSimpleType

getMemberTypes

public XSType[] getMemberTypes()
Description copied from interface: XSUnionType

Returns the array of member types. Each member type is, of course, a simple type.

Specified by:
getMemberTypes in interface XSUnionType