Class GraphDifferencer

java.lang.Object
org.fcrepo.kernel.api.utils.GraphDifferencer

public class GraphDifferencer extends Object
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

    Constructors
    Constructor
    Description
    GraphDifferencer(org.apache.jena.graph.Graph replacement, Stream<org.apache.jena.graph.Triple> original)
    Diff a graph against a stream of triples
    GraphDifferencer(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 Type
    Method
    Description
    Stream<org.apache.jena.graph.Triple>
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 replacement
      original - 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 replacement
      original - the original
  • Method Details

    • 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.
    • notCommon

      public Stream<org.apache.jena.graph.Triple> 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.