Class GraphDiff
Implementation of a Graph Difference algorithm for RDF Graphs.
Inherited Members
Namespace: VDS.RDF
Assembly: dotNetRdf.dll
Syntax
public class GraphDiff
Remarks
This algorithm is broadly based upon the methodology fror computing differences in RDF Graphs described in the RDFSync paper by Tummarello et al. This is an implementation purely of a difference algorithm and not the synchronisation aspects described in their paper. Main difference between their algorithm and mine is that mine does not make the input Graphs lean as it is concerned with showing the raw differences between the Graphs and does not concern itself with whether the differences may be semantically irrelevant.
To understand this consider the following Graphs:
Graph A
_:autos1 rdfs:label "Rob" .
Graph B
_:autos1 rdfs:label "Rob" .
_:autos2 rdfs:label "Rob" .
Given these Graphs computing the Graph Difference between A and B would report an Added MSG (Minimal Spanning Graph) when in fact the 2nd Graph is non-lean and could be reduced to the same as the 1st Graph.
Methods
| Edit this page View SourceComputeMSGs(IGraph, HashSet<Triple>, List<IGraph>)
Computes MSGs for a Graph.
Declaration
public static void ComputeMSGs(IGraph g, HashSet<Triple> unassigned, List<IGraph> msgs)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph. |
HashSet<Triple> | unassigned | Triples that need assigning to MSGs. |
List<IGraph> | msgs | MSGs list to populate. |
Difference(IGraph, IGraph)
Calculates the Difference between the two Graphs i.e. the changes required to get from the 1st Graph to the 2nd Graph.
Declaration
public GraphDiffReport Difference(IGraph a, IGraph b)
Parameters
Type | Name | Description |
---|---|---|
IGraph | a | First Graph. |
IGraph | b | Second Graph. |
Returns
Type | Description |
---|---|
GraphDiffReport |