Protégé-OWL 3.3.1

edu.stanford.smi.protegex.owl.ui.search.finder
Class BasicFind

java.lang.Object
  extended by 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

Field Summary
 
Fields inherited from interface edu.stanford.smi.protegex.owl.ui.search.finder.Find
CONTAINS, ENDS_WITH, EXACTLY_MATCHES, searchTypeString, STARTS_WITH
 
Constructor Summary
BasicFind(OWLModel owlModel, int type)
           
 
Method Summary
protected  boolean aborted()
           
 void addResultListener(SearchListener l)
           
 void cancelSearch()
           
 String getDescription()
           
 String getLastSearch()
           
 OWLModel getModel()
           
 int getNumSearchProperties()
           
 int getResultCount()
           
 Set getResultResources()
           
 Map<RDFResource,FindResult> getResults()
          This method can be called to get the current results
protected  List getSearchProperties()
          by default automatically search the name and the current browser slot as well as the search synonym slots (if set)
 int getSearchType()
           
 String getSummaryText()
           
 boolean isRunning()
           
protected  boolean isValidFrameToSearch(edu.stanford.smi.protege.model.Frame f)
          Only look at classes, properties and individuals
protected  void notifyResultsUpdated()
           
protected  void notifySearchCancelled()
           
protected  void notifySearchComplete()
           
protected  void notifySearchStarted()
           
 boolean removeResultListener(SearchListener l)
           
protected  Map<RDFResource,FindResult> searchOnSlot(edu.stanford.smi.protege.model.Slot searchProp, String searchStr, String lang, int searchType)
           
 void startSearch(String s)
           
 void startSearch(String s, int type)
          This method should start the search.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicFind

public BasicFind(OWLModel owlModel,
                 int type)
Method Detail

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)


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

Protégé-OWL 3.3.1

Submit a bug report or feature request
Copyright (c) 1998-2007 Stanford University.