|
DLESE Tools v1.6.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.dlese.dpc.xml.schema.compositor.Compositor
public abstract class Compositor
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.
Field Summary | |
---|---|
static int |
ALL
NOT YET DOCUMENTED |
protected CompositorMember |
anyTypeMember
|
static int |
CHOICE
NOT YET DOCUMENTED |
protected static boolean |
debug
NOT YET DOCUMENTED |
protected Element |
element
NOT YET DOCUMENTED |
protected NamespaceRegistry |
instanceNamespaces
NOT YET DOCUMENTED |
protected List |
leafMembers
NOT YET DOCUMENTED |
protected NamespaceRegistry |
localNamespaces
NOT YET DOCUMENTED |
protected int |
maxOccurs
NOT YET DOCUMENTED |
protected List |
members
NOT YET DOCUMENTED |
protected int |
minOccurs
NOT YET DOCUMENTED |
protected String |
name
NOT YET DOCUMENTED |
protected ComplexType |
parent
NOT YET DOCUMENTED |
static int |
SEQUENCE
NOT YET DOCUMENTED |
static int |
UNKNOWN
NOT YET DOCUMENTED |
Constructor Summary | |
---|---|
Compositor(ComplexType parent)
Constructor for the Compositor object |
|
Compositor(ComplexType parent,
Element e)
Constructor for the Compositor object. |
Method Summary | |
---|---|
abstract boolean |
acceptsNewMember(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(Element instanceElement,
String memberName,
int memberIndex)
NOT YET DOCUMENTED |
CompositorMember |
getAnyTypeMember()
|
Element |
getElement()
Gets the element attribute of the Compositor object |
int |
getIndexOfMember(CompositorMember cm)
Gets the indexOfMember attribute of the Compositor object |
int |
getIndexOfMember(String memberName)
Gets the indexOfMember attribute of the Compositor object |
List |
getInstanceNames()
InstanceNames are the instance-qualified names of the members that that cannot be further split into subCompositors. |
CompositorMember |
getLeafMember(String name)
Gets the leafMember attribute of the Compositor object |
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. |
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(String name)
Finds a particular Member from the members list |
CompositorMember |
getMemberAt(int index)
Gets the memberAt attribute of the Compositor object |
List |
getMemberNames()
Returns the instanceNames of the child members of this Compositor |
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 |
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 List |
getSubstitionGroupMembers(GlobalElement headElement)
Return a list of CompositoMembers made from the substitionGroup for the given headElement. |
protected 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(String name)
NOT YET DOCUMENTED |
protected void |
init()
Initialize this compositor with occurance information and instantiate compositor members |
String |
occursInfo()
NOT YET DOCUMENTED |
void |
printInstanceNames()
NOT YET DOCUMENTED |
void |
printLeafMemberNames()
NOT YET DOCUMENTED |
protected static void |
prtln(String s)
NOT YET DOCUMENTED |
String |
toString()
Description of the Method |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
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 Element element
protected String name
protected List members
protected List leafMembers
protected NamespaceRegistry localNamespaces
protected NamespaceRegistry instanceNamespaces
protected CompositorMember anyTypeMember
Constructor Detail |
---|
public Compositor(ComplexType parent, Element e)
parent
- NOT YET DOCUMENTEDe
- NOT YET DOCUMENTEDpublic Compositor(ComplexType parent)
parent
- NOT YET DOCUMENTEDMethod Detail |
---|
protected void init()
public boolean hasAnyTypeMember()
public CompositorMember getAnyTypeMember()
protected List getSubstitionGroupNames(GlobalElement headElement)
headElement
- NOT YET DOCUMENTED
protected List getSubstitionGroupMembers(GlobalElement headElement)
headElement
- NOT YET DOCUMENTED
public 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 List getLeafMemberNames()
public void printInstanceNames()
public void printLeafMemberNames()
public int getType()
public String getName()
public final ComplexType getParent()
public final List getMemberNames()
public final List getInstanceNames()
For headElement members, must we include the substitutionGroupMembers?
public final Element getElement()
public int getIndexOfMember(CompositorMember cm)
cm
- NOT YET DOCUMENTED
public int getIndexOfMember(String memberName)
memberName
- NOT YET DOCUMENTED
public CompositorMember getMemberAt(int index)
index
- NOT YET DOCUMENTED
public String toString()
toString
in class Object
public String occursInfo()
public abstract boolean acceptsNewMember(Element instanceDocElement)
instanceDocElement
- NOT YET DOCUMENTED
public abstract boolean acceptsNewMember(Element instanceElement, String memberName, int memberIndex)
instanceElement
- NOT YET DOCUMENTEDmemberName
- NOT YET DOCUMENTEDmemberIndex
- NOT YET DOCUMENTED
public 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 List getMembers()
public boolean hasMember(String name)
name
- NOT YET DOCUMENTED
public CompositorMember getMember(String name)
name
- NOT YET DOCUMENTED
public CompositorMember getLeafMember(String name)
name
- NOT YET DOCUMENTED
protected 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 |