public abstract class BigdataGraph extends Object implements com.tinkerpop.blueprints.Graph
Modifier and Type | Class and Description |
---|---|
class |
BigdataGraph.EdgeIterable
Translate a collection of Bigdata statements into an iteration of
Blueprints edges.
|
class |
BigdataGraph.FusedIterable<T>
Fuse two iterables together into one.
|
static interface |
BigdataGraph.Options |
class |
BigdataGraph.VertexIterable
Translate a collection of Bigdata statements into an iteration of
Blueprints vertices.
|
class |
BigdataGraph.WrappedResult<E> |
Modifier and Type | Field and Description |
---|---|
protected org.openrdf.model.URI |
EDGE
URI used to represent a Edge.
|
protected BlueprintsValueFactory |
factory
Factory for round-tripping between Blueprints data and RDF data.
|
protected static com.tinkerpop.blueprints.Features |
FEATURES |
protected org.openrdf.model.URI |
LABEL
URI used for labeling edges.
|
protected boolean |
laxProperties
If true, use pure append mode (don't check old property values).
|
protected int |
maxQueryTime
Max Query Time used to globally set the query timeout.
|
static int |
SPARQL_LOG_MAX
Maximum number of chars to print through the SparqlLogger.
|
protected org.openrdf.model.URI |
TYPE
URI used for typing elements.
|
protected org.openrdf.model.URI |
VERTEX
URI used to represent a Vertex.
|
Constructor and Description |
---|
BigdataGraph(BlueprintsValueFactory factory) |
BigdataGraph(BlueprintsValueFactory factory,
Properties props) |
Modifier and Type | Method and Description |
---|---|
com.tinkerpop.blueprints.Edge |
addEdge(Object key,
com.tinkerpop.blueprints.Vertex from,
com.tinkerpop.blueprints.Vertex to,
boolean anonymous)
Add an edge.
|
com.tinkerpop.blueprints.Edge |
addEdge(Object key,
com.tinkerpop.blueprints.Vertex from,
com.tinkerpop.blueprints.Vertex to,
String label)
Add an edge.
|
com.tinkerpop.blueprints.Edge |
addEdge(Object key,
com.tinkerpop.blueprints.Vertex from,
com.tinkerpop.blueprints.Vertex to,
String label,
boolean anonymous)
Add an edge.
|
com.tinkerpop.blueprints.Vertex |
addVertex(Object key)
Add a vertex.
|
boolean |
ask(String queryStr)
Select results using a SPARQL query.
|
boolean |
ask(String queryStr,
String externalQueryId)
Select results using a SPARQL query.
|
abstract void |
cancel(RunningQuery r)
Kill a running query specified by the RunningQuery object.
|
abstract void |
cancel(String uuid)
Kill a running query specified by the UUID String.
|
abstract void |
cancel(UUID queryId)
Kill a running query specified by the UUID.
|
protected BigdataBindingSet |
convert(org.openrdf.query.BindingSet bs)
Convert SPARQL/RDF results into PG form.
|
abstract org.openrdf.repository.RepositoryConnection |
cxn()
Different implementations will return different types of connections
depending on the mode (client/server, embedded, read-only, etc.)
|
protected void |
finalizeQuery(UUID queryId)
Wrapper method to clean up query and throw exception is interrupted.
|
<T> Iterable<T> |
fuse(Iterable<T>... args)
Fuse two iterables together into one.
|
com.tinkerpop.blueprints.Edge |
getEdge(Object key)
Lookup an edge.
|
Iterable<com.tinkerpop.blueprints.Edge> |
getEdges()
Iterate all edges.
|
Iterable<com.tinkerpop.blueprints.Edge> |
getEdges(String prop,
Object val)
Find edges with the supplied property value.
|
protected org.openrdf.query.GraphQueryResult |
getElements(org.openrdf.model.URI from,
org.openrdf.model.URI to,
String... labels)
Translates the request to a high-performance SPARQL query:
construct {
?from ?edge ?to .
|
com.tinkerpop.blueprints.Features |
getFeatures() |
Object |
getProperty(org.openrdf.model.URI uri,
String prop)
Return a single-valued property for an edge or vertex.
|
Object |
getProperty(org.openrdf.model.URI uri,
org.openrdf.model.URI prop)
Return a single-valued property for an edge or vertex.
|
protected Object |
getProperty(org.openrdf.model.Value value) |
Set<String> |
getPropertyKeys(org.openrdf.model.URI uri)
Return the property names for an edge or vertex.
|
abstract RunningQuery |
getQueryByExternalId(String extQueryId)
Return the
RunningQuery for a currently executing SPARQL QUERY or
UPDATE request. |
abstract RunningQuery |
getQueryById(UUID queryId2)
Return the
RunningQuery for a currently executing SPARQL QUERY or
UPDATE request. |
abstract Collection<RunningQuery> |
getRunningQueries()
Return a Collection of running queries
|
BlueprintsValueFactory |
getValueFactory()
Return the factory used to round-trip between Blueprints values and
RDF values.
|
com.tinkerpop.blueprints.Vertex |
getVertex(Object key)
Lookup a vertex.
|
Iterable<com.tinkerpop.blueprints.Vertex> |
getVertices()
Iterate all vertices.
|
Iterable<com.tinkerpop.blueprints.Vertex> |
getVertices(String prop,
Object val)
Find vertices with the supplied property value.
|
ICloseableIterator<BigdataGraphEdit> |
history(List<org.openrdf.model.URI> ids)
If history is enabled, return an iterator of historical graph edits
related to any of the supplied ids.
|
ICloseableIterator<BigdataGraphEdit> |
history(List<org.openrdf.model.URI> ids,
String extQueryId) |
protected abstract boolean |
isQueryCancelled(UUID queryId)
Helper method to determine if a query was cancelled.
|
abstract boolean |
isReadOnly()
Is this a read-only view of the graph?
|
void |
loadGraphML(String file)
Post a GraphML file to the remote server.
|
ICloseableIterator<BigdataGraphAtom> |
project(String queryStr)
Project a subgraph using a SPARQL query.
|
ICloseableIterator<BigdataGraphAtom> |
project(String queryStr,
String externalQueryId)
Project a subgraph using a SPARQL query.
|
com.tinkerpop.blueprints.GraphQuery |
query()
Providing an override implementation for our GraphQuery to avoid the
low-performance scan and filter paradigm.
|
void |
removeEdge(com.tinkerpop.blueprints.Edge edge)
Remove an edge and its properties.
|
Object |
removeProperty(org.openrdf.model.URI uri,
String prop)
Remove all values for a particular property on an edge or vertex.
|
Object |
removeProperty(org.openrdf.model.URI uri,
org.openrdf.model.URI prop)
Remove all values for a particular property on an edge or vertex.
|
void |
removeVertex(com.tinkerpop.blueprints.Vertex vertex)
Remove a vertex and its edges and properties.
|
ICloseableIterator<BigdataBindingSet> |
select(String queryStr)
Select results using a SPARQL query.
|
ICloseableIterator<BigdataBindingSet> |
select(String queryStr,
String externalQueryId)
Select results using a SPARQL query.
|
protected void |
setMaxQueryTime(org.openrdf.query.Query query)
Utility function to set the Query timeout to the global
setting if it is configured.
|
void |
setProperty(org.openrdf.model.URI s,
String prop,
Object val)
Set a single-value property on an edge or vertex (remove the old
value first).
|
void |
setProperty(org.openrdf.model.URI uri,
org.openrdf.model.URI prop,
Collection<org.openrdf.model.Literal> vals)
Set a multi-value property on an edge or vertex (remove the old
values first).
|
protected abstract UUID |
setupQuery(BigdataSailRepositoryConnection cxn,
ASTContainer astContainer,
QueryType queryType,
String extQueryId)
Embedded clients can override this to access query management
capabilities.
|
protected abstract void |
tearDownQuery(UUID queryId)
Embedded clients can override this to access query management
capabilities.
|
protected BigdataGraphAtom |
toGraphAtom(org.openrdf.model.Statement stmt)
Convert a unit of RDF data to an atomic unit of PG data.
|
protected BigdataGraphAtom |
toGraphAtom(org.openrdf.model.URI s,
org.openrdf.model.URI p,
org.openrdf.model.Value o)
Convert a unit of RDF data to an atomic unit of PG data.
|
protected Collection<org.openrdf.model.Literal> |
toLiterals(Object val) |
String |
toString()
For some reason this is part of the specification (i.e.
|
void |
update(String queryStr)
Update graph using SPARQL Update.
|
void |
update(String queryStr,
String extQueryId)
Update graph using SPARQL Update.
|
public static final int SPARQL_LOG_MAX
protected final int maxQueryTime
protected final org.openrdf.model.URI TYPE
protected final org.openrdf.model.URI VERTEX
protected final org.openrdf.model.URI EDGE
protected final org.openrdf.model.URI LABEL
protected final BlueprintsValueFactory factory
protected final boolean laxProperties
protected static final com.tinkerpop.blueprints.Features FEATURES
public BigdataGraph(BlueprintsValueFactory factory)
public BigdataGraph(BlueprintsValueFactory factory, Properties props)
public String toString()
public BlueprintsValueFactory getValueFactory()
public abstract org.openrdf.repository.RepositoryConnection cxn() throws Exception
Exception
public Object getProperty(org.openrdf.model.URI uri, String prop)
BigdataElement}
public Object getProperty(org.openrdf.model.URI uri, org.openrdf.model.URI prop)
BigdataElement}
protected Object getProperty(org.openrdf.model.Value value)
public Set<String> getPropertyKeys(org.openrdf.model.URI uri)
BigdataElement}
public Object removeProperty(org.openrdf.model.URI uri, String prop)
BigdataElement}
public Object removeProperty(org.openrdf.model.URI uri, org.openrdf.model.URI prop)
BigdataElement}
public void setProperty(org.openrdf.model.URI s, String prop, Object val)
BigdataElement}
protected Collection<org.openrdf.model.Literal> toLiterals(Object val)
public void setProperty(org.openrdf.model.URI uri, org.openrdf.model.URI prop, Collection<org.openrdf.model.Literal> vals)
BigdataElement}
public void loadGraphML(String file) throws Exception
Exception
public com.tinkerpop.blueprints.Edge addEdge(Object key, com.tinkerpop.blueprints.Vertex from, com.tinkerpop.blueprints.Vertex to, String label)
addEdge
in interface com.tinkerpop.blueprints.Graph
public com.tinkerpop.blueprints.Edge addEdge(Object key, com.tinkerpop.blueprints.Vertex from, com.tinkerpop.blueprints.Vertex to, boolean anonymous)
public com.tinkerpop.blueprints.Edge addEdge(Object key, com.tinkerpop.blueprints.Vertex from, com.tinkerpop.blueprints.Vertex to, String label, boolean anonymous)
public com.tinkerpop.blueprints.Vertex addVertex(Object key)
addVertex
in interface com.tinkerpop.blueprints.Graph
public com.tinkerpop.blueprints.Edge getEdge(Object key)
getEdge
in interface com.tinkerpop.blueprints.Graph
public Iterable<com.tinkerpop.blueprints.Edge> getEdges()
getEdges
in interface com.tinkerpop.blueprints.Graph
protected org.openrdf.query.GraphQueryResult getElements(org.openrdf.model.URI from, org.openrdf.model.URI to, String... labels) throws Exception
Exception
public Iterable<com.tinkerpop.blueprints.Edge> getEdges(String prop, Object val)
getEdges
in interface com.tinkerpop.blueprints.Graph
public com.tinkerpop.blueprints.Vertex getVertex(Object key)
getVertex
in interface com.tinkerpop.blueprints.Graph
public Iterable<com.tinkerpop.blueprints.Vertex> getVertices()
getVertices
in interface com.tinkerpop.blueprints.Graph
public Iterable<com.tinkerpop.blueprints.Vertex> getVertices(String prop, Object val)
getVertices
in interface com.tinkerpop.blueprints.Graph
public com.tinkerpop.blueprints.GraphQuery query()
BigdataGraphQuery
.query
in interface com.tinkerpop.blueprints.Graph
public void removeEdge(com.tinkerpop.blueprints.Edge edge)
removeEdge
in interface com.tinkerpop.blueprints.Graph
public void removeVertex(com.tinkerpop.blueprints.Vertex vertex)
removeVertex
in interface com.tinkerpop.blueprints.Graph
public final <T> Iterable<T> fuse(Iterable<T>... args)
public ICloseableIterator<BigdataGraphAtom> project(String queryStr) throws Exception
Warning: You MUST close this iterator when finished.
Exception
public ICloseableIterator<BigdataGraphAtom> project(String queryStr, String externalQueryId) throws Exception
Warning: You MUST close this iterator when finished.
Exception
protected BigdataGraphAtom toGraphAtom(org.openrdf.model.Statement stmt)
protected BigdataGraphAtom toGraphAtom(org.openrdf.model.URI s, org.openrdf.model.URI p, org.openrdf.model.Value o)
public ICloseableIterator<BigdataBindingSet> select(String queryStr) throws Exception
Warning: You MUST close this iterator when finished.
Exception
public ICloseableIterator<BigdataBindingSet> select(String queryStr, String externalQueryId) throws Exception
Warning: You MUST close this iterator when finished.
Exception
protected BigdataBindingSet convert(org.openrdf.query.BindingSet bs)
public boolean ask(String queryStr) throws Exception
Exception
public boolean ask(String queryStr, String externalQueryId) throws Exception
Exception
public void update(String queryStr) throws Exception
Exception
public void update(String queryStr, String extQueryId) throws Exception
Exception
public ICloseableIterator<BigdataGraphEdit> history(List<org.openrdf.model.URI> ids) throws Exception
Warning: You MUST close this iterator when finished.
Exception
AbstractTripleStore.Options#STATEMENT_IDENTIFIERS}
,
AbstractTripleStore.Options#RDR_HISTORY_CLASS}
,
RDRHistory}
public ICloseableIterator<BigdataGraphEdit> history(List<org.openrdf.model.URI> ids, String extQueryId) throws Exception
Exception
public com.tinkerpop.blueprints.Features getFeatures()
getFeatures
in interface com.tinkerpop.blueprints.Graph
protected void setMaxQueryTime(org.openrdf.query.Query query)
public abstract Collection<RunningQuery> getRunningQueries()
public abstract void cancel(UUID queryId)
queryId
- public abstract void cancel(String uuid)
String
- uuidpublic abstract void cancel(RunningQuery r)
r
- public abstract RunningQuery getQueryById(UUID queryId2)
RunningQuery
for a currently executing SPARQL QUERY or
UPDATE request.queryId2
- The UUID
for the request.RunningQuery
iff it was found.public abstract RunningQuery getQueryByExternalId(String extQueryId)
RunningQuery
for a currently executing SPARQL QUERY or
UPDATE request.queryId2
- The UUID
for the request.RunningQuery
iff it was found.protected abstract UUID setupQuery(BigdataSailRepositoryConnection cxn, ASTContainer astContainer, QueryType queryType, String extQueryId)
cxn
- astContainer
- protected void finalizeQuery(UUID queryId) throws QueryCancelledException
queryId
- QueryCancelledException
protected abstract void tearDownQuery(UUID queryId)
absQuery
- protected abstract boolean isQueryCancelled(UUID queryId)
queryId
- public abstract boolean isReadOnly()
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.