Class HarmoniNode

Description

Node is a Hierarchy's representation of an external object that is one of a number of similar objects to be organized. Nodes must be connected to a Hierarchy.

OSID Version: 2.0

  • version: $Id: HarmoniNode.class.php,v 1.20 2007/09/13 16:04:20 adamfranco Exp $
  • license: GNU General Public License (GPL)
  • copyright: Copyright © 2005, Middlebury College

Located in /harmoni/core/oki2/hierarchy/HarmoniNode.class.php (line 26)

Node
   |
   --HarmoniNode
Variable Summary
object _cache $_cache
string $_description
string $_displayName
object _id $_id
object _type $_type
Method Summary
HarmoniNode HarmoniNode (ref $id, ref $type, string $displayName, string $description, ref $cache)
void addParent (mixed $nodeId, object Id $nodeId )
void changeParent (object Id $oldParentId, mixed $newParentId, object Id $newParentId )
object NodeIterator getChildren ()
string getDescription ()
string getDisplayName ()
object Id getId ()
object NodeIterator getParents ()
object Type getType ()
boolean isLeaf ()
boolean isRoot ()
void removeParent (mixed $parentId, object Id $parentId )
void updateDescription (mixed $description, string $description )
void updateDisplayName (mixed $displayName, string $displayName )
Variables
object _cache $_cache (line 66)

This is the HierarchyCache object. Must be the same one that all other nodes in the Hierarchy are using.

  • access: private
string $_description (line 50)

The description for this node.

string $_displayName (line 57)

The display name for this node.

object _id $_id (line 35)

The Id of this node.

  • access: private
object _type $_type (line 43)

The type of this node.

  • access: private
Methods
Constructor HarmoniNode (line 79)

Constructor.

HarmoniNode HarmoniNode (ref $id, ref $type, string $displayName, string $description, ref $cache)
  • ref $id: object id The Id of this Node.
  • ref $type: object type The Type of the new Node.
  • string $displayName: displayName The displayName of the Node.
  • string $description: description The description of the Node.
  • ref $cache: object cache This is the HierarchyCache object. Must be the same one that all other nodes in the Hierarchy are using.
addParent (line 432)

Link a parent to this Node.

  • access: public
  • throws: object HierarchyException An exception with one of the following messages defined in org.osid.hierarchy.HierarchyException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED, NULL_ARGUMENT, NODE_TYPE_NOT_FOUND, SINGLE_PARENT_HIERARCHY, ALREADY_ADDED, ATTEMPTED_RECURSION
void addParent (mixed $nodeId, object Id $nodeId )
  • object Id $nodeId

Redefinition of:
Node::addParent()
Link a parent to this Node.
changeParent (line 506)

Changes the parent of this Node by adding a new parent and removing the old parent.

  • access: public
  • throws: object HierarchyException An exception with one of the following messages defined in org.osid.hierarchy.HierarchyException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED, NULL_ARGUMENT, NODE_TYPE_NOT_FOUND, ATTEMPTED_RECURSION
void changeParent (object Id $oldParentId, mixed $newParentId, object Id $newParentId )
  • object Id $oldParentId
  • object Id $newParentId

Redefinition of:
Node::changeParent()
Changes the parent of this Node by adding a new parent and removing the old parent.
getChildren (line 238)

Get the children of this Node. To get other descendants use the Hierarchy traverse method.

  • access: public
  • throws: object HierarchyException An exception with one of the following messages defined in org.osid.hierarchy.HierarchyException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED
object NodeIterator getChildren ()

Redefinition of:
Node::getChildren()
Get the children of this Node. To get other descendants use the Hierarchy traverse method.
getDescription (line 161)

Get the description for this Node.

  • access: public
  • throws: object HierarchyException An exception with one of the following messages defined in org.osid.hierarchy.HierarchyException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED
string getDescription ()

Redefinition of:
Node::getDescription()
Get the description for this Node.
getDisplayName (line 138)

Get the display name for this Node.

  • access: public
  • throws: object HierarchyException An exception with one of the following messages defined in org.osid.hierarchy.HierarchyException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED
string getDisplayName ()

Redefinition of:
Node::getDisplayName()
Get the display name for this Node.
getId (line 115)

Get the unique Id for this Node.

  • access: public
  • throws: object HierarchyException An exception with one of the following messages defined in org.osid.hierarchy.HierarchyException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED
object Id getId ()

Redefinition of:
Node::getId()
Get the unique Id for this Node.
getParents (line 208)

Get the parents of this Node. To get other ancestors use the Hierarchy traverse method.

  • access: public
  • throws: object HierarchyException An exception with one of the following messages defined in org.osid.hierarchy.HierarchyException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED
object NodeIterator getParents ()

Redefinition of:
Node::getParents()
Get the parents of this Node. To get other ancestors use the Hierarchy traverse method.
getType (line 184)

Get the Type for this Node.

  • access: public
  • throws: object HierarchyException An exception with one of the following messages defined in org.osid.hierarchy.HierarchyException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED
object Type getType ()

Redefinition of:
Node::getType()
Get the Type for this Node.
isLeaf (line 373)

Return true if this Node is a leaf; false otherwise. A Node is a leaf if it has no children.

  • access: public
  • throws: object HierarchyException An exception with one of the following messages defined in org.osid.hierarchy.HierarchyException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED
boolean isLeaf ()

Redefinition of:
Node::isLeaf()
Return true if this Node is a leaf; false otherwise. A Node is a leaf if it has no children.
isRoot (line 396)

Return true if this Node is a root; false otherwise.

  • access: public
  • throws: object HierarchyException An exception with one of the following messages defined in org.osid.hierarchy.HierarchyException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED
boolean isRoot ()

Redefinition of:
Node::isRoot()
Return true if this Node is a root; false otherwise.
removeParent (line 469)

Unlink a parent from this Node.

  • access: public
  • throws: object HierarchyException An exception with one of the following messages defined in org.osid.hierarchy.HierarchyException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED, NULL_ARGUMENT, NODE_TYPE_NOT_FOUND, SINGLE_PARENT_HIERARCHY, INCONSISTENT_STATE
void removeParent (mixed $parentId, object Id $parentId )
  • object Id $parentId

Redefinition of:
Node::removeParent()
Unlink a parent from this Node.
updateDescription (line 269)

Update the description of this Node.

  • access: public
  • throws: object HierarchyException An exception with one of the following messages defined in org.osid.hierarchy.HierarchyException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED, NULL_ARGUMENT
void updateDescription (mixed $description, string $description )
  • string $description

Redefinition of:
Node::updateDescription()
Update the description of this Node.
updateDisplayName (line 322)

Update the name of this Node. Node name changes are permitted since the Hierarchy's integrity is based on the Node's unique Id.

  • access: public
  • throws: object HierarchyException An exception with one of the following messages defined in org.osid.hierarchy.HierarchyException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED, NULL_ARGUMENT
void updateDisplayName (mixed $displayName, string $displayName )
  • string $displayName

Redefinition of:
Node::updateDisplayName()
Update the name of this Node. Node name changes are permitted since the Hierarchy's integrity is based on the Node's unique Id.

Inherited Methods

Inherited From Node

Node::addParent()
Node::changeParent()
Node::getChildren()
Node::getDescription()
Node::getDisplayName()
Node::getId()
Node::getParents()
Node::getType()
Node::isLeaf()
Node::isRoot()
Node::removeParent()
Node::updateDescription()
Node::updateDisplayName()

Documentation generated on Wed, 19 Sep 2007 10:24:07 -0400 by phpDocumentor 1.3.0RC3