public class DatasetGraphView extends Object implements Graph
Graph view on a Dataset.
This view is backed by a Dataset, and can be constructed in two ways:
DatasetGraphView(Dataset)Quads of the Dataset is represented as a Triple. Adding
triples will add them to the default graph, while removing triples
will remove from all graphs.DatasetGraphView(Dataset, BlankNodeOrIRI)IRI,
a BlankNode, or null for the default
graph.Changes in the Graph are reflected directly in the Dataset and vice versa. This class is thread-safe is the underlying Dataset is thread-safe.
| Constructor and Description |
|---|
DatasetGraphView(Dataset dataset) |
DatasetGraphView(Dataset dataset,
BlankNodeOrIRI namedGraph) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(BlankNodeOrIRI subject,
IRI predicate,
RDFTerm object) |
void |
add(Triple triple) |
void |
clear() |
void |
close() |
boolean |
contains(BlankNodeOrIRI subject,
IRI predicate,
RDFTerm object) |
boolean |
contains(Triple triple) |
void |
remove(BlankNodeOrIRI subject,
IRI predicate,
RDFTerm object) |
void |
remove(Triple triple) |
long |
size() |
Stream<? extends Triple> |
stream() |
Stream<? extends Triple> |
stream(BlankNodeOrIRI subject,
IRI predicate,
RDFTerm object) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetTriples, getTriples, iterate, iteratepublic DatasetGraphView(Dataset dataset)
public DatasetGraphView(Dataset dataset, BlankNodeOrIRI namedGraph)
public void close()
throws Exception
close in interface AutoCloseableclose in interface GraphExceptionpublic void add(Triple triple)
public void add(BlankNodeOrIRI subject, IRI predicate, RDFTerm object)
public boolean contains(Triple triple)
public boolean contains(BlankNodeOrIRI subject, IRI predicate, RDFTerm object)
public void remove(Triple triple)
public void remove(BlankNodeOrIRI subject, IRI predicate, RDFTerm object)
public void clear()
public long size()
Copyright © 2015–2017 The Apache Software Foundation. All rights reserved.