@Test public void provenanceIsAddedToTheLatestRevision() throws Exception { final int newVersion = 0; final String newRevision = SUBJECT + "/" + newVersion; GraphQlToRdfPatch instance = new GraphQlToRdfPatch(SUBJECT, USER_URI, changeLog); instance.sendQuads(serializer, s -> { }, dataSet); verify(serializer).addDelQuad( eq(true), startsWith(DATA_SET_URI + "/activity"), eq("http: eq(newRevision), isNull(), isNull(), isNull() ); verify(serializer).addDelQuad( eq(true), startsWith(DATA_SET_URI + "/activity"), eq(RDF_TYPE), eq("http: isNull(), isNull(), isNull() ); verify(serializer).addDelQuad( eq(true), startsWith(DATA_SET_URI + "/activity"), eq("http: eq(USER_URI), isNull(), isNull(), isNull()) ; verify(serializer).addDelQuad(true, USER_URI, RDF_TYPE, "http: verify(serializer).addDelQuad( eq(true), startsWith(DATA_SET_URI + "/activity"), eq("http: startsWith(DATA_SET_URI + "/association"), isNull(), isNull(), isNull() ); verify(serializer).addDelQuad( eq(true), startsWith(DATA_SET_URI + "/association"), eq(RDF_TYPE), eq("http: isNull(), isNull(), isNull() ); verify(serializer).addDelQuad( eq(true), startsWith(DATA_SET_URI + "/association"), eq("http: eq(USER_URI), isNull(), isNull(), isNull() ); verify(serializer).addDelQuad( eq(true), startsWith(DATA_SET_URI + "/association"), eq("http: startsWith(DATA_SET_URI + "/plan"), isNull(), isNull(), isNull() ); verify(serializer).addDelQuad( eq(true), startsWith(DATA_SET_URI + "/plan"), eq(RDF_TYPE), eq("http: isNull(), isNull(), isNull() ); }
@Override public void sendQuads(RdfPatchSerializer saver, Consumer<String> importStatusConsumer, DataSet dataSet) throws LogStorageFailedException { addData(saver, dataSet); String newRevision = addNewRevision(saver, dataSet); String association = addProvenance(saver, dataSet, newRevision); addPlan(saver, dataSet, newRevision, association); }
GraphQlToRdfPatch implements PatchRdfCreator { @Override public void sendQuads(RdfPatchSerializer saver, Consumer<String> importStatusConsumer, DataSet dataSet) throws LogStorageFailedException { addData(saver, dataSet); String newRevision = addNewRevision(saver, dataSet); String association = addProvenance(saver, dataSet, newRevision); addPlan(saver, dataSet, newRevision, association); } }
GraphQlToRdfPatch implements PatchRdfCreator { @Override public void sendQuads(RdfPatchSerializer saver, Consumer<String> importStatusConsumer, DataSet dataSet) throws LogStorageFailedException { addData(saver, dataSet); String newRevision = addNewRevision(saver, dataSet); String association = addProvenance(saver, dataSet, newRevision); addPlan(saver, dataSet, newRevision, association); } @JsonCreator  GraphQlToRdfPatch(
    @JsonProperty("subjectUri") String subjectUri,
    @JsonProperty("userUri") String userUri,
    @JsonProperty("changeLog") ChangeLog changeLog
  ); }
GraphQlToRdfPatch implements PatchRdfCreator { @Override public void sendQuads(RdfPatchSerializer saver, Consumer<String> importStatusConsumer, DataSet dataSet) throws LogStorageFailedException { addData(saver, dataSet); String newRevision = addNewRevision(saver, dataSet); String association = addProvenance(saver, dataSet, newRevision); addPlan(saver, dataSet, newRevision, association); } @JsonCreator  GraphQlToRdfPatch(
    @JsonProperty("subjectUri") String subjectUri,
    @JsonProperty("userUri") String userUri,
    @JsonProperty("changeLog") ChangeLog changeLog
  ); @Override void sendQuads(RdfPatchSerializer saver, Consumer<String> importStatusConsumer, DataSet dataSet); }
GraphQlToRdfPatch implements PatchRdfCreator { @Override public void sendQuads(RdfPatchSerializer saver, Consumer<String> importStatusConsumer, DataSet dataSet) throws LogStorageFailedException { addData(saver, dataSet); String newRevision = addNewRevision(saver, dataSet); String association = addProvenance(saver, dataSet, newRevision); addPlan(saver, dataSet, newRevision, association); } @JsonCreator  GraphQlToRdfPatch(
    @JsonProperty("subjectUri") String subjectUri,
    @JsonProperty("userUri") String userUri,
    @JsonProperty("changeLog") ChangeLog changeLog
  ); @Override void sendQuads(RdfPatchSerializer saver, Consumer<String> importStatusConsumer, DataSet dataSet);  }