|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectprefuse.data.tuple.AbstractTupleSet
prefuse.data.tuple.DefaultTupleSet
prefuse.data.search.SearchTupleSet
public abstract class SearchTupleSet
Abstract base class for TupleSet implementations that support text search. These sets provide search engine functionality -- Tuple data fields can be indexed and then searched over using text queries, the results of which populate the TupleSet. A range of search techniques are provided by subclasses of this class.
NOTE: The addTuple(Tuple) and
removeTuple(Tuple), methods are not supported by this
implementation or its derived classes. Calling these methods will result
in thrown exceptions. Instead, membership is determined by the search
matches found using the search method, which
searches over the terms indexed using the index(Iterator, String)
and index(Tuple, String) methods.
SearchQueryBinding| Field Summary |
|---|
| Fields inherited from class prefuse.data.tuple.DefaultTupleSet |
|---|
m_tuples |
| Fields inherited from interface prefuse.data.event.EventConstants |
|---|
ALL_COLUMNS, DELETE, INSERT, UPDATE |
| Fields inherited from interface prefuse.data.tuple.TupleSet |
|---|
EMPTY_ARRAY |
| Constructor Summary | |
|---|---|
SearchTupleSet()
|
|
| Method Summary | |
|---|---|
Tuple |
addTuple(Tuple t)
This method is not supported by this implementation. |
abstract java.lang.String |
getQuery()
Returns the current search query, if any. |
void |
index(java.util.Iterator tuples,
java.lang.String field)
Indexes the data values for the given field name for each Tuple in the provided Iterator. |
abstract void |
index(Tuple t,
java.lang.String field)
Index an individual Tuple field, so that it can be searched for. |
abstract boolean |
isUnindexSupported()
Indicates if this TupleSearchSet supports the unindex operation. |
boolean |
removeTuple(Tuple t)
This method is not supported by this implementation. |
abstract void |
search(java.lang.String query)
Searches the indexed fields of this TupleSet for matching strings, adding the Tuple instances for each search match to the TupleSet. |
abstract void |
unindex(Tuple t,
java.lang.String field)
Un-index an individual Tuple field, so that it can no longer be searched for. |
| Methods inherited from class prefuse.data.tuple.DefaultTupleSet |
|---|
addInternal, clear, clearInternal, containsTuple, getTupleCount, removeInternal, setTuple, toArray, tuples |
| Methods inherited from class prefuse.data.tuple.AbstractTupleSet |
|---|
addColumn, addColumn, addColumn, addColumn, addColumns, addPropertyChangeListener, addPropertyChangeListener, addTupleSetListener, fireTupleEvent, fireTupleEvent, fireTupleEvent, getClientProperty, isAddColumnSupported, putClientProperty, removePropertyChangeListener, removePropertyChangeListener, removeTupleSetListener, tuples, tuples |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SearchTupleSet()
| Method Detail |
|---|
public abstract java.lang.String getQuery()
public abstract void search(java.lang.String query)
query - the query string to search for. Indexed fields
with matching text will be added to the TupleSet.
public void index(java.util.Iterator tuples,
java.lang.String field)
tuples - an Iterator over Tuple instances to indexfield - the name of the attribute to index
java.lang.ClassCastException - is a non-Tuple instance is
encountered in the iteration.
public abstract void index(Tuple t,
java.lang.String field)
t - the Tuplefield - the data field to index
public abstract void unindex(Tuple t,
java.lang.String field)
t - the Tuplefield - the data field to unindexisUnindexSupported()public abstract boolean isUnindexSupported()
unindex(Tuple, String)public Tuple addTuple(Tuple t)
search or
clear methods.
addTuple in interface TupleSetaddTuple in class DefaultTupleSett - the Tuple add
TupleSet.addTuple(prefuse.data.Tuple)public boolean removeTuple(Tuple t)
search or
clear methods.
removeTuple in interface TupleSetremoveTuple in class DefaultTupleSett - the Tuple to remove
TupleSet.removeTuple(prefuse.data.Tuple)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||