org.apache.ws.jaxme.xs
Interface XSParticle

All Known Implementing Classes:
XSParticleImpl

public interface XSParticle

Interface of a model groups particle.

Author:
Jochen Wiedmann

Nested Class Summary
static class XSParticle.Type
           
 
Field Summary
static XSParticle.Type ELEMENT
          The particle type "element".
static XSParticle.Type GROUP
          The particle type "group".
static XSParticle.Type WILDCARD
          The particle type "wildcard".
 
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).
 

Field Detail

GROUP

static final XSParticle.Type GROUP

The particle type "group".


WILDCARD

static final XSParticle.Type WILDCARD

The particle type "wildcard".


ELEMENT

static final XSParticle.Type ELEMENT

The particle type "element".

Method Detail

getType

XSParticle.Type getType()

Returns the particle type.


isGroup

boolean isGroup()

Shortcut for getType().equals(GROUP).

See Also:
getType(), GROUP

getGroup

XSGroup getGroup()

If the particle type is group: Returns the group.

Throws:
java.lang.IllegalStateException - isGroup() returns false

isWildcard

boolean isWildcard()

Shortcut for getType().equals(WILDCARD).

See Also:
getType(), WILDCARD

getWildcard

XSAny getWildcard()

If the particle type is wildcard: Returns the wildcard.

Throws:
java.lang.IllegalStateException - isWildcard() returns false

isElement

boolean isElement()

Shortcut for getType().equals(ELEMENT).

See Also:
getType(), ELEMENT

getElement

XSElement getElement()

If the particle type is element: Returns the element.

Throws:
java.lang.IllegalStateException - isElement() returns false

getMinOccurs

int getMinOccurs()

Returns the particles minOccurs value.


getMaxOccurs

int getMaxOccurs()

Returns the particles maxOccurs value or -1 for unbounded.


getLocator

org.xml.sax.Locator getLocator()

Returns the particles Locator.