public class RemoteRepository extends RemoteRepositoryBase
Note: The RemoteRepository
object SHOULD be reused for multiple
operations against the same end point.
Modifier and Type | Class and Description |
---|---|
static class |
RemoteRepository.AddOp
Add by URI, statements, or file.
|
protected class |
RemoteRepository.QueryOrUpdate
A prepared query will hold metadata for a particular query instance.
|
static class |
RemoteRepository.RemoveOp
Remove by query, access path, statements, or file.
|
BASE_URI, BD_NULL_GRAPH, BINDING_PREFIX, DEFAULT_GRAPH_URI, DEFAULT_MAX_REQUEST_URL_LENGTH, DEFAULT_NAMESPACE, DEFAULT_QUERY_METHOD, FORCE_INDEX_CREATE, HTTP_HEADER_BIGDATA_MAX_QUERY_MILLIS, INCLUDE_INFERRED, MAX_QUERY_TIME_MILLIS, MAX_REQUEST_URL_LENGTH, NAMED_GRAPH_URI, OPTION_CREATE_KB_NAMESPACE, QUERY_METHOD, QUERYID, USING_GRAPH_URI, USING_NAMED_GRAPH_URI, UTF8
Modifier and Type | Method and Description |
---|---|
long |
add(RemoteRepository.AddOp add)
Adds RDF data to the remote repository.
|
long |
add(RemoteRepository.AddOp add,
UUID uuid)
Adds RDF data to the remote repository.
|
void |
cancel(UUID queryId)
Cancel a query running remotely on the server.
|
BigdataSailRemoteRepository |
getBigdataSailRemoteRepository()
Flyweight method returns a wrapper for the sparql end point associated
with this instance.
|
Collection<org.openrdf.model.Resource> |
getContexts()
Return a list of contexts in use in a remote quads database.
|
RemoteRepositoryManager |
getRemoteRepositoryManager()
The
RemoteRepositoryManager object use to manage all access to the
service backing the sparqlEndpointURL . |
org.openrdf.query.GraphQueryResult |
getServiceDescription()
Return the SPARQL 1.1 Service Description for the end point.
|
org.openrdf.query.GraphQueryResult |
getServiceDescription(UUID uuid) |
String |
getSparqlEndPoint()
Return the SPARQL end point.
|
org.openrdf.query.GraphQueryResult |
getStatements(org.openrdf.model.Resource subj,
org.openrdf.model.URI pred,
org.openrdf.model.Value obj,
boolean includeInferred,
org.openrdf.model.Resource... contexts)
Return all matching statements.
|
boolean |
hasStatement(org.openrdf.model.Resource s,
org.openrdf.model.URI p,
org.openrdf.model.Value o,
boolean includeInferred,
org.openrdf.model.Resource... c)
Method to line up with the Sesame interface.
|
long |
postGraphML(String path)
Post a GraphML file to the blueprints layer of the remote bigdata instance.
|
IPreparedBooleanQuery |
prepareBooleanQuery(String query)
Prepare a boolean (ask) query.
|
IPreparedBooleanQuery |
prepareBooleanQuery(String query,
UUID uuid)
Prepare a boolean (ask) query.
|
IPreparedGraphQuery |
prepareGraphQuery(String query)
Prepare a graph query.
|
IPreparedGraphQuery |
prepareGraphQuery(String query,
UUID uuid)
Prepare a graph query.
|
IPreparedTupleQuery |
prepareTupleQuery(String query)
Prepare a tuple (select) query.
|
IPreparedTupleQuery |
prepareTupleQuery(String query,
UUID uuid)
Prepare a tuple (select) query.
|
IPreparedSparqlUpdate |
prepareUpdate(String updateStr)
Prepare a SPARQL UPDATE request.
|
IPreparedSparqlUpdate |
prepareUpdate(String updateStr,
UUID uuid)
Prepare a SPARQL UPDATE request.
|
long |
rangeCount(boolean exact,
org.openrdf.model.Resource s,
org.openrdf.model.URI p,
org.openrdf.model.Value o,
org.openrdf.model.Resource... c)
Perform a range count on the statement indices for a given triple (quad)
pattern.
|
long |
rangeCount(org.openrdf.model.Resource s,
org.openrdf.model.URI p,
org.openrdf.model.Value o,
org.openrdf.model.Resource... c)
Perform a fast range count on the statement indices for a given triple
(quad) pattern.
|
long |
remove(RemoteRepository.RemoveOp remove)
Removes RDF data from the remote repository.
|
long |
remove(RemoteRepository.RemoveOp remove,
UUID uuid)
Removes RDF data from the remote repository.
|
long |
size()
Perform a fast range count on the statement indices.
|
String |
toString() |
long |
update(RemoteRepository.RemoveOp remove,
RemoteRepository.AddOp add)
Perform an ACID update (delete+insert) per the semantics of the NanoSparqlServer.
|
long |
update(RemoteRepository.RemoveOp remove,
RemoteRepository.AddOp add,
UUID uuid)
Perform an ACID update
|
asGraph, booleanResults, checkResponseCode, contextsResults, getContextPath, mutationResults, rangeCountResults, serialize, toStrings
public String getSparqlEndPoint()
public RemoteRepositoryManager getRemoteRepositoryManager()
RemoteRepositoryManager
object use to manage all access to the
service backing the sparqlEndpointURL
.public BigdataSailRemoteRepository getBigdataSailRemoteRepository()
public long postGraphML(String path) throws Exception
Exception
public org.openrdf.query.GraphQueryResult getServiceDescription() throws Exception
Exception
public org.openrdf.query.GraphQueryResult getServiceDescription(UUID uuid) throws Exception
Exception
public IPreparedTupleQuery prepareTupleQuery(String query) throws Exception
query
- the query stringIPreparedTupleQuery
.Exception
public IPreparedTupleQuery prepareTupleQuery(String query, UUID uuid) throws Exception
query
- the query stringuuid
- The UUID
used to identify this query.IPreparedTupleQuery
.Exception
public IPreparedGraphQuery prepareGraphQuery(String query) throws Exception
query
- the query stringIPreparedGraphQuery
Exception
public IPreparedGraphQuery prepareGraphQuery(String query, UUID uuid) throws Exception
query
- the query stringuuid
- The UUID
used to identify this query.IPreparedGraphQuery
Exception
public IPreparedBooleanQuery prepareBooleanQuery(String query) throws Exception
query
- the query stringIPreparedBooleanQuery
Exception
public IPreparedBooleanQuery prepareBooleanQuery(String query, UUID uuid) throws Exception
query
- the query stringuuid
- The UUID
used to identify this query.IPreparedBooleanQuery
Exception
public IPreparedSparqlUpdate prepareUpdate(String updateStr) throws Exception
updateStr
- The SPARQL UPDATE request.SparqlUpdate
operation.Exception
public IPreparedSparqlUpdate prepareUpdate(String updateStr, UUID uuid) throws Exception
public org.openrdf.query.GraphQueryResult getStatements(org.openrdf.model.Resource subj, org.openrdf.model.URI pred, org.openrdf.model.Value obj, boolean includeInferred, org.openrdf.model.Resource... contexts) throws Exception
subj
- pred
- obj
- includeInferred
- contexts
- Exception
public boolean hasStatement(org.openrdf.model.Resource s, org.openrdf.model.URI p, org.openrdf.model.Value o, boolean includeInferred, org.openrdf.model.Resource... c) throws Exception
s
- The subject (optional).p
- The predicate (optional).o
- The value (optional).includeInferred
- when true
inferred statements will also be
considered.c
- The contexts (optional, BUT may not be a null Resource[]).true
iff a statement exists that matches the request.Exception
public void cancel(UUID queryId) throws Exception
queryID
- the UUID of the query to cancelException
public long rangeCount(org.openrdf.model.Resource s, org.openrdf.model.URI p, org.openrdf.model.Value o, org.openrdf.model.Resource... c) throws Exception
s
- the subject (can be null)p
- the predicate (can be null)o
- the object (can be null)c
- the context (can be null)Exception
public long rangeCount(boolean exact, org.openrdf.model.Resource s, org.openrdf.model.URI p, org.openrdf.model.Value o, org.openrdf.model.Resource... c) throws Exception
Note: fast range counts are *fast*. They require two key probes into the indices. Exact range counts are only fast when the indices do not support isolation or fused views. Isolation is used if the namespace supports full read/write transactions. Fused views are used in scale-out to model shards and are also used in full read/write transaction support.
exact
- if true
then an exact range count is requested,
otherwise a fast range count is requested.s
- the subject (can be null)p
- the predicate (can be null)o
- the object (can be null)c
- the context (can be null)Exception
public long size() throws Exception
Exception
public Collection<org.openrdf.model.Resource> getContexts() throws Exception
Closeable
. Callers will then have to invoke
Closeable.close()
to avoid leaking resources. (This change could
be made when making the CONTEXTS an operation that can be given a UUID
for cancellation by the client.)Exception
public long add(RemoteRepository.AddOp add) throws Exception
add
- The RDF data to be added.Exception
public long add(RemoteRepository.AddOp add, UUID uuid) throws Exception
public long remove(RemoteRepository.RemoveOp remove) throws Exception
remove
- The RDF data to be removed.Exception
public long remove(RemoteRepository.RemoveOp remove, UUID uuid) throws Exception
remove
- The RDF data to be removed.Exception
/ BLZG-1259
public long update(RemoteRepository.RemoveOp remove, RemoteRepository.AddOp add) throws Exception
Currently, the only combination supported is delete by query with add by
post (Iterable
remove
- The RDF data to be removed.add
- The RDF data to be added.Exception
public long update(RemoteRepository.RemoveOp remove, RemoteRepository.AddOp add, UUID uuid) throws Exception
There are two different patterns which are supported:
remove
- The RDF data to be removed (either a collection of statements
or a CONSTRUCT or DESCRIBE QUERY identifying the data to be
deleted).add
- The RDF data to be added (must be a collection of statements).Exception
://wiki.blazegraph.com/wiki/index.php/NanoSparqlServer#UPDATE_.28D
ELETE_.2B_INSERT.29
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.