|
DLESE Tools v1.6.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.dlese.dpc.xml.schema.compositor.CompositorGuard
org.dlese.dpc.xml.schema.compositor.ChoiceGuard
public class ChoiceGuard
CompositorGuard for the Choice compositor.
| Field Summary |
|---|
| Fields inherited from class org.dlese.dpc.xml.schema.compositor.CompositorGuard |
|---|
instanceMembers |
| Constructor Summary | |
|---|---|
ChoiceGuard(Compositor compositor,
Element instanceElement)
Constructor for the ChoiceGuard object |
|
ChoiceGuard(Compositor compositor,
List instanceList)
|
|
| Method Summary | |
|---|---|
boolean |
acceptsNewMember()
Returns true if a new member may be added. |
boolean |
checkValid()
NOTE: if any of the choice compositor members has a minOccurs of 0, then there need not be any occurrances! |
List |
getAcceptableMembers()
Returns a list of element names representing the choices that can be legally made. |
protected List |
getOccurrences()
Returns a list of occurrence instances that can be used to determine whether an instance document element satisfies the occurrence constraints of the schema. |
protected static void |
prtln(String s)
NOT YET DOCUMENTED |
| Methods inherited from class org.dlese.dpc.xml.schema.compositor.CompositorGuard |
|---|
acceptsNewMember, findOccurence, findOccurrence, getCompositor, getInstance, getOccurrencesCount, getOccurrencesCount, getSubOccurrenceCount, printInstanceMembers, printOccurrences, resolveLeafNameToCM, resolveLeafNameToCMName, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ChoiceGuard(Compositor compositor,
Element instanceElement)
compositor - NOT YET DOCUMENTEDinstanceElement - NOT YET DOCUMENTED
public ChoiceGuard(Compositor compositor,
List instanceList)
| Method Detail |
|---|
public List getAcceptableMembers()
protected List getOccurrences()
throws Exception
Walk down the buckets, when there is no room to add the current member, start an new occurrance. NOTE: the order in which we add members is aribitrary - we just can't overfill any single member.
NOTE: this does not account for many of the children choice compositors can have: - choice - sequence - any - element - group
getOccurrences in class CompositorGuardException - NOT YET DOCUMENTED
public boolean checkValid()
throws Exception
checkValid in class CompositorGuardException - NOT YET DOCUMENTEDpublic boolean acceptsNewMember()
Takes into account whether there is a legal choice to be made, as well as the maxOccurs constraint of the compositor.
acceptsNewMember in class CompositorGuardprotected static void prtln(String s)
s - NOT YET DOCUMENTED
|
DLESE Tools v1.6.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||