- Timestamp:
- Jun 25, 2010, 10:27:01 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/groovy/dbnp/rest/CommunicationManager.groovy
r553 r608 10 10 import dbnp.data.CleanDataLayer 11 11 import dbnp.studycapturing.Study 12 import dbnp.studycapturing.Assay 12 13 13 14 … … 32 33 * rest resources that this communication manager connects to. 33 34 */ 34 def static ServerURL = "http://nbx5.nugo.org:8182/ClinicalChemistry/rest"; 35 //def static ServerURL = "http://localhost:8080/gscf/rest"; 35 36 def static ServerURL = "http://localhost:8182/ClinicalChemistry" 37 //def static ServerURL = "http://nbx5.nugo.org:8182/ClinicalChemistry" 38 def static RestServerURL = ServerURL + "/rest" 36 39 37 40 38 41 /* Methods implemented for CleanDataLayer */ 42 43 39 44 40 45 … … 45 50 */ 46 51 public String[] getFeaturesQuantitative(long assayID) { 47 return new String [20] ;52 return new String [20] 48 53 } 49 54 … … 58 63 */ 59 64 public Map getDataQuantitative(String feature, long assayID, String[] sampleIDs) { 60 return new HashMap() ;65 return new HashMap() 61 66 } 62 67 … … 104 109 */ 105 110 public Object getMeasurementsResource( String keyword ) { 106 def url = new URL( ServerURL + "/" + getSearchable(keyword) )111 def url = new URL( RestServerURL + "/" + getSearchable(keyword) ) 107 112 return JSON.parse( url.newReader() ) 108 113 } … … 117 122 */ 118 123 private Object request( String resource ) { 119 def url = new URL( ServerURL + "/" + resource );120 return JSON.parse( url.newReader() ) ;124 def url = new URL( RestServerURL + "/" + resource ) 125 return JSON.parse( url.newReader() ) 121 126 } 122 127 … … 138 143 139 144 145 /** 146 * Get the URL for importing an assay within the GSCF. 147 * This is not a REST method! It only creates a rest resource and returns it's url. 148 * 149 * @params assay 150 * @return list of ClinicalFloatData 151 */ 152 public Object getAssayImportURL( assay ) { 153 return new URL( ServerURL + '/importer/test?externalAssayID=' + assay.externalAssayID ) 154 } 140 155 141 156 142 157 143 158 144 /* To Do for querying 145 public void getMeasurementsForValueResource() { 159 /* Methods for acessing URLs in SAM */ 160 161 162 /** 163 * Get the URL for importing an assay within the GSCF. 164 * This is not a REST method! It only creates a rest resource and returns it's url. 165 * 166 * @params assay 167 * @return URL 168 */ 169 public Object getAssayShowURL( assay ) { 170 return new URL( ServerURL + '/simpleAssay/show/assay?externalAssayID=' + assay.externalAssayID ) 146 171 } 147 172 148 173 149 public void getMeasurementsForRangeResource() { 174 /** 175 * Get the URL for importing an assay within the GSCF. 176 * This is not a REST method! It only creates a rest resource and returns it's url. 177 * 178 * @params assay 179 * @return URL 180 */ 181 public Object getAssayEditURL( assay ) { 182 return new URL( ServerURL + '/simpleAssay/edit/assay?externalAssayID=' + assay.externalAssayID ) 150 183 } 151 184 152 185 153 public void getDataSimple() { 186 /** 187 * Get the URL for importing an assay within the GSCF. 188 * This is not a REST method! It only creates a rest resource and returns it's url. 189 * 190 * @params URL 191 * @return list of ClinicalFloatData 192 */ 193 public Object getMeasurementTypesURL() { 194 return new URL( ServerURL + '/simpleAssayMeasurementType/list/nil?externalAssayID=' + assay.externalAssayID ) 154 195 } 155 */156 157 158 159 196 160 197
Note: See TracChangeset
for help on using the changeset viewer.