ambit2.core.data.experiment
Class StudyTemplate

Package class diagram package StudyTemplate
java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<TemplateField>
              extended by 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

Field Summary
protected  int id
           
protected  java.lang.String name
           
protected  TemplateField query
           
protected  java.lang.String source
           
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
StudyTemplate(java.lang.String name)
           
 
Method Summary
 void addFields(java.lang.String fieldName, java.lang.String units, boolean numeric, boolean isResult)
           
protected  org.w3c.dom.Document buildDocument()
           
 TemplateField getField(java.lang.Object field)
           
 int getId()
           
 java.lang.String getName()
           
 java.lang.String getSource()
           
 void getStudyConditions(java.util.Hashtable properties)
           
 void getStudyResults(java.util.Hashtable properties)
           
 boolean load(java.io.InputStream in)
           
 boolean load(java.io.Reader reader)
           
 boolean save(java.io.OutputStream out)
           
 boolean save(java.io.Writer writer)
           
 void setId(int id)
           
 void setName(java.lang.String name)
           
 void setSource(java.lang.String source)
           
 java.lang.String toString()
           
 
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
 

Field Detail

source

protected java.lang.String source

query

protected TemplateField query

name

protected java.lang.String name

id

protected int id
Constructor Detail

StudyTemplate

public StudyTemplate(java.lang.String name)
Method Detail

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)