TissueInfo API 20091124110011

edu.cornell.med.icb.tissueinfo.annotations
Class AnnotationSet

java.lang.Object
  extended by edu.cornell.med.icb.tissueinfo.annotations.AnnotationSet

public class AnnotationSet
extends Object

Associate sampleIds to annotations. Annotations may describe tissue origin, gender of the specimen, development stage, or other attributes.

Author:
Fabien Campagne Date: Sep 4, 2007 Time: 5:30:13 PM

Constructor Summary
AnnotationSet()
           
 
Method Summary
 void associate(MutableString sampleId, MutableString annotationType, MutableString annotationValue)
          Associate a sampleId with an annotation (type, value).
 void associate(String sampleId, String annotationType, String annotationValue)
          Associate a sampleId with an annotation (type, value)
 IntSet getAnnotations(int sampleIndex, int tissueAnnotationIndex)
           
 AnnotationType getAnnotationType(int annotationTypeIndex)
          Get an annotation type.
 int getAnnotationTypeIndex(MutableString annotationType)
           
 int getAnnotationTypeIndex(String annotationType)
           
 int getNumberOfSamples()
           
 int getNumberOfValues(int annotationTypeIndex)
          Returns the number of distinct value identifiers for the annotation type.
 int getSampleIndex(MutableString sampleId)
           
 int getSampleIndex(String sampleId)
           
 int getValueIndex(int tissueAnnotationIndex, MutableString valueId)
           
 int getValueIndex(int tissueAnnotationIndex, String valueId)
           
 int registerAnnotationType(MutableString annotationType)
          Associate a annotationType with an annotation type.
 void registerDefaultValue(MutableString annotationType, MutableString annotationValue)
          Register a default value for a type.
 void registerDefaultValue(String annotationType, String annotationValue)
          Register a default value for a type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationSet

public AnnotationSet()
Method Detail

registerAnnotationType

public int registerAnnotationType(MutableString annotationType)
Associate a annotationType with an annotation type. For instance, tissueinfo supports annotations of types tissue, gender, or devStage (development stage).

Parameters:
annotationType - the type of annotation to register.
Returns:
index of the new type.

associate

public void associate(String sampleId,
                      String annotationType,
                      String annotationValue)
Associate a sampleId with an annotation (type, value)

Parameters:
sampleId -
annotationType -
annotationValue -

associate

public void associate(MutableString sampleId,
                      MutableString annotationType,
                      MutableString annotationValue)
Associate a sampleId with an annotation (type, value).

Parameters:
sampleId -
annotationType -
annotationValue -

getNumberOfSamples

public int getNumberOfSamples()

getAnnotationTypeIndex

public int getAnnotationTypeIndex(String annotationType)

getAnnotationTypeIndex

public int getAnnotationTypeIndex(MutableString annotationType)

getAnnotations

public IntSet getAnnotations(int sampleIndex,
                             int tissueAnnotationIndex)

getSampleIndex

public int getSampleIndex(String sampleId)

getSampleIndex

public int getSampleIndex(MutableString sampleId)

getValueIndex

public int getValueIndex(int tissueAnnotationIndex,
                         MutableString valueId)

getValueIndex

public int getValueIndex(int tissueAnnotationIndex,
                         String valueId)

getNumberOfValues

public int getNumberOfValues(int annotationTypeIndex)
Returns the number of distinct value identifiers for the annotation type.

Returns:
the number of distinct value identifiers for the annotation type.

getAnnotationType

public final AnnotationType getAnnotationType(int annotationTypeIndex)
Get an annotation type.

Parameters:
annotationTypeIndex - Index of the annotation type.
Returns:

registerDefaultValue

public void registerDefaultValue(MutableString annotationType,
                                 MutableString annotationValue)
Register a default value for a type. The default value will be returned for the type whenever no value has been associated to the sample for this annotation type.

Parameters:
annotationType - Type of association (e.g., tissue, devStage, gender, etc.)
annotationValue - Default value.

registerDefaultValue

public void registerDefaultValue(String annotationType,
                                 String annotationValue)
Register a default value for a type. The default value will be returned for the type whenever no value has been associated to the sample for this annotation type.

Parameters:
annotationType - Type of association (e.g., tissue, devStage, gender, etc.)
annotationValue - Default value.

TissueInfo API 20091124110011

Copyright © 2001-2009 Institute for Computational Biomedicine, All Rights Reserved.