Methods Summary |
---|
void | appendParticle(java.lang.StringBuffer buffer)append the string description of this particle to the string buffer
this is for error message.
switch (fType) {
case PARTICLE_EMPTY:
buffer.append("EMPTY");
break;
case PARTICLE_ELEMENT:
case PARTICLE_WILDCARD:
buffer.append('(");
buffer.append(fValue.toString());
buffer.append(')");
break;
case PARTICLE_MODELGROUP:
buffer.append(fValue.toString());
break;
}
|
public boolean | emptiable()3.9.6 Schema Component Constraint: Particle Emptiable
whether this particle is emptible
return minEffectiveTotalRange() == 0;
|
public int | getMaxOccurs(){max occurs} determines the maximum number of terms that can occur.
return fMaxOccurs;
|
public boolean | getMaxOccursUnbounded(){max occurs} whether the maxOccurs value is unbounded.
return fMaxOccurs == SchemaSymbols.OCCURRENCE_UNBOUNDED;
|
public int | getMinOccurs(){min occurs} determines the minimum number of terms that can occur.
return fMinOccurs;
|
public java.lang.String | getName()The name of this XSObject depending on the
XSObject type.
return null;
|
public java.lang.String | getNamespace()The namespace URI of this node, or null if it is
unspecified. defines how a namespace URI is attached to schema
components.
return null;
|
public com.sun.org.apache.xerces.internal.xs.XSNamespaceItem | getNamespaceItem()
return null;
|
public com.sun.org.apache.xerces.internal.xs.XSTerm | getTerm(){term} One of a model group, a wildcard, or an element declaration.
return fValue;
|
public short | getType()Get the type of the object, i.e ELEMENT_DECLARATION.
return XSConstants.PARTICLE;
|
public boolean | isEmpty()
if (fType == PARTICLE_EMPTY)
return true;
if (fType == PARTICLE_ELEMENT || fType == PARTICLE_WILDCARD)
return false;
return ((XSModelGroupImpl)fValue).isEmpty();
|
public com.sun.org.apache.xerces.internal.impl.xs.XSParticleDecl | makeClone()
// clone this decl
XSParticleDecl particle = new XSParticleDecl();
particle.fType = fType;
particle.fMinOccurs = fMinOccurs;
particle.fMaxOccurs = fMaxOccurs;
particle.fDescription = fDescription;
particle.fValue = fValue;
return particle;
|
public int | maxEffectiveTotalRange()
if (fType == XSParticleDecl.PARTICLE_EMPTY) {
return 0;
}
if (fType == PARTICLE_MODELGROUP) {
int max = ((XSModelGroupImpl)fValue).maxEffectiveTotalRange();
if (max == SchemaSymbols.OCCURRENCE_UNBOUNDED)
return SchemaSymbols.OCCURRENCE_UNBOUNDED;
if (max != 0 && fMaxOccurs == SchemaSymbols.OCCURRENCE_UNBOUNDED)
return SchemaSymbols.OCCURRENCE_UNBOUNDED;
return max * fMaxOccurs;
}
return fMaxOccurs;
|
public int | minEffectiveTotalRange()3.8.6 Effective Total Range (all and sequence) and
Effective Total Range (choice)
The following methods are used to return min/max range for a particle.
They are not exactly the same as it's described in the spec, but all the
values from the spec are retrievable by these methods.
if (fType == XSParticleDecl.PARTICLE_EMPTY) {
return 0;
}
if (fType == PARTICLE_MODELGROUP) {
return ((XSModelGroupImpl)fValue).minEffectiveTotalRange() * fMinOccurs;
}
return fMinOccurs;
|
public void | reset()
fType = PARTICLE_EMPTY;
fValue = null;
fMinOccurs = 1;
fMaxOccurs = 1;
fDescription = null;
|
public java.lang.String | toString()
if (fDescription == null) {
StringBuffer buffer = new StringBuffer();
appendParticle(buffer);
if (!(fMinOccurs == 0 && fMaxOccurs == 0 ||
fMinOccurs == 1 && fMaxOccurs == 1)) {
buffer.append("{" + fMinOccurs);
if (fMaxOccurs == SchemaSymbols.OCCURRENCE_UNBOUNDED)
buffer.append("-UNBOUNDED");
else if (fMinOccurs != fMaxOccurs)
buffer.append("-" + fMaxOccurs);
buffer.append("}");
}
fDescription = buffer.toString();
}
return fDescription;
|