public class RiSearch extends FedoraRequest<RiSearch>
Modifier and Type | Method and Description |
---|---|
RiSearch |
distinct(boolean distinct)
Whether to force duplicate results to be dropped.
|
RiSearchResponse |
execute()
Executes this request against the
FedoraRequest.DEFAULT_CLIENT |
RiSearchResponse |
execute(FedoraClient fedora)
Execute this request using the supplied FedoraClient instance.
|
RiSearch |
flush(boolean flush)
The flush parameter tells the Resource Index to ensure that any
recently-added/modified/deleted triples are flushed to the triplestore
before executing the query.
|
RiSearch |
format(String format)
The desired response format.
|
RiSearch |
lang(String lang)
The query language to use.
|
RiSearch |
limit(int limit)
The maximum number of results to return.
|
RiSearch |
stream(boolean stream)
Whether to stream the results right away (faster), or to save them to a
temporary file before sending them to the client.
|
RiSearch |
template(String template)
Templates are used to convert tuple query results to triples.
|
RiSearch |
type(String type)
A tuple query is one that returns a list of named values.
|
addHeader, addQueryParam, getFirstQueryParam, getHeaders, getQueryParam, getQueryParams, isDefaultClientSet, removeHeader, resource, resource, resource, resource, setDefaultClient, setHeaders, xParam
public RiSearch(String query)
query
- the query textpublic RiSearch type(String type)
type
- tuples or triplespublic RiSearch lang(String lang)
lang
- one of itql, sparql or spo (spo only if type = triples)public RiSearch format(String format)
format
- if type is tuples, then one of csv, simple, sparql, or tsv.
If type is triples, then one of n-triples, notation 3, rdf/xml, or turtle.public RiSearch flush(boolean flush)
flush
- whether the Fedora server should flush its triple buffer
first. If false, the result could be out of date with what was actually
stored in the repository at the time of the request. If true, it may take
considerably longer to get a response.public RiSearch limit(int limit)
limit
- maximum number of results to return.public RiSearch distinct(boolean distinct)
distinct
- public RiSearch stream(boolean stream)
stream
- whether to stream the results immediately or save them to a
temporary file before sending them to the client.public RiSearch template(String template)
template
- public RiSearchResponse execute() throws FedoraClientException
FedoraRequest
Executes this request against the FedoraRequest.DEFAULT_CLIENT
execute
in class FedoraRequest<RiSearch>
FedoraClientException
- if FedoraRequest.DEFAULT_CLIENT
is null
public RiSearchResponse execute(FedoraClient fedora) throws FedoraClientException
FedoraRequest
Execute this request using the supplied FedoraClient instance.
execute
in class FedoraRequest<RiSearch>
fedora
- an instance of FedoraClientFedoraClientException
- if the HTTP status code of the response is
>= 400.Copyright © 2010-2013 MediaShelf. All Rights Reserved.