edu.stanford.smi.protegex.owl.ui.search.finder
Class BasicFind
java.lang.Object
edu.stanford.smi.protegex.owl.ui.search.finder.BasicFind
- All Implemented Interfaces:
- Find
- Direct Known Subclasses:
- ThreadedFind
public class BasicFind
- extends Object
- implements Find
- Author:
- Nick Drummond, Medical Informatics Group, University of Manchester
17-Mar-2006
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BasicFind
public BasicFind(OWLModel owlModel,
int type)
startSearch
public void startSearch(String s)
- Specified by:
startSearch in interface Find
startSearch
public void startSearch(String s,
int type)
- Description copied from interface:
Find
- This method should start the search.
- Specified by:
startSearch in interface Find
- Parameters:
s - the string to search for
cancelSearch
public void cancelSearch()
- Specified by:
cancelSearch in interface Find
aborted
protected boolean aborted()
isRunning
public boolean isRunning()
searchOnSlot
protected Map<RDFResource,FindResult> searchOnSlot(edu.stanford.smi.protege.model.Slot searchProp,
String searchStr,
String lang,
int searchType)
getSearchProperties
protected List getSearchProperties()
- by default automatically search the name and the current browser slot
as well as the search synonym slots (if set)
FIXME: TT: This method is wrong. It does not treat correctly the browser text
getResults
public Map<RDFResource,FindResult> getResults()
- Description copied from interface:
Find
- This method can be called to get the current results
- Specified by:
getResults in interface Find
- Returns:
- a map of Resources as keys with SearchResultItem objects as values
getResultResources
public Set getResultResources()
- Specified by:
getResultResources in interface Find
getResultCount
public int getResultCount()
- Specified by:
getResultCount in interface Find
getSummaryText
public String getSummaryText()
- Specified by:
getSummaryText in interface Find
getLastSearch
public String getLastSearch()
- Specified by:
getLastSearch in interface Find
getDescription
public String getDescription()
- Specified by:
getDescription in interface Find
getModel
public OWLModel getModel()
- Specified by:
getModel in interface Find
getNumSearchProperties
public int getNumSearchProperties()
- Specified by:
getNumSearchProperties in interface Find
isValidFrameToSearch
protected boolean isValidFrameToSearch(edu.stanford.smi.protege.model.Frame f)
- Only look at classes, properties and individuals
- Parameters:
f - a frame
- Returns:
- true if the given frame should be included in the results
getSearchType
public int getSearchType()
- Specified by:
getSearchType in interface Find
notifySearchStarted
protected void notifySearchStarted()
notifyResultsUpdated
protected void notifyResultsUpdated()
notifySearchComplete
protected void notifySearchComplete()
notifySearchCancelled
protected void notifySearchCancelled()
addResultListener
public void addResultListener(SearchListener l)
- Specified by:
addResultListener in interface Find
removeResultListener
public boolean removeResultListener(SearchListener l)
- Specified by:
removeResultListener in interface Find
Submit a bug report or feature request
Copyright (c) 1998-2008 Stanford University.