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

java.lang.Object
  extended by org.apache.ws.jaxme.xs.impl.XSObjectImpl
      extended by org.apache.ws.jaxme.xs.impl.XSOpenAttrsImpl
          extended by org.apache.ws.jaxme.xs.impl.XSGroupImpl
All Implemented Interfaces:
XSGroup, XSModelGroup, XSObject, XSOpenAttrs
Direct Known Subclasses:
JAXBGroupImpl

public class XSGroupImpl
extends XSOpenAttrsImpl
implements XSGroup

Author:
Jochen Wiedmann

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.ws.jaxme.xs.XSModelGroup
XSModelGroup.Compositor
 
Field Summary
 
Fields inherited from interface org.apache.ws.jaxme.xs.XSModelGroup
ALL, CHOICE, SEQUENCE
 
Constructor Summary
protected XSGroupImpl(XSObject pParent, XsEChoice pChoice)
           
protected XSGroupImpl(XSObject pParent, XsESequence pSequence)
           
protected XSGroupImpl(XSObject pParent, XsTAll pAll)
           
protected XSGroupImpl(XSObject pParent, XsTGroupRef pBaseGroup)
           
protected XSGroupImpl(XSObject pParent, XsTNamedGroup pBaseGroup)
           
 
Method Summary
protected  void addParticle(XSModelGroupImpl pModelGroup, XsTNestedParticle pParticle)
           
protected  void addParticle(XSModelGroupImpl pModelGroup, XsTParticle pParticle)
           
 XSAnnotation[] getAnnotations()
          Returns the array of annotations.
 XSModelGroup.Compositor getCompositor()
          Returns the model groups compositor.
 XsQName getName()
          If the group is global: Returns the groups name.
 XSParticle[] getParticles()
          Returns the model groups particles.
protected  XsQName getQName(XsNCName pName)
           
protected  void initParticles(XSModelGroupImpl pModelGroup, XsTNestedParticle[] pParticles)
           
protected  void initParticles(XSModelGroupImpl pModelGroup, XsTParticle[] pParticles)
           
 boolean isAll()
          Shortcut for getCompositor().equals(ALL).
 boolean isChoice()
          Shortcut for getCompositor().equals(CHOICE).
 boolean isGlobal()
          Returns whether the group is global or not.
 boolean isSequence()
          Shortcut for getCompositor().equals(SEQUENCE).
protected  boolean isValidated()
           
 void setGlobal(boolean pGlobal)
          Sets whether the group is global or not.
 void validate()
          Validates the objects internal state.
 
Methods inherited from class org.apache.ws.jaxme.xs.impl.XSOpenAttrsImpl
getOpenAttributes
 
Methods inherited from class org.apache.ws.jaxme.xs.impl.XSObjectImpl
getLocator, getParentObject, getXsObject, getXSSchema, isTopLevelObject, validateAllIn
 
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.XSOpenAttrs
getOpenAttributes
 
Methods inherited from interface org.apache.ws.jaxme.xs.XSObject
getLocator, getParentObject, getXSSchema, isTopLevelObject
 
Methods inherited from interface org.apache.ws.jaxme.xs.XSModelGroup
getLocator
 

Constructor Detail

XSGroupImpl

protected XSGroupImpl(XSObject pParent,
                      XsTGroupRef pBaseGroup)
               throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

XSGroupImpl

protected XSGroupImpl(XSObject pParent,
                      XsTNamedGroup pBaseGroup)
               throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

XSGroupImpl

protected XSGroupImpl(XSObject pParent,
                      XsEChoice pChoice)
               throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

XSGroupImpl

protected XSGroupImpl(XSObject pParent,
                      XsESequence pSequence)
               throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

XSGroupImpl

protected XSGroupImpl(XSObject pParent,
                      XsTAll pAll)
               throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException
Method Detail

getQName

protected XsQName getQName(XsNCName pName)
                    throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

initParticles

protected void initParticles(XSModelGroupImpl pModelGroup,
                             XsTNestedParticle[] pParticles)
                      throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

initParticles

protected void initParticles(XSModelGroupImpl pModelGroup,
                             XsTParticle[] pParticles)
                      throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

addParticle

protected void addParticle(XSModelGroupImpl pModelGroup,
                           XsTParticle pParticle)
                    throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

addParticle

protected void addParticle(XSModelGroupImpl pModelGroup,
                           XsTNestedParticle pParticle)
                    throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

isGlobal

public boolean isGlobal()
Description copied from interface: XSGroup

Returns whether the group is global or not.

Specified by:
isGlobal in interface XSGroup

setGlobal

public void setGlobal(boolean pGlobal)
Description copied from interface: XSGroup

Sets whether the group is global or not.

Specified by:
setGlobal in interface XSGroup

getName

public XsQName getName()
Description copied from interface: XSGroup

If the group is global: Returns the groups name. Otherwise returns null.

Specified by:
getName in interface XSGroup

isValidated

protected boolean isValidated()

validate

public void validate()
              throws org.xml.sax.SAXException
Description copied from interface: XSObject

Validates the objects internal state.

Specified by:
validate in interface XSModelGroup
Specified by:
validate in interface XSObject
Overrides:
validate in class XSObjectImpl
Throws:
org.xml.sax.SAXException

getCompositor

public XSModelGroup.Compositor getCompositor()
Description copied from interface: XSModelGroup

Returns the model groups compositor.

Specified by:
getCompositor in interface XSModelGroup

getParticles

public XSParticle[] getParticles()
Description copied from interface: XSModelGroup

Returns the model groups particles.

Specified by:
getParticles in interface XSModelGroup

isSequence

public boolean isSequence()
Description copied from interface: XSModelGroup

Shortcut for getCompositor().equals(SEQUENCE).

Specified by:
isSequence in interface XSModelGroup
See Also:
XSModelGroup.getCompositor(), XSModelGroup.SEQUENCE

isChoice

public boolean isChoice()
Description copied from interface: XSModelGroup

Shortcut for getCompositor().equals(CHOICE).

Specified by:
isChoice in interface XSModelGroup
See Also:
XSModelGroup.getCompositor(), XSModelGroup.CHOICE

isAll

public boolean isAll()
Description copied from interface: XSModelGroup

Shortcut for getCompositor().equals(ALL).

Specified by:
isAll in interface XSModelGroup
See Also:
XSModelGroup.getCompositor(), XSModelGroup.ALL

getAnnotations

public XSAnnotation[] getAnnotations()
Description copied from interface: XSGroup

Returns the array of annotations.

Specified by:
getAnnotations in interface XSGroup