public interface Graph extends Set<Edge>, LocalNameService
| Modifier and Type | Method and Description |
|---|---|
void |
add(Vertex vertex)
Add all the outgoing statements from the given vertex.
|
GraphBuilder |
builder() |
boolean |
contains(org.openrdf.model.Resource subject,
org.openrdf.model.URI predicate,
org.openrdf.model.Value object) |
Edge |
edge(Edge edge) |
Edge |
edge(org.openrdf.model.Resource subject,
org.openrdf.model.URI predicate,
List<? extends org.openrdf.model.Value> list) |
Edge |
edge(org.openrdf.model.Resource subject,
org.openrdf.model.URI predicate,
org.openrdf.model.Value object)
Add an edge to this Graph.
|
Edge |
edge(org.openrdf.model.Resource subject,
org.openrdf.model.URI predicate,
org.openrdf.model.Value object,
org.openrdf.model.Resource context) |
Edge |
edge(Vertex subject,
org.openrdf.model.URI predicate,
Vertex object) |
org.openrdf.model.Resource |
getId()
Get the identifier this Graph as a named graph.
|
NamespaceManager |
getNamespaceManager() |
Vertex |
getVertex(org.openrdf.model.Resource id)
Get the Vertex with the specified id.
|
Vertex |
getVertex(String id)
A convenience method that gets the Vertex with the specified id.
|
Set<org.openrdf.model.URI> |
lookupLocalName(String localName)
Compute the set of all URI values in this graph which have a given local name
|
Vertex |
mappedBNode(org.openrdf.model.BNode bnode)
Obtain the Vertex that is mapped to a given BNode in the current transaction.
|
void |
remove(Edge edge)
Remove the specified edge from this graph
|
void |
remove(org.openrdf.model.Resource resource)
Remove a resource from this graph.
|
void |
remove(Vertex v)
Remove a vertex from this graph.
|
void |
setId(org.openrdf.model.Resource id)
Set the identifier for this Graph as a named graph.
|
void |
setNamespaceManager(NamespaceManager nsManager) |
Transaction |
tx()
Get the Transactional view of this Graph.
|
Traversal |
v(org.openrdf.model.Resource subject)
Return a traversal for the specified subject.
|
Vertex |
vertex()
A convenience method that creates a new Vertex with a BNode identifier.
|
Vertex |
vertex(org.openrdf.model.Resource id)
Create or get a Vertex with the specified id.
|
Vertex |
vertex(String id)
A convenience method that gets or creates a Vertex from a string IRI identifier.
|
Collection<Vertex> |
vertices()
Returns the set of vertices in this Graph
|
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, spliterator, toArray, toArrayparallelStream, removeIf, streamGraphBuilder builder()
NamespaceManager getNamespaceManager()
void setNamespaceManager(NamespaceManager nsManager)
org.openrdf.model.Resource getId()
void setId(org.openrdf.model.Resource id)
id - The identifier for this GraphVertex vertex()
Vertex vertex(String id)
id - The IRI for the vertex that is to be returned.Collection<Vertex> vertices()
Vertex vertex(org.openrdf.model.Resource id)
id - The identifier for the Vertex.Vertex getVertex(org.openrdf.model.Resource id)
id - The identifier for the Vertex that is to be returnedVertex getVertex(String id)
id - The identifier for the Vertex that is to be returnedEdge edge(org.openrdf.model.Resource subject, org.openrdf.model.URI predicate, org.openrdf.model.Value object)
subject - The subject in the statement expressed by the edge.predicate - The predicate in the statement expressed by the edgeobject - The value in the statement expressed by the edge.Edge edge(org.openrdf.model.Resource subject, org.openrdf.model.URI predicate, org.openrdf.model.Value object, org.openrdf.model.Resource context)
Edge edge(org.openrdf.model.Resource subject, org.openrdf.model.URI predicate, List<? extends org.openrdf.model.Value> list)
void add(Vertex vertex)
vertex - The vertex whose outgoing statements will be added to this graph.void remove(Edge edge)
edge - The edge to be removed.void remove(Vertex v)
v - The vertex to be removedvoid remove(org.openrdf.model.Resource resource)
Vertex v = graph.getVertex(resource); graph.remove(v);
resource - Traversal v(org.openrdf.model.Resource subject)
subject - Transaction tx()
boolean contains(org.openrdf.model.Resource subject,
org.openrdf.model.URI predicate,
org.openrdf.model.Value object)
Set<org.openrdf.model.URI> lookupLocalName(String localName)
lookupLocalName in interface LocalNameServicelocalName - The local name to be matchedVertex mappedBNode(org.openrdf.model.BNode bnode)
Copyright © 2019. All rights reserved.