Changeset 631
- Timestamp:
- Jun 29, 2010, 3:36:04 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/RestController.groovy
r624 r631 52 52 * Provide a list of all subjects belonging to a study. 53 53 * 54 * Examlpe call of the getAssays REST resource: http://localhost:8080/gscf/rest/getSubjects/json?externalStudyID=155 *56 54 * @param externalStudyID 57 55 * @return as JSON object list of subject names … … 72 70 * Provide a list of all assays for a given study 73 71 * 74 * Example for calling this resource: http://localhost:8080/gscf/rest/getAssays/json?externalStudyID=275 *76 72 * @param externalStudyID 77 73 * @return list of assays as JSON object … … 91 87 * Provide all samples of a given Assay. The result is an enriched list with additional informatin on a sample. 92 88 * 93 * Example for calling this resource: http://localhost:8080/gscf/rest/getAssays/json?externalStudyID=294 *95 89 * @param assayID (externalAssayID of some Assay in GSCF) 96 90 * @return list of element of Sample.name x Sample.material x Sample.subject.name x Sample.Event.name x Sample.Event.time … … 100 94 if( params.externalAssayID ) { 101 95 def id = Long.parseLong(params.externalAssayID) 96 Assay.findAll().each{ println it } 102 97 Assay.find( "from Assay as a where externalAssayID=?",[id]).getSamples().each { sample -> 103 98 def item = [ … … 105 100 'material' : sample.material.name, 106 101 'subject' : sample.parentSubject.name, 107 'event' : sample.parentEvent.template.name, // get the freaking name102 'event' : sample.parentEvent.template.name, 108 103 'startTime' : sample.parentEvent.getDurationString() 109 104 ]
Note: See TracChangeset
for help on using the changeset viewer.