|
|||||||||
| 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<SearchResultItem>
de.pangaea.metadataportal.search.SearchResultList
public class SearchResultList
This class holds search result items. It is implemented with the List interface to make it usable like any other Java list (iterators,...).
Be warned: Iterating over this list is very slow. When trying to iterate over all search results use a search method of SearchService
that notifies you on each result item using a SearchResultCollector instance.
| Field Summary |
|---|
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
protected |
SearchResultList(LuceneCache.Session session,
FieldSelector fields)
For internal use only! |
| Method Summary | |
|---|---|
SearchResultItem |
get(int index)
Gets search result at the supplied index. |
long |
getQueryTime()
Gets the duration of the query in milliseconds. |
SearchResultItem |
getResult(int index)
Gets search result at the supplied index. |
int |
getResultCount()
Returns the number of search results. |
int |
size()
Returns the number of search results. |
| Methods inherited from class java.util.AbstractList |
|---|
add, add, addAll, clear, equals, hashCode, indexOf, iterator, 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 |
|---|
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray |
| Constructor Detail |
|---|
protected SearchResultList(LuceneCache.Session session,
FieldSelector fields)
| Method Detail |
|---|
public SearchResultItem get(int index)
get in interface List<SearchResultItem>get in class AbstractList<SearchResultItem>RuntimeException - wrapping an IOException. This is needed because the generic List interface does not allow us to throw exceptions.getResult(int)public int size()
size in interface Collection<SearchResultItem>size in interface List<SearchResultItem>size in class AbstractCollection<SearchResultItem>RuntimeException - wrapping an IOException. This is needed because the generic List interface does not allow us to throw exceptions.
public SearchResultItem getResult(int index)
throws IOException
List-specific code because you can catch the IOException.
IOException
public int getResultCount()
throws IOException
List-specific code because you can catch the IOException.
IOException
public long getQueryTime()
throws IOException
IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||