Changeset 2613
- Timestamp:
- 07/08/08 09:16:11 (3 months ago)
- 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 28 28 29 29 <zeromany name="pixels" type="ome.model.core.Pixels" inverse="image" ordered="true"/> 30 <zeromany name="wellSamples" type="ome.model.screen.WellSample" inverse="image"/> 30 31 31 32 <!-- Containers --> … … 34 35 <parent name="datasetLinks" type="ome.model.containers.DatasetImageLink" 35 36 target="ome.model.containers.Dataset"/> 36 <parent name="sampleLinks" type="ome.model.screen.WellSampleImageLink"37 target="ome.model.screen.WellSample"/>38 37 </properties> 39 38 </type> -
trunk/components/model/resources/mappings/screen.ome.xml
r2590 r2613 61 61 <optional name="externalIdentifier" type="string"/> 62 62 <optional name="type" type="string"/> 63 <zeromany name="wellSample " type="ome.model.screen.WellSample"63 <zeromany name="wellSamples" type="ome.model.screen.WellSample" 64 64 inverse="well"/> 65 65 <manyone name="plate" type="ome.model.screen.Plate" inverse="well"/> … … 67 67 </type> 68 68 69 <!-- A WellSample is effectively a WellImageLink --> 69 70 <type id="ome.model.screen.WellSample" annotated="true"> 70 71 <properties> … … 72 73 <optional name="posY" type="float"/> 73 74 <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"/> 77 77 <parent name="screenAcquisitionLinks" 78 78 type="ome.model.screen.ScreenAcquisitionWellSampleLink" … … 114 114 </link> 115 115 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 123 116 </types> -
trunk/components/model/test/ome/model/utests/ScreenPlateWellTest.java
r2600 r2613 82 82 well2_2.addWellSample(ws2_2b); 83 83 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); 92 92 93 93 screen.addScreenAcquisition(acq1); -
trunk/components/server/test/ome/server/itests/spw/SpwTest.java
r2601 r2613 34 34 Plate p = new Plate("p"); 35 35 Well w = new Well(); 36 Image i = new Image("i"); 36 37 Reagent r = new Reagent(); 37 38 r.setName("r"); 38 39 ScreenAcquisition sa = new ScreenAcquisition(s); 39 WellSample ws = new WellSample( w);40 WellSample ws = new WellSample(); 40 41 ws.linkScreenAcquisition(sa); 41 42 … … 46 47 r.linkWell(w); 47 48 48 ws.linkImage(new Image("i"));49 49 w.addWellSample(ws); 50 i.addWellSample(ws); 50 51 sa.linkWellSample(ws); 51 52 … … 73 74 74 75 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", 76 77 new Parameters().addId(w.getId())); 77 78 … … 79 80 sa = iUpdate.saveAndReturnObject(sa); 80 81 81 WellSample ws = new WellSample(w); 82 i = new Image("i"); 83 84 WellSample ws = new WellSample(); 82 85 ws.linkScreenAcquisition(sa); 83 ws.linkImage(new Image("i"));86 i.addWellSample(ws); 84 87 w.addWellSample(ws); 85 88 ws = iUpdate.saveAndReturnObject(ws); -
trunk/sql/psql/OMERO3A__6/OMERO3A__5.sql
r2601 r2613 44 44 create sequence seq_wellsample; 45 45 create sequence seq_wellsampleannotationlink; 46 create sequence seq_wellsampleimagelink;47 46 48 47 drop view count_ScreenAcquisition_annotationLinks_by_owner; … … 284 283 owner_id int8 not null, 285 284 update_id int8 not null, 285 image int8 not null, 286 286 well int8 not null, 287 287 primary key (id) … … 289 289 290 290 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 (305 291 id int8 not null, 306 292 permissions int8 not null, … … 766 752 references externalinfo; 767 753 754 alter table wellsample 755 add constraint FKwellsample_image_image 756 foreign key (image) 757 references image; 758 768 759 alter table wellsampleannotationlink 769 760 add constraint FKwellsampleannotationlink_child_annotation … … 801 792 references externalinfo; 802 793 803 alter table wellsampleimagelink804 add constraint FKwellsampleimagelink_child_image805 foreign key (child)806 references image;807 808 alter table wellsampleimagelink809 add constraint FKwellsampleimagelink_update_id_event810 foreign key (update_id)811 references event;812 813 alter table wellsampleimagelink814 add constraint FKwellsampleimagelink_owner_id_experimenter815 foreign key (owner_id)816 references experimenter;817 818 alter table wellsampleimagelink819 add constraint FKwellsampleimagelink_creation_id_event820 foreign key (creation_id)821 references event;822 823 alter table wellsampleimagelink824 add constraint FKwellsampleimagelink_parent_wellsample825 foreign key (parent)826 references wellsample;827 828 alter table wellsampleimagelink829 add constraint FKwellsampleimagelink_group_id_experimentergroup830 foreign key (group_id)831 references experimentergroup;832 833 alter table wellsampleimagelink834 add constraint FKwellsampleimagelink_external_id_externalinfo835 foreign key (external_id)836 references externalinfo;837 838 794 CREATE OR REPLACE VIEW count_Plate_screenLinks_by_owner (Plate_id, owner_id, count) AS select child, owner_id, count(*) 839 795 FROM ScreenPlateLink GROUP BY child, owner_id ORDER BY child; … … 854 810 FROM ScreenAcquisitionWellSampleLink GROUP BY parent, owner_id ORDER BY parent; 855 811 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 859 812 CREATE OR REPLACE VIEW count_WellSample_screenAcquisitionLinks_by_owner (WellSample_id, owner_id, count) AS select child, owner_id, count(*) 860 813 FROM ScreenAcquisitionWellSampleLink GROUP BY child, owner_id ORDER BY child; … … 868 821 CREATE OR REPLACE VIEW count_Well_annotationLinks_by_owner (Well_id, owner_id, count) AS select parent, owner_id, count(*) 869 822 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;873 823 874 824 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 459 459 ); 460 460 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 468 461 create table count_Job_originalFileLinks_by_owner ( 469 462 job_id int8 not null, … … 586 579 587 580 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 (595 581 wellsample_id int8 not null, 596 582 count int8 not null, … … 2112 2098 owner_id int8 not null, 2113 2099 update_id int8 not null, 2100 image int8 not null, 2114 2101 well int8 not null, 2115 2102 primary key (id) … … 2117 2104 2118 2105 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 (2133 2106 id int8 not null, 2134 2107 permissions int8 not null, … … 2909 2882 references image; 2910 2883 2911 alter table count_Image_sampleLinks_by_owner2912 add constraint FK_count_to_Image_sampleLinks2913 foreign key (image_id)2914 references image;2915 2916 2884 alter table count_Job_originalFileLinks_by_owner 2917 2885 add constraint FK_count_to_Job_originalFileLinks … … 3004 2972 references wellsample; 3005 2973 3006 alter table count_WellSample_imageLinks_by_owner3007 add constraint FK_count_to_WellSample_imageLinks3008 foreign key (wellsample_id)3009 references wellsample;3010 3011 2974 alter table count_WellSample_screenAcquisitionLinks_by_owner 3012 2975 add constraint FK_count_to_WellSample_screenAcquisitionLinks … … 5909 5872 references externalinfo; 5910 5873 5874 alter table wellsample 5875 add constraint FKwellsample_image_image 5876 foreign key (image) 5877 references image; 5878 5911 5879 alter table wellsampleannotationlink 5912 5880 add constraint FKwellsampleannotationlink_child_annotation … … 5944 5912 references externalinfo; 5945 5913 5946 alter table wellsampleimagelink5947 add constraint FKwellsampleimagelink_child_image5948 foreign key (child)5949 references image;5950 5951 alter table wellsampleimagelink5952 add constraint FKwellsampleimagelink_update_id_event5953 foreign key (update_id)5954 references event;5955 5956 alter table wellsampleimagelink5957 add constraint FKwellsampleimagelink_owner_id_experimenter5958 foreign key (owner_id)5959 references experimenter;5960 5961 alter table wellsampleimagelink5962 add constraint FKwellsampleimagelink_creation_id_event5963 foreign key (creation_id)5964 references event;5965 5966 alter table wellsampleimagelink5967 add constraint FKwellsampleimagelink_parent_wellsample5968 foreign key (parent)5969 references wellsample;5970 5971 alter table wellsampleimagelink5972 add constraint FKwellsampleimagelink_group_id_experimentergroup5973 foreign key (group_id)5974 references experimentergroup;5975 5976 alter table wellsampleimagelink5977 add constraint FKwellsampleimagelink_external_id_externalinfo5978 foreign key (external_id)5979 references externalinfo;5980 5981 5914 create sequence seq_aberrationcorrection; 5982 5915 … … 6230 6163 6231 6164 create sequence seq_wellsampleannotationlink; 6232 6233 create sequence seq_wellsampleimagelink; -
trunk/sql/psql/OMERO3A__6/views.sql
r2589 r2613 90 90 FROM CategoryGroupCategoryLink GROUP BY parent, owner_id ORDER BY parent; 91 91 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 97 92 DROP TABLE count_WellSample_screenAcquisitionLinks_by_owner; 98 93 … … 150 145 FROM DatasetImageLink GROUP BY child, owner_id ORDER BY child; 151 146 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 157 147 DROP TABLE count_Image_annotationLinks_by_owner; 158 148
