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