org.mydm.search
Class AdvancedSearch

java.lang.Object
  extended byorg.mydm.search.AdvancedSearch
All Implemented Interfaces:
java.lang.Runnable, Search

public class AdvancedSearch
extends java.lang.Object
implements Search, java.lang.Runnable

Advanced Search.

have a look of the documentation of SimpleSearch. Simple Search provides a simple search over the complete metadata. The results will be very broad. Advanced Searches the text on single elements. There are some limitations on the Advanced Search.

The search will done on the main MyDM collections which are under collection "md" (/db/md/)

Current limitations


Constructor Summary
AdvancedSearch(java.util.HashMap hm)
          Constructor to Search all collections.
AdvancedSearch(java.lang.String[] colnames, java.util.HashMap hm)
          Constructor to search within specified collections.
 
Method Summary
 void addListener(SearchResListener srl)
          Adds the Listener to the set of listeners
 SearchResListener performSearch()
          Performs the search and returns a reference to SearchResListener object.
 void performSearch(SearchResListener slistener)
          Performs the search in a new thread.
 void removeListener(SearchResListener srl)
          Removed the listener from the set of listeners.
 void run()
           
 boolean status()
          Gives the status of the search.
 void stop()
          Stops the Searching thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdvancedSearch

public AdvancedSearch(java.util.HashMap hm)
Constructor to Search all collections. HashMap = metadata element => search string

Parameters:
hm - HasmMap of mdelements to search string

AdvancedSearch

public AdvancedSearch(java.lang.String[] colnames,
                      java.util.HashMap hm)
Constructor to search within specified collections. HashMap = metadata element => search string

Parameters:
colnames - array of collection names
hm - HashMap of mdelements to searchstring.
Method Detail

performSearch

public void performSearch(SearchResListener slistener)
                   throws MyDMException
Description copied from interface: Search
Performs the search in a new thread. Search Results are notified to the listener object passed.

Specified by:
performSearch in interface Search
Parameters:
slistener - SearchResListener
Throws:
MyDMException

performSearch

public SearchResListener performSearch()
                                throws MyDMException
Description copied from interface: Search
Performs the search and returns a reference to SearchResListener object.

Specified by:
performSearch in interface Search
Returns:
searchreslistener object
Throws:
MyDMException

status

public boolean status()
Description copied from interface: Search
Gives the status of the search. returns true if the search thread is still running. returns falase if the search thread is not running.

Specified by:
status in interface Search
Returns:
true or false.

stop

public void stop()
Description copied from interface: Search
Stops the Searching thread.

Specified by:
stop in interface Search

addListener

public void addListener(SearchResListener srl)
Description copied from interface: Search
Adds the Listener to the set of listeners

Specified by:
addListener in interface Search
Parameters:
srl - SearchResListener

removeListener

public void removeListener(SearchResListener srl)
Description copied from interface: Search
Removed the listener from the set of listeners.

Specified by:
removeListener in interface Search
Parameters:
srl -

run

public void run()
Specified by:
run in interface java.lang.Runnable