Class Compositor
java.lang.Object
org.dlese.dpc.xml.schema.compositor.Compositor
- Direct Known Subclasses:
All,Choice,InlineCompositor,Sequence
Compositor class specifies methods for accessing and validating the
"members" of a Compositor Element (i.e., All, Sequence and Choice), as well
as the acceptsNewMember method. The members are a list of CompositorMember
instances which represent the child elements of the compositor element.
- Author:
- ostwald
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intNOT YET DOCUMENTEDprotected CompositorMemberstatic final intNOT YET DOCUMENTEDprotected static booleanNOT YET DOCUMENTEDprotected org.dom4j.ElementNOT YET DOCUMENTEDprotected NamespaceRegistryNOT YET DOCUMENTEDprotected ListNOT YET DOCUMENTEDprotected NamespaceRegistryNOT YET DOCUMENTEDprotected intNOT YET DOCUMENTEDprotected ListNOT YET DOCUMENTEDprotected intNOT YET DOCUMENTEDprotected StringNOT YET DOCUMENTEDprotected ComplexTypeNOT YET DOCUMENTEDstatic final intNOT YET DOCUMENTEDstatic final intNOT YET DOCUMENTED -
Constructor Summary
ConstructorsConstructorDescriptionCompositor(ComplexType parent) Constructor for the Compositor objectCompositor(ComplexType parent, org.dom4j.Element e) Constructor for the Compositor object. -
Method Summary
Modifier and TypeMethodDescriptionabstract booleanacceptsNewMember(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 booleanacceptsNewMember(org.dom4j.Element instanceElement, String memberName, int memberIndex) NOT YET DOCUMENTEDfinal org.dom4j.ElementGets the element attribute of the Compositor objectintgetIndexOfMember(String memberName) Gets the indexOfMember attribute of the Compositor objectintGets the indexOfMember attribute of the Compositor objectfinal ListInstanceNames are the instance-qualified names of the members that that cannot be further split into subCompositors.getLeafMember(String name) Gets the leafMember attribute of the Compositor objectRecursively 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.Recursively traverses the element Compositor's elements, collecting CompositorMembers for the leaf elements (those members that can no longer be expanded.intReturn the maximum leaf nodes this member could have.final intGets the maxOccurs attribute of the Compositor objectFinds a particular Member from the members listgetMemberAt(int index) Gets the memberAt attribute of the Compositor objectfinal ListReturns the instanceNames of the child members of this CompositorReturns a list of Member instances - one for each element in the choice compositorfinal intGets the minOccurs attribute of the Compositor objectgetName()Returns string representation of the Compositor's type (e.g., "compositor", "sequence", "all").final ComplexTypeReturns the ComplexType instance in which this Compositor is defined.protected ListgetSubstitionGroupMembers(GlobalElement headElement) Return a list of CompositoMembers made from the substitionGroup for the given headElement.protected ListgetSubstitionGroupNames(GlobalElement headElement) Expands a headElement (a GlobaElement having a substitutionGroup) into the instanceQualified names of it's substitutionGroup members.intgetType()Returns an integer contant that specifies whether this Compositor is Sequence, Choice, All.booleanbooleanNOT YET DOCUMENTEDprotected voidinit()Initialize this compositor with occurance information and instantiate compositor membersNOT YET DOCUMENTEDvoidNOT YET DOCUMENTEDvoidNOT YET DOCUMENTEDprotected static voidNOT YET DOCUMENTEDtoString()Description of the Method
-
Field Details
-
debug
protected static boolean debugNOT YET DOCUMENTED -
UNKNOWN
public static final int UNKNOWNNOT YET DOCUMENTED- See Also:
-
SEQUENCE
public static final int SEQUENCENOT YET DOCUMENTED- See Also:
-
CHOICE
public static final int CHOICENOT YET DOCUMENTED- See Also:
-
ALL
public static final int ALLNOT YET DOCUMENTED- See Also:
-
minOccurs
protected int minOccursNOT YET DOCUMENTED -
maxOccurs
protected int maxOccursNOT YET DOCUMENTED -
parent
NOT YET DOCUMENTED -
element
protected org.dom4j.Element elementNOT YET DOCUMENTED -
name
NOT YET DOCUMENTED -
members
NOT YET DOCUMENTED -
leafMembers
NOT YET DOCUMENTED -
localNamespaces
NOT YET DOCUMENTED -
instanceNamespaces
NOT YET DOCUMENTED -
anyTypeMember
-
-
Constructor Details
-
Compositor
Constructor for the Compositor object. Used to construct InlineCompositor instances- Parameters:
parent- NOT YET DOCUMENTEDe- NOT YET DOCUMENTED
-
Compositor
Constructor for the Compositor object- Parameters:
parent- NOT YET DOCUMENTED
-
-
Method Details
-
init
protected void init()Initialize this compositor with occurance information and instantiate compositor members -
hasAnyTypeMember
public boolean hasAnyTypeMember() -
getAnyTypeMember
-
getSubstitionGroupNames
Expands a headElement (a GlobaElement having a substitutionGroup) into the instanceQualified names of it's substitutionGroup members.- Parameters:
headElement- NOT YET DOCUMENTED- Returns:
- The substitionGroupNames value
-
getSubstitionGroupMembers
Return a list of CompositoMembers made from the substitionGroup for the given headElement.- Parameters:
headElement- NOT YET DOCUMENTED- Returns:
- The substitionGroupMembers value
-
getLeafMembers
Recursively traverses the element Compositor's elements, collecting CompositorMembers for the leaf elements (those members that can no longer be expanded. LeafMembers are important because only they are present in an instanceDocument.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??
- Returns:
- The leafMembers value
-
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.- Returns:
- The leafMemberNames value
-
printInstanceNames
public void printInstanceNames()NOT YET DOCUMENTED -
printLeafMemberNames
public void printLeafMemberNames()NOT YET DOCUMENTED -
getType
public int getType()Returns an integer contant that specifies whether this Compositor is Sequence, Choice, All.- Returns:
- The dataType value
-
getName
Returns string representation of the Compositor's type (e.g., "compositor", "sequence", "all").- Returns:
- The type value
-
getParent
Returns the ComplexType instance in which this Compositor is defined.- Returns:
- The location value
-
getMemberNames
Returns the instanceNames of the child members of this Compositor- Returns:
- The memberNames value
-
getInstanceNames
InstanceNames are the instance-qualified names of the members that that cannot be further split into subCompositors.For headElement members, must we include the substitutionGroupMembers?
- Returns:
- The instanceNames value
-
getElement
public final org.dom4j.Element getElement()Gets the element attribute of the Compositor object- Returns:
- The element value
-
getIndexOfMember
Gets the indexOfMember attribute of the Compositor object- Parameters:
cm- NOT YET DOCUMENTED- Returns:
- The indexOfMember value
-
getIndexOfMember
Gets the indexOfMember attribute of the Compositor object- Parameters:
memberName- NOT YET DOCUMENTED- Returns:
- The indexOfMember value
-
getMemberAt
Gets the memberAt attribute of the Compositor object- Parameters:
index- NOT YET DOCUMENTED- Returns:
- The memberAt value
-
toString
Description of the Method -
occursInfo
NOT YET DOCUMENTED- Returns:
- NOT YET DOCUMENTED
-
acceptsNewMember
public 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.- Parameters:
instanceDocElement- NOT YET DOCUMENTED- Returns:
- The simpleType value
-
acceptsNewMember
public abstract boolean acceptsNewMember(org.dom4j.Element instanceElement, String memberName, int memberIndex) NOT YET DOCUMENTED- Parameters:
instanceElement- NOT YET DOCUMENTEDmemberName- NOT YET DOCUMENTEDmemberIndex- NOT YET DOCUMENTED- Returns:
- NOT YET DOCUMENTED
-
getMinOccurs
public final int getMinOccurs()Gets the minOccurs attribute of the Compositor object- Returns:
- The minOccurs value
-
getMaxOccurs
public final int getMaxOccurs()Gets the maxOccurs attribute of the Compositor object- Returns:
- The maxOccurs value
-
getMaxInstanceElements
public int getMaxInstanceElements()Return the maximum leaf nodes this member could have.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!
- Returns:
- The maxInstanceElements value
-
getMembers
Returns a list of Member instances - one for each element in the choice compositor- Returns:
- The members value
-
hasMember
NOT YET DOCUMENTED- Parameters:
name- NOT YET DOCUMENTED- Returns:
- NOT YET DOCUMENTED
-
getMember
Finds a particular Member from the members list- Parameters:
name- NOT YET DOCUMENTED- Returns:
- The member value
-
getLeafMember
Gets the leafMember attribute of the Compositor object- Parameters:
name- NOT YET DOCUMENTED- Returns:
- The leafMember value
-
prtln
NOT YET DOCUMENTED- Parameters:
s- NOT YET DOCUMENTED
-