Class RemoteSearcher
java.lang.Object
org.dlese.dpc.serviceclients.remotesearch.RemoteSearcher
RemoteSearcher plays a role anaogous to
SimpleLuceneIndex in the DDS, only it performs searches
for records using a DDS Web Service (version 1.0). RemoteSearcher employs the WebService
client to do the actual search (via the urlCheck method (so this
class can be thought of as a wrapper for the urlCheck Service).A use case of RemoteSearcher follows:
- the user submits a query, which at this time is in the form of a URL (including wild cards)
- the query is given to
searchDocs(java.lang.String), which in turn calls the UrlCheck method of theWebServiceClient, and then - the result Document is parsed into an array of
RemoteResultDoc
- Author:
- ostwald
-
Constructor Summary
ConstructorsConstructorDescriptionRemoteSearcher(String ddsWebServicesBaseUrl, MetadataVocab vocab) Constructor for the RemoteSearcher object -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()getDocument(String id) Gets the document attribute of the RemoteSearcher objectGets the record attribute of the RemoteSearcher objectgetVocab()Gets the vocab attribute of the RemoteSearcher objectGets the webServiceClient attribute of the RemoteSearcher objectstatic voidRemoteSearcher testersearchDocs(String s) analogus to SimpleLuceneIndex.searchDoc, performs a search and returns an array ofRemoteResultDocobjects that represent the results of the search.static voidsetDebug(boolean db) Sets the debug attribute
-
Constructor Details
-
RemoteSearcher
Constructor for the RemoteSearcher object- Parameters:
ddsWebServicesBaseUrl- DDS Web Service URLvocab- MetadataVocab object used to parse search results
-
-
Method Details
-
getVocab
Gets the vocab attribute of the RemoteSearcher object- Returns:
- The vocab value
-
getWebServiceClient
Gets the webServiceClient attribute of the RemoteSearcher object- Returns:
- The webServiceClient value
- See Also:
-
searchDocs
analogus to SimpleLuceneIndex.searchDoc, performs a search and returns an array ofRemoteResultDocobjects that represent the results of the search.Note: the urlCheck WebService returns information about duplicate records (that don't match the query, but which refer to the same resource) returned as an alsoCatalogedBy element of MatchingRecord . These duplicates are treated as search results by searchDocs - they are expanded into RemoteResultDoc objects and added to the results returned.
- Parameters:
s- Description of the Parameter- Returns:
- Description of the Return Value
-
getRecord
Gets the record attribute of the RemoteSearcher object- Parameters:
id- Description of the Parameter- Returns:
- The record value
-
getDocument
Gets the document attribute of the RemoteSearcher object- Parameters:
id- Description of the Parameter- Returns:
- The document value
-
destroy
public void destroy() -
setDebug
public static void setDebug(boolean db) Sets the debug attribute- Parameters:
db- The new debug value
-
main
RemoteSearcher tester- Parameters:
args- The command line arguments
-