Root
Keywords: uk.ac.ic.doc.automed.p2p.tree.Root class

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## uk.ac.ic.doc.automed.p2p.tree
Class Root

    java.lang.Object
      uk.ac.ic.doc.automed.p2p.tree.TreeNode
          uk.ac.ic.doc.automed.p2p.tree.Root

    public class Root

extends TreeNode

Field Summary

Fields inherited from class uk.ac.ic.doc.automed.p2p.tree.TreeNode
`children, CLASS, COLLECTION, COLLECTION_SET, FIELD, GLOBAL, id, ID, LIST, MAIN_OBJECT_CLASSES, OBJECT, OBJECT_DEFINITION, OBJECT_LIST, parent, REF, VALUE`

Constructor Summary
`Root()`
`Root(java.lang.String description)`

Method Summary
`protected void` | `addMainClass(java.lang.Class c)`
`protected void` | `addObject(PersistentObject object)`
`protected void` | `addObjectCollection(ObjectCollection collection)`
`void` | `completeTree()` completes the tree by adding the AutoMedObject nodes that correspond to the references of the tree.
`java.lang.String` | `debugString()`
`AutoMedObject` | `getAutoMedObject(Reference ref)`
`java.util.List` | `getAutoMedObjects(java.util.List refList)` Returns a list of AutoMedObject nodes that correspond to the list of References given as parameter.
`ObjectCollection` | `getCollectionForClass(java.lang.Class c)`
`java.util.List` | `getMainClasses()`
`org.w3c.dom.Document` | `getXMLDocument()` Build a simple XML document for this node.
`org.w3c.dom.Node` | `getXMLNode(org.w3c.dom.Document document)`
`protected boolean` | `isValidChild(TreeNode child)`
`void` | `serialize(java.io.OutputStream out)`

Methods inherited from class uk.ac.ic.doc.automed.p2p.tree.TreeNode
`addChild, createObjectNode, createTree, createTree, getChild, getChildren, getId, getXMLString, placeChild, setId, setParent, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Root

    public Root()

### Root

    public Root(java.lang.String description)

Method Detail

### addMainClass

    protected void addMainClass(java.lang.Class c)

### serialize

    public void serialize(java.io.OutputStream out)
                   throws java.io.IOException

  Throws:
    `java.io.IOException`

### getAutoMedObject

    public AutoMedObject getAutoMedObject(Reference ref)

### getAutoMedObjects

    public java.util.List getAutoMedObjects(java.util.List refList)

  Returns a list of AutoMedObject nodes that correspond to the list of References given as parameter.

### completeTree

    public void completeTree()
                      throws AutoMedTreeException

  completes the tree by adding the AutoMedObject nodes that correspond to the references of the tree. It does this by querying the AutoMed repository. This is done iteratively untill all the references correspond to nodes in the Tree.

  Throws:
    `AutoMedTreeException`

### getXMLNode

    public org.w3c.dom.Node getXMLNode(org.w3c.dom.Document document)

  Specified by:
    `getXMLNode` in class `TreeNode`

### getXMLDocument

    public org.w3c.dom.Document getXMLDocument()

  Description copied from class: `TreeNode`
  Build a simple XML document for this node. This is useful in cases where we are only interested in XML representation of only a part (e.g. ObjectCollection) of a XML document tree

  Overrides:
    `getXMLDocument` in class `TreeNode`

### isValidChild

    protected boolean isValidChild(TreeNode child)

  Specified by:
    `isValidChild` in class `TreeNode`

### addObject

    protected void addObject(PersistentObject object)
                      throws AutoMedTreeException

  Throws:
    `AutoMedTreeException`

### addObjectCollection

    protected void addObjectCollection(ObjectCollection collection)
                                throws AutoMedTreeException

  Throws:
    `AutoMedTreeException`

### getMainClasses

    public java.util.List getMainClasses()

### debugString

    public java.lang.String debugString()

### getCollectionForClass

    public ObjectCollection getCollectionForClass(java.lang.Class c)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD