Package org.fcrepo.kernel.api.utils
Class GraphDifferencer
- java.lang.Object
-
- org.fcrepo.kernel.api.utils.GraphDifferencer
-
public class GraphDifferencer extends Object
A wrappingStream
that calculates two differences between aGraph
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
Constructors Constructor Description GraphDifferencer(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stream<org.apache.jena.graph.Triple>
common()
This method will return null until the source iterator is exhausted.Stream<org.apache.jena.graph.Triple>
difference()
This method returns the difference between the two input sources.Stream<org.apache.jena.graph.Triple>
notCommon()
This method will return null until the source iterator is exhausted.
-
-
-
Constructor Detail
-
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 Detail
-
difference
public Stream<org.apache.jena.graph.Triple> difference()
This method returns the difference between the two input sources.- Returns:
- The differences between the two inputs.
-
common
public Stream<org.apache.jena.graph.Triple> 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.
-
-