Class Hierarchy

Description

Hierarchy is a structure composed of nodes arranged in root, parent, and

child form. The Hierarchy can be traversed in several ways to determine the arrangement of nodes. A Hierarchy can allow multiple parents. A Hierarchy can allow recursion. The implementation is responsible for ensuring that the integrity of the Hierarchy is always maintained.

<p> OSID Version: 2.0 </p>

<p> Licensed under the org.osid.SidImplementationLicenseMIT. </p>

Located in /harmoni/oki2/osid/hierarchy/Hierarchy.php (line 21)


	
			
Direct descendents
Class Description
HarmoniHierarchy Hierarchy is a structure composed of nodes arranged in root, parent, and
Method Summary
void addNodeType (mixed $type, object Type $type )
boolean allowsRecursion ()
object Node createNode (object Id $nodeId, object Id $parentId, object Type $type, string $displayName, mixed $description, string $description )
object Node createRootNode (object Id $nodeId, object Type $nodeType, string $displayName, mixed $description, string $description )
void deleteNode (mixed $nodeId, object Id $nodeId )
string getDescription ()
string getDisplayName ()
object Node getNode (mixed $nodeId, object Id $nodeId )
void removeNodeType (mixed $type, object Type $type )
object TraversalInfoIterator traverse (object Id $startId, int $mode, int $direction, mixed $levels, int $levels )
void updateDescription (mixed $description, string $description )
void updateDisplayName (mixed $displayName, string $displayName )
Methods
addNodeType (line 323)

Add a NodeType to this Hierarchy.

  • 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, ALREADY_ADDED
void addNodeType (mixed $type, object Type $type )

Redefined in descendants as:
allowsMultipleParents (line 474)

Returns true if multiple parents are allowed; 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 allowsMultipleParents ()

Redefined in descendants as:
allowsRecursion (line 497)

Returns true if recursion allowed; 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 allowsRecursion ()

Redefined in descendants as:
createNode (line 267)

Create a Node. The Node is created with the specified unique Id and initially has only the specified 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, UNKNOWN_PARENT_NODE, ATTEMPTED_RECURSION
object Node createNode (object Id $nodeId, object Id $parentId, object Type $type, string $displayName, mixed $description, string $description )

Redefined in descendants as:
createRootNode (line 231)

Create a root Node. The Node is created with the specified unique Id, and, unlike Nodes created with createNode, initially has no parents or 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, UNIMPLEMENTEDNULL_ARGUMENT, SINGLE_PARENT_HIERARCHY
object Node createRootNode (object Id $nodeId, object Type $nodeType, string $displayName, mixed $description, string $description )

Redefined in descendants as:
  • HarmoniHierarchy::createRootNode() : Create a root Node. The Node is created with the specified unique Id, and, unlike Nodes created with createNode, initially has no parents or children.
deleteNode (line 296)

Delete a Node by Id. Only leaf Nodes can be deleted.

  • 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, INCONSISTENT_STATE
void deleteNode (mixed $nodeId, object Id $nodeId )

Redefined in descendants as:
getAllNodes (line 376)

Get all the Nodes in this Hierarchy.

  • 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 getAllNodes ()

Redefined in descendants as:
getDescription (line 172)

Get the description for this Hierarchy.

  • 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 ()

Redefined in descendants as:
getDisplayName (line 126)

Get the display name for this Hierarchy.

  • 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 ()

Redefined in descendants as:
getId (line 103)

Get the unique Id for this Hierarchy.

  • 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 ()

Redefined in descendants as:
getNode (line 428)

Get a Node by 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, NODE_TYPE_NOT_FOUND
object Node getNode (mixed $nodeId, object Id $nodeId )

Redefined in descendants as:
getNodeTypes (line 451)

Get all NodeTypes used in this Hierarchy.

  • 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 TypeIterator getNodeTypes ()

Redefined in descendants as:
getRootNodes (line 399)

Get the root Nodes in this Hierarchy.

  • 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 getRootNodes ()

Redefined in descendants as:
removeNodeType (line 353)

Remove a NodeType from this Hierarchy. Note that no Nodes can have this NodeType.

  • 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_IN_USE, NODE_TYPE_NOT_FOUND
void removeNodeType (mixed $type, object Type $type )

Redefined in descendants as:
traverse (line 531)

Traverse a Hierarchy returning information about each Node encountered.

  • 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, NODE_TYPE_NOT_FOUND, UNKNOWN_TRAVERSAL_MODE, UNKNOWN_TRAVERSAL_DIRECTION
object TraversalInfoIterator traverse (object Id $startId, int $mode, int $direction, mixed $levels, int $levels )
  • object Id $startId
  • int $mode
  • int $direction
  • int $levels

Redefined in descendants as:
TRAVERSE_DIRECTION_DOWN (line 68)

Constant indicating traversal down the Hierarchy, or traversal of children.

Note: This method is PHP's equivalent of a static field.

  • static:
  • access: public
int TRAVERSE_DIRECTION_DOWN ()
TRAVERSE_DIRECTION_UP (line 55)

Constant indicating traversal up the Hierarchy, or traversal of parents.

Note: This method is PHP's equivalent of a static field.

  • static:
  • access: public
int TRAVERSE_DIRECTION_UP ()
TRAVERSE_LEVELS_ALL (line 80)

Constant indicating no limit on the depth of traversal.

Note: This method is PHP's equivalent of a static field.

  • static:
  • access: public
int TRAVERSE_LEVELS_ALL ()
TRAVERSE_MODE_BREADTH_FIRST (line 43)

Constant indicating breadth-first traversal.

Note: This method is PHP's equivalent of a static field.

  • static:
  • access: public
int TRAVERSE_MODE_BREADTH_FIRST ()
TRAVERSE_MODE_DEPTH_FIRST (line 31)

Constant indicating depth-first traversal.

Note: This method is PHP's equivalent of a static field.

  • static:
  • access: public
int TRAVERSE_MODE_DEPTH_FIRST ()
updateDescription (line 197)

Update the description for this Hierarchy.

  • 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

Redefined in descendants as:
updateDisplayName (line 149)

Update the display name for this Hierarchy.

  • 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
void updateDisplayName (mixed $displayName, string $displayName )
  • string $displayName

Redefined in descendants as:

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