Changeset 83


Ignore:
Timestamp:
Jan 11, 2010, 2:44:03 PM (13 years ago)
Author:
ademcan
Message:

modification of some magetab domain classes

Location:
trunk
Files:
2 added
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/LoadController.groovy

    r74 r83  
    3535        def investigationDesign = new dbnp.transcriptomics.magetab.idf.InvestigationDesign();
    3636        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
    3838        def publication = new dbnp.transcriptomics.magetab.idf.Publication();
    3939        def normalization = new dbnp.transcriptomics.magetab.sdrf.Normalization();
     
    4141        def comment = new dbnp.transcriptomics.magetab.idf.Comment();
    4242        def experimentalInfo = new dbnp.transcriptomics.magetab.idf.ExperimentalInfo();
     43        def factor = new dbnp.transcriptomics.magetab.idf.Factor();
    4344
    4445        //ArrayList rows = new ArrayList();
    4546
    4647        for (i in fileReader.readLines()){
    47             render(i);
     48            //render(i);
    4849            String line = i.toString() ;
    4950            ArrayList tmp_list = new ArrayList();
     
    8384                    String value = get_string(tmp_list);
    8485                    experimentalInfo.design_term_source_ref = value;
    85                     render("value : " + value );
     86                    //render("value : " + value );
    8687                    println("value : "+value);
    8788                }
     
    9192                        factor_name = factor_name + " , " +tmp_list[a];
    9293                    }
    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                //}
    102103                else if (tmp_list[0]=="Experimental Factor Term Source REF") {
    103104                    String exp_ref  = tmp_list[1];
     
    108109                }
    109110                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;
    111116                }
    112117                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;
    114123                }
    115124                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;
    117130                }
    118131                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;
    120137                }
    121138                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;
    123144                }
    124145                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;
    126151                }
    127152                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;
    129158                }
    130159                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;
    132165                }
    133166                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;
    135172                }
    136173                else if (tmp_list[0]=="Person Roles Term Source REF") {
     
    165202                }
    166203                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;
    168209                }
    169210                else if (tmp_list[0]=="Publication Author List") {
     
    171212                }
    172213                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;
    174219                }
    175220                else if (tmp_list[0]=="Publication Status") {
     
    216261                }
    217262                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;
    219268                }
    220269                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;
    222275                }
    223276                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;
    225282                }
    226283                else if (tmp_list[0]=="Protocol Term Source REF") {
     
    228285                }
    229286                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;
    231292                }
    232293                else if (tmp_list[0]=="Term Source Name") {
     
    248309            comment.save();
    249310            experimentalInfo.save();
     311            //factor.save();
    250312            //termSource.save();
    251 
    252313        }
    253 
    254314    }
    255 
    256315}
    257316
  • trunk/grails-app/domain/dbnp/transcriptomics/magetab/idf/Factor.groovy

    r70 r83  
    77
    88    static constraints = {
    9 
    10         type(nullable: true)
    11        
     9        name(nullable:true,blank:true)
     10        type(nullable: true, blank:true)
    1211    }
    1312}
  • trunk/grails-app/domain/dbnp/transcriptomics/magetab/idf/InvestigationDesign.groovy

    r70 r83  
    77    String dateOfExperiment
    88    String publicReleaseDate
     9    String sdrf_file;
     10
     11    static mapping = {
     12       experimentDescription type: 'text'
     13    }
    914
    1015    static hasMany = [
     
    2732        dateOfExperiment(nullable:true,blank:true)
    2833        publicReleaseDate(nullable:true,blank:true)
     34        sdrf_file(nullable:true,blank:true)
    2935    }
    3036}
  • trunk/grails-app/domain/dbnp/transcriptomics/magetab/idf/MAGEProtocol.groovy

    r70 r83  
    1616    ]
    1717
     18    static mapping = {
     19       description type: 'text'
     20    }
     21
    1822    static constraints = {
    1923        type(nullable: true,blank:true)
  • trunk/grails-app/domain/dbnp/transcriptomics/magetab/idf/Publication.groovy

    r70 r83  
    2020        DOI(nullable:true,blank:true)
    2121        authors_list(nullable:true,blank:true)
     22        status_term_source_ref(nullable:true,blank:true)
    2223    }
    2324}
Note: See TracChangeset for help on using the changeset viewer.