|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<MultiRow<ResultsRow<MultiRowValue<ResultElement>>>>
org.intermine.api.results.WebResults
public class WebResults
The web version of a Results object. This class handles the mapping between the paths that user selected for the view and the objects that are returned from the query.
| Field Summary | |
|---|---|
static int |
BIG_BATCH_SIZE
The batch size to use when we need to iterate through the whole result set. |
protected static org.apache.log4j.Logger |
LOG
|
protected Model |
model
|
protected java.util.LinkedHashMap<java.lang.String,java.lang.Integer> |
pathToIndex
|
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
WebResults(PathQuery pathQuery,
Results results,
Model model,
java.util.Map<java.lang.String,QuerySelectable> pathToQueryNode,
java.util.Map<java.lang.String,java.util.List<FieldDescriptor>> classKeys,
java.util.Map<java.lang.String,BagQueryResult> pathToBagQueryResult)
Create a new WebResults object. |
|
| Method Summary | |
|---|---|
void |
addColumns(java.util.List<Path> columnPaths)
Adds columns that should be displayed to the table. |
MultiRow<ResultsRow<MultiRowValue<ResultElement>>> |
get(int index)
|
java.util.List |
getColumnNames()
Return the names of the columns of the results. |
java.util.List |
getColumns()
Returns the columns for these results. |
int |
getEstimatedSize()
Get the estimated number of rows of this table |
ResultsInfo |
getInfo()
Return the ResultsInfo object from the underlying Results object. |
Results |
getInterMineResults()
Return the underlying results object. |
int |
getMaxRetrievableIndex()
Returns the ObjectStore's maximum allowable offset. |
PathQuery |
getPathQuery()
Get the PathQuery associated with this WebTable |
java.util.Map<java.lang.String,BagQueryResult> |
getPathToBagQueryResult()
Returns the pathToBagQueryResult Map. |
protected java.util.LinkedHashMap<java.lang.String,java.lang.Integer> |
getPathToIndex()
Create a map from string paths to index of QueryNodes in the ObjectStore query |
java.util.Map<java.lang.String,QuerySelectable> |
getPathToQueryNode()
Returns the pathToQueryNode Map. |
MultiRow<ResultsRow<MultiRowValue<ResultElement>>> |
getResultElements(int index)
Return a List containing a ResultElement object for each element in the given row. |
void |
goFaster()
Calls ObjectStore.goFaster() if this object wraps a Results object from an ObjectStoreInterMineImpl. |
boolean |
isSingleBatch()
Returns true if the results are known to be contained in a single batch. |
boolean |
isSizeEstimate()
Check whether the result of getEstimatedSize() is an estimate |
java.util.Iterator<MultiRow<ResultsRow<MultiRowValue<ResultElement>>>> |
iterator()
|
java.util.Iterator<MultiRow<ResultsRow<MultiRowValue<ResultElement>>>> |
iteratorFrom(int start)
|
void |
releaseGoFaster()
Calls ObjectStore.releaseGoFaster() if this object wraps a Results object from an ObjectStoreInterMineImpl. |
int |
size()
|
| Methods inherited from class java.util.AbstractList |
|---|
add, add, addAll, clear, equals, hashCode, indexOf, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList |
| Methods inherited from class java.util.AbstractCollection |
|---|
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
add, add, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, isEmpty, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, subList, toArray, toArray |
| Field Detail |
|---|
protected static final org.apache.log4j.Logger LOG
protected java.util.LinkedHashMap<java.lang.String,java.lang.Integer> pathToIndex
protected Model model
public static final int BIG_BATCH_SIZE
| Constructor Detail |
|---|
public WebResults(PathQuery pathQuery,
Results results,
Model model,
java.util.Map<java.lang.String,QuerySelectable> pathToQueryNode,
java.util.Map<java.lang.String,java.util.List<FieldDescriptor>> classKeys,
java.util.Map<java.lang.String,BagQueryResult> pathToBagQueryResult)
pathQuery - used to get the paths of the columnsresults - the underlying Results objectmodel - the ModelpathToQueryNode - the mapping between Paths (in the columnPaths argument) and the
QueryNodes in the results objectclassKeys - the Map from class name to set of defined keyspathToBagQueryResult - a Map containing results from LOOKUP operations| Method Detail |
|---|
public boolean isSingleBatch()
isSingleBatch in interface WebTableprotected java.util.LinkedHashMap<java.lang.String,java.lang.Integer> getPathToIndex()
public java.util.List getColumnNames()
public void addColumns(java.util.List<Path> columnPaths)
columnPaths - columns correspond to paths and columns for these paths should be addedpublic MultiRow<ResultsRow<MultiRowValue<ResultElement>>> get(int index)
get in interface java.util.List<MultiRow<ResultsRow<MultiRowValue<ResultElement>>>>get in class java.util.AbstractList<MultiRow<ResultsRow<MultiRowValue<ResultElement>>>>public int getEstimatedSize()
getEstimatedSize in interface WebTablepublic boolean isSizeEstimate()
isSizeEstimate in interface WebTablepublic int size()
size in interface java.util.Collection<MultiRow<ResultsRow<MultiRowValue<ResultElement>>>>size in interface java.util.List<MultiRow<ResultsRow<MultiRowValue<ResultElement>>>>size in class java.util.AbstractCollection<MultiRow<ResultsRow<MultiRowValue<ResultElement>>>>
public ResultsInfo getInfo()
throws ObjectStoreException
getInfo in interface WebTableObjectStoreException - if there is an exception while getting the infopublic Results getInterMineResults()
public java.util.Map<java.lang.String,QuerySelectable> getPathToQueryNode()
public java.util.Map<java.lang.String,BagQueryResult> getPathToBagQueryResult()
getPathToBagQueryResult in interface WebTable
public void goFaster()
throws ObjectStoreException
ObjectStoreException - if ObjectStoreInterMineImpl.goFaster() throws the exception
public void releaseGoFaster()
throws ObjectStoreException
ObjectStoreException - if ObjectStoreInterMineImpl.releaseGoFaster() throws the
exceptionpublic int getMaxRetrievableIndex()
getMaxRetrievableIndex in interface WebTablepublic MultiRow<ResultsRow<MultiRowValue<ResultElement>>> getResultElements(int index)
getResultElements in interface WebTableindex - the row of the results to fetch
public java.util.Iterator<MultiRow<ResultsRow<MultiRowValue<ResultElement>>>> iterator()
iterator in interface java.lang.Iterable<MultiRow<ResultsRow<MultiRowValue<ResultElement>>>>iterator in interface java.util.Collection<MultiRow<ResultsRow<MultiRowValue<ResultElement>>>>iterator in interface java.util.List<MultiRow<ResultsRow<MultiRowValue<ResultElement>>>>iterator in class java.util.AbstractList<MultiRow<ResultsRow<MultiRowValue<ResultElement>>>>public java.util.Iterator<MultiRow<ResultsRow<MultiRowValue<ResultElement>>>> iteratorFrom(int start)
start - - first index from which start iteration
public java.util.List getColumns()
getColumns in interface WebTablepublic PathQuery getPathQuery()
WebTable
getPathQuery in interface WebTable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||