ambit2.core.data.experiment
Class StudyTemplate
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<TemplateField>
ambit2.core.data.experiment.StudyTemplate
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<TemplateField>, java.util.Collection<TemplateField>, java.util.List<TemplateField>, java.util.RandomAccess
public class StudyTemplate
- extends java.util.ArrayList<TemplateField>
Study templates are introduced in order to provide generic framework for storing experimental data results, without predefined fieldnames, which may not be relevant to all endpoints (e.g. species strain or vehicle is not relevant to all species or endpoints). On other hand, fields with the same meaning have to have the same name to make queries feasible (e.g. “species” field should be the same across all endpoints in order to be able to search for species).
A template consists of a name, fields defining study conditions and fields defining study results. Each field has a name, units and a flag specifying whether it is a condition or a result. See DefaultTemplate
,
DSSToxCarcinogenicityTemplate
, DSSToxERBindingTemplate
,
DSSToxLC50Template
for specific examples.
- See Also:
- Serialized Form
Fields inherited from class java.util.AbstractList |
modCount |
Methods inherited from class java.util.ArrayList |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize |
Methods inherited from class java.util.AbstractList |
equals, hashCode, iterator, listIterator, listIterator, subList |
Methods inherited from class java.util.AbstractCollection |
containsAll, removeAll, retainAll |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList |
source
protected java.lang.String source
query
protected TemplateField query
name
protected java.lang.String name
id
protected int id
StudyTemplate
public StudyTemplate(java.lang.String name)
addFields
public void addFields(java.lang.String fieldName,
java.lang.String units,
boolean numeric,
boolean isResult)
getField
public TemplateField getField(java.lang.Object field)
save
public boolean save(java.io.OutputStream out)
throws ambit2.base.exceptions.AmbitIOException
- Throws:
ambit2.base.exceptions.AmbitIOException
save
public boolean save(java.io.Writer writer)
throws ambit2.base.exceptions.AmbitIOException
- Throws:
ambit2.base.exceptions.AmbitIOException
buildDocument
protected org.w3c.dom.Document buildDocument()
load
public boolean load(java.io.InputStream in)
throws ambit2.base.exceptions.AmbitIOException
- Throws:
ambit2.base.exceptions.AmbitIOException
load
public boolean load(java.io.Reader reader)
throws ambit2.base.exceptions.AmbitIOException
- Throws:
ambit2.base.exceptions.AmbitIOException
toString
public java.lang.String toString()
- Overrides:
toString
in class java.util.AbstractCollection<TemplateField>
getSource
public java.lang.String getSource()
setSource
public void setSource(java.lang.String source)
getStudyConditions
public void getStudyConditions(java.util.Hashtable properties)
getStudyResults
public void getStudyResults(java.util.Hashtable properties)
getId
public int getId()
setId
public void setId(int id)
getName
public java.lang.String getName()
setName
public void setName(java.lang.String name)