Package omero.gateway.model
Class SearchParameters
- java.lang.Object
-
- omero.gateway.model.SearchParameters
-
public class SearchParameters extends java.lang.ObjectHolds all parameters needed to perform a search operation; SeeSearchFacility.search(omero.gateway.SecurityContext, SearchParameters)- Since:
- 5.0
-
-
Field Summary
Fields Modifier and Type Field Description static intALL_GROUPS_IDThe ID for searching across all groupsstatic java.util.Set<SearchScope>ALL_SCOPEstatic java.util.List<java.lang.Class<? extends DataObject>>ALL_TYPESstatic intDATE_ACQUISITIONIndicates that the date has to be interpreted as acquisition datestatic intDATE_IMPORTIndicates 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 intgetDateType()java.sql.TimestampgetEnd()Returns the upper bound of the time interval.longgetGroupId()java.lang.StringgetQuery()Returns the query terms to search forjava.util.Set<SearchScope>getScope()Returns the scope of the search.java.sql.TimestampgetStart()Returns the lower bound of the time interval.java.util.List<java.lang.Class<? extends DataObject>>getTypes()Returns the types to search on.longgetUserId()booleanhasTextToSearch()Returnstrueif text to search for,falseotherwise.booleanisValid()Returnstrueif the context of the search is valid i.e.voidsetDateType(int dateType)voidsetGroupId(long groupId)voidsetTimeInterval(java.sql.Timestamp start, java.sql.Timestamp end, int type)Sets the time interval.voidsetUserId(long userId)
-
-
-
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 searchtypes- 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()
Returnstrueif the context of the search is valid i.e. parameters correctly set,falseotherwise.- Returns:
- See above.
-
hasTextToSearch
public boolean hasTextToSearch()
Returnstrueif text to search for,falseotherwise.- 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)
-
-