Class TopicMapSearchResult
- All Implemented Interfaces:
Iterable<TMObjectIF>,Collection<TMObjectIF>,List<TMObjectIF>
INTERNAL: A List implementation that wraps a SearchResultIF to
present the actual topic map objects referenced in the search
result. The 'object_id' document field is used by default to look
up topic map objects by their object ids. This field can be changed
by setting the objectIdField property.
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']]
-
Field Summary
FieldsFields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget(int index) INTERNAL: This is the java.util.List.get(int) method.INTERNAL: Returns the name of the field that contains the topic map object id.floatgetScore(int index) INTERNAL: The score of the result row.voidsetObjectIdField(String id_field) INTERNAL: Sets the name of the field that contains the topic map object id.intsize()INTERNAL: This is the java.util.List.size() method.Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListMethods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
-
Field Details
-
topicmap
-
result
-
id_field
-
-
Constructor Details
-
TopicMapSearchResult
-
-
Method Details
-
getObjectIdField
INTERNAL: Returns the name of the field that contains the topic map object id. -
setObjectIdField
INTERNAL: Sets the name of the field that contains the topic map object id. -
getScore
public float getScore(int index) INTERNAL: The score of the result row. -
get
INTERNAL: This is the java.util.List.get(int) method.- Specified by:
getin interfaceList<TMObjectIF>- Specified by:
getin classAbstractList<TMObjectIF>
-
size
public int size()INTERNAL: This is the java.util.List.size() method.- Specified by:
sizein interfaceCollection<TMObjectIF>- Specified by:
sizein interfaceList<TMObjectIF>- Specified by:
sizein classAbstractCollection<TMObjectIF>
-