Changeset 72


Ignore:
Timestamp:
Jan 5, 2010, 11:21:31 AM (14 years ago)
Author:
ademcan
Message:

modification of domain classes organization

Location:
trunk
Files:
6 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/application.properties

    r70 r72  
     1
    12#Grails Metadata file
    23#Tue Dec 29 14:59:12 CET 2009
  • trunk/grails-app/controllers/LoadController.groovy

    r70 r72  
    1616    def index = {}
    1717
     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
    1826    def load = {
    1927
    2028        //ArrayList attributes = new ArrayList();
    2129
    22         render("Loading ...\n");
     30        render("Loading ...<br>");
    2331
    2432        InputStream inputStream = request.getFile("uploadfile").inputStream;
     
    3745
    3846        for (i in fileReader.readLines()){
     47            render(i);
    3948            String line = i.toString() ;
    4049            ArrayList tmp_list = new ArrayList();
     
    7281                }
    7382                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);
    7987                }
    8088                else if (tmp_list[0]=="Experimental Factor Name") {
     
    93101                }
    94102                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;
    96108                }
    97109                else if (tmp_list[0]=="Person Last Name") {
     
    174186                }
    175187                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
    178195                else if (tmp_list[0]=="Protocol Type") {
    179196                    def type = new dbnp.transcriptomics.magetab.idf.OntologyTerm();
     
    185202                }
    186203                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;
    188209                }
    189210                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;
    191216                }
    192217                else if (tmp_list[0]=="Protocol Hardware") {
     
    203228                }
    204229                else if (tmp_list[0]=="SDRF File") {
    205 
     230                    investigationDesign.sdrf_file = tmp_list[1];
    206231                }
    207232                else if (tmp_list[0]=="Term Source Name") {
Note: See TracChangeset for help on using the changeset viewer.