Changeset 631

Show
Ignore:
Timestamp:
29-06-10 15:36:04 (4 years ago)
Author:
jahn
Message:

Cleaned up CommunicationManager? and put it in uniform use and package
structure with the dbnp.rest used in the Simple Assay Module.

Location:
trunk
Files:
4 added
1 removed
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/RestController.groovy

    r624 r631  
    5252        * Provide a list of all subjects belonging to a study.  
    5353        * 
    54         * Examlpe call of the getAssays REST resource: http://localhost:8080/gscf/rest/getSubjects/json?externalStudyID=1 
    55         * 
    5654        * @param  externalStudyID 
    5755        * @return as JSON object list of subject names  
     
    7270        * Provide a list of all assays for a given study 
    7371        * 
    74         * Example for calling this resource: http://localhost:8080/gscf/rest/getAssays/json?externalStudyID=2 
    75         * 
    7672        * @param  externalStudyID  
    7773        * @return list of assays as JSON object  
     
    9187        * Provide all samples of a given Assay. The result is an enriched list with additional informatin on a sample.  
    9288        * 
    93         * Example for calling this resource: http://localhost:8080/gscf/rest/getAssays/json?externalStudyID=2 
    94         * 
    9589        * @param  assayID (externalAssayID of some Assay in GSCF) 
    9690        * @return list of element of  Sample.name x Sample.material x Sample.subject.name x Sample.Event.name x Sample.Event.time 
     
    10094                if( params.externalAssayID ) { 
    10195                        def id = Long.parseLong(params.externalAssayID) 
     96                        Assay.findAll().each{ println it } 
    10297                        Assay.find( "from Assay as a where externalAssayID=?",[id]).getSamples().each { sample -> 
    10398                                def item = [  
     
    105100                                        'material'      : sample.material.name, 
    106101                                        'subject'       : sample.parentSubject.name, 
    107                                         'event'         : sample.parentEvent.template.name,  // get the freaking name  
     102                                        'event'         : sample.parentEvent.template.name, 
    108103                                        'startTime'     : sample.parentEvent.getDurationString() 
    109104                                ]