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