• Views
  • Iteration Report
  • My Iteration Report
  •  
OMERO.server
  • Login
  • Help/Guide
  • About Trac
  • Preferences
  • Wiki
  • Timeline
  • Roadmap
  • Browse Source
  • View Tickets
  • Search

Context Navigation

  • ← Previous Changeset
  • Next Changeset →

Changeset 2613

Show
Ignore:
Timestamp:
07/08/08 09:16:11 (3 months ago)
Author:
jmoore
Message:

OMERO3A__6 modification : Removed WellSampleImageLink from ScreenPlateWell

The WellSample is itself a link between Well and Image. We are
not making WellSample a link here, though we may consider that in
future versions.

Note: "Well.wellSample" was also changed to "wellSamples" to make more sense.

Location:
trunk
Files:
7 modified

  • components/model/resources/mappings/acquisition.ome.xml (modified) (2 diffs)
  • components/model/resources/mappings/screen.ome.xml (modified) (4 diffs)
  • components/model/test/ome/model/utests/ScreenPlateWellTest.java (modified) (1 diff)
  • components/server/test/ome/server/itests/spw/SpwTest.java (modified) (4 diffs)
  • sql/psql/OMERO3A__6/OMERO3A__5.sql (modified) (7 diffs)
  • sql/psql/OMERO3A__6/schema.sql (modified) (9 diffs)
  • sql/psql/OMERO3A__6/views.sql (modified) (2 diffs)

Legend:

Unmodified
Added
Removed
  • trunk/components/model/resources/mappings/acquisition.ome.xml

    r2311 r2613  
    2828 
    2929                        <zeromany name="pixels" type="ome.model.core.Pixels" inverse="image" ordered="true"/> 
     30                        <zeromany name="wellSamples" type="ome.model.screen.WellSample" inverse="image"/> 
    3031 
    3132                        <!-- Containers --> 
    … …  
    3435                        <parent name="datasetLinks" type="ome.model.containers.DatasetImageLink" 
    3536                                target="ome.model.containers.Dataset"/> 
    36                         <parent name="sampleLinks" type="ome.model.screen.WellSampleImageLink" 
    37                                 target="ome.model.screen.WellSample"/> 
    3837                </properties> 
    3938        </type> 
  • trunk/components/model/resources/mappings/screen.ome.xml

    r2590 r2613  
    6161      <optional name="externalIdentifier" type="string"/> 
    6262      <optional name="type" type="string"/> 
    63       <zeromany name="wellSample" type="ome.model.screen.WellSample" 
     63      <zeromany name="wellSamples" type="ome.model.screen.WellSample" 
    6464        inverse="well"/> 
    6565      <manyone name="plate" type="ome.model.screen.Plate" inverse="well"/> 
    … …  
    6767  </type> 
    6868 
     69  <!-- A WellSample is effectively a WellImageLink --> 
    6970  <type id="ome.model.screen.WellSample" annotated="true"> 
    7071    <properties> 
    … …  
    7273      <optional name="posY" type="float"/> 
    7374      <optional name="timepoint" type="int"/> 
    74       <child name="imageLinks" type="ome.model.screen.WellSampleImageLink" 
    75         target="ome.model.core.Image"/> 
    76       <manyone name="well" type="ome.model.screen.Well" inverse="wellSample"/> 
     75      <manyone name="well" type="ome.model.screen.Well" inverse="wellSamples"/> 
     76      <manyone name="image" type="ome.model.core.Image" inverse="wellSamples"/> 
    7777      <parent name="screenAcquisitionLinks" 
    7878        type="ome.model.screen.ScreenAcquisitionWellSampleLink" 
    … …  
    114114  </link> 
    115115 
    116   <link id="ome.model.screen.WellSampleImageLink"> 
    117     <properties> 
    118       <from_parent type="ome.model.screen.WellSample"/> 
    119       <to_child type="ome.model.core.Image"/> 
    120     </properties> 
    121   </link> 
    122  
    123116</types> 
  • trunk/components/model/test/ome/model/utests/ScreenPlateWellTest.java

    r2600 r2613  
    8282        well2_2.addWellSample(ws2_2b); 
    8383 
    84         ws1_1a.linkImage(i1_1a); 
    85         ws1_1b.linkImage(i1_1b); 
    86         ws1_2a.linkImage(i1_2a); 
    87         ws1_2b.linkImage(i1_2b); 
    88         ws2_1a.linkImage(i2_1a); 
    89         ws2_1b.linkImage(i2_1b); 
    90         ws2_2a.linkImage(i2_2a); 
    91         ws2_2b.linkImage(i2_2b); 
     84        i1_1a.addWellSample(ws1_1a); 
     85        i1_1b.addWellSample(ws1_1b); 
     86        i1_2a.addWellSample(ws1_2a); 
     87        i1_2b.addWellSample(ws1_2b); 
     88        i2_1a.addWellSample(ws2_1a); 
     89        i2_1b.addWellSample(ws2_1b); 
     90        i2_2a.addWellSample(ws2_2a); 
     91        i2_2b.addWellSample(ws2_2b); 
    9292 
    9393        screen.addScreenAcquisition(acq1); 
  • trunk/components/server/test/ome/server/itests/spw/SpwTest.java

    r2601 r2613  
    3434        Plate p = new Plate("p"); 
    3535        Well w = new Well(); 
     36        Image i = new Image("i"); 
    3637        Reagent r = new Reagent(); 
    3738        r.setName("r"); 
    3839        ScreenAcquisition sa = new ScreenAcquisition(s); 
    39         WellSample ws = new WellSample(w); 
     40        WellSample ws = new WellSample(); 
    4041        ws.linkScreenAcquisition(sa); 
    4142 
    … …  
    4647        r.linkWell(w); 
    4748 
    48         ws.linkImage(new Image("i")); 
    4949        w.addWellSample(ws); 
     50        i.addWellSample(ws); 
    5051        sa.linkWellSample(ws); 
    5152 
    … …  
    7374 
    7475        w = iQuery.findByQuery("select w from Well w " 
    75                 + "left outer join fetch w.wellSample " + "where w.id = :id", 
     76                + "left outer join fetch w.wellSamples " + "where w.id = :id", 
    7677                new Parameters().addId(w.getId())); 
    7778 
    … …  
    7980        sa = iUpdate.saveAndReturnObject(sa); 
    8081 
    81         WellSample ws = new WellSample(w); 
     82        i = new Image("i"); 
     83 
     84        WellSample ws = new WellSample(); 
    8285        ws.linkScreenAcquisition(sa); 
    83         ws.linkImage(new Image("i")); 
     86        i.addWellSample(ws); 
    8487        w.addWellSample(ws); 
    8588        ws = iUpdate.saveAndReturnObject(ws); 
  • trunk/sql/psql/OMERO3A__6/OMERO3A__5.sql

    r2601 r2613  
    4444    create sequence seq_wellsample; 
    4545    create sequence seq_wellsampleannotationlink; 
    46     create sequence seq_wellsampleimagelink; 
    4746 
    4847    drop view count_ScreenAcquisition_annotationLinks_by_owner; 
    … …  
    284283        owner_id int8 not null, 
    285284        update_id int8 not null, 
     285        image int8 not null, 
    286286        well int8 not null, 
    287287        primary key (id) 
    … …  
    289289 
    290290    create table wellsampleannotationlink ( 
    291         id int8 not null, 
    292         permissions int8 not null, 
    293         version int4, 
    294         child int8 not null, 
    295         creation_id int8 not null, 
    296         external_id int8 unique, 
    297         group_id int8 not null, 
    298         owner_id int8 not null, 
    299         update_id int8 not null, 
    300         parent int8 not null, 
    301         primary key (id) 
    302     ); 
    303  
    304     create table wellsampleimagelink ( 
    305291        id int8 not null, 
    306292        permissions int8 not null, 
    … …  
    766752        references externalinfo; 
    767753 
     754    alter table wellsample  
     755        add constraint FKwellsample_image_image  
     756        foreign key (image)  
     757        references image; 
     758 
    768759    alter table wellsampleannotationlink  
    769760        add constraint FKwellsampleannotationlink_child_annotation  
    … …  
    801792        references externalinfo; 
    802793 
    803     alter table wellsampleimagelink  
    804         add constraint FKwellsampleimagelink_child_image  
    805         foreign key (child)  
    806         references image; 
    807  
    808     alter table wellsampleimagelink  
    809         add constraint FKwellsampleimagelink_update_id_event  
    810         foreign key (update_id)  
    811         references event; 
    812  
    813     alter table wellsampleimagelink  
    814         add constraint FKwellsampleimagelink_owner_id_experimenter  
    815         foreign key (owner_id)  
    816         references experimenter; 
    817  
    818     alter table wellsampleimagelink  
    819         add constraint FKwellsampleimagelink_creation_id_event  
    820         foreign key (creation_id)  
    821         references event; 
    822  
    823     alter table wellsampleimagelink  
    824         add constraint FKwellsampleimagelink_parent_wellsample  
    825         foreign key (parent)  
    826         references wellsample; 
    827  
    828     alter table wellsampleimagelink  
    829         add constraint FKwellsampleimagelink_group_id_experimentergroup  
    830         foreign key (group_id)  
    831         references experimentergroup; 
    832  
    833     alter table wellsampleimagelink  
    834         add constraint FKwellsampleimagelink_external_id_externalinfo  
    835         foreign key (external_id)  
    836         references externalinfo; 
    837  
    838794  CREATE OR REPLACE VIEW count_Plate_screenLinks_by_owner (Plate_id, owner_id, count) AS select child, owner_id, count(*) 
    839795    FROM ScreenPlateLink GROUP BY child, owner_id ORDER BY child; 
    … …  
    854810    FROM ScreenAcquisitionWellSampleLink GROUP BY parent, owner_id ORDER BY parent; 
    855811 
    856   CREATE OR REPLACE VIEW count_WellSample_imageLinks_by_owner (WellSample_id, owner_id, count) AS select parent, owner_id, count(*) 
    857     FROM WellSampleImageLink GROUP BY parent, owner_id ORDER BY parent; 
    858  
    859812  CREATE OR REPLACE VIEW count_WellSample_screenAcquisitionLinks_by_owner (WellSample_id, owner_id, count) AS select child, owner_id, count(*) 
    860813    FROM ScreenAcquisitionWellSampleLink GROUP BY child, owner_id ORDER BY child; 
    … …  
    868821  CREATE OR REPLACE VIEW count_Well_annotationLinks_by_owner (Well_id, owner_id, count) AS select parent, owner_id, count(*) 
    869822    FROM WellAnnotationLink GROUP BY parent, owner_id ORDER BY parent; 
    870  
    871   CREATE OR REPLACE VIEW count_Image_sampleLinks_by_owner (Image_id, owner_id, count) AS select child, owner_id, count(*) 
    872     FROM WellSampleImageLink GROUP BY child, owner_id ORDER BY child; 
    873823 
    874824  CREATE OR REPLACE VIEW count_Reagent_wellLinks_by_owner (Reagent_id, owner_id, count) AS select child, owner_id, count(*) 
  • trunk/sql/psql/OMERO3A__6/schema.sql

    r2591 r2613  
    459459    ); 
    460460 
    461     create table count_Image_sampleLinks_by_owner ( 
    462         image_id int8 not null, 
    463         count int8 not null, 
    464         owner_id int8, 
    465         primary key (image_id, owner_id) 
    466     ); 
    467  
    468461    create table count_Job_originalFileLinks_by_owner ( 
    469462        job_id int8 not null, 
    … …  
    586579 
    587580    create table count_WellSample_annotationLinks_by_owner ( 
    588         wellsample_id int8 not null, 
    589         count int8 not null, 
    590         owner_id int8, 
    591         primary key (wellsample_id, owner_id) 
    592     ); 
    593  
    594     create table count_WellSample_imageLinks_by_owner ( 
    595581        wellsample_id int8 not null, 
    596582        count int8 not null, 
    … …  
    21122098        owner_id int8 not null, 
    21132099        update_id int8 not null, 
     2100        image int8 not null, 
    21142101        well int8 not null, 
    21152102        primary key (id) 
    … …  
    21172104 
    21182105    create table wellsampleannotationlink ( 
    2119         id int8 not null, 
    2120         permissions int8 not null, 
    2121         version int4, 
    2122         child int8 not null, 
    2123         creation_id int8 not null, 
    2124         external_id int8 unique, 
    2125         group_id int8 not null, 
    2126         owner_id int8 not null, 
    2127         update_id int8 not null, 
    2128         parent int8 not null, 
    2129         primary key (id) 
    2130     ); 
    2131  
    2132     create table wellsampleimagelink ( 
    21332106        id int8 not null, 
    21342107        permissions int8 not null, 
    … …  
    29092882        references image; 
    29102883 
    2911     alter table count_Image_sampleLinks_by_owner  
    2912         add constraint FK_count_to_Image_sampleLinks  
    2913         foreign key (image_id)  
    2914         references image; 
    2915  
    29162884    alter table count_Job_originalFileLinks_by_owner  
    29172885        add constraint FK_count_to_Job_originalFileLinks  
    … …  
    30042972        references wellsample; 
    30052973 
    3006     alter table count_WellSample_imageLinks_by_owner  
    3007         add constraint FK_count_to_WellSample_imageLinks  
    3008         foreign key (wellsample_id)  
    3009         references wellsample; 
    3010  
    30112974    alter table count_WellSample_screenAcquisitionLinks_by_owner  
    30122975        add constraint FK_count_to_WellSample_screenAcquisitionLinks  
    … …  
    59095872        references externalinfo; 
    59105873 
     5874    alter table wellsample  
     5875        add constraint FKwellsample_image_image  
     5876        foreign key (image)  
     5877        references image; 
     5878 
    59115879    alter table wellsampleannotationlink  
    59125880        add constraint FKwellsampleannotationlink_child_annotation  
    … …  
    59445912        references externalinfo; 
    59455913 
    5946     alter table wellsampleimagelink  
    5947         add constraint FKwellsampleimagelink_child_image  
    5948         foreign key (child)  
    5949         references image; 
    5950  
    5951     alter table wellsampleimagelink  
    5952         add constraint FKwellsampleimagelink_update_id_event  
    5953         foreign key (update_id)  
    5954         references event; 
    5955  
    5956     alter table wellsampleimagelink  
    5957         add constraint FKwellsampleimagelink_owner_id_experimenter  
    5958         foreign key (owner_id)  
    5959         references experimenter; 
    5960  
    5961     alter table wellsampleimagelink  
    5962         add constraint FKwellsampleimagelink_creation_id_event  
    5963         foreign key (creation_id)  
    5964         references event; 
    5965  
    5966     alter table wellsampleimagelink  
    5967         add constraint FKwellsampleimagelink_parent_wellsample  
    5968         foreign key (parent)  
    5969         references wellsample; 
    5970  
    5971     alter table wellsampleimagelink  
    5972         add constraint FKwellsampleimagelink_group_id_experimentergroup  
    5973         foreign key (group_id)  
    5974         references experimentergroup; 
    5975  
    5976     alter table wellsampleimagelink  
    5977         add constraint FKwellsampleimagelink_external_id_externalinfo  
    5978         foreign key (external_id)  
    5979         references externalinfo; 
    5980  
    59815914    create sequence seq_aberrationcorrection; 
    59825915 
    … …  
    62306163 
    62316164    create sequence seq_wellsampleannotationlink; 
    6232  
    6233     create sequence seq_wellsampleimagelink; 
  • trunk/sql/psql/OMERO3A__6/views.sql

    r2589 r2613  
    9090    FROM CategoryGroupCategoryLink GROUP BY parent, owner_id ORDER BY parent; 
    9191 
    92   DROP TABLE count_WellSample_imageLinks_by_owner; 
    93  
    94   CREATE OR REPLACE VIEW count_WellSample_imageLinks_by_owner (WellSample_id, owner_id, count) AS select parent, owner_id, count(*) 
    95     FROM WellSampleImageLink GROUP BY parent, owner_id ORDER BY parent; 
    96  
    9792  DROP TABLE count_WellSample_screenAcquisitionLinks_by_owner; 
    9893 
    … …  
    150145    FROM DatasetImageLink GROUP BY child, owner_id ORDER BY child; 
    151146 
    152   DROP TABLE count_Image_sampleLinks_by_owner; 
    153  
    154   CREATE OR REPLACE VIEW count_Image_sampleLinks_by_owner (Image_id, owner_id, count) AS select child, owner_id, count(*) 
    155     FROM WellSampleImageLink GROUP BY child, owner_id ORDER BY child; 
    156  
    157147  DROP TABLE count_Image_annotationLinks_by_owner; 
    158148 

Download in other formats:

  • Unified Diff
  • Zip Archive

Trac Powered

Powered by Trac 0.11
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/