org.nees.util.chef
Interface HierarchicalObject

All Known Implementing Classes:
NEES2HierarchicalObject

public interface HierarchicalObject

Acts as a delegate for some application-specific object so that a hierarchy of those objects can be displayed in some user interface.


Method Summary
 HierarchicalObject[] getChildren()
          Get the children of this object.
 java.lang.Object getObject()
          /** Get the application-specific object.
 HierarchicalObject getParent()
          Get the parent of this object.
 java.lang.String getProperty(java.lang.String name)
          Get the value of an application-specific property of the underlying object.
 boolean isContainer()
          Determine if this is a container node (otherwise it's a leaf node).
 boolean isDeleted()
          Determine if this is object has been marked deleted.
 void refreshObject()
          Refresh the application-specific object.
 

Method Detail

getChildren

public HierarchicalObject[] getChildren()
Get the children of this object.

Returns:
HierarchialObjects representing the children of this object.

getParent

public HierarchicalObject getParent()
Get the parent of this object.

Returns:
a HierarchicalObject representing the parent of this object.

isContainer

public boolean isContainer()
Determine if this is a container node (otherwise it's a leaf node).

Returns:
whether or not this is a container node (otherwise it's a leaf node).

isDeleted

public boolean isDeleted()
Determine if this is object has been marked deleted.

Returns:
whether or not this is object is deleted. leaf node).

refreshObject

public void refreshObject()
Refresh the application-specific object. This is useful if the underlying object is cached or remotely located and may change at the source and the latest version needs to be used.


getObject

public java.lang.Object getObject()
/** Get the application-specific object.

Returns:
the underlying application-specific object represented by this HierarchicalObject.

getProperty

public java.lang.String getProperty(java.lang.String name)
Get the value of an application-specific property of the underlying object.

Parameters:
name - the name of the property
Returns:
the value of the property, or null if the property does not exist or has no value.