vitro
Class DataAnnotation

java.lang.Object
  extended by vitro.DataAnnotation
All Implemented Interfaces:
Annotation

public class DataAnnotation
extends Object
implements Annotation

An Annotation meant for associating an arbitrary data structure with the state of the Model. DataAnnotation can render an arbitrary tree constructed from Maps, Collections, arrays, primitives and synthetic Objects in a graphical format. For best results, use a Map from "category names" to values as a base-level element. Views may implement specific logic for this type of Annotation, but the default Host implementation can pick up DataAnnotations and break them off into their own window, allowing DataAnnotations to be used with almost any View "out of the box".


Field Summary
 Object data
           
 String label
           
 
Constructor Summary
DataAnnotation(Object data)
          Construct a new DataAnnotation from a data structure.
DataAnnotation(Object data, String label)
          Construct a new DataAnnotation with an identifying label.
 
Method Summary
 boolean equals(Object o)
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

data

public final Object data

label

public final String label
Constructor Detail

DataAnnotation

public DataAnnotation(Object data)
Construct a new DataAnnotation from a data structure.

Parameters:
data - the root of any tree of data structures

DataAnnotation

public DataAnnotation(Object data,
                      String label)
Construct a new DataAnnotation with an identifying label.

Parameters:
data - the root of any tree of data structures
label - the label to associate with these data structures
Method Detail

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object