org.apache.ws.jaxme.xs.xml.impl
Class XsGAllModelImpl

java.lang.Object
  extended by org.apache.ws.jaxme.xs.xml.impl.XsObjectImpl
      extended by org.apache.ws.jaxme.xs.xml.impl.XsTOpenAttrsImpl
          extended by org.apache.ws.jaxme.xs.xml.impl.XsTAnnotatedImpl
              extended by org.apache.ws.jaxme.xs.xml.impl.XsGAllModelImpl
All Implemented Interfaces:
XsGAllModel, XsObject, XsTAnnotated, XsTOpenAttrs

public class XsGAllModelImpl
extends XsTAnnotatedImpl
implements XsGAllModel

Implementation of xs:allModel, as specified by the following:

  <xs:group name="allModel">
    <xs:sequence>
      <xs:element ref="xs:annotation" minOccurs="0"/>
      <xs:element name="element" minOccurs="0" maxOccurs="unbounded">
        <xs:complexType>
          <xs:annotation>
            <xs:documentation>restricted max/min</xs:documentation>
          </xs:annotation>
          <xs:complexContent>
            <xs:restriction base="xs:localElement">
              <xs:sequence>
                <xs:element ref="xs:annotation" minOccurs="0"/>
                <xs:choice minOccurs="0">
                  <xs:element name="simpleType" type="xs:localSimpleType"/>
                  <xs:element name="complexType" type="xs:localComplexType"/>
                </xs:choice>
                <xs:group ref="xs:identityConstraint" minOccurs="0"
                    maxOccurs="unbounded"/>
              </xs:sequence>
              <xs:attribute name="minOccurs" use="optional" default="1">
                <xs:simpleType>
                  <xs:restriction base="xs:nonNegativeInteger">
                    <xs:enumeration value="0"/>
                    <xs:enumeration value="1"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:attribute>
              <xs:attribute name="maxOccurs" use="optional" default="1">
                <xs:simpleType>
                  <xs:restriction base="xs:allNNI">
                    <xs:enumeration value="0"/>
                    <xs:enumeration value="1"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:attribute>
            </xs:restriction>
          </xs:complexContent>
        </xs:complexType>
       </xs:element>
    </xs:sequence>
  </xs:group>
 

Implementation note: The above restriction of a XsTLocalElement is interpreted as a usual local element, except that the minOccurs and maxOccurs attributes must be 0 or 1.

Author:
Jochen Wiedmann

Constructor Summary
protected XsGAllModelImpl(XsObject pParent)
           
 
Method Summary
 XsTLocalElement createElement()
           
 XsTLocalElement[] getElements()
           
 
Methods inherited from class org.apache.ws.jaxme.xs.xml.impl.XsTAnnotatedImpl
createAnnotation, getAnnotation, getId, setId
 
Methods inherited from class org.apache.ws.jaxme.xs.xml.impl.XsTOpenAttrsImpl
getOpenAttributes, setAttribute
 
Methods inherited from class org.apache.ws.jaxme.xs.xml.impl.XsObjectImpl
asXsQName, asXsQName, getContext, getLocator, getNamespaceSupport, getObjectFactory, getParentObject, getXsESchema, isTopLevelObject, isValidated, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.ws.jaxme.xs.xml.XsGAllModel
createAnnotation, getAnnotation
 
Methods inherited from interface org.apache.ws.jaxme.xs.xml.XsTOpenAttrs
getOpenAttributes
 
Methods inherited from interface org.apache.ws.jaxme.xs.xml.XsObject
getLocator, getObjectFactory, getParentObject, getXsESchema, isTopLevelObject, validate
 

Constructor Detail

XsGAllModelImpl

protected XsGAllModelImpl(XsObject pParent)
Method Detail

createElement

public XsTLocalElement createElement()
Specified by:
createElement in interface XsGAllModel

getElements

public XsTLocalElement[] getElements()
Specified by:
getElements in interface XsGAllModel