Class CompositorMember
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.
- Author:
- Jonathan Ostwald
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intintintstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionCompositorMember(GlobalElement globalElement) Construct a CompositorMember given a GlobalElement.CompositorMember(org.dom4j.Element element, Compositor compositor) Constructor for the Member object -
Method Summary
Modifier and TypeMethodDescriptionintGets the cMtype attribute of the CompositorMember objectorg.dom4j.ElementGets the element attribute of the CompositorMember objectGets the instanceQualifiedName attribute of the CompositorMember objectgetLabel()Gets the label attribute of the CompositorMember objectintreturn the maximum leaf nodes this member could haveGets the parentCompositor attribute of the CompositorMember objectGets the parentCompositorGuard attribute of the CompositorMember objectGets the qualifiedName attribute of the CompositorMember objectReturns this Member's inline compositor (Choice, Sequence, All) if there is one.Gets the instanceQualifiedNames of the substitutionGroupMembers, if this Member is a headElement.If this CompositorMember represents a HeadElement (a globalElement having a substitutionGroup, then return the substitutionGroup as a list of GlobalElements.booleanDescription of the MethodbooleanIs this member a headElement (having a substitutionGroup that specifies element names that can be subsituted for this member.static voidNOT YET DOCUMENTEDtoString()
-
Field Details
-
ELEMENT
public static final int ELEMENT- See Also:
-
ELEMENT_REF
public static final int ELEMENT_REF- See Also:
-
GROUP_REF
public static final int GROUP_REF- See Also:
-
COMPOSITOR
public static final int COMPOSITOR- See Also:
-
ANY
public static final int ANY- See Also:
-
UNKNOWN
public static final int UNKNOWN- See Also:
-
minOccurs
public int minOccurs -
maxOccurs
public int maxOccurs
-
-
Constructor Details
-
CompositorMember
Constructor for the Member object- Parameters:
element- Schema Element representing this membercompositor- the compositor instance of which this is a member
-
CompositorMember
Construct a CompositorMember given a 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.
- Parameters:
globalElement- Description of the Parameter
-
-
Method Details
-
getMaxInstanceElements
public int getMaxInstanceElements()return the maximum leaf nodes this member could have- Returns:
- The maxInstanceElements value
-
getElement
public org.dom4j.Element getElement()Gets the element attribute of the CompositorMember object- Returns:
- The element value
-
hasSubCompositor
public boolean hasSubCompositor()Description of the Method- Returns:
- Description of the Return Value
-
getSubstitutionGroupMembers
If this CompositorMember represents a HeadElement (a globalElement having a substitutionGroup, then return the substitutionGroup as a list of GlobalElements. Otherwise return an empty List.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.
- Returns:
- The substitutionGroupMembers value
-
getSubstitutionGroupMemberNames
Gets the instanceQualifiedNames of the substitutionGroupMembers, if this Member is a headElement.- Returns:
- InstanceQualifiedNames of this Members substitutionGroupMembers
-
isHeadElement
public boolean isHeadElement()Is this member a headElement (having a substitutionGroup that specifies element names that can be subsituted for this member.- Returns:
- The headElement value
-
getSubCompositor
Returns this Member's inline compositor (Choice, Sequence, All) if there is one.- Returns:
- The subCompositor value
-
getParentCompositor
Gets the parentCompositor attribute of the CompositorMember object- Returns:
- The parentCompositor value
-
getParentCompositorGuard
Gets the parentCompositorGuard attribute of the CompositorMember object- Returns:
- The parentCompositorGuard value
-
getInstanceQualifiedName
Gets the instanceQualifiedName attribute of the CompositorMember object- Returns:
- The instanceQualifiedName value
-
getQualifiedName
Gets the qualifiedName attribute of the CompositorMember object- Returns:
- The qualifiedName value
-
getLabel
Gets the label attribute of the CompositorMember object- Returns:
- The label value
-
getCMtype
public int getCMtype()Gets the cMtype attribute of the CompositorMember object- Returns:
- The cMtype value
-
toString
-
prtln
NOT YET DOCUMENTED- Parameters:
s- NOT YET DOCUMENTED
-