org.eclipse.rse.services.search
Class HostSearchResultSet
java.lang.Object
org.eclipse.core.runtime.PlatformObject
org.eclipse.rse.services.search.HostSearchResultSet
-
All Implemented Interfaces:
-
IAdaptable,
IHostSearchResultSet
-
public class HostSearchResultSet
- extends
PlatformObject
- implements
IHostSearchResultSet,
IAdaptable
A remote search result set represents a page in the Remote Search view.
A search result set contains multiple search configurations and their results.
This allows it to contain results from multiple connections, filters, and folders
(from different systems).
Methods inherited from class java.lang.
Object
|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
|
configurations
protected
Vector configurations
name
protected
String name
HostSearchResultSet
public HostSearchResultSet()
- Constructor to create a result set.
setName
public void setName(
String name)
-
Description copied from interface:
IHostSearchResultSet
- Sets the name of the search.
-
-
Specified by:
-
setName
in interface
IHostSearchResultSet
-
-
Parameters:
-
name
- the name of the search.
getName
public
String getName()
-
Description copied from interface:
IHostSearchResultSet
- Gets the name of the search that is being run.
-
-
Specified by:
-
getName
in interface
IHostSearchResultSet
-
-
Returns:
- the name of the search.
addSearchConfiguration
public void addSearchConfiguration(
IHostSearchResultConfiguration config)
-
Description copied from interface:
IHostSearchResultSet
- Add a search configuration.
-
-
Specified by:
-
addSearchConfiguration
in interface
IHostSearchResultSet
-
-
Parameters:
-
config
- a search configuration.
removeSearchConfiguration
public void removeSearchConfiguration(
IHostSearchResultConfiguration config)
-
Description copied from interface:
IHostSearchResultSet
- Removes a search configuration.
-
-
Specified by:
-
removeSearchConfiguration
in interface
IHostSearchResultSet
-
-
Parameters:
-
config
- a search configuration.
getSearchConfigurations
public
Iterator getSearchConfigurations()
-
Description copied from interface:
IHostSearchResultSet
- Returns an iterator over search configurations.
-
-
Specified by:
-
getSearchConfigurations
in interface
IHostSearchResultSet
-
-
Returns:
- an iterator over search configurations.
addResult
public void addResult(
IHostSearchResultConfiguration config,
Object result)
-
Description copied from interface:
IHostSearchResultSet
- Add a result for a search configuration.
-
-
Specified by:
-
addResult
in interface
IHostSearchResultSet
-
-
Parameters:
-
config
- a search configuration that was previously added. -
result
- a search result.
removeResult
public void removeResult(
IHostSearchResultConfiguration config,
Object result)
-
Description copied from interface:
IHostSearchResultSet
- Removes a result from a search configuration.
-
-
Specified by:
-
removeResult
in interface
IHostSearchResultSet
-
-
Parameters:
-
config
- a search configuration that was previously added. -
result
- a search result.
getResultsForConfiguration
public
Object[] getResultsForConfiguration(
IHostSearchResultConfiguration config)
-
Description copied from interface:
IHostSearchResultSet
- Returns the results of a particular search configuration.
-
-
Specified by:
-
getResultsForConfiguration
in interface
IHostSearchResultSet
-
-
Parameters:
-
config
- a search configuration.
-
Returns:
- the results for the given search configuration.
getAllResults
public
Object[] getAllResults()
-
Description copied from interface:
IHostSearchResultSet
- Returns all results of the search.
-
-
Specified by:
-
getAllResults
in interface
IHostSearchResultSet
-
-
Returns:
- all results of the search.
removeAllResults
public void removeAllResults()
-
Description copied from interface:
IHostSearchResultSet
- Removes all results of the search.
-
-
Specified by:
-
removeAllResults
in interface
IHostSearchResultSet
-
getNumOfResults
public int getNumOfResults()
-
Description copied from interface:
IHostSearchResultSet
- Gets the number of results.
-
-
Specified by:
-
getNumOfResults
in interface
IHostSearchResultSet
-
-
Returns:
- the number of results.
cancel
public void cancel()
-
Description copied from interface:
IHostSearchResultSet
- Cancels the search. Cancel those configurations that are still running.
-
-
Specified by:
-
cancel
in interface
IHostSearchResultSet
-
removeResult
public void removeResult(
Object result)
-
Description copied from interface:
IHostSearchResultSet
- Removes a result from all search configurations where it exists.
-
-
Specified by:
-
removeResult
in interface
IHostSearchResultSet
-
-
Parameters:
-
result
- a search result.
removeAndAddResult
public void removeAndAddResult(
Object oldResult,
Object newResult)
-
Description copied from interface:
IHostSearchResultSet
- Removes the old result from configurations where it is found, and
add the new result to those configurations.
-
-
Specified by:
-
removeAndAddResult
in interface
IHostSearchResultSet
-
-
Parameters:
-
oldResult
- the old result. -
newResult
- the new result.
dispose
public void dispose()
-
Description copied from interface:
IHostSearchResultSet
- Removes all configurations. First cancels the search, then calls the
dispose
method of
the configurations before removing them.
-
-
Specified by:
-
dispose
in interface
IHostSearchResultSet
-
isCancelled
public boolean isCancelled()
-
Description copied from interface:
IHostSearchResultSet
- Returns whether the search is cancelled. A search is cancelled if all of the configurations are
cancelled.
-
-
Specified by:
-
isCancelled
in interface
IHostSearchResultSet
-
-
Returns:
-
true
if the search is cancelled, false
otherwise.
isFinished
public boolean isFinished()
-
Description copied from interface:
IHostSearchResultSet
- Returns whether the search is finished. A search is finished if all the configurations are finished.
-
-
Specified by:
-
isFinished
in interface
IHostSearchResultSet
-
-
Returns:
-
true
if the search is finished, false
otherwise.
isRunning
public boolean isRunning()
-
Description copied from interface:
IHostSearchResultSet
- Returns whether search is running. A search is running if any of the configurations is running.
-
-
Specified by:
-
isRunning
in interface
IHostSearchResultSet
-
-
Returns:
-
true
if the search is running, false
otherwise.
isDisconnected
public boolean isDisconnected()
-
Description copied from interface:
IHostSearchResultSet
- Returns whether the search is disconnected. A search is disconnected if all the configurations are
disconnected.
-
-
Specified by:
-
isDisconnected
in interface
IHostSearchResultSet
-
-
Returns:
-
true
if the search is disconnected, false
otherwise.
Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.