public interface Graph
Modifier and Type | Method and Description |
---|---|
void |
add(BlankNodeOrIRI subject,
IRI predicate,
RDFTerm object)
Add a triple to the graph.
|
void |
add(Triple triple)
Add a triple to the graph.
|
void |
clear()
Clear the graph.
|
boolean |
contains(BlankNodeOrIRI subject,
IRI predicate,
RDFTerm object)
Check if graph contains a pattern of triples.
|
boolean |
contains(Triple triple)
Check if graph contains triple.
|
java.util.stream.Stream<? extends Triple> |
getTriples()
Get all triples contained by the graph.
The behaviour of the Stream is not specified if add, remove, or clear, are called on the Stream before it terminates. Implementations may throw ConcurrentModificationException from Stream methods if they detect a conflict while the Stream is active. |
java.util.stream.Stream<? extends Triple> |
getTriples(BlankNodeOrIRI subject,
IRI predicate,
RDFTerm object)
Get all triples contained by the graph matched with the pattern.
|
void |
remove(BlankNodeOrIRI subject,
IRI predicate,
RDFTerm object)
Remove a concrete pattern of triples from the graph.
|
void |
remove(Triple triple)
Remove a concrete triple from the graph.
|
long |
size()
Number of triples contained by the graph.
|
void add(BlankNodeOrIRI subject, IRI predicate, RDFTerm object)
subject
- The triple subjectpredicate
- The triple predicateobject
- The triple objectboolean contains(Triple triple)
triple
- The triple to check.boolean contains(BlankNodeOrIRI subject, IRI predicate, RDFTerm object)
subject
- The triple subject (null is a wildcard)predicate
- The triple predicate (null is a wildcard)object
- The triple object (null is a wildcard)void remove(Triple triple)
triple
- triple to removevoid remove(BlankNodeOrIRI subject, IRI predicate, RDFTerm object)
subject
- The triple subject (null is a wildcard)predicate
- The triple predicate (null is a wildcard)object
- The triple object (null is a wildcard)void clear()
long size()
java.util.stream.Stream<? extends Triple> getTriples()
Stream
over all of the triples in the graph.java.util.stream.Stream<? extends Triple> getTriples(BlankNodeOrIRI subject, IRI predicate, RDFTerm object)
subject
- The triple subject (null is a wildcard)predicate
- The triple predicate (null is a wildcard)object
- The triple object (null is a wildcard)Stream
over the matched triples.Copyright © 2014. All rights reserved.