public class SearchParameters
extends java.lang.Object
SearchFacility.search(omero.gateway.SecurityContext, SearchParameters)
Modifier and Type | Field and 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 and Description |
---|
SearchParameters(java.util.Set<SearchScope> scope,
java.util.List<java.lang.Class<? extends DataObject>> types,
java.lang.String query)
Creates a new instance.
|
Modifier and Type | Method and 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) |
public static final int ALL_GROUPS_ID
public static final int DATE_IMPORT
public static final int DATE_ACQUISITION
public static final java.util.Set<SearchScope> ALL_SCOPE
public static final java.util.List<java.lang.Class<? extends DataObject>> ALL_TYPES
public SearchParameters(java.util.Set<SearchScope> scope, java.util.List<java.lang.Class<? extends DataObject>> types, java.lang.String query)
scope
- Scope of the searchtypes
- The types to search on, i.e. project, dataset, image.query
- The terms to search for.public void setTimeInterval(java.sql.Timestamp start, java.sql.Timestamp end, int type)
start
- The lower bound of the time interval.end
- The upper bound of the time interval.type
- The type of date.public java.sql.Timestamp getStart()
public java.sql.Timestamp getEnd()
public java.util.Set<SearchScope> getScope()
public java.util.List<java.lang.Class<? extends DataObject>> getTypes()
public java.lang.String getQuery()
public boolean isValid()
true
if the context of the search is valid i.e.
parameters correctly set, false
otherwise.public boolean hasTextToSearch()
true
if text to search for,
false
otherwise.public long getUserId()
public void setUserId(long userId)
public int getDateType()
public void setDateType(int dateType)
public long getGroupId()
public void setGroupId(long groupId)