public class TopicMapSearchResult extends AbstractList<TMObjectIF>
Example:
TopicMapSearchResult tmobjects = new TopicMapSearchResult(topicmap, searcher.search("verdi")); Iterator iter = tmobjects.iterator(); while (iter.hasNext()) { System.out.println(iter.next()); }Output:
[basic.TopicName, 790, 'Verdi, Giuseppe'] [basic.TopicName, 791, 'Giuseppe Verdi'] [basic.TopicName, 705, 'Land of Verdi']]
Modifier and Type | Field and Description |
---|---|
protected String |
id_field |
protected SearchResultIF |
result |
protected TopicMapIF |
topicmap |
modCount
Constructor and Description |
---|
TopicMapSearchResult(TopicMapIF topicmap,
SearchResultIF result) |
Modifier and Type | Method and Description |
---|---|
TMObjectIF |
get(int index)
INTERNAL: This is the java.util.List.get(int) method.
|
String |
getObjectIdField()
INTERNAL: Returns the name of the field that contains the topic
map object id.
|
float |
getScore(int index)
INTERNAL: The score of the result row.
|
void |
setObjectIdField(String id_field)
INTERNAL: Sets the name of the field that contains the topic map
object id.
|
int |
size()
INTERNAL: This is the java.util.List.size() method.
|
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
parallelStream, removeIf, stream
protected TopicMapIF topicmap
protected SearchResultIF result
protected String id_field
public TopicMapSearchResult(TopicMapIF topicmap, SearchResultIF result)
public String getObjectIdField()
public void setObjectIdField(String id_field)
public float getScore(int index)
public TMObjectIF get(int index)
get
in interface List<TMObjectIF>
get
in class AbstractList<TMObjectIF>
public int size()
size
in interface Collection<TMObjectIF>
size
in interface List<TMObjectIF>
size
in class AbstractCollection<TMObjectIF>