Class SearchParameters

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int ALL_GROUPS_ID
      The ID for searching across all groups
      static java.util.Set<SearchScope> ALL_SCOPE  
      static java.util.List<java.lang.Class<? extends DataObject>> ALL_TYPES  
      static int DATE_ACQUISITION
      Indicates that the date has to be interpreted as acquisition date
      static int DATE_IMPORT
      Indicates that the date has to be interpreted as import date
    • Constructor Summary

      Constructors 
      Constructor Description
      SearchParameters​(java.util.Set<SearchScope> scope, java.util.List<java.lang.Class<? extends DataObject>> types, java.lang.String query)
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getDateType()  
      java.sql.Timestamp getEnd()
      Returns the upper bound of the time interval.
      long getGroupId()  
      java.lang.String getQuery()
      Returns the query terms to search for
      java.util.Set<SearchScope> getScope()
      Returns the scope of the search.
      java.sql.Timestamp getStart()
      Returns the lower bound of the time interval.
      java.util.List<java.lang.Class<? extends DataObject>> getTypes()
      Returns the types to search on.
      long getUserId()  
      boolean hasTextToSearch()
      Returns true if text to search for, false otherwise.
      boolean isValid()
      Returns true if the context of the search is valid i.e.
      void setDateType​(int dateType)  
      void setGroupId​(long groupId)  
      void setTimeInterval​(java.sql.Timestamp start, java.sql.Timestamp end, int type)
      Sets the time interval.
      void setUserId​(long userId)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ALL_GROUPS_ID

        public static final int ALL_GROUPS_ID
        The ID for searching across all groups
        See Also:
        Constant Field Values
      • DATE_IMPORT

        public static final int DATE_IMPORT
        Indicates that the date has to be interpreted as import date
        See Also:
        Constant Field Values
      • DATE_ACQUISITION

        public static final int DATE_ACQUISITION
        Indicates that the date has to be interpreted as acquisition date
        See Also:
        Constant Field Values
      • ALL_SCOPE

        public static final java.util.Set<SearchScope> ALL_SCOPE
      • ALL_TYPES

        public static final java.util.List<java.lang.Class<? extends DataObject>> ALL_TYPES
    • Constructor Detail

      • SearchParameters

        public SearchParameters​(java.util.Set<SearchScope> scope,
                                java.util.List<java.lang.Class<? extends DataObject>> types,
                                java.lang.String query)
        Creates a new instance.
        Parameters:
        scope - Scope of the search
        types - The types to search on, i.e. project, dataset, image.
        query - The terms to search for.
    • Method Detail

      • setTimeInterval

        public void setTimeInterval​(java.sql.Timestamp start,
                                    java.sql.Timestamp end,
                                    int type)
        Sets the time interval.
        Parameters:
        start - The lower bound of the time interval.
        end - The upper bound of the time interval.
        type - The type of date.
      • getStart

        public java.sql.Timestamp getStart()
        Returns the lower bound of the time interval.
        Returns:
        See above.
      • getEnd

        public java.sql.Timestamp getEnd()
        Returns the upper bound of the time interval.
        Returns:
        See above.
      • getScope

        public java.util.Set<SearchScope> getScope()
        Returns the scope of the search.
        Returns:
        See above.
      • getTypes

        public java.util.List<java.lang.Class<? extends DataObject>> getTypes()
        Returns the types to search on.
        Returns:
        See above.
      • getQuery

        public java.lang.String getQuery()
        Returns the query terms to search for
        Returns:
        See above.
      • isValid

        public boolean isValid()
        Returns true if the context of the search is valid i.e. parameters correctly set, false otherwise.
        Returns:
        See above.
      • hasTextToSearch

        public boolean hasTextToSearch()
        Returns true if text to search for, false otherwise.
        Returns:
        See above.
      • getUserId

        public long getUserId()
      • setUserId

        public void setUserId​(long userId)
      • getDateType

        public int getDateType()
      • setDateType

        public void setDateType​(int dateType)
      • getGroupId

        public long getGroupId()
      • setGroupId

        public void setGroupId​(long groupId)