• 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 Change
  • Next Change →

Changeset 106 for branches/omero

Show
Ignore:
Timestamp:
06/13/05 15:16:45 (4 years ago)
Author:
jmoore
Message:

* New and improved queries. Here's what we got to work on.
* DbUnit? up and working. A bit slow, but eh.
* Moving common dependencies to main project.xml
* Added a rough "block" diagram of dependencies

Location:
branches/omero
Files:
8 added
13 modified

  • components/client/project.xml (modified) (1 diff)
  • components/common/project.xml (modified) (1 diff)
  • components/server/.classpath (modified) (1 diff)
  • components/server/maven.xml (modified) (2 diffs)
  • components/server/project.properties (modified) (1 diff)
  • components/server/project.xml (modified) (3 diffs)
  • components/server/sql (added)
  • components/server/sql/constraints.sql (added)
  • components/server/sql/db-export.xml (added)
  • components/server/sql/tables.sql (added)
  • components/server/src/org/openmicroscopy/omero/logic/ContainerDaoHibernate.java (modified) (1 diff)
  • components/server/src/org/openmicroscopy/omero/logic/queries.hbm.xml (modified) (2 diffs)
  • components/server/test/WEB-INF (added)
  • components/server/test/WEB-INF/test (added)
  • components/server/test/org/openmicroscopy/omero/server/utests/HierarchyBrowsingDbUnitTest.java (added)
  • components/server/web/WEB-INF/config-test.xml (modified) (1 diff)
  • components/shoola-adapter/project.xml (modified) (1 diff)
  • components/test/project.xml (modified) (1 diff)
  • docs/block-diagram.svg (added)
  • maven.xml (modified) (1 diff)
  • project.xml (modified) (1 diff)

Legend:

Unmodified
Added
Removed
  • branches/omero/components/client/project.xml

    r103 r106  
    2424      <artifactId>spring-mock</artifactId> 
    2525      <version>1.2.1</version> 
    26     </dependency> 
    27     <dependency> 
    28       <groupId>commons-logging</groupId> 
    29       <artifactId>commons-logging</artifactId> 
    30       <version>1.0.4</version> 
    3126    </dependency> 
    3227    <dependency> 
  • branches/omero/components/common/project.xml

    r104 r106  
    3131    </dependency> 
    3232    <dependency> 
    33       <groupId>commons-lang</groupId> 
    34       <artifactId>commons-lang</artifactId> 
    35       <version>2.0</version> 
    36     </dependency> 
    37     <dependency> 
    38       <groupId>commons-logging</groupId> 
    39       <artifactId>commons-logging</artifactId> 
    40       <version>1.0.4</version> 
    41     </dependency> 
    42     <dependency> 
    4333      <groupId>postgresql</groupId> 
    4434      <artifactId>postgresql</artifactId> 
  • branches/omero/components/server/.classpath

    r105 r106  
    1111        <classpathentry kind="var" path="MAVEN_REPO/acegisecurity/jars/acegi-security-0.8.2.jar"/> 
    1212        <classpathentry kind="var" path="MAVEN_REPO/hessian/jars/hessian-2.1.12.jar"/> 
    13         <classpathentry kind="var" path="MAVEN_REPO/hibernate/jars/hibernate-3.0.5.jar"/> 
     13        <classpathentry sourcepath="HOME/lib/hibernate-3.0.5/src" kind="var" path="MAVEN_REPO/hibernate/jars/hibernate-3.0.5.jar"/> 
    1414        <classpathentry kind="var" path="MAVEN_REPO/omero/jars/jta-hibernate.jar"/> 
    1515        <classpathentry kind="var" path="MAVEN_REPO/omero/jars/asm-hibernate.jar"/> 
  • branches/omero/components/server/maven.xml

    r102 r106  
    2222 </goal> 
    2323 
    24  <goal name="db-load"> 
    25    <attainGoal name="dbunit"/> 
     24 <goal name="db-load" prereqs="dbunit"> 
    2625   <ant:property name="operation" value="CLEAN_INSERT"/> 
    27    <ant:property name="file" value="db-export.xml"/> 
    28    <ant:dbunit driver="${database.driver_class}" 
     26   <ant:property name="file" value="sql/db-export.xml"/> 
     27   <ant:dbunit driver="${database.driver}" 
    2928               supportBatchStatement="false" 
    30                url="${database.url}" 
     29               url="${database.url}-test" 
    3130               userid="${database.username}" 
    3231               password="${database.password}"> 
    … …  
    3635 </goal> 
    3736 
    38  <goal name="db-export"> 
    39    <attainGoal name="dbunit"/> 
     37 <goal name="db-export" prereqs="dbunit"> 
    4038   <ant:dbunit driver="${database.driver}" 
    4139            url="${database.url}" 
    4240            userid="${database.username}" 
    4341            password="${database.password}"> 
    44      <ant:export dest="db-export.xml" format="xml"/> 
     42     <ant:export dest="sql/db-export.xml" format="xml">  
     43<!--remove elements for all--> 
     44<!--       <ant:query name="images"  
     45                  sql="select * from images where image_id &lt; 
     4610"/>--> 
     47<!-- This list comes from the middlegen-build.xml file --> 
     48        <ant:query name="module_executions"  
     49sql="select * from module_executions where module_execution_id in 
     50${mex} ;"/> 
     51        <ant:query name="projects"  
     52sql="select * from projects where project_id in ${prj};"/> 
     53        <ant:query name="datasets"  
     54sql="select * from datasets where dataset_id in ${ds};"/> 
     55        <ant:query name="project_dataset_map" 
     56sql="select * from project_dataset_map where project_id in ${prj} or 
     57dataset_id in ${ds}"/> 
     58        <ant:query name="image_dataset_map" 
     59sql="select * from image_dataset_map where image_id in ${img} or 
     60dataset_id in ${ds}"/> 
     61        <ant:table name="image_dataset_map"/> 
     62        <ant:query name="images" 
     63sql="select * from images where image_id in ${img} ;"/> 
     64        <ant:table name="experimenters"/> 
     65        <ant:table name="experimenter_group_map"/> 
     66        <ant:table name="groups"/> 
     67        <ant:table name="classification"/> 
     68        <ant:table name="categories"/> 
     69        <ant:table name="category_groups"/> 
     70        <ant:table name="dataset_annotations"/> 
     71        <ant:table name="image_annotations"/> 
     72        <ant:query name="image_dimensions" 
     73sql="select * from image_dimensions where image_id in ${img} ;"/> 
     74        <ant:query name="image_pixels" 
     75sql="select * from image_pixels where image_id in ${img} ;"/> 
     76        <ant:table name="image_info"/> 
     77        <ant:table name="image_plates"/> 
     78        <ant:table name="thumbnails"/> 
     79        <ant:table name="repositories"/> 
     80        <ant:table name="display_roi"/> 
     81<!-- 
     82        <ant:table name="channel_components"/> 
     83        <ant:table name="features"/> 
     84        <ant:table name="display_options"/> 
     85--> 
     86     </ant:export> 
    4587   </ant:dbunit> 
    4688 </goal> 
  • branches/omero/components/server/project.properties

    r100 r106  
    2121#maven.jam.master.ignoreFailures=false 
    2222 
     23 
     24mex=(1192, 1431, 1485, 1490, 1491, 1496, 1498, 1612, 1613, 1617, 1711, 1712, 1713, 1971, 1985, 1988, 1996, 2004, 2005, 2006, 2027, 2029, 2030, 2033, 2044, 2050, 2257, 2258, 2259, 2302, 2567, 2583, 3217, 3316, 3322, 3323, 3338, 3623, 17696, 18055, 18056, 18057, 18058, 18059, 18060, 18061, 18062, 18063, 18162, 18249, 18250, 18251, 18252, 18253, 18581, 18582, 18596, 18605, 19070, 19071, 19072, 19073, 19382, 19383, 19844, 22060, 22061, 22062, 22063, 22064, 22065, 22066, 22067, 23205, 23206, 23207, 23209, 23210, 23212, 23217, 23218, 23220) 
     25prj=(63,64,59) 
     26ds=(115,120,124,125) 
     27img=(296, 313, 340, 357, 485, 558, 4391, 4446, 4507, 1, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 47, 51, 54, 56, 60, 73, 363, 369, 370, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 4373, 4374, 4375, 4376, 4377, 4378, 4379, 4380, 4381, 4382, 4383, 4384, 4385, 4386, 4387, 4388, 4389, 4390, 4409, 4415, 4431, 4434, 4446, 4447, 4458, 4459, 4462, 4463, 4470, 4479, 4485, 4486, 4487, 4489, 4490, 4492, 4493, 4494, 4495, 4496, 4497, 4498, 4499, 4500, 4503, 4505, 4506, 4507, 4508, 4509, 4510, 4511, 4512, 4516, 4517, 4518, 4521, 4522, 4523, 4524, 4526, 4527, 4528, 4529, 5210, 5212, 5213, 5214, 5218, 5219) 
  • branches/omero/components/server/project.xml

    r102 r106  
    179179    </dependency> 
    180180    <dependency> 
    181       <groupId>commons-lang</groupId> 
    182       <artifactId>commons-lang</artifactId> 
    183       <version>2.0</version> 
    184     </dependency> 
    185     <dependency> 
    186181      <groupId>commons-pool</groupId> 
    187182      <artifactId>commons-pool</artifactId> 
    … …  
    196191      <artifactId>commons-dbcp</artifactId> 
    197192      <version>1.2.1</version> 
    198       <type>jar</type> 
    199       <properties> 
    200         <war.bundle>true</war.bundle> 
    201       </properties> 
    202     </dependency> 
    203     <dependency> 
    204       <groupId>commons-logging</groupId> 
    205       <artifactId>commons-logging</artifactId> 
    206       <version>1.0.4</version> 
    207193      <type>jar</type> 
    208194      <properties> 
    … …  
    276262        </includes> 
    277263      </resource> 
     264      <resource> 
     265        <directory>test</directory> 
     266        <includes> 
     267          <include>**/*.xml</include> 
     268        </includes> 
     269      </resource> 
    278270    </resources> 
    279271  </build> 
  • branches/omero/components/server/src/org/openmicroscopy/omero/logic/ContainerDaoHibernate.java

    r104 r106  
    6868                        arg0.getPackage().getName().length() + 1); 
    6969 
    70                 Query q = session.getNamedQuery("loadHierarchy_by_" + klass); 
     70                Query q = session.getNamedQuery("loadHierarchy_by_" + klass);                    
    7171                q.setLong("id", arg1); 
    7272                return q.uniqueResult(); 
  • branches/omero/components/server/src/org/openmicroscopy/omero/logic/queries.hbm.xml

    r105 r106  
    33    "-//Hibernate/Hibernate Mapping DTD 3.0//EN" 
    44    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" > 
    5      
     5 
    66<hibernate-mapping> 
    77  <!-- load*Hierarchy  
    88        TODO if all ids where called *.getId() then we could merge these  
    99        --> 
    10          
     10<!--TODO  need to add default_pixel once FK from Ilya --> 
     11<!--TODO some way to DRY here would be great --> 
    1112  <query name="loadHierarchy_by_Project"><![CDATA[ 
    12     from Project as p join fetch p.experimenter  
    13           where p.projectId = :id 
     13    from Project as p 
     14          left outer join fetch p.experimenter as p_e 
     15          left outer join fetch p.group as p_g 
     16          left outer join fetch p.datasets as d 
     17          left outer join fetch d.experimenter as d_e 
     18          left outer join fetch d.group as d_g 
     19          left outer join fetch d.images as i 
     20          left outer join fetch i.group as i_g 
     21          left outer join fetch i.experimenter as i_e 
     22            where p.projectId = :id 
    1423  ]]></query> 
    1524 
    1625  <query name="loadHierarchy_by_Dataset"><![CDATA[ 
    17         from Dataset as d join fetch d.experimenter join fetch d.images as img 
    18           where d.datasetId = :id  
     26        from Dataset as d  
     27          left outer join fetch d.experimenter as d_e 
     28          left outer join fetch d.group as d_g 
     29          left outer join fetch d.images as i 
     30          left outer join fetch i.group as i_g 
     31          left outer join fetch i.experimenter as i_e 
     32            where d.datasetId = :id  
    1933  ]]></query> 
    2034 
    2135  <query name="loadHierarchy_by_CategoryGroup"><![CDATA[ 
    22   from CategoryGroup cg join fetch cg.moduleExecution as mex join fetch mex.experimenter as exp 
    23     where cg.attributeId = :id  
     36        from CategoryGroup cg  
     37          left outer join fetch cg.moduleExecution as cg_mex  
     38          left outer join fetch cg_mex.experimenter as cg_exp 
     39          left outer join fetch cg_mex.categories as c 
     40          left outer join fetch c.moduleExecution as c_mex 
     41          left outer join fetch c_mex.experimenter as c_exp 
     42          left outer join fetch c_mex.classifications as cla 
     43          left outer join fetch cla.moduleExecution as cla_mex 
     44          left outer join fetch cla_mex.experimenter as cla_exp 
     45          left outer join fetch cla.image as i 
     46        where cg.attributeId = :id  
    2447  ]]></query> 
    2548 
    2649  <query name="loadHierarchy_by_Category"><![CDATA[ 
    27   from Category c join fetch c.moduleExecution as mex join fetch mex.experimenter as exp 
    28     where c.attributeId = :id  
     50        from Category c  
     51          left outer join fetch c.moduleExecution as c_mex 
     52          left outer join fetch c_mex.experimenter as c_exp 
     53          left outer join fetch c_mex.classifications as cla 
     54          left outer join fetch cla.moduleExecution as cla_mex 
     55          left outer join fetch cla_mex.experimenter as cla_exp 
     56          left outer join fetch cla.image as i 
     57            where c.attributeId = :id  
    2958  ]]></query> 
    3059     
    … …  
    3261  <query name="findPDI"><![CDATA[ 
    3362        from Image as i  
    34           left outer join fetch i.datasets as ds  
    35           left outer join fetch ds.projects as prj  
    36           where i in (:img_list) 
     63          left outer join fetch i.datasets as d 
     64          left outer join fetch d.experimenter as d_exp 
     65          left outer join fetch d.group as d_g     
     66          left outer join fetch d.projects as p 
     67          left outer join fetch p.experimenter as p_exp 
     68          left outer join fetch p.group as p_g  
     69            where i in (:img_list) 
    3770  ]]></query>    
    38    
     71 
     72<!-- this is standard style temporarily using theta style  
    3973  <query name="findCGCI"><![CDATA[ 
    40         from Image as i join fetch i.classifications as cla  
    41           where i in (:img_list) 
    42             and cla.valid = true 
     74        from Image as i  
     75          left outer join fetch i.classifications as cla  
     76          left outer join fetch cla.category as c 
     77          left outer join fetch c.moduleExecution as c_mex 
     78          left outer join fetch c_mex.experimenter as c_exp 
     79          left outer join fetch c.categoryGroup as cg 
     80          left outer join fetch cg.moduleExecution as cg_mex 
     81          left outer join fetch cg_mex.experimenter as cg_exp 
     82            where i in (:img_list) 
     83              and cla.valid = true 
    4384  ]]></query>    
    44    
     85  --> 
     86  <query name="findCGCI"><![CDATA[ 
     87        from Image as i  
     88          left outer join fetch i.classifications as cla  
     89            where i in (:img_list) 
     90              and cla.valid = true 
     91  ]]></query>                      
     92                   
    4593  <!-- findAnnotations --> 
    4694  <query name="findImageAnn"><![CDATA[ 
    47   from ImageAnnotation as ann join fetch ann.image as i  
    48     where ann.image in (:img_list) 
    49           and ann.valid = true 
     95        from ImageAnnotation as ann  
     96          left outer join fetch ann.image as i  
     97          left outer join fetch ann.moduleExecution as ann_mex 
     98          left outer join fetch ann_mex.experimenter as ann_exp 
     99          where ann.image in (:img_list)  
     100            and ann.valid = true 
    50101  ]]></query> 
    51102 
    52103  <query name="findImageAnnWithID"><![CDATA[ 
    53   from ImageAnnotation as ann join fetch ann.image as i  
    54         where ann.image in (:img_list)  
    55           and ann.valid = true 
    56           and ann.moduleExecution.experimenter = :expId 
     104        from ImageAnnotation as ann  
     105          left outer join fetch ann.image as i  
     106          left outer join fetch ann.moduleExecution as ann_mex 
     107          left outer join fetch ann_mex.experimenter as ann_exp 
     108          where ann.image in (:img_list)  
     109            and ann.valid = true 
     110            and ann_exp = :expId 
    57111  ]]></query> 
    58112 
    59113  <query name="findDatasetAnn"><![CDATA[ 
    60   from DatasetAnnotation as ann join fetch ann.dataset as d  
    61     where ann.dataset in (:ds_list) 
    62           and ann.valid = true 
     114        from DatasetAnnotation as ann  
     115          left outer join fetch ann.dataset as d  
     116          left outer join fetch ann.moduleExecution as ann_mex 
     117          left outer join fetch ann_mex.experimenter as ann_exp 
     118      where ann.dataset in (:ds_list) 
     119            and ann.valid = true 
    63120  ]]></query> 
    64121   
    65122  <query name="findDatasetAnnWithID"><![CDATA[ 
    66   from DatasetAnnotation as ann join fetch ann.dataset as d  
    67     where ann.dataset in (:ds_list)  
    68           and ann.valid = true 
    69           and ann.moduleExecution.experimenter = :expId 
     123        from DatasetAnnotation as ann  
     124          left outer join fetch ann.dataset as d  
     125          left outer join fetch ann.moduleExecution as ann_mex 
     126          left outer join fetch ann_mex.experimenter as ann_exp 
     127      where d in (:ds_list)  
     128            and ann.valid = true 
     129            and ann_exp = :expId 
    70130  ]]></query> 
    71131   
    72   <!--   
    73         from A a left join fetch a.bs 
    74 from C c left join fetch c.ds where c.id in (:cids) 
    75 from D d left join fetch d.es where d.id in (:dids) 
    76  
    77 Or maybe: 
    78  
    79 from A a 
    80 left join fetch a.bs 
    81 where a.xyz = 'foo' 
    82  
    83 from A a 
    84 left join a.bs b 
    85 left join b.c c 
    86 left join fetch c.ds 
    87 where a.xyz = 'foo' 
    88  
    89 from A a 
    90 left join a.bs b 
    91 left join b.c c 
    92 left join c.ds d 
    93 left join fetch d.es 
    94 where a.xyz = 'foo'  
    95  
    96 from Image i left join fetch i.datasets 
    97 from Image i left join i.datsets as d left join fetch d.projects 
    98  
    99         --> 
    100          
    101    
    102    
    103132</hibernate-mapping> 
  • branches/omero/components/server/web/WEB-INF/config-test.xml

    r104 r106  
    5555        <!-- Add this config file to the getConfigLocations() of your tests 
    5656                if you want data and interfaces injected --> 
     57<!-- TODO this needs to be somewhere else 
    5758        <bean id="data" class="org.openmicroscopy.omero.tests.OMEPerformanceData" init-method="init"> 
    5859                <property name="dataSource" ref="dataSource"/> 
    5960        </bean> 
     61        --> 
    6062 
    6163</beans> 
  • branches/omero/components/shoola-adapter/project.xml

    r103 r106  
    3030      <version>2.4.0</version> 
    3131    </dependency> 
    32     <dependency> 
    33       <groupId>commons-logging</groupId> 
    34       <artifactId>commons-logging</artifactId> 
    35       <version>1.0.4</version> 
    36     </dependency> 
    37     <dependency> 
    38       <groupId>commons-lang</groupId> 
    39       <artifactId>commons-lang</artifactId> 
    40       <version>2.0</version> 
    41     </dependency> 
    4232 
    4333  </dependencies> 
  • branches/omero/components/test/project.xml

    r105 r106  
    3434      <artifactId>spring-mock</artifactId> 
    3535      <version>1.2.1</version> 
    36     </dependency> 
    37     <dependency> 
    38       <groupId>commons-logging</groupId> 
    39       <artifactId>commons-logging</artifactId>  
    40       <version>1.0.4</version> 
    41     </dependency> 
    42     <dependency> 
    43       <groupId>commons-lang</groupId> 
    44       <artifactId>commons-lang</artifactId> 
    45       <version>2.0</version> 
    4636    </dependency> 
    4737    <dependency> 
  • branches/omero/maven.xml

    r102 r106  
    4343      <ant:mkdir dir="${maven.build.dest}"/> 
    4444      <ant:propertyfile  
    45         comment=" Database and Server properties generated from build 
    46 properties TODO remove from svn"  
    47                         file="${basedir}/src/spring.properties"> 
     45        comment=" DO NOT EDIT: Generated Database and Server properties from build.properties" 
     46        file="${basedir}/src/spring.properties"> 
    4847         <ant:entry key="database.driver" value="${database.driver}"/> 
    4948         <ant:entry key="database.url" value="${database.url}"/> 
  • branches/omero/project.xml

    r98 r106  
    4242      <type>plugin</type> 
    4343    </depdendency> 
     44    <depdendency> 
     45      <groupId>maven-plugins</groupId> 
     46      <artifactId>maven-dbunit-plugin</artifactId> 
     47      <version>1.5</version> 
     48      <type>plugin</type> 
     49    </depdendency> 
     50    <dependency> 
     51      <groupId>commons-lang</groupId> 
     52      <artifactId>commons-lang</artifactId> 
     53      <version>2.0</version> 
     54      <properties> 
     55        <war.bundle>true</war.bundle> 
     56      </properties> 
     57    </dependency> 
     58    <dependency> 
     59      <groupId>commons-logging</groupId> 
     60      <artifactId>commons-logging</artifactId> 
     61      <version>1.0.4</version> 
     62      <properties> 
     63        <war.bundle>true</war.bundle> 
     64      </properties> 
     65    </dependency> 
    4466  </dependencies> 
    4567  <reports> 

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/