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

java.lang.Object
  extended by org.apache.ws.jaxme.xs.impl.XSParticleImpl
All Implemented Interfaces:
XSParticle

public class XSParticleImpl
extends java.lang.Object
implements XSParticle

Default implementation of a particle.

Author:
Jochen Wiedmann

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.ws.jaxme.xs.XSParticle
XSParticle.Type
 
Field Summary
 
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.
 org.xml.sax.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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XSParticleImpl

public XSParticleImpl(XSGroup pGroup)
               throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

XSParticleImpl

public XSParticleImpl(XSAny pWildcard)

XSParticleImpl

public XSParticleImpl(XSElement pElement)
Method Detail

getType

public XSParticle.Type getType()
Description copied from interface: XSParticle

Returns the particle type.

Specified by:
getType in interface XSParticle

isGroup

public boolean isGroup()
Description copied from interface: XSParticle

Shortcut for getType().equals(GROUP).

Specified by:
isGroup in interface XSParticle
See Also:
XSParticle.getType(), XSParticle.GROUP

getGroup

public XSGroup getGroup()
Description copied from interface: XSParticle

If the particle type is group: Returns the group.

Specified by:
getGroup in interface XSParticle

isWildcard

public boolean isWildcard()
Description copied from interface: XSParticle

Shortcut for getType().equals(WILDCARD).

Specified by:
isWildcard in interface XSParticle
See Also:
XSParticle.getType(), XSParticle.WILDCARD

getWildcard

public XSAny getWildcard()
Description copied from interface: XSParticle

If the particle type is wildcard: Returns the wildcard.

Specified by:
getWildcard in interface XSParticle

isElement

public boolean isElement()
Description copied from interface: XSParticle

Shortcut for getType().equals(ELEMENT).

Specified by:
isElement in interface XSParticle
See Also:
XSParticle.getType(), XSParticle.ELEMENT

getElement

public XSElement getElement()
Description copied from interface: XSParticle

If the particle type is element: Returns the element.

Specified by:
getElement in interface XSParticle

getMinOccurs

public int getMinOccurs()
Description copied from interface: XSParticle

Returns the particles minOccurs value.

Specified by:
getMinOccurs in interface XSParticle

setMinOccurs

public void setMinOccurs(int pMinOccurs)

getMaxOccurs

public int getMaxOccurs()
Description copied from interface: XSParticle

Returns the particles maxOccurs value or -1 for unbounded.

Specified by:
getMaxOccurs in interface XSParticle

setMaxOccurs

public void setMaxOccurs(int pMaxOccurs)

getLocator

public org.xml.sax.Locator getLocator()
Description copied from interface: XSParticle

Returns the particles Locator.

Specified by:
getLocator in interface XSParticle