Changeset 83 for trunk/grailsapp/controllers/LoadController.groovy
 Timestamp:
 Jan 11, 2010, 2:44:03 PM (9 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/grailsapp/controllers/LoadController.groovy
r74 r83 35 35 def investigationDesign = new dbnp.transcriptomics.magetab.idf.InvestigationDesign(); 36 36 def person = new dbnp.transcriptomics.magetab.idf.Person(); 37 def protocol = new dbnp.transcriptomics.magetab.idf.MAGEProtocol(); 37 def protocol = new dbnp.transcriptomics.magetab.idf.MAGEProtocol();l 38 38 def publication = new dbnp.transcriptomics.magetab.idf.Publication(); 39 39 def normalization = new dbnp.transcriptomics.magetab.sdrf.Normalization(); … … 41 41 def comment = new dbnp.transcriptomics.magetab.idf.Comment(); 42 42 def experimentalInfo = new dbnp.transcriptomics.magetab.idf.ExperimentalInfo(); 43 def factor = new dbnp.transcriptomics.magetab.idf.Factor(); 43 44 44 45 //ArrayList rows = new ArrayList(); 45 46 46 47 for (i in fileReader.readLines()){ 47 render(i);48 //render(i); 48 49 String line = i.toString() ; 49 50 ArrayList tmp_list = new ArrayList(); … … 83 84 String value = get_string(tmp_list); 84 85 experimentalInfo.design_term_source_ref = value; 85 render("value : " + value );86 //render("value : " + value ); 86 87 println("value : "+value); 87 88 } … … 91 92 factor_name = factor_name + " , " +tmp_list[a]; 92 93 } 93 experimentalInfo.factor_name = factor_name;94 } 95 else if (tmp_list[0]=="Experimental Factor Type") {96 String factor_type = tmp_list[1];97 for (a in 2..tmp_list.size()1){98 factor_type = factor_type + " , " +tmp_list[a];99 }100 experimentalInfo.factor_type = factor_type;101 }94 factor.name = factor_name; 95 } 96 //else if (tmp_list[0]=="Experimental Factor Type") { 97 // String factor_type = tmp_list[1]; 98 // for (a in 2..tmp_list.size()1){ 99 // factor_type = factor_type + " , " +tmp_list[a]; 100 // } 101 // factor.type = factor_type; 102 //} 102 103 else if (tmp_list[0]=="Experimental Factor Term Source REF") { 103 104 String exp_ref = tmp_list[1]; … … 108 109 } 109 110 else if (tmp_list[0]=="Person Last Name") { 110 person.lastName = tmp_list[1]; 111 String last_name = tmp_list[1]; 112 for (a in 2..tmp_list.size()1){ 113 last_name = last_name + " , " +tmp_list[a]; 114 } 115 person.lastName = last_name; 111 116 } 112 117 else if (tmp_list[0]=="Person First Name") { 113 person.firstName = tmp_list[1]; 118 String first_name = tmp_list[1]; 119 for (a in 2..tmp_list.size()1){ 120 first_name = first_name + " , " +tmp_list[a]; 121 } 122 person.firstName = first_name; 114 123 } 115 124 else if (tmp_list[0]=="Person Mid Initials") { 116 person.midInitials = tmp_list[1]; 125 String mid_initials = tmp_list[1]; 126 for (a in 2..tmp_list.size()1){ 127 mid_initials = mid_initials + " , " +tmp_list[a]; 128 } 129 person.midInitials = mid_initials; 117 130 } 118 131 else if (tmp_list[0]=="Person Email") { 119 person.email = tmp_list[1]; 132 String pemail = tmp_list[1]; 133 for (a in 2..tmp_list.size()1){ 134 pemail = pemail + " , " +tmp_list[a]; 135 } 136 person.email = pemail; 120 137 } 121 138 else if (tmp_list[0]=="Person Phone") { 122 person.phone = tmp_list[1]; 139 String pphone = tmp_list[1]; 140 for (a in 2..tmp_list.size()1){ 141 pphone = pphone + " , " +tmp_list[a]; 142 } 143 person.phone = pphone; 123 144 } 124 145 else if (tmp_list[0]=="Person Fax") { 125 person.fax = tmp_list[1]; 146 String pfax = tmp_list[1]; 147 for (a in 2..tmp_list.size()1){ 148 pfax = pfax + " , " +tmp_list[a]; 149 } 150 person.fax = pfax; 126 151 } 127 152 else if (tmp_list[0]=="Person Address") { 128 person.address = tmp_list[1]; 153 String paddress = tmp_list[1]; 154 for (a in 2..tmp_list.size()1){ 155 paddress = paddress + " , " +tmp_list[a]; 156 } 157 person.address = paddress; 129 158 } 130 159 else if (tmp_list[0]=="Person Affiliation") { 131 person.affiliation = tmp_list[1]; 160 String paffiliation = tmp_list[1]; 161 for (a in 2..tmp_list.size()1){ 162 paffiliation = paffiliation + " , " +tmp_list[a]; 163 } 164 person.affiliation = paffiliation; 132 165 } 133 166 else if (tmp_list[0]=="Person Roles") { 134 person.roles = tmp_list[1]; 167 String proles = tmp_list[1]; 168 for (a in 2..tmp_list.size()1){ 169 proles = proles + " , " +tmp_list[a]; 170 } 171 person.roles = proles; 135 172 } 136 173 else if (tmp_list[0]=="Person Roles Term Source REF") { … … 165 202 } 166 203 else if (tmp_list[0]=="Publication DOI") { 167 publication.DOI = tmp_list[1]; 204 String doi = tmp_list[1]; 205 for (a in 2..tmp_list.size()1){ 206 doi = doi + " , " +tmp_list[a]; 207 } 208 publication.DOI = doi; 168 209 } 169 210 else if (tmp_list[0]=="Publication Author List") { … … 171 212 } 172 213 else if (tmp_list[0]=="Publication Title") { 173 publication.title = tmp_list[1]; 214 String pubTitle = tmp_list[1]; 215 for (a in 2..tmp_list.size()1){ 216 pubTitle = pubTitle + " , " +tmp_list[a]; 217 } 218 publication.title = pubTitle; 174 219 } 175 220 else if (tmp_list[0]=="Publication Status") { … … 216 261 } 217 262 else if (tmp_list[0]=="Protocol Hardware") { 218 protocol.hardware = tmp_list[1]; 263 String phardware = tmp_list[1]; 264 for (a in 2..tmp_list.size()1){ 265 phardware = phardware + " , " +tmp_list[a]; 266 } 267 protocol.hardware = phardware; 219 268 } 220 269 else if (tmp_list[0]=="Protocol Software") { 221 protocol.software = tmp_list[1]; 270 String psoftware = tmp_list[1]; 271 for (a in 2..tmp_list.size()1){ 272 psoftware = psoftware + " , " +tmp_list[a]; 273 } 274 protocol.software = psoftware; 222 275 } 223 276 else if (tmp_list[0]=="Protocol Contact") { 224 protocol.contact = tmp_list[1]; 277 String pcontact = tmp_list[1]; 278 for (a in 2..tmp_list.size()1){ 279 pcontact = pcontact + " , " +tmp_list[a]; 280 } 281 protocol.contact = pcontact; 225 282 } 226 283 else if (tmp_list[0]=="Protocol Term Source REF") { … … 228 285 } 229 286 else if (tmp_list[0]=="SDRF File") { 230 investigationDesign.sdrf_file = tmp_list[1]; 287 String sdrf = tmp_list[1]; 288 for (a in 2..tmp_list.size()1){ 289 sdrf = sdrf + " , " +tmp_list[a]; 290 } 291 investigationDesign.sdrf_file = sdrf; 231 292 } 232 293 else if (tmp_list[0]=="Term Source Name") { … … 248 309 comment.save(); 249 310 experimentalInfo.save(); 311 //factor.save(); 250 312 //termSource.save(); 251 252 313 } 253 254 314 } 255 256 315 } 257 316
Note: See TracChangeset
for help on using the changeset viewer.