For a museum we are looking into setting up a triple store containing metadata of the collection and making this available to researchers using a SPARQL endpoint. Stardog looks promising, but we have a requirement about querying data revisions that I am not sure Stardog addresses.
When a researcher runs a query and obtains a result set, someone else who would like to reproduce these results at a later point in time might end up with a different result set, since the underlying dataset has been updated. I read the documentation about Versioning (http://docs.stardog.com/#_versioning) and to put it in that context, if you would query for foaf:Person at revision 5e8c, you will get 2 persons, while firing the same query at revision e5ef, will return 3 persons. I would like a researchers to be able to state they queried the database at revision 5e8c, making the 2 persons reproducible.
Is it possible to query different revisions of the data using Stardog?
ConnectionConfiguration config = ConnectionConfiguration
.to("stardog")
.credentials("admin","admin")
.server("snarl://docker.local:5820");
// 'INSERT DATA {GRAPH <urn:g> {<urn:s> <urn:p> <urn:o>}}' executed, code omitted
try(VersioningConnection conn = config.connect().as(VersioningConnection.class)) {
TupleQueryResult result = conn.select("SELECT * {?s ?p ?o}").execute();
while(result.hasNext()){
System.out.println(result.next());
}
// '<urn:s> <urn:p> <urn:o>' returned, not the versioning data as wished
}
TupleQueryResult result = conn.getVersioningMetadata().select("SELECT * {?s ?p ?o}").execute();