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

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.XsEUnionImpl
All Implemented Interfaces:
XsEUnion, XsObject, XsTAnnotated, XsTOpenAttrs

public class XsEUnionImpl
extends XsTAnnotatedImpl
implements XsEUnion

Implementation of xs:union, following the specification below:

  <xs:element name="union" id="union">
    <xs:complexType>
      <xs:annotation>
        <xs:documentation
            source="http://www.w3.org/TR/xmlschema-2/#element-union">
          memberTypes attribute must be non-empty or there must be
          at least one simpleType child
        </xs:documentation>
      </xs:annotation>
      <xs:complexContent>
        <xs:extension base="xs:annotated">
          <xs:sequence>
            <xs:element name="simpleType" type="xs:localSimpleType"
                minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
          <xs:attribute name="memberTypes" use="optional">
            <xs:simpleType>
              <xs:list itemType="xs:QName"/>
            </xs:simpleType>
          </xs:attribute>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>
 

Author:
Jochen Wiedmann

Field Summary
 java.util.List memberTypes
           
 java.util.List simpleTypes
           
 
Constructor Summary
protected XsEUnionImpl(XsObject pParent)
           
 
Method Summary
 XsTLocalSimpleType createSimpleType()
          Creates a new, local simple type as a member type of the union.
 XsQName[] getMemberTypes()
          Returns an array of member types which have been added using XsEUnion.setMemberTypes(XsQName[]).
 XsTLocalSimpleType[] getSimpleTypes()
          Returns an array of member types which have been created using XsEUnion.createSimpleType().
 void setMemberTypes(java.lang.String pTypes)
           
 void setMemberTypes(XsQName[] pTypes)
          Sets the qualified names of simple types being used as member types of the union.
 
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.XsTAnnotated
createAnnotation, getAnnotation, getId, setId
 
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
 

Field Detail

simpleTypes

public java.util.List simpleTypes

memberTypes

public java.util.List memberTypes
Constructor Detail

XsEUnionImpl

protected XsEUnionImpl(XsObject pParent)
Method Detail

createSimpleType

public XsTLocalSimpleType createSimpleType()
Description copied from interface: XsEUnion

Creates a new, local simple type as a member type of the union.

Specified by:
createSimpleType in interface XsEUnion

getSimpleTypes

public XsTLocalSimpleType[] getSimpleTypes()
Description copied from interface: XsEUnion

Returns an array of member types which have been created using XsEUnion.createSimpleType().

Specified by:
getSimpleTypes in interface XsEUnion

setMemberTypes

public void setMemberTypes(XsQName[] pTypes)
Description copied from interface: XsEUnion

Sets the qualified names of simple types being used as member types of the union.

Specified by:
setMemberTypes in interface XsEUnion

setMemberTypes

public void setMemberTypes(java.lang.String pTypes)
                    throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

getMemberTypes

public XsQName[] getMemberTypes()
Description copied from interface: XsEUnion

Returns an array of member types which have been added using XsEUnion.setMemberTypes(XsQName[]). This array may be null, if the method XsEUnion.setMemberTypes(XsQName[]) wasn't invoked at all, or it may be the empty array, if an empty string was passed as argument to the method.

Specified by:
getMemberTypes in interface XsEUnion