public class CompositorMember
extends java.lang.Object
Compositor Members are created at schema-processing time, but used to provide run-time services. For example, at run time, the compositor is used, along with the CompositorGuard instance, to determine if a child element may be added to an existing instance document. In order to serve run-time purposes, the Compositor members must be accessible via qualified element names as they appear in the instance document. The instance-level namespace prefix might be different from that associated with the compositor members in the schema file in which they were defined.
Modifier and Type | Field and Description |
---|---|
static int |
ANY |
static int |
COMPOSITOR |
static int |
ELEMENT |
static int |
ELEMENT_REF |
static int |
GROUP_REF |
int |
maxOccurs |
int |
minOccurs |
static int |
UNKNOWN |
Constructor and Description |
---|
CompositorMember(org.dom4j.Element element,
Compositor compositor)
Constructor for the Member object
|
CompositorMember(GlobalElement globalElement)
Construct a CompositorMember given a GlobalElement.
|
Modifier and Type | Method and Description |
---|---|
int |
getCMtype()
Gets the cMtype attribute of the CompositorMember object
|
org.dom4j.Element |
getElement()
Gets the element attribute of the CompositorMember object
|
java.lang.String |
getInstanceQualifiedName()
Gets the instanceQualifiedName attribute of the CompositorMember object
|
java.lang.String |
getLabel()
Gets the label attribute of the CompositorMember object
|
int |
getMaxInstanceElements()
return the maximum leaf nodes this member could have
|
Compositor |
getParentCompositor()
Gets the parentCompositor attribute of the CompositorMember object
|
CompositorGuard |
getParentCompositorGuard()
Gets the parentCompositorGuard attribute of the CompositorMember object
|
java.lang.String |
getQualifiedName()
Gets the qualifiedName attribute of the CompositorMember object
|
InlineCompositor |
getSubCompositor()
Returns this Member's inline compositor (Choice, Sequence, All) if there is one.
|
java.util.List |
getSubstitutionGroupMemberNames()
Gets the instanceQualifiedNames of the substitutionGroupMembers, if
this Member is a headElement.
|
java.util.List |
getSubstitutionGroupMembers()
If this CompositorMember represents a HeadElement (a globalElement having a
substitutionGroup, then return the substitutionGroup as a list of
GlobalElements.
|
boolean |
hasSubCompositor()
Description of the Method
|
boolean |
isHeadElement()
Is this member a headElement (having a substitutionGroup that
specifies element names that can be subsituted for this member.
|
static void |
prtln(java.lang.String s)
NOT YET DOCUMENTED
|
java.lang.String |
toString() |
public static final int ELEMENT
public static final int ELEMENT_REF
public static final int GROUP_REF
public static final int COMPOSITOR
public static final int ANY
public static final int UNKNOWN
public int minOccurs
public int maxOccurs
public CompositorMember(org.dom4j.Element element, Compositor compositor)
element
- Schema Element representing this membercompositor
- the compositor instance of which this is a memberpublic CompositorMember(GlobalElement globalElement)
This constructor is used to create CompositorMembers from the GlobalElements stored as substitutionGroup of a headElement (see Compositor.getSubstitionGroupMembers).
Global elements may not have occurrance information. The the qualifiedName should already be in the top-level namespace context, but for now leave getInstanceQualifiedName alone, rather than assign it here as we do with qualifiedName.
globalElement
- Description of the Parameterpublic int getMaxInstanceElements()
public org.dom4j.Element getElement()
public boolean hasSubCompositor()
public java.util.List getSubstitutionGroupMembers()
NOTE: evaluation of substitutionGroupMembers is lazy - it must be performed AFTER all the GlobalDefs in the schema have been created, otherwise there is a chance that the globalElement, if one exists, will not be found in the GlobalDefMap.
public java.util.List getSubstitutionGroupMemberNames()
public boolean isHeadElement()
public InlineCompositor getSubCompositor()
public Compositor getParentCompositor()
public CompositorGuard getParentCompositorGuard()
public java.lang.String getInstanceQualifiedName()
public java.lang.String getQualifiedName()
public java.lang.String getLabel()
public int getCMtype()
public java.lang.String toString()
toString
in class java.lang.Object
public static void prtln(java.lang.String s)
s
- NOT YET DOCUMENTED