public class RdfClient extends Object
| Modifier and Type | Field and Description |
|---|---|
org.eclipse.jetty.client.HttpClient |
httpClient
Http connection pool for the rdf repository.
|
| Constructor and Description |
|---|
RdfClient(org.eclipse.jetty.client.HttpClient httpClient,
URI uri,
com.github.rholder.retry.Retryer<org.eclipse.jetty.client.api.ContentResponse> retryer,
Duration timeout) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
ask(String sparql)
Execute a SPARQL ask and parse the boolean result.
|
Integer |
loadUrl(String sparql)
Loads a uri into this rdf repository.
|
org.openrdf.query.TupleQueryResult |
query(String sparql)
Execute some SPARQL which returns a results table.
|
List<String> |
selectToList(String query,
String valueBinding,
String prefix)
Perform a SPARQL query and return the result as list from one column.
|
com.google.common.collect.ImmutableSetMultimap<String,String> |
selectToMap(String query,
String keyBinding,
String valueBinding)
Perform a SPARQL query and return the result as a map.
|
Integer |
update(String sparql)
Executes an update and returns the number of changes.
|
public final org.eclipse.jetty.client.HttpClient httpClient
public org.openrdf.query.TupleQueryResult query(String sparql)
public boolean ask(String sparql)
public Integer loadUrl(String sparql)
public com.google.common.collect.ImmutableSetMultimap<String,String> selectToMap(String query, String keyBinding, String valueBinding)
query - SPARQL query, should be SELECTkeyBinding - Binding name to serve as keyvalueBinding - Binding name to serve as valuespublic List<String> selectToList(String query, String valueBinding, String prefix)
query - SPARQL query, should be SELECTvalueBinding - Binding name to serve as valuesprefix - If specified, remove this prefix from the resultCopyright © 2019. All rights reserved.