public abstract class Compositor
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
ALL
NOT YET DOCUMENTED
|
protected CompositorMember |
anyTypeMember |
static int |
CHOICE
NOT YET DOCUMENTED
|
protected static boolean |
debug
NOT YET DOCUMENTED
|
protected org.dom4j.Element |
element
NOT YET DOCUMENTED
|
protected NamespaceRegistry |
instanceNamespaces
NOT YET DOCUMENTED
|
protected java.util.List |
leafMembers
NOT YET DOCUMENTED
|
protected NamespaceRegistry |
localNamespaces
NOT YET DOCUMENTED
|
protected int |
maxOccurs
NOT YET DOCUMENTED
|
protected java.util.List |
members
NOT YET DOCUMENTED
|
protected int |
minOccurs
NOT YET DOCUMENTED
|
protected java.lang.String |
name
NOT YET DOCUMENTED
|
protected ComplexType |
parent
NOT YET DOCUMENTED
|
static int |
SEQUENCE
NOT YET DOCUMENTED
|
static int |
UNKNOWN
NOT YET DOCUMENTED
|
Constructor and Description |
---|
Compositor(ComplexType parent)
Constructor for the Compositor object
|
Compositor(ComplexType parent,
org.dom4j.Element e)
Constructor for the Compositor object.
|
Modifier and Type | Method and Description |
---|---|
abstract boolean |
acceptsNewMember(org.dom4j.Element instanceDocElement)
Returns true if a given instance document element can accept a new member
according to schema-defined constraints for this compositor.
|
abstract boolean |
acceptsNewMember(org.dom4j.Element instanceElement,
java.lang.String memberName,
int memberIndex)
NOT YET DOCUMENTED
|
CompositorMember |
getAnyTypeMember() |
org.dom4j.Element |
getElement()
Gets the element attribute of the Compositor object
|
int |
getIndexOfMember(CompositorMember cm)
Gets the indexOfMember attribute of the Compositor object
|
int |
getIndexOfMember(java.lang.String memberName)
Gets the indexOfMember attribute of the Compositor object
|
java.util.List |
getInstanceNames()
InstanceNames are the instance-qualified names of the members that that
cannot be further split into subCompositors.
|
CompositorMember |
getLeafMember(java.lang.String name)
Gets the leafMember attribute of the Compositor object
|
java.util.List |
getLeafMemberNames()
Recursively expand the compositor elements to resolve each into one or more
membersNames - returning a list collecting all possible member Names that
this compositor could contain.
|
java.util.List |
getLeafMembers()
Recursively traverses the element Compositor's elements, collecting
CompositorMembers for the leaf elements (those members that can no longer
be expanded.
|
int |
getMaxInstanceElements()
Return the maximum leaf nodes this member could have.
|
int |
getMaxOccurs()
Gets the maxOccurs attribute of the Compositor object
|
CompositorMember |
getMember(java.lang.String name)
Finds a particular Member from the members list
|
CompositorMember |
getMemberAt(int index)
Gets the memberAt attribute of the Compositor object
|
java.util.List |
getMemberNames()
Returns the instanceNames of the child members of this Compositor
|
java.util.List |
getMembers()
Returns a list of Member instances - one for each element in the choice
compositor
|
int |
getMinOccurs()
Gets the minOccurs attribute of the Compositor object
|
java.lang.String |
getName()
Returns string representation of the Compositor's type (e.g., "compositor",
"sequence", "all").
|
ComplexType |
getParent()
Returns the ComplexType instance in which this Compositor is defined.
|
protected java.util.List |
getSubstitionGroupMembers(GlobalElement headElement)
Return a list of CompositoMembers made from the substitionGroup for the
given headElement.
|
protected java.util.List |
getSubstitionGroupNames(GlobalElement headElement)
Expands a headElement (a GlobaElement having a substitutionGroup) into the
instanceQualified names of it's substitutionGroup members.
|
int |
getType()
Returns an integer contant that specifies whether this Compositor is
Sequence, Choice, All.
|
boolean |
hasAnyTypeMember() |
boolean |
hasMember(java.lang.String name)
NOT YET DOCUMENTED
|
protected void |
init()
Initialize this compositor with occurance information and instantiate compositor members
|
java.lang.String |
occursInfo()
NOT YET DOCUMENTED
|
void |
printInstanceNames()
NOT YET DOCUMENTED
|
void |
printLeafMemberNames()
NOT YET DOCUMENTED
|
protected static void |
prtln(java.lang.String s)
NOT YET DOCUMENTED
|
java.lang.String |
toString()
Description of the Method
|
protected static boolean debug
public static final int UNKNOWN
public static final int SEQUENCE
public static final int CHOICE
public static final int ALL
protected int minOccurs
protected int maxOccurs
protected ComplexType parent
protected org.dom4j.Element element
protected java.lang.String name
protected java.util.List members
protected java.util.List leafMembers
protected NamespaceRegistry localNamespaces
protected NamespaceRegistry instanceNamespaces
protected CompositorMember anyTypeMember
public Compositor(ComplexType parent, org.dom4j.Element e)
parent
- NOT YET DOCUMENTEDe
- NOT YET DOCUMENTEDpublic Compositor(ComplexType parent)
parent
- NOT YET DOCUMENTEDprotected void init()
public boolean hasAnyTypeMember()
public CompositorMember getAnyTypeMember()
protected java.util.List getSubstitionGroupNames(GlobalElement headElement)
headElement
- NOT YET DOCUMENTEDprotected java.util.List getSubstitionGroupMembers(GlobalElement headElement)
headElement
- NOT YET DOCUMENTEDpublic java.util.List getLeafMembers()
Members that are expanded include Groups and inline Compositors (Sequence, All, Choice).
NOTE: Does this algorithm take derivedContentModels into account?? I.e., how are complexContent (extensions) handled??
public java.util.List getLeafMemberNames()
public void printInstanceNames()
public void printLeafMemberNames()
public int getType()
public java.lang.String getName()
public final ComplexType getParent()
public final java.util.List getMemberNames()
public final java.util.List getInstanceNames()
For headElement members, must we include the substitutionGroupMembers?
public final org.dom4j.Element getElement()
public int getIndexOfMember(CompositorMember cm)
cm
- NOT YET DOCUMENTEDpublic int getIndexOfMember(java.lang.String memberName)
memberName
- NOT YET DOCUMENTEDpublic CompositorMember getMemberAt(int index)
index
- NOT YET DOCUMENTEDpublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String occursInfo()
public abstract boolean acceptsNewMember(org.dom4j.Element instanceDocElement)
instanceDocElement
- NOT YET DOCUMENTEDpublic abstract boolean acceptsNewMember(org.dom4j.Element instanceElement, java.lang.String memberName, int memberIndex)
instanceElement
- NOT YET DOCUMENTEDmemberName
- NOT YET DOCUMENTEDmemberIndex
- NOT YET DOCUMENTEDpublic final int getMinOccurs()
public final int getMaxOccurs()
public int getMaxInstanceElements()
NOTE: this might be okay for Sequence and All, but it doesn't work for CHOICE compositors, since only one member can contribute PER OCCURRANCE!
public java.util.List getMembers()
public boolean hasMember(java.lang.String name)
name
- NOT YET DOCUMENTEDpublic CompositorMember getMember(java.lang.String name)
name
- NOT YET DOCUMENTEDpublic CompositorMember getLeafMember(java.lang.String name)
name
- NOT YET DOCUMENTEDprotected static void prtln(java.lang.String s)
s
- NOT YET DOCUMENTED