edu.iastate.metnet.datamodel
Interface Entity

All Known Subinterfaces:
Gene
All Known Implementing Classes:
EntityImpl, GeneImpl

public interface Entity

The basic element of the Metnet data model. An entity represents something we are analyzing in the MetNet framework. It has a name and a set of generic attributes. Each attribute is identified by a type. The advantage of this vs, for example, an enum, is that we can take advantage of Java's built-in type checking. Right now, the methods are designed so that the actual attribute value is returned when given an attribute type, which maximizes convenience and efficiency. There is only one attribute of a given type in an entity. If there is a possibility that an entity can have multiple attributes of a type, then the attribute value should be of type Collection or something similar.

Author:
larman

Method Summary
<A extends Attribute<V>,V>
V
getAttr(java.lang.Class<A> clazz)
           
 java.lang.String getName()
           
<A extends Attribute<V>,V>
void
setAttr(java.lang.Class<A> clazz, V value)
           
 

Method Detail

getName

java.lang.String getName()

getAttr

<A extends Attribute<V>,V> V getAttr(java.lang.Class<A> clazz)

setAttr

<A extends Attribute<V>,V> void setAttr(java.lang.Class<A> clazz,
                                        V value)