Changeset 645
- Timestamp:
- Jul 9, 2010, 1:38:18 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/groovy/dbnp/rest/common/CommunicationManager.groovy
r644 r645 4 4 import java.net.URLEncoder 5 5 import org.codehaus.groovy.grails.web.json.* 6 import dbnp.studycapturing.Study7 6 8 7 /** CommunicationManager … … 116 115 return closure( getRestResource( serverURL, restName, map ) ) 117 116 } 118 println "registered + ${restName}"119 117 } 120 118 … … 200 198 def studies = [] 201 199 def assays = [] 202 map['studyIds'].each { studies.add( dbnp.studycapturing.Study.find("from dbnp.studycapturing.Study as s where s.code=?",[it]) ) } 200 def studiesHQ = "from dbnp.studycapturing.Study as s where s.code=?" 201 map['studyIds'].each { studies.add( dbnp.studycapturing.Study.find(studiesHQ,[it]) ) } 203 202 map['assays'].each { samAssay -> 204 203 def assayID = samAssay['externalAssayID'] 205 def assay = dbnp.studycapturing.Assay.find("from dbnp.studycapturing.Assay as a where a.externalAssayID='${assayID}'") 204 def assayHQ = "from dbnp.studycapturing.Assay as a where a.externalAssayID='${assayID}'" 205 def assay = dbnp.studycapturing.Assay.find(assayHQ) 206 206 assays.add( [samAssay,assay] ) 207 207 } … … 214 214 215 215 216 217 /** Send a request for the REST resource to SAM and deliver the218 * results for the Query controller.219 *220 * @param compound a SAM compound, e.g., "ldl" or "weight"221 * @param value a SAM value of a measurement, e.g. "20" (without unit, please)222 * @param opperator a SAM operator, i.e., "", "=", "<", or ">"223 * @return List of matching studies224 */225 public List<Study> getSAMStudies( String compound, String value, String opperator ) {226 return []227 }228 229 230 216 }
Note: See TracChangeset
for help on using the changeset viewer.