vitro
Class DataAnnotation
java.lang.Object
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".
data
public final Object data
label
public final String label
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 structureslabel
- the label to associate with these data structures
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