Free Trial - Stylus Studio, The World's Best XML IDE!


com.saxonica.schema
Class AbstractParticle

java.lang.Object
  |
  +--com.saxonica.schema.SchemaElement
        |
        +--com.saxonica.schema.AbstractParticle
All Implemented Interfaces:
Particle, java.io.Serializable, javax.xml.transform.SourceLocator, Term
Direct Known Subclasses:
Compositor, ElementDecl

public abstract class AbstractParticle
extends SchemaElement
implements Particle, Term

An abstract class that represents an XML Schema Particle

See Also:
Serialized Form

Field Summary
static int UNBOUNDED
          A constant to represent an UNBOUNDED particle
 
Fields inherited from class com.saxonica.schema.SchemaElement
ANNOTATION, ANYTYPE, APPINFO, ATTRIBUTE, ATTRIBUTE_GROUP, COMPLEX_CONTENT, COMPLEX_TYPE, COMPOSITOR, DOCUMENTATION, ELEMENT, FACET, GROUP, IDENTITY_FIELD, IDENTITY_SELECTOR, KEY, KEYREF, LIST, REDEFINE, SCHEMA, SIMPLE_CONTENT, SIMPLE_TYPE, UNION, UNIQUE, UNKNOWN, WILDCARD_ATTRIBUTE, WILDCARD_ELEMENT
 
Constructor Summary
protected AbstractParticle()
          Default Constructor, uses a default minimum occurrence of 1, and a default unbounded maximum occurrence
protected AbstractParticle(int minOccurs, int maxOccurs)
          Constructor for Particle which allows setting the values for maximum and minimum occurrences
 
Method Summary
 int getMaxOccurs()
          Returns the maximum number of occurrences that this Particle may appear in the containing content model
 int getMinOccurs()
          Returns the minimum number of occurrences that this Particle must appear in the containing content model
 Term getTerm()
          Get the term corresponding to this particle
 void setMaxOccurs(int maxOccurs)
          Sets the maximum number of occurrences for this Particle within the containing content model
 void setMinOccurs(int minOccurs)
          Sets the minimum number of occurrences for this Particle within the containing content model
 
Methods inherited from class com.saxonica.schema.SchemaElement
getColumnNumber, getLineNumber, getPublicId, getStructureType, getSystemId, setLocator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.saxonica.schema.Particle
compile, isEmptiable
 

Field Detail

UNBOUNDED

public static int UNBOUNDED
A constant to represent an UNBOUNDED particle

Constructor Detail

AbstractParticle

protected AbstractParticle()
Default Constructor, uses a default minimum occurrence of 1, and a default unbounded maximum occurrence


AbstractParticle

protected AbstractParticle(int minOccurs,
                           int maxOccurs)
Constructor for Particle which allows setting the values for maximum and minimum occurrences

Parameters:
minOccurs - the minimum number of occurrences
maxOccurs - the maximum number of occurrences ( -1 for unbounded)
Method Detail

getMaxOccurs

public final int getMaxOccurs()
Returns the maximum number of occurrences that this Particle may appear in the containing content model

Specified by:
getMaxOccurs in interface Particle
Returns:
the maximum number of occurrences that this Particle may appear. A negative (n < 0) value indicates that the value is unspecified (ie. unbounded).

getMinOccurs

public final int getMinOccurs()
Returns the minimum number of occurrences that this Particle must appear in the containing content model

Specified by:
getMinOccurs in interface Particle
Returns:
the minimum number of occurrences that this Particle must appear A negative (n < 0) value indicates that the value is unspecified.

getTerm

public Term getTerm()
Get the term corresponding to this particle

Specified by:
getTerm in interface Particle
Returns:
the corresponding term

setMaxOccurs

public final void setMaxOccurs(int maxOccurs)
Sets the maximum number of occurrences for this Particle within the containing content model

Parameters:
maxOccurs - the maximum number of occurrences for this Particle, or -1 to indicate that the maximum is unbounded

setMinOccurs

public final void setMinOccurs(int minOccurs)
Sets the minimum number of occurrences for this Particle within the containing content model

Parameters:
minOccurs - the minimum number of occurrences for this Particle


Stylus Studio features integrated development and debugging support for Saxon in the XQuery editor and XSLT editor.