@Test public void addsQuadsForEachValueInAnAddition() throws Exception { String addedValue = "newValue"; String addedValue2 = "newValue2"; addAdditionsToChangeLog( new Change(SUBJECT, PRED1, newArrayList(new Value(addedValue, STRING), new Value(addedValue2, STRING)), null) ); GraphQlToRdfPatch instance = new GraphQlToRdfPatch(SUBJECT, USER_URI, changeLog); instance.sendQuads(serializer, s -> { }, dataSet); verify(serializer).addDelQuad(true, SUBJECT, PRED1, addedValue, STRING, null, null); verify(serializer).addDelQuad(true, SUBJECT, PRED1, addedValue2, STRING, null, null); }
@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);  }