• 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 2401

Show
Ignore:
Timestamp:
05/23/08 11:20:13 (7 months ago)
Author:
jmoore
Message:

ticket:975 Renamed boolean methods to and(),or(),not() from r2387

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  
    478478        void clearQueries() throws ServerError; 
    479479 
    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; 
    483483 
    484484 
  • trunk/components/common/src/ome/api/Search.java

    r2387 r2401  
    458458    /** 
    459459     * Delegates to {@link IQuery#findAllByQuery(String, Parameters)} method to 
    460      * take advantage of the {@link #intersection()}, {@link #union()}, and 
    461      * {@link #complement()} methods, or queue-semantics. 
     460     * take advantage of the {@link #and()}, {@link #or()}, and 
     461     * {@link #not()} methods, or queue-semantics. 
    462462     *  
    463463     * @param query 
    … …  
    506506     * will return both Images and Datasets together. 
    507507     *  
    508      * Calling this method overrides a previous setting of 
    509      * {@link #intersection()} or {@link #complement()}. If there is no active 
    510      * queries (i.e. {@link #activeQueries()} > 0), then an 
    511      * {@link ApiUsageException} will be thrown. 
    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(); 
    514514 
    515515    /** 
    … …  
    530530     *  
    531531     * <p> 
    532      * Calling this method overrides a previous setting of {@link #union()} or 
    533      * {@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. 
    534534     * {@link #activeQueries()} > 0), then an {@link ApiUsageException} will be 
    535535     * thrown. 
    536536     * </p> 
    537537     */ 
    538     void intersection(); 
     538    void and(); 
    539539 
    540540    /** 
    … …  
    554554     * will return all the Images <em>not</em> annotated with TagAnnotation. 
    555555     * <p> 
    556      * Calling this method overrides a previous setting of {@link #union()} or 
    557      * {@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. 
    558558     * {@link #activeQueries()} > 0), then an {@link ApiUsageException} will be 
    559559     * thrown. 
    560560     * </p> 
    561561     */ 
    562     void complement(); 
     562    void not(); 
    563563 
    564564    /** 
  • trunk/components/server/src/ome/services/SearchBean.java

    r2387 r2401  
    219219    @Transactional 
    220220    @RolesAllowed("user") 
    221     public void union() { 
     221    public void or() { 
    222222        actions.union(); 
    223223    } 
    … …  
    225225    @Transactional 
    226226    @RolesAllowed("user") 
    227     public void intersection() { 
     227    public void and() { 
    228228        actions.intersection(); 
    229229    } 
    … …  
    231231    @Transactional 
    232232    @RolesAllowed("user") 
    233     public void complement() { 
     233    public void not() { 
    234234        actions.complement(); 
    235235    } 
  • trunk/components/server/src/ome/services/search/Complement.java

    r2387 r2401  
    2727 * @author Josh Moore, josh at glencoesoftware.com 
    2828 * @since 3.0-Beta3 
    29  * @see ome.api.Search#intersection() 
     29 * @see ome.api.Search#and() 
    3030 */ 
    3131public class Complement extends SearchAction { 
  • trunk/components/server/src/ome/services/search/Intersection.java

    r2387 r2401  
    2727 * @author Josh Moore, josh at glencoesoftware.com 
    2828 * @since 3.0-Beta3 
    29  * @see ome.api.Search#intersection() 
     29 * @see ome.api.Search#and() 
    3030 */ 
    3131public class Intersection extends SearchAction { 
  • trunk/components/server/src/ome/services/search/Union.java

    r2387 r2401  
    2727 * @author Josh Moore, josh at glencoesoftware.com 
    2828 * @since 3.0-Beta3 
    29  * @see ome.api.Search#union() 
     29 * @see ome.api.Search#or() 
    3030 */ 
    3131public class Union extends SearchAction { 
  • trunk/components/server/test/ome/server/itests/search/SearchTest.java

    r2387 r2401  
    537537        // A + B 
    538538        search.byFullText(uuid1); 
    539         search.union(); 
     539        search.or(); 
    540540        search.byFullText(uuid2); 
    541541        assertResults(search, 2); 
    … …  
    543543        // A & B 
    544544        search.byFullText(uuid1); 
    545         search.intersection(); 
     545        search.and(); 
    546546        search.byFullText(uuid2); 
    547547        assertResults(search, 0); 
    … …  
    549549        // A - B 
    550550        search.byFullText(uuid1); 
    551         search.complement(); 
     551        search.not(); 
    552552        search.byFullText(uuid2); 
    553553        assertResults(search, 1); 
    … …  
    555555        // A + B - B = A 
    556556        search.byFullText(uuid1); 
    557         search.union(); 
     557        search.or(); 
    558558        search.byFullText(uuid2); 
    559         search.complement(); 
     559        search.not(); 
    560560        search.byFullText(uuid2); 
    561561        assertResults(search, 1); 
    … …  
    564564        search.onlyType(Event.class); 
    565565        search.byFullText("root"); 
    566         search.intersection(); 
     566        search.and(); 
    567567        search.byHqlQuery("select e from Event e where e.id = 0", null); 
    568568        assertResults(search, 1); 
    … …  
    18671867 
    18681868    /** 
    1869      * Attempts to solve #975 by using the {@link Search#union()} method. 
     1869     * Attempts to solve #975 by using the {@link Search#or()} method. 
    18701870     */ 
    18711871    @Test(groups = "ticket:975") 
    … …  
    18941894        // checking via intersection 
    18951895        search.bySomeMustNone(q, null, null); 
    1896         search.intersection(); 
     1896        search.and(); 
    18971897        search.byAnnotatedWith(new TagAnnotation()); 
    18981898 
    … …  
    19021902 
    19031903    /** 
    1904      * Attempts to solve #975 by using the {@link Search#union()} method. 
     1904     * Attempts to solve #975 by using the {@link Search#or()} method. 
    19051905     */ 
    19061906    @Test(groups = "ticket:975") 
    … …  
    19311931        // checking via intersection 
    19321932        search.bySomeMustNone(q, null, null); 
    1933         search.intersection(); 
     1933        search.and(); 
    19341934        search.byAnnotatedWith(new TagAnnotation(), new FileAnnotation()); 
    19351935 
    … …  
    19691969        search.onlyType(Image.class); 
    19701970        search.bySomeMustNone(new String[] { "an*" }, null, null); 
    1971         search.intersection(); 
     1971        search.and(); 
    19721972        search.byAnnotatedWith(new TagAnnotation()); 
    19731973 

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/