Package net.sf.basedb.util
Class AnnotationUtil.AnnotatableWrapper
java.lang.Object
net.sf.basedb.util.AnnotationUtil.AnnotatableWrapper
- Enclosing class:
- AnnotationUtil
This wrapper class is needed because we need to keep
track of extracts linked with raw bioassays and derived bioassays
until we have loaded the Extracts of a Physical Bioassay.
When we reach a RawBioAssay
item or DerivedBioAssay
item, we
remember the extract on that as we move up towards PhysicalBioAssay.
When the PhysicalBioAssay is reached we use the extracts to call
PhysicalBioAssay.getAnnotatableParents(int, Collection)
.
-
Field Summary
Modifier and TypeFieldDescriptionprivate final AnnotationUtil.Cache
private final AnnotationUtil.AnnotatableWrapper
private final Extract
private final Annotatable
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
A wrapper is equal to another if they references the same item and chain of extracts.(package private) Annotatable
The annotatable that we are wrapping.(package private) Set<AnnotationUtil.AnnotatableWrapper>
Get all annotatable parents wrapped inside AnnotatableWrapper:sprivate static Extract
getExtract
(Annotatable item) Get the extract to use.int
hashCode()
Load extracts in parent chain.toString()
-
Field Details
-
item
-
extractsInChain
-
allChildExtractsInChain
-
chain
-
cache
-
extract
-
-
Constructor Details
-
AnnotatableWrapper
AnnotatableWrapper(Annotatable item, AnnotationUtil.Cache cache) -
AnnotatableWrapper
AnnotatableWrapper(Annotatable item, AnnotationUtil.AnnotatableWrapper chain)
-
-
Method Details
-
getExtract
Get the extract to use. This method returns:- If the item is a raw bioassay,
RawBioAssay.getParentExtract()
- If the item is a derived bioassay,
DerivedBioAssay.getExtract()
- null in all other cases.
- If the item is a raw bioassay,
-
getAnnotatable
Annotatable getAnnotatable()The annotatable that we are wrapping. -
loadExtracts
Load extracts in parent chain. We have to consider this for rawbioassay, derived bioassay and physical bioassay since the annotatable parents to a physical bioassay depends on the extracts we have seen while traversing the path from the raw bioassay and up. After reaching the physical bioassay we can forget about the extracts. -
getAnnotatableParentWrappers
Set<AnnotationUtil.AnnotatableWrapper> getAnnotatableParentWrappers(DbControl dc) throws BaseException Get all annotatable parents wrapped inside AnnotatableWrapper:s- Throws:
BaseException
-
equals
A wrapper is equal to another if they references the same item and chain of extracts. -
hashCode
public int hashCode() -
toString
-