gov.nih.nci.common.persistence.enhanced.Experiment
Class ExperimentByOrganismNameQuery

java.lang.Object
  extended by gov.nih.nci.common.persistence.enhanced.BaseQueryImpl
      extended by gov.nih.nci.common.persistence.enhanced.Experiment.ExperimentByOrganismNameQuery
All Implemented Interfaces:
ESCriterionQuery, ESQuery

public class ExperimentByOrganismNameQuery
extends BaseQueryImpl
implements ESCriterionQuery

Used to find all Experiment(s) with BioMaterial(s) with characteristics, OntologyEntry(s) with a category of value 'Organism' OR BioMaterial(s) with descriptions.annotations with a category of value 'species'

Author:
smatyas
       1.1a Find all BioSource(s).descriptions.annotations.category='species' AND descriptions.annotations.value is LIKE "%?%"
       1.2a Find all BioSample(s).descriptions.annotations.category='species' AND descriptions.annotations.value is LIKE "%?%"
       1.3a Find all LabeledExtract(s).descriptions.annotations.category='species' AND descriptions.annotations.value is LIKE "%?%"  
       1.1. Find all BioSources with characteristics.category = 'Organism'
       1.2. Find all BioSamples with characteristics.category = 'Organism', recurse through BioSamples 
       1.3. Find all LabeledExtracts with characteristics.category = 'Organism'
       2.  Find all LabeledExtracts from the resultset from step 1.1, 1.1a, 1.2, 1.2a, 1.3, 1.3a
       3. Find all related PhysicalBioAssay(s) recursively (typically there are one or more PhysicalBioAssays per LabeledExtract) (note: caArray doesn't support this however, this is needed to be complete per the MAGE-OM 1.1 Spec.) 
          Do so using the founds PhysicalBioAssay(s) = PhysicalBioAssay.bioAssayTreatments.target 
       4. Find all Experiments for the given the PhysicalBioAssays founds
 

Field Summary
 
Fields inherited from class gov.nih.nci.common.persistence.enhanced.BaseQueryImpl
EMPTY_LONG_COLLECTION
 
Constructor Summary
ExperimentByOrganismNameQuery()
           
 
Method Summary
protected  java.util.Collection<java.lang.Long> findAllBioSamplesFromBioSourcesWithCharacteristicsCategoryMatchingOrganismOrWithOntologyEntryOfCategorySpecies()
           
protected  java.util.Collection<java.lang.Long> findAllBioSamplesWithCharacteristicsCategoryMatchingOrganism()
           
protected  java.util.Collection<java.lang.Long> findAllBioSamplesWithOntologyEntryOfCategorySpecies()
           
protected  java.util.Collection<java.lang.Long> findAllBioSourcesWithCharacteristicsCategoryMatchingOrganism()
           
protected  java.util.Collection<java.lang.Long> findAllBioSourcesWithOntologyEntryOfCategorySpecies()
           
protected  java.util.Collection findAllExperiments()
           
protected  java.util.Collection<java.lang.Long> findAllLabeledExtractsFromBioMaterialsFound()
           
protected  java.util.Collection<java.lang.Long> findAllLabeledExtractsFromBioSamples(java.util.Collection<java.lang.Long> bioSampleIds)
           
protected  java.util.Collection<java.lang.Long> findAllLabeledExtractsWithCharacteristicsCategoryMatchingOrganism()
           
protected  java.util.Collection<java.lang.Long> findAllLabeledExtractsWithOntologyEntryOfCategorySpecies()
           
protected  java.util.Collection<java.lang.Long> findAllPhysicalBioAssays()
           
 java.lang.Long[] getIdsForQuery()
           
protected  org.apache.ojb.broker.query.ReportQueryByCriteria query_findAllBioSamplesWithCharacteristicsCategoryMatchingOrganism(java.lang.String[] values)
           
protected  org.apache.ojb.broker.query.ReportQueryByCriteria query_findAllBioSourcesWithCharacteristicsCategoryMatchingOrganism(java.lang.String[] values)
           
protected  org.apache.ojb.broker.query.ReportQueryByCriteria query_findAllExperiments(java.util.Collection<java.lang.Long> physicalBioAssayIds)
           
protected  org.apache.ojb.broker.query.ReportQueryByCriteria query_findAllLabeledExtractsFromBioSamples(java.util.Collection<java.lang.Long> bioSampleIds)
           
 void setCriterion(EnhancedSearchCriterion criterion)
           
 
Methods inherited from class gov.nih.nci.common.persistence.enhanced.BaseQueryImpl
buildLikeCriteria, buildLikeCriteria, getBroker, getCollectionByQuery, getCollectionByQuery, getConnection, getIds, getIdsAsCollection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExperimentByOrganismNameQuery

public ExperimentByOrganismNameQuery()
Method Detail

setCriterion

public void setCriterion(EnhancedSearchCriterion criterion)
Specified by:
setCriterion in interface ESCriterionQuery

getIdsForQuery

public java.lang.Long[] getIdsForQuery()
Specified by:
getIdsForQuery in interface ESCriterionQuery

findAllBioSourcesWithOntologyEntryOfCategorySpecies

protected java.util.Collection<java.lang.Long> findAllBioSourcesWithOntologyEntryOfCategorySpecies()

findAllBioSamplesWithOntologyEntryOfCategorySpecies

protected java.util.Collection<java.lang.Long> findAllBioSamplesWithOntologyEntryOfCategorySpecies()

findAllLabeledExtractsWithOntologyEntryOfCategorySpecies

protected java.util.Collection<java.lang.Long> findAllLabeledExtractsWithOntologyEntryOfCategorySpecies()

findAllBioSourcesWithCharacteristicsCategoryMatchingOrganism

protected java.util.Collection<java.lang.Long> findAllBioSourcesWithCharacteristicsCategoryMatchingOrganism()

query_findAllBioSourcesWithCharacteristicsCategoryMatchingOrganism

protected org.apache.ojb.broker.query.ReportQueryByCriteria query_findAllBioSourcesWithCharacteristicsCategoryMatchingOrganism(java.lang.String[] values)

findAllBioSamplesWithCharacteristicsCategoryMatchingOrganism

protected java.util.Collection<java.lang.Long> findAllBioSamplesWithCharacteristicsCategoryMatchingOrganism()

query_findAllBioSamplesWithCharacteristicsCategoryMatchingOrganism

protected org.apache.ojb.broker.query.ReportQueryByCriteria query_findAllBioSamplesWithCharacteristicsCategoryMatchingOrganism(java.lang.String[] values)

findAllLabeledExtractsWithCharacteristicsCategoryMatchingOrganism

protected java.util.Collection<java.lang.Long> findAllLabeledExtractsWithCharacteristicsCategoryMatchingOrganism()

findAllLabeledExtractsFromBioMaterialsFound

protected java.util.Collection<java.lang.Long> findAllLabeledExtractsFromBioMaterialsFound()

findAllBioSamplesFromBioSourcesWithCharacteristicsCategoryMatchingOrganismOrWithOntologyEntryOfCategorySpecies

protected java.util.Collection<java.lang.Long> findAllBioSamplesFromBioSourcesWithCharacteristicsCategoryMatchingOrganismOrWithOntologyEntryOfCategorySpecies()
Returns:

findAllLabeledExtractsFromBioSamples

protected java.util.Collection<java.lang.Long> findAllLabeledExtractsFromBioSamples(java.util.Collection<java.lang.Long> bioSampleIds)
Returns:

query_findAllLabeledExtractsFromBioSamples

protected org.apache.ojb.broker.query.ReportQueryByCriteria query_findAllLabeledExtractsFromBioSamples(java.util.Collection<java.lang.Long> bioSampleIds)
Parameters:
bioSampleIds -
Returns:

findAllPhysicalBioAssays

protected java.util.Collection<java.lang.Long> findAllPhysicalBioAssays()
Returns:

findAllExperiments

protected java.util.Collection findAllExperiments()

query_findAllExperiments

protected org.apache.ojb.broker.query.ReportQueryByCriteria query_findAllExperiments(java.util.Collection<java.lang.Long> physicalBioAssayIds)