Changeset 72
- Timestamp:
- Jan 5, 2010, 11:21:31 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/application.properties
r70 r72 1 1 2 #Grails Metadata file 2 3 #Tue Dec 29 14:59:12 CET 2009 -
trunk/grails-app/controllers/LoadController.groovy
r70 r72 16 16 def index = {} 17 17 18 def get_string(ArrayList tmp_list) { 19 String value = tmp_list[1]; 20 for (a in 2..tmp_list.size()-1){ 21 value = value + " , " +tmp_list[a]; 22 } 23 return value; 24 } 25 18 26 def load = { 19 27 20 28 //ArrayList attributes = new ArrayList(); 21 29 22 render("Loading ... \n");30 render("Loading ...<br>"); 23 31 24 32 InputStream inputStream = request.getFile("uploadfile").inputStream; … … 37 45 38 46 for (i in fileReader.readLines()){ 47 render(i); 39 48 String line = i.toString() ; 40 49 ArrayList tmp_list = new ArrayList(); … … 72 81 } 73 82 else if (tmp_list[0]=="Experimental Design Term Source REF") { 74 String term_ref = tmp_list[1]; 75 for (a in 2..tmp_list.size()-1){ 76 term_ref = term_ref + " , " +tmp_list[a]; 77 } 78 experimentalInfo.design_term_source_ref = term_ref; 83 String value = get_string(tmp_list); 84 experimentalInfo.design_term_source_ref = value; 85 render("value : " + value ); 86 println("value : "+value); 79 87 } 80 88 else if (tmp_list[0]=="Experimental Factor Name") { … … 93 101 } 94 102 else if (tmp_list[0]=="Experimental Factor Term Source REF") { 95 experimentalInfo.factor_term_source_ref = tmp_list[1]; 103 String exp_ref = tmp_list[1]; 104 for (a in 2..tmp_list.size()-1){ 105 exp_ref = exp_ref + " , " +tmp_list[a]; 106 } 107 experimentalInfo.factor_term_source_ref = exp_ref; 96 108 } 97 109 else if (tmp_list[0]=="Person Last Name") { … … 174 186 } 175 187 else if (tmp_list[0]=="Protocol Name") { 176 protocol.name = tmp_list[1]; 177 } 188 String protocol_name = tmp_list[1]; 189 for (a in 2..tmp_list.size()-1){ 190 protocol_name = protocol_name + " , " +tmp_list[a]; 191 } 192 protocol.name = protocol_name; 193 } 194 //todo list of type 178 195 else if (tmp_list[0]=="Protocol Type") { 179 196 def type = new dbnp.transcriptomics.magetab.idf.OntologyTerm(); … … 185 202 } 186 203 else if (tmp_list[0]=="Protocol Description") { 187 protocol.description = tmp_list[1]; 204 String protocol_description = tmp_list[1]; 205 for (a in 2..tmp_list.size()-1){ 206 protocol_description = protocol_description + " , " +tmp_list[a]; 207 } 208 protocol.description = protocol_description; 188 209 } 189 210 else if (tmp_list[0]=="Protocol Parameters") { 190 protocol.parameters = tmp_list[1]; 211 String protocol_parameters = tmp_list[1]; 212 for (a in 2..tmp_list.size()-1){ 213 protocol_parameters = protocol_parameters + " , " +tmp_list[a]; 214 } 215 protocol.parameters = protocol_parameters; 191 216 } 192 217 else if (tmp_list[0]=="Protocol Hardware") { … … 203 228 } 204 229 else if (tmp_list[0]=="SDRF File") { 205 230 investigationDesign.sdrf_file = tmp_list[1]; 206 231 } 207 232 else if (tmp_list[0]=="Term Source Name") {
Note: See TracChangeset
for help on using the changeset viewer.