|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exolab.castor.xml.dtd.ContentParticle
public class ContentParticle
Implementation of DTD Content Particle specification, used to define the content of an element.
Constructor Summary | |
---|---|
ContentParticle()
Constructor, setting occurance specification to ONE, by default. |
|
ContentParticle(java.lang.String reference)
Creates content particle and sets its type to REFERENCE, that is the content is exactly one child-element. |
Method Summary | |
---|---|
void |
addChild(ContentParticle cp)
Adds child to the vector of child elements (content particles). |
java.util.Enumeration |
getChildren()
Returns enumeration of the children - content particles, that form the content of this Content Particle, if has SEQ or CHOICE type (sequence or choice list), null otherwise. |
java.lang.String |
getReference()
Returns the name of the child element, if content is exactly one child. |
boolean |
isChoiceType()
True if the content is a choice list of content particles, false otherwise. |
boolean |
isOneOccurance()
True if ocurence specification of the content particle is ONE, false otherwise. |
boolean |
isOneOrMoreOccurances()
True if occurance specification of the content particle is ONE_OR_MORE, false otherwise. |
boolean |
isReferenceType()
True if the content is exactly on child-element, false otherwise. |
boolean |
isSeqType()
True if the content is a sequence list of content particles, false otherwise. |
boolean |
isZeroOrMoreOccurances()
True if occurance specification of the content particle is ZERO_OR_MORE, false otherwise. |
boolean |
isZeroOrOneOccurance()
True if occurance specification of the content particle is ZERO_OR_ONE, false otherwise. |
void |
setChoiceType()
Sets the content to choice list of content particles. |
void |
setOneOccurance()
Sets occurance specification of the content particle to ONE. |
void |
setOneOrMoreOccurances()
Sets occurance specification of the content particle to ONE_OR_MORE. |
void |
setReferenceType(java.lang.String reference)
Makes the content particle represent the content with exactly one child-element. |
void |
setSeqType()
Sets the content to sequence list of content particles. |
void |
setZeroOrMoreOccurances()
Sets occurance specification of the content particle to ZERO_OR_MORE. |
void |
setZeroOrOneOccurance()
Sets occurance specification of the content particle to ZERO_OR_ONE. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ContentParticle()
public ContentParticle(java.lang.String reference)
reference
- name of this child-element.Method Detail |
---|
public void setReferenceType(java.lang.String reference)
reference
- the name of this child-element - must not be
null or equal to empty String.public boolean isReferenceType()
public void setSeqType()
public boolean isSeqType()
public void setChoiceType()
public boolean isChoiceType()
public java.lang.String getReference()
public java.util.Enumeration getChildren()
public void setOneOccurance()
public boolean isOneOccurance()
public void setZeroOrOneOccurance()
public boolean isZeroOrOneOccurance()
public void setOneOrMoreOccurances()
public boolean isOneOrMoreOccurances()
public void setZeroOrMoreOccurances()
public boolean isZeroOrMoreOccurances()
public void addChild(ContentParticle cp)
cp
- content particle to add to the vector of children.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |