public class ContentParticle extends Object
| Constructor and Description |
|---|
ContentParticle()
Constructor, setting occurance specification to ONE, by default.
|
ContentParticle(String reference)
Creates content particle and sets its type to REFERENCE, that is the content is
exactly one child-element.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(ContentParticle cp)
Adds child to the vector of child elements (content particles).
|
Enumeration<ContentParticle> |
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.
|
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(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.
|
public ContentParticle()
public ContentParticle(String reference)
reference - name of this child-element.public void setReferenceType(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 String getReference()
public Enumeration<ContentParticle> 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.Copyright © 2016. All rights reserved.