TissueInfo API 20091124110011

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

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

public class AnnotationType
extends Object

Author:
Fabien Campagne Date: Sep 5, 2007 Time: 10:40:51 AM

Constructor Summary
AnnotationType(MutableString type)
           
 
Method Summary
 void associate(int sampleId, int value)
           
 void associate(int sampleId, MutableString value)
           
 IntSet getAnnotations(int sampleIndex)
          Returns the annotations associated with this sample.
 int getNumberOfValues()
          Returns the number of distinct value identifiers for this type.
 MutableString getType()
           
 MutableString getValue(int valueIndex)
           
 int getValueIndex(MutableString valueId)
          Return the value that represents this value identifier in the annotation sets.
 void registerDefaultValue(MutableString annotationValue)
          Register a default value for this type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationType

public AnnotationType(MutableString type)
Method Detail

getType

public MutableString getType()

associate

public void associate(int sampleId,
                      MutableString value)

associate

public void associate(int sampleId,
                      int value)

getAnnotations

public IntSet getAnnotations(int sampleIndex)
Returns the annotations associated with this sample. If a default value is defined for the type, will return the index of the default value.

Parameters:
sampleIndex - Index of the sample
Returns:
Set of annotation indices.

getValueIndex

public int getValueIndex(MutableString valueId)
Return the value that represents this value identifier in the annotation sets.

Parameters:
valueId - value identifier, such as lung, liver for tissue type annotations.
Returns:
Index of the value used to store the annotation in set returned by getAnnotations.

getNumberOfValues

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

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

getValue

public MutableString getValue(int valueIndex)

registerDefaultValue

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

Parameters:
annotationValue - Default value.

TissueInfo API 20091124110011

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