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

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.XsTComplexTypeImpl
All Implemented Interfaces:
XsGAttrDecls, XsGTypeDefParticle, XsObject, XsRedefinable, XsTAnnotated, XsTComplexType, XsTOpenAttrs
Direct Known Subclasses:
XsTLocalComplexTypeImpl, XsTTopLevelComplexTypeImpl

public class XsTComplexTypeImpl
extends XsTAnnotatedImpl
implements XsTComplexType

Base implementation of a complex type, to be shared by XsTLocalComplexType and XsTComplexType. Follows this specification:

  <xs:complexType name="complexType" abstract="true">
    <xs:complexContent>
      <xs:extension base="xs:annotated">
        <xs:group ref="xs:complexTypeModel"/>
        <xs:attribute name="name" type="xs:NCName">
          <xs:annotation>
            <xs:documentation>
              Will be restricted to required or forbidden
            </xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="mixed" type="xs:boolean" use="optional" default="false">
          <xs:annotation>
            <xs:documentation>
              Not allowed if simpleContent child is chosen.
              May be overriden by setting on complexContent child.
            </xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="abstract" type="xs:boolean" use="optional" default="false"/>
        <xs:attribute name="final" type="xs:derivationSet"/>
        <xs:attribute name="block" type="xs:derivationSet"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:group name="complexTypeModel">
    <xs:choice>
      <xs:element ref="xs:simpleContent"/>
      <xs:element ref="xs:complexContent"/>
      <xs:sequence>
        <xs:annotation>
          <xs:documentation>
            This branch is short for &lt;complexContent&gt;
            &lt;restriction base="xs:anyType"&gt;
            ...
            &lt;/restriction&gt;
            &lt;/complexContent&gt;
          </xs:documentation>
        </xs:annotation>
        <xs:group ref="xs:typeDefParticle" minOccurs="0"/>
        <xs:group ref="xs:attrDecls"/>
      </xs:sequence>
    </xs:choice>
  </xs:group>

  <xs:group name="typeDefParticle">
    <xs:annotation>
      <xs:documentation>
        'complexType' uses this
      </xs:documentation>
    </xs:annotation>
    <xs:choice>
      <xs:element name="group" type="xs:groupRef"/>
      <xs:element ref="xs:all"/>
      <xs:element ref="xs:choice"/>
      <xs:element ref="xs:sequence"/>
    </xs:choice>
  </xs:group>
 

Author:
Jochen Wiedmann

Constructor Summary
protected XsTComplexTypeImpl(XsObject pParent)
           
 
Method Summary
 XsTAll createAll()
           
 XsTWildcard createAnyAttribute()
          Creates a new instance of XsTWildcard.
 XsTAttribute createAttribute()
          Creates a new instance of XsTAttribute.
 XsTAttributeGroupRef createAttributeGroup()
          Creates a new instance of XsTAttributeGroup.
 XsEChoice createChoice()
           
 XsEComplexContent createComplexContent()
           
 XsTGroupRef createGroup()
           
 XsESequence createSequence()
           
 XsESimpleContent createSimpleContent()
           
 java.lang.Object[] getAllAttributes()
          Returns all objects created by XsGAttrDecls.createAttribute(), XsGAttrDecls.createAttributeGroup(), or XsGAttrDecls.createAnyAttribute(), in the order of the corresponding method calls.
 XsTWildcard getAnyAttribute()
          Returns the instance created by XsGAttrDecls.createAnyAttribute(), or null, if the method wasn't called.
 XsTAttributeGroupRef[] getAttributeGroups()
          Returns an array of all attribute groups created by XsGAttrDecls.createAttributeGroup();
 XsTAttribute[] getAttributes()
          Returns an array of all attributes created by XsGAttrDecls.createAttribute().
 XsEComplexContent getComplexContent()
           
 XsDerivationSet getFinal()
           
 XsNCName getName()
           
 XsESimpleContent getSimpleContent()
           
 XsTTypeDefParticle getTypeDefParticle()
           
 boolean isAbstract()
           
 boolean isMixed()
           
 void setAbstract(boolean pAbstract)
           
 void setFinal(XsDerivationSet pFinal)
           
 void setMixed(boolean pMixed)
           
 void setName(XsNCName pName)
           
 
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
 

Constructor Detail

XsTComplexTypeImpl

protected XsTComplexTypeImpl(XsObject pParent)
Method Detail

getFinal

public XsDerivationSet getFinal()

setFinal

public void setFinal(XsDerivationSet pFinal)

createSimpleContent

public XsESimpleContent createSimpleContent()
Specified by:
createSimpleContent in interface XsTComplexType

getSimpleContent

public XsESimpleContent getSimpleContent()
Specified by:
getSimpleContent in interface XsTComplexType

createComplexContent

public XsEComplexContent createComplexContent()
Specified by:
createComplexContent in interface XsTComplexType

getComplexContent

public XsEComplexContent getComplexContent()
Specified by:
getComplexContent in interface XsTComplexType

createGroup

public XsTGroupRef createGroup()
Specified by:
createGroup in interface XsGTypeDefParticle

createAll

public XsTAll createAll()
Specified by:
createAll in interface XsGTypeDefParticle

createChoice

public XsEChoice createChoice()
Specified by:
createChoice in interface XsGTypeDefParticle

createSequence

public XsESequence createSequence()
Specified by:
createSequence in interface XsGTypeDefParticle

getTypeDefParticle

public XsTTypeDefParticle getTypeDefParticle()
Specified by:
getTypeDefParticle in interface XsGTypeDefParticle

createAttribute

public XsTAttribute createAttribute()
Description copied from interface: XsGAttrDecls

Creates a new instance of XsTAttribute.

Specified by:
createAttribute in interface XsGAttrDecls

getAttributes

public XsTAttribute[] getAttributes()
Description copied from interface: XsGAttrDecls

Returns an array of all attributes created by XsGAttrDecls.createAttribute().

Specified by:
getAttributes in interface XsGAttrDecls

createAttributeGroup

public XsTAttributeGroupRef createAttributeGroup()
Description copied from interface: XsGAttrDecls

Creates a new instance of XsTAttributeGroup.

Specified by:
createAttributeGroup in interface XsGAttrDecls

getAttributeGroups

public XsTAttributeGroupRef[] getAttributeGroups()
Description copied from interface: XsGAttrDecls

Returns an array of all attribute groups created by XsGAttrDecls.createAttributeGroup();

Specified by:
getAttributeGroups in interface XsGAttrDecls

createAnyAttribute

public XsTWildcard createAnyAttribute()
Description copied from interface: XsGAttrDecls

Creates a new instance of XsTWildcard.

Specified by:
createAnyAttribute in interface XsGAttrDecls

getAnyAttribute

public XsTWildcard getAnyAttribute()
Description copied from interface: XsGAttrDecls

Returns the instance created by XsGAttrDecls.createAnyAttribute(), or null, if the method wasn't called.

Specified by:
getAnyAttribute in interface XsGAttrDecls

getAllAttributes

public java.lang.Object[] getAllAttributes()
Description copied from interface: XsGAttrDecls

Returns all objects created by XsGAttrDecls.createAttribute(), XsGAttrDecls.createAttributeGroup(), or XsGAttrDecls.createAnyAttribute(), in the order of the corresponding method calls.

Specified by:
getAllAttributes in interface XsGAttrDecls

setName

public void setName(XsNCName pName)
Specified by:
setName in interface XsTComplexType

getName

public XsNCName getName()
Specified by:
getName in interface XsTComplexType

isAbstract

public boolean isAbstract()
Specified by:
isAbstract in interface XsTComplexType

setAbstract

public void setAbstract(boolean pAbstract)
Specified by:
setAbstract in interface XsTComplexType

isMixed

public boolean isMixed()
Specified by:
isMixed in interface XsTComplexType

setMixed

public void setMixed(boolean pMixed)
Specified by:
setMixed in interface XsTComplexType