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

java.lang.Object
  extended by org.apache.ws.jaxme.xs.impl.XSSimpleTypeImpl
      extended by org.apache.ws.jaxme.xs.impl.XSSimpleTypeRestrictionImpl
All Implemented Interfaces:
XSSimpleType
Direct Known Subclasses:
XSAtomicTypeRestrictionImpl, XSListTypeRestrictionImpl, XSUnionTypeRestrictionImpl

public abstract class XSSimpleTypeRestrictionImpl
extends XSSimpleTypeImpl

Author:
Jochen Wiedmann

Constructor Summary
protected XSSimpleTypeRestrictionImpl(XSType pParent, XSType pRestrictedType, XsGSimpleRestrictionModel pRestriction)
           
 
Method Summary
protected  XSSimpleType getBaseType()
           
 XSEnumeration[] getEnumerations()
          Returns the values of the "enumeration" facets.
 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.
protected  XsGSimpleRestrictionModel getRestriction()
           
 boolean isRestriction()
          Returns whether the type is a restriction of another simple type.
 
Methods inherited from class org.apache.ws.jaxme.xs.impl.XSSimpleTypeImpl
getAtomicType, getListType, getUnionType, isAtomic, isList, isUnion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XSSimpleTypeRestrictionImpl

protected XSSimpleTypeRestrictionImpl(XSType pParent,
                                      XSType pRestrictedType,
                                      XsGSimpleRestrictionModel pRestriction)
                               throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException
Method Detail

getBaseType

protected XSSimpleType getBaseType()

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.


getRestrictedType

public XSType getRestrictedType()
Description copied from interface: XSSimpleType

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


getRestriction

protected XsGSimpleRestrictionModel getRestriction()

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.


getEnumerations

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

Returns the values of the "enumeration" facets.