Compute human readable diffs between RDF graphs.
project | 6 years ago | ||
src/ main | 6 years ago | ||
.gitignore | 6 years ago | ||
README.md | 6 years ago | ||
build.sbt | 6 years ago |
Compute human readable diffs between RDF graphs.
Use Jena to check two RDF graphs to see if they are isomorphic, and if not, show which statements are only in one graph and not in the other. From the Jena docs:
Two models are isomorphic when each statement in one can be matched with a statement in the other. Statements which are identical match. Special treatment is given to anonymous nodes. A binding is a one to one mapping which maps each anonymous node in this model to an anonymous node in model. Two statements s1 and s2 match under a binding if if s1.subject is anonymous and s2.subject is anonymous and the binding maps s1.subject to s2.subject. Two models are isomorphic if there is a binding that allows all the statements in one model to match a a statement in the other.
The build uses sbt, the Scala Build Tool. Once sbt is installed, build the utility using:
sbt assembly
resulting in target/scala-2.12/rdfdiff, an executable JAR file with all necessary Jena libraries included. Copy the file to somewhere in your path, e.g. /usr/local/bin/ and make it executable.
-- Alex Tucker, 2018.