Package nl.knaw.dans.lib.dataverse
Class SearchApi
java.lang.Object
nl.knaw.dans.lib.dataverse.SearchApi
-
Field Summary
Modifier and TypeFieldDescriptionprotected final nl.knaw.dans.lib.dataverse.HttpClientWrapper
protected static final String
-
Method Summary
Modifier and TypeMethodDescriptionprotected Path
A basic search action with default options.find
(String query, SearchOptions options) A search action with specificSearchOptions
.getQueryParamsFromMetadataKeys
(Map<String, String> metadataKeys) Returns an iterator to all the results for the specified query and default options.iterator
(String query, SearchOptions searchOptions) Returns an iterator to all the results for the specified query and options.toString()
-
Field Details
-
MDKEY_PARAM_NAME_PREFIX
- See Also:
-
httpClientWrapper
protected final nl.knaw.dans.lib.dataverse.HttpClientWrapper httpClientWrapper
-
-
Method Details
-
find
public DataverseHttpResponse<SearchResult> find(String query) throws IOException, DataverseException A basic search action with default options.- Parameters:
query
- search query- Returns:
- a search result
- Throws:
IOException
- when I/O problems occur during the interaction with DataverseDataverseException
- when Dataverse fails to perform the request- See Also:
-
find
public DataverseHttpResponse<SearchResult> find(String query, SearchOptions options) throws IOException, DataverseException A search action with specificSearchOptions
.- Parameters:
query
- search queryoptions
- further options for futher filtering and rendering the results- Returns:
- a search result
- Throws:
IOException
- when I/O problems occur during the interaction with DataverseDataverseException
- when Dataverse fails to perform the request- See Also:
-
iterator
Returns an iterator to all the results for the specified query and options. The caller is responsible for calling theResultItem
s to the appropriate subclass.- Parameters:
query
- the query to executesearchOptions
- the options for the query- Returns:
- an iterator over the results
-
iterator
Returns an iterator to all the results for the specified query and default options. The caller is responsible for calling theResultItem
s to the appropriate subclass.- Parameters:
query
- the query to execute- Returns:
- an iterator over the results
-
toString
-
buildPath
-
getQueryParamsFromMetadataKeys
-