Changeset 645


Ignore:
Timestamp:
Jul 9, 2010, 1:38:18 PM (7 years ago)
Author:
jahn
Message:

Minor changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/groovy/dbnp/rest/common/CommunicationManager.groovy

    r644 r645  
    44import java.net.URLEncoder
    55import org.codehaus.groovy.grails.web.json.*
    6 import dbnp.studycapturing.Study
    76
    87/**  CommunicationManager
     
    116115                        return closure( getRestResource( serverURL, restName, map ) )
    117116                }
    118         println "registered + ${restName}"
    119117        }
    120118
     
    200198                    def studies = []   
    201199                    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]) ) }
    203202                        map['assays'].each { samAssay ->
    204203                                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)
    206206                                assays.add( [samAssay,assay] )
    207207                        }
     
    214214
    215215
    216  
    217     /** Send a request for the REST resource to SAM and deliver the
    218      *  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 studies
    224      */
    225     public List<Study> getSAMStudies( String compound, String value, String opperator ) {
    226          return []
    227     }
    228 
    229 
    230216}
Note: See TracChangeset for help on using the changeset viewer.