org.apache.ws.jaxme.xs.impl

Class XSParticleImpl

Implemented Interfaces:
XSParticle

public class XSParticleImpl
extends java.lang.Object
implements XSParticle

Default implementation of a particle.
Author:
Jochen Wiedmann

Fields inherited from interface org.apache.ws.jaxme.xs.XSParticle

ELEMENT, GROUP, WILDCARD

Constructor Summary

XSParticleImpl(XSAny pWildcard)
XSParticleImpl(XSElement pElement)
XSParticleImpl(XSGroup pGroup)

Method Summary

XSElement
getElement()
If the particle type is element: Returns the element.
XSGroup
getGroup()
If the particle type is group: Returns the group.
Locator
getLocator()
Returns the particles Locator.
int
getMaxOccurs()
Returns the particles maxOccurs value or -1 for unbounded.
int
getMinOccurs()
Returns the particles minOccurs value.
XSParticle.Type
getType()
Returns the particle type.
XSAny
getWildcard()
If the particle type is wildcard: Returns the wildcard.
boolean
isElement()
Shortcut for getType().equals(ELEMENT).
boolean
isGroup()
Shortcut for getType().equals(GROUP).
boolean
isWildcard()
Shortcut for getType().equals(WILDCARD).
void
setMaxOccurs(int pMaxOccurs)
void
setMinOccurs(int pMinOccurs)

Constructor Details

XSParticleImpl

public XSParticleImpl(XSAny pWildcard)

XSParticleImpl

public XSParticleImpl(XSElement pElement)

XSParticleImpl

public XSParticleImpl(XSGroup pGroup)
            throws SAXException

Method Details

getElement

public XSElement getElement()
If the particle type is element: Returns the element.
Specified by:
getElement in interface XSParticle

getGroup

public XSGroup getGroup()
If the particle type is group: Returns the group.
Specified by:
getGroup in interface XSParticle

getLocator

public Locator getLocator()
Returns the particles Locator.
Specified by:
getLocator in interface XSParticle

getMaxOccurs

public int getMaxOccurs()
Returns the particles maxOccurs value or -1 for unbounded.
Specified by:
getMaxOccurs in interface XSParticle

getMinOccurs

public int getMinOccurs()
Returns the particles minOccurs value.
Specified by:
getMinOccurs in interface XSParticle

getType

public XSParticle.Type getType()
Returns the particle type.
Specified by:
getType in interface XSParticle

getWildcard

public XSAny getWildcard()
If the particle type is wildcard: Returns the wildcard.
Specified by:
getWildcard in interface XSParticle

isElement

public boolean isElement()
Shortcut for getType().equals(ELEMENT).
Specified by:
isElement in interface XSParticle

isGroup

public boolean isGroup()
Shortcut for getType().equals(GROUP).
Specified by:
isGroup in interface XSParticle

isWildcard

public boolean isWildcard()
Shortcut for getType().equals(WILDCARD).
Specified by:
isWildcard in interface XSParticle

setMaxOccurs

public void setMaxOccurs(int pMaxOccurs)

setMinOccurs

public void setMinOccurs(int pMinOccurs)