public class SearchResultCollection extends ArrayList<SearchResult>
SearchResult
sModifier and Type | Field and Description |
---|---|
static int |
GENERAL_ERROR
Some other error
|
static int |
NO_ERROR
No error
|
static int |
TOO_MANY_CLAUSES
The search has to many clauses, e.g. a 'a*' search term
would expand to too many single clauses
|
static int |
TOO_MANY_RESULTS_ERROR
The search has to many results
|
modCount
Constructor and Description |
---|
SearchResultCollection() |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
void |
consolidate()
Removes results which DataObjects are not set
|
boolean |
contains(Object o) |
Map<Long,List<SearchResult>> |
getByGroup()
Get a perGroup map representation of the results
|
Map<Long,List<SearchResult>> |
getByGroup(Class<? extends DataObject> type)
Get a perGroup map representation of the results, filtered by type
|
List<DataObject> |
getDataObjects(int scopeId,
Class<? extends DataObject> type)
Get DataObjects filtered by scope and type
|
int |
getError()
Get the error code
|
List<SearchResult> |
getResults(int scopeId,
Class<? extends DataObject> type)
Get all results of a certain scope and/or type
|
boolean |
isError() |
void |
setError(int error)
Set the error state
|
String |
toString() |
add, add, addAll, addAll, clone, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
equals, hashCode
containsAll
finalize, getClass, notify, notifyAll, wait, wait, wait
containsAll, equals, hashCode
parallelStream, stream
public static final int NO_ERROR
public static final int GENERAL_ERROR
public static final int TOO_MANY_RESULTS_ERROR
public static final int TOO_MANY_CLAUSES
public boolean isError()
true
if there was an error with the search,
false
otherwisepublic void setError(int error)
error
- The value to set.public int getError()
public boolean contains(Object o)
contains
in interface Collection<SearchResult>
contains
in interface List<SearchResult>
contains
in class ArrayList<SearchResult>
public void clear()
clear
in interface Collection<SearchResult>
clear
in interface List<SearchResult>
clear
in class ArrayList<SearchResult>
public List<SearchResult> getResults(int scopeId, Class<? extends DataObject> type)
scopeId
- The scope to filter for.type
- The type to filter for, see DataObject
public List<DataObject> getDataObjects(int scopeId, Class<? extends DataObject> type)
scopeId
- type
- public Map<Long,List<SearchResult>> getByGroup()
public Map<Long,List<SearchResult>> getByGroup(Class<? extends DataObject> type)
type
- public void consolidate()
public String toString()
toString
in class AbstractCollection<SearchResult>
Version: 5.3.3-ice35-b63
Copyright © 2017 The University of Dundee & Open Microscopy Environment. All Rights Reserved.