2.17.2: 2011-06-17

net.sf.basedb.util
Class AnnotationUtil.AnnotatableWrapper

java.lang.Object
  extended by net.sf.basedb.util.AnnotationUtil.AnnotatableWrapper
Enclosing class:
AnnotationUtil

static class AnnotationUtil.AnnotatableWrapper
extends Object

This wrapper class is needed because we need to keep track of the RawBioAssay.getArrayNum() property until we have loaded the Labeled Extracts of a Hybridization.

The 'normal' value of arrayNum is 0, which means that it is ignored. When we reach a RawBioAssay item, we use the arrayNum on that. The array num is kept as we move up to Scan and Hybridization. When the Hybridization is reached we use the arrayNum to call Hybridization.getAnnotatableParents(int) so that we only get labeled extracts that are linked with the correct array num.


Field Summary
private  int arrayNum
           
private  Annotatable item
           
 
Constructor Summary
AnnotationUtil.AnnotatableWrapper(Annotatable item, int arrayNum)
           
 
Method Summary
 boolean equals(Object o)
          A wrapper is equal to another if they references the same item and have the same arrayNum.
(package private)  Annotatable getAnnotatable()
          The annotatable that we are wrapping.
(package private)  Set<AnnotationUtil.AnnotatableWrapper> getAnnotatableParentWrappers()
          Get all annotatable parents wrapped inside AnnotatableWrapper:s
private static int getArrayNum(Annotatable item, int arrayNum)
          Get the array num to use.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

item

private final Annotatable item

arrayNum

private final int arrayNum
Constructor Detail

AnnotationUtil.AnnotatableWrapper

AnnotationUtil.AnnotatableWrapper(Annotatable item,
                                  int arrayNum)
Method Detail

getArrayNum

private static int getArrayNum(Annotatable item,
                               int arrayNum)
Get the array num to use. This method returns:

getAnnotatable

Annotatable getAnnotatable()
The annotatable that we are wrapping.


getAnnotatableParentWrappers

Set<AnnotationUtil.AnnotatableWrapper> getAnnotatableParentWrappers()
                                                              throws BaseException
Get all annotatable parents wrapped inside AnnotatableWrapper:s

Throws:
BaseException

equals

public boolean equals(Object o)
A wrapper is equal to another if they references the same item and have the same arrayNum.

Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

2.17.2: 2011-06-17