edu.washington.biostr.sig.vault.core
Class BasicNode

java.lang.Object
  extended by edu.washington.biostr.sig.vault.core.BasicNode
All Implemented Interfaces:
DataNode, Serializable

public class BasicNode
extends Object
implements DataNode, Serializable

See Also:
Serialized Form

Constructor Summary
BasicNode(DataNode other)
           
BasicNode(Object key, String text, Set<Tag> tags)
           
 
Method Summary
 boolean equals(Object arg0)
          2 nodes are equal if they have the same key and if they refer to the same file or they both return false for isFile().
 FileGroup getFile()
          If this node represents a file, return that file.
 Object getKey()
          Return the key for this node.
 Set<Tag> getTags()
          Return an unmodifieable Set.
 String getText()
          The text node is the default display name.
 int hashCode()
          Return the hashCode of the key.
 boolean isEditable()
          Return true if this node is editable outside of the vault that created it.
 boolean isFile()
          Return true if this node is a file.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasicNode

public BasicNode(Object key,
                 String text,
                 Set<Tag> tags)

BasicNode

public BasicNode(DataNode other)
Method Detail

getKey

public Object getKey()
Description copied from interface: DataNode
Return the key for this node. If isFile() returns true, this returns the same result as getFile().

Specified by:
getKey in interface DataNode
Returns:

getTags

public Set<Tag> getTags()
Return an unmodifieable Set.

Specified by:
getTags in interface DataNode
Returns:

getFile

public FileGroup getFile()
Description copied from interface: DataNode
If this node represents a file, return that file. Otherwise throw an UnsupportedOperationException.

Specified by:
getFile in interface DataNode
Returns:

isFile

public boolean isFile()
Description copied from interface: DataNode
Return true if this node is a file.

Specified by:
isFile in interface DataNode
Returns:

isEditable

public boolean isEditable()
Description copied from interface: DataNode
Return true if this node is editable outside of the vault that created it.

Specified by:
isEditable in interface DataNode
Returns:

equals

public boolean equals(Object arg0)
Description copied from interface: DataNode
2 nodes are equal if they have the same key and if they refer to the same file or they both return false for isFile().

Specified by:
equals in interface DataNode
Overrides:
equals in class Object

hashCode

public int hashCode()
Description copied from interface: DataNode
Return the hashCode of the key.

Specified by:
hashCode in interface DataNode
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

getText

public String getText()
Description copied from interface: DataNode
The text node is the default display name.

Specified by:
getText in interface DataNode
Returns:


Copyright © 2006 University of Washington. All Rights Reserved.