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

Class XsEUnionImpl

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

List
memberTypes
List
simpleTypes

Constructor Summary

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(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

Field Details

memberTypes

public List memberTypes

simpleTypes

public List simpleTypes

Constructor Details

XsEUnionImpl

protected XsEUnionImpl(XsObject pParent)

Method Details

createSimpleType

public XsTLocalSimpleType createSimpleType()
Creates a new, local simple type as a member type of the union.
Specified by:
createSimpleType in interface XsEUnion

getMemberTypes

public XsQName[] getMemberTypes()
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

getSimpleTypes

public XsTLocalSimpleType[] getSimpleTypes()
Returns an array of member types which have been created using XsEUnion.createSimpleType().
Specified by:
getSimpleTypes in interface XsEUnion

setMemberTypes

public void setMemberTypes(String pTypes)
            throws SAXException

setMemberTypes

public void setMemberTypes(XsQName[] pTypes)
Sets the qualified names of simple types being used as member types of the union.
Specified by:
setMemberTypes in interface XsEUnion