edu.wpi.cs.DSRG.xmldb.DTDWrapper
Class Group
java.lang.Object
|
+--edu.wpi.cs.DSRG.xmldb.DTDWrapper.Item
|
+--edu.wpi.cs.DSRG.xmldb.DTDWrapper.Group
- public class Group
- extends Item
Representing the Group in the Element Type Declaration.
Every group will have a unique name by when created.
The name is unique, but the number in the name may not be continuous.
Because, the group is created on the fly, then, every time we want to
new a GROUP to get some of its information, the number will be increased,
but we may not store that GROUP in the DTDM_item table.
There could be more than one GROUP object for one group in the DOM tree.
Field Summary |
(package private) edu.wpi.cs.DSRG.xmldb.DTDWrapper.Element |
group_root
Root of the group. |
(package private) java.lang.String |
name
The name of the group. |
Constructor Summary |
Group(edu.wpi.cs.DSRG.xmldb.DTDWrapper.Element a_root)
Create a group object. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
name
java.lang.String name
- The name of the group. Which is generated by the constructor.
group_root
edu.wpi.cs.DSRG.xmldb.DTDWrapper.Element group_root
- Root of the group.
if will be the "./" in the methods.
Group
public Group(edu.wpi.cs.DSRG.xmldb.DTDWrapper.Element a_root)
- Create a group object. It will give it a unique group name, and also keep the
DOM tree node that is the root of this group_root.
getType
public java.lang.String getType()
- Get the type of the Group. It could be either "sequence", or "choice".
If there is only one element, then that is the type of the "choice".
The real implementation will be depends on the XML Schema DOM tree.
XQL: ./@order
process:
if (./@order == "choice") return "CHOICE"
else return "SEQUENCE"
getNumberOfReferences
public int getNumberOfReferences()
- Get number of references underneath this group.
XQL: count(./*)
- Overrides:
getNumberOfReferences
in class Item
getReferenceAt
public Reference getReferenceAt(int Index)
- get the Reference at specific Index.
XQL: ./*[Index() == Index]
- Overrides:
getReferenceAt
in class Item
getParent
public Item getParent()
- Get the parent of this group. It could be either an ElementTypeDeclaration,
or a Group.
I am not sure if I am going to use this interface.
getName
public java.lang.String getName()
- Get the group's name.
- Overrides:
getName
in class Item