public class XSParticleImpl extends java.lang.Object implements XSParticle
Default implementation of a particle.
XSParticle.TypeELEMENT, GROUP, WILDCARD| Constructor and Description |
|---|
XSParticleImpl(XSAny pWildcard) |
XSParticleImpl(XSElement pElement) |
XSParticleImpl(XSGroup pGroup) |
| Modifier and Type | Method and Description |
|---|---|
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) |
public XSParticleImpl(XSGroup pGroup) throws org.xml.sax.SAXException
org.xml.sax.SAXExceptionpublic XSParticleImpl(XSAny pWildcard)
public XSParticleImpl(XSElement pElement)
public XSParticle.Type getType()
XSParticleReturns the particle type.
getType in interface XSParticlepublic boolean isGroup()
XSParticleShortcut for getType().equals(GROUP).
isGroup in interface XSParticleXSParticle.getType(),
XSParticle.GROUPpublic XSGroup getGroup()
XSParticleIf the particle type is group: Returns the group.
getGroup in interface XSParticlepublic boolean isWildcard()
XSParticleShortcut for getType().equals(WILDCARD).
isWildcard in interface XSParticleXSParticle.getType(),
XSParticle.WILDCARDpublic XSAny getWildcard()
XSParticleIf the particle type is wildcard: Returns the wildcard.
getWildcard in interface XSParticlepublic boolean isElement()
XSParticleShortcut for getType().equals(ELEMENT).
isElement in interface XSParticleXSParticle.getType(),
XSParticle.ELEMENTpublic XSElement getElement()
XSParticleIf the particle type is element: Returns the element.
getElement in interface XSParticlepublic int getMinOccurs()
XSParticleReturns the particles minOccurs value.
getMinOccurs in interface XSParticlepublic void setMinOccurs(int pMinOccurs)
public int getMaxOccurs()
XSParticleReturns the particles maxOccurs value or -1 for unbounded.
getMaxOccurs in interface XSParticlepublic void setMaxOccurs(int pMaxOccurs)
public org.xml.sax.Locator getLocator()
XSParticleReturns the particles Locator.
getLocator in interface XSParticle