Changeset 2401
- Timestamp:
- 05/23/08 11:20:13 (7 months ago)
- Location:
- trunk/components
- Files:
-
- 7 modified
-
blitz/resources/omero/API.ice (modified) (1 diff)
-
common/src/ome/api/Search.java (modified) (4 diffs)
-
server/src/ome/services/SearchBean.java (modified) (3 diffs)
-
server/src/ome/services/search/Complement.java (modified) (1 diff)
-
server/src/ome/services/search/Intersection.java (modified) (1 diff)
-
server/src/ome/services/search/Union.java (modified) (1 diff)
-
server/test/ome/server/itests/search/SearchTest.java (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/components/blitz/resources/omero/API.ice
r2387 r2401 478 478 void clearQueries() throws ServerError; 479 479 480 void union() throws ServerError;481 void intersection() throws ServerError;482 void complement() throws ServerError;480 void and() throws ServerError; 481 void or() throws ServerError; 482 void not() throws ServerError; 483 483 484 484 -
trunk/components/common/src/ome/api/Search.java
r2387 r2401 458 458 /** 459 459 * Delegates to {@link IQuery#findAllByQuery(String, Parameters)} method to 460 * take advantage of the {@link # intersection()}, {@link #union()}, and461 * {@link # complement()} methods, or queue-semantics.460 * take advantage of the {@link #and()}, {@link #or()}, and 461 * {@link #not()} methods, or queue-semantics. 462 462 * 463 463 * @param query … … 506 506 * will return both Images and Datasets together. 507 507 * 508 * Calling this method overrides a previous setting of 509 * {@link # intersection()} or {@link #complement()}. If there is no active510 * queries (i.e. {@link #activeQueries()} > 0), then an511 * {@link ApiUsageException} will bethrown.512 */ 513 void union();508 * Calling this method overrides a previous setting of {@link #and()} or 509 * {@link #not()}. If there is no active queries (i.e. 510 * {@link #activeQueries()} > 0), then an {@link ApiUsageException} will be 511 * thrown. 512 */ 513 void or(); 514 514 515 515 /** … … 530 530 * 531 531 * <p> 532 * Calling this method overrides a previous setting of {@link # union()} or533 * {@link # complement()}. If there is no active queries (i.e.532 * Calling this method overrides a previous setting of {@link #or()} or 533 * {@link #not()}. If there is no active queries (i.e. 534 534 * {@link #activeQueries()} > 0), then an {@link ApiUsageException} will be 535 535 * thrown. 536 536 * </p> 537 537 */ 538 void intersection();538 void and(); 539 539 540 540 /** … … 554 554 * will return all the Images <em>not</em> annotated with TagAnnotation. 555 555 * <p> 556 * Calling this method overrides a previous setting of {@link # union()} or557 * {@link # intersection()}. If there is no active queries (i.e.556 * Calling this method overrides a previous setting of {@link #or()} or 557 * {@link #and()}. If there is no active queries (i.e. 558 558 * {@link #activeQueries()} > 0), then an {@link ApiUsageException} will be 559 559 * thrown. 560 560 * </p> 561 561 */ 562 void complement();562 void not(); 563 563 564 564 /** -
trunk/components/server/src/ome/services/SearchBean.java
r2387 r2401 219 219 @Transactional 220 220 @RolesAllowed("user") 221 public void union() {221 public void or() { 222 222 actions.union(); 223 223 } … … 225 225 @Transactional 226 226 @RolesAllowed("user") 227 public void intersection() {227 public void and() { 228 228 actions.intersection(); 229 229 } … … 231 231 @Transactional 232 232 @RolesAllowed("user") 233 public void complement() {233 public void not() { 234 234 actions.complement(); 235 235 } -
trunk/components/server/src/ome/services/search/Complement.java
r2387 r2401 27 27 * @author Josh Moore, josh at glencoesoftware.com 28 28 * @since 3.0-Beta3 29 * @see ome.api.Search# intersection()29 * @see ome.api.Search#and() 30 30 */ 31 31 public class Complement extends SearchAction { -
trunk/components/server/src/ome/services/search/Intersection.java
r2387 r2401 27 27 * @author Josh Moore, josh at glencoesoftware.com 28 28 * @since 3.0-Beta3 29 * @see ome.api.Search# intersection()29 * @see ome.api.Search#and() 30 30 */ 31 31 public class Intersection extends SearchAction { -
trunk/components/server/src/ome/services/search/Union.java
r2387 r2401 27 27 * @author Josh Moore, josh at glencoesoftware.com 28 28 * @since 3.0-Beta3 29 * @see ome.api.Search# union()29 * @see ome.api.Search#or() 30 30 */ 31 31 public class Union extends SearchAction { -
trunk/components/server/test/ome/server/itests/search/SearchTest.java
r2387 r2401 537 537 // A + B 538 538 search.byFullText(uuid1); 539 search. union();539 search.or(); 540 540 search.byFullText(uuid2); 541 541 assertResults(search, 2); … … 543 543 // A & B 544 544 search.byFullText(uuid1); 545 search. intersection();545 search.and(); 546 546 search.byFullText(uuid2); 547 547 assertResults(search, 0); … … 549 549 // A - B 550 550 search.byFullText(uuid1); 551 search. complement();551 search.not(); 552 552 search.byFullText(uuid2); 553 553 assertResults(search, 1); … … 555 555 // A + B - B = A 556 556 search.byFullText(uuid1); 557 search. union();557 search.or(); 558 558 search.byFullText(uuid2); 559 search. complement();559 search.not(); 560 560 search.byFullText(uuid2); 561 561 assertResults(search, 1); … … 564 564 search.onlyType(Event.class); 565 565 search.byFullText("root"); 566 search. intersection();566 search.and(); 567 567 search.byHqlQuery("select e from Event e where e.id = 0", null); 568 568 assertResults(search, 1); … … 1867 1867 1868 1868 /** 1869 * Attempts to solve #975 by using the {@link Search# union()} method.1869 * Attempts to solve #975 by using the {@link Search#or()} method. 1870 1870 */ 1871 1871 @Test(groups = "ticket:975") … … 1894 1894 // checking via intersection 1895 1895 search.bySomeMustNone(q, null, null); 1896 search. intersection();1896 search.and(); 1897 1897 search.byAnnotatedWith(new TagAnnotation()); 1898 1898 … … 1902 1902 1903 1903 /** 1904 * Attempts to solve #975 by using the {@link Search# union()} method.1904 * Attempts to solve #975 by using the {@link Search#or()} method. 1905 1905 */ 1906 1906 @Test(groups = "ticket:975") … … 1931 1931 // checking via intersection 1932 1932 search.bySomeMustNone(q, null, null); 1933 search. intersection();1933 search.and(); 1934 1934 search.byAnnotatedWith(new TagAnnotation(), new FileAnnotation()); 1935 1935 … … 1969 1969 search.onlyType(Image.class); 1970 1970 search.bySomeMustNone(new String[] { "an*" }, null, null); 1971 search. intersection();1971 search.and(); 1972 1972 search.byAnnotatedWith(new TagAnnotation()); 1973 1973
