public class RemoteSearcher
extends java.lang.Object
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:
searchDocs(java.lang.String), which in turn calls the
UrlCheck method of the WebServiceClient, and thenRemoteResultDoc | Constructor and Description |
|---|
RemoteSearcher(java.lang.String ddsWebServicesBaseUrl,
MetadataVocab vocab)
Constructor for the RemoteSearcher object
|
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
GetRecordResponse |
getDocument(java.lang.String id)
Gets the document attribute of the RemoteSearcher object
|
GetRecordResponse |
getRecord(java.lang.String id)
Gets the record attribute of the RemoteSearcher object
|
MetadataVocab |
getVocab()
Gets the vocab attribute of the RemoteSearcher object
|
WebServiceClient |
getWebServiceClient()
Gets the webServiceClient attribute of the RemoteSearcher object
|
static void |
main(java.lang.String[] args)
RemoteSearcher tester
|
RemoteResultDoc[] |
searchDocs(java.lang.String s)
analogus to SimpleLuceneIndex.searchDoc, performs a search and returns an
array of
RemoteResultDoc objects that represent the results of the
search. |
static void |
setDebug(boolean db)
Sets the debug attribute
|
public RemoteSearcher(java.lang.String ddsWebServicesBaseUrl,
MetadataVocab vocab)
ddsWebServicesBaseUrl - DDS Web Service URLvocab - MetadataVocab object used to parse search
resultspublic MetadataVocab getVocab()
public WebServiceClient getWebServiceClient()
WebServiceClientpublic RemoteResultDoc[] searchDocs(java.lang.String s)
RemoteResultDoc objects 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.
s - Description of the Parameterpublic GetRecordResponse getRecord(java.lang.String id)
id - Description of the Parameterpublic GetRecordResponse getDocument(java.lang.String id)
id - Description of the Parameterpublic void destroy()
public static void setDebug(boolean db)
db - The new debug valuepublic static void main(java.lang.String[] args)
args - The command line arguments