Package org.fcrepo.kernel.api.utils
Class GraphDifferencer
java.lang.Object
org.fcrepo.kernel.api.utils.GraphDifferencer
A wrapping
Stream that calculates two differences between a
Graph A and a source Stream B. The differences are (A - (A ∩ B)) and
(B - (A ∩ B)). The ordinary output of this stream is (B - (A ∩ B)), and
after exhaustion, sets containing (A - (A ∩ B)) and (A ∩ B) are available.- Since:
- Oct 24, 2013
- Author:
- ajs6f, acoburn
-
Constructor Summary
ConstructorsConstructorDescriptionGraphDifferencer(org.apache.jena.graph.Graph replacement, Stream<org.apache.jena.graph.Triple> original) Diff a graph against a stream of triplesGraphDifferencer(org.apache.jena.rdf.model.Model replacement, Stream<org.apache.jena.graph.Triple> original) Diff a Model against a stream of triples -
Method Summary
Modifier and TypeMethodDescriptionStream<org.apache.jena.graph.Triple> common()This method will return null until the source iterator is exhausted.Stream<org.apache.jena.graph.Triple> This method returns the difference between the two input sources.Stream<org.apache.jena.graph.Triple> This method will return null until the source iterator is exhausted.
-
Constructor Details
-
GraphDifferencer
public GraphDifferencer(org.apache.jena.rdf.model.Model replacement, Stream<org.apache.jena.graph.Triple> original) Diff a Model against a stream of triples- Parameters:
replacement- the replacementoriginal- the original
-
GraphDifferencer
public GraphDifferencer(org.apache.jena.graph.Graph replacement, Stream<org.apache.jena.graph.Triple> original) Diff a graph against a stream of triples- Parameters:
replacement- the replacementoriginal- the original
-
-
Method Details
-
difference
This method returns the difference between the two input sources.- Returns:
- The differences between the two inputs.
-
common
This method will return null until the source iterator is exhausted.- Returns:
- The elements that turned out to be common to the two inputs.
-
notCommon
This method will return null until the source iterator is exhausted.- Returns:
- The elements that turned out not to be common to the two inputs.
-