org.apache.ws.jaxme.xs

Interface XSParticle

public interface XSParticle

Interface of a model groups particle.

Author: Jochen Wiedmann

Nested Class Summary
static classXSParticle.Type
Field Summary
XSParticle.TypeELEMENT

The particle type "element".

XSParticle.TypeGROUP

The particle type "group".

XSParticle.TypeWILDCARD

The particle type "wildcard".

Method Summary
XSElementgetElement()

If the particle type is element: Returns the element.

XSGroupgetGroup()

If the particle type is group: Returns the group.

LocatorgetLocator()

Returns the particles Locator.

intgetMaxOccurs()

Returns the particles maxOccurs value or -1 for unbounded.

intgetMinOccurs()

Returns the particles minOccurs value.

XSParticle.TypegetType()

Returns the particle type.

XSAnygetWildcard()

If the particle type is wildcard: Returns the wildcard.

booleanisElement()

Shortcut for getType().equals(ELEMENT).

booleanisGroup()

Shortcut for getType().equals(GROUP).

booleanisWildcard()

Shortcut for getType().equals(WILDCARD).

Field Detail

ELEMENT

public XSParticle.Type ELEMENT

The particle type "element".

GROUP

public XSParticle.Type GROUP

The particle type "group".

WILDCARD

public XSParticle.Type WILDCARD

The particle type "wildcard".

Method Detail

getElement

public XSElement getElement()

If the particle type is element: Returns the element.

Throws: IllegalStateException isElement returns false

getGroup

public XSGroup getGroup()

If the particle type is group: Returns the group.

Throws: IllegalStateException isGroup returns false

getLocator

public Locator getLocator()

Returns the particles Locator.

getMaxOccurs

public int getMaxOccurs()

Returns the particles maxOccurs value or -1 for unbounded.

getMinOccurs

public int getMinOccurs()

Returns the particles minOccurs value.

getType

public XSParticle.Type getType()

Returns the particle type.

getWildcard

public XSAny getWildcard()

If the particle type is wildcard: Returns the wildcard.

Throws: IllegalStateException isWildcard returns false

isElement

public boolean isElement()

Shortcut for getType().equals(ELEMENT).

See Also: getType ELEMENT

isGroup

public boolean isGroup()

Shortcut for getType().equals(GROUP).

See Also: getType GROUP

isWildcard

public boolean isWildcard()

Shortcut for getType().equals(WILDCARD).

See Also: getType WILDCARD