org.intermine.bio.util
Class BioQueries

java.lang.Object
  extended by org.intermine.bio.util.BioQueries

public abstract class BioQueries
extends java.lang.Object

Bio utility methods for queries.


Constructor Summary
BioQueries()
           
 
Method Summary
static Results findLocationAndObjects(ObjectStore os, java.lang.Class<?> objectCls, java.lang.Class<?> subjectCls, boolean orderBySubject, boolean hasLength, boolean hasChromosomeLocation, int batchSize)
          Query ObjectStore for all Location object between given object (eg.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BioQueries

public BioQueries()
Method Detail

findLocationAndObjects

public static Results findLocationAndObjects(ObjectStore os,
                                             java.lang.Class<?> objectCls,
                                             java.lang.Class<?> subjectCls,
                                             boolean orderBySubject,
                                             boolean hasLength,
                                             boolean hasChromosomeLocation,
                                             int batchSize)
                                      throws ObjectStoreException
Query ObjectStore for all Location object between given object (eg. Chromosome) and subject (eg. Gene) classes. Return an iterator over the results ordered by subject if orderBySubject is true, otherwise order by object.

Parameters:
os - the ObjectStore to find the Locations in
objectCls - object type of the Location
subjectCls - subject type of the Location
orderBySubject - if true order the results using the subjectCls, otherwise order by objectCls
hasLength - if true, only query locations where the objectCls object has a non-zero length
batchSize - the batch size for the results object
hasChromosomeLocation - if true, only query where the subject has a chromosome location
Returns:
a Results object: object.id, location, subject
Throws:
ObjectStoreException - if problem reading ObjectStore