@Test public void testMergeNew() { Statement s1 = StatementBuilder.forSubjectAndProperty(Q1, P3) .withValue(Q1).build(); Statement s2 = StatementBuilder.forSubjectAndProperty(Q1, P3) .withValue(Q1).build(); ItemDocument currentDocument = ItemDocumentBuilder.forItemId(Q1) .build(); StatementUpdate su = new StatementUpdate(currentDocument, Arrays.asList(s1, s2), Collections.emptyList()); assertEquals(0, su.toDelete.size()); assertEquals(1, su.toKeep.size()); assertTrue(su.toKeep.containsKey(P3)); assertEquals(1, su.toKeep.get(P3).size()); assertEquals(s1, su.toKeep.get(P3).get(0).statement); assertTrue(su.toKeep.get(P3).get(0).write); assertFalse(su.isEmptyEdit()); }
@JsonIgnore public boolean isEmptyEdit() { return getUpdatedStatements().isEmpty(); }
StatementUpdate { @JsonIgnore public boolean isEmptyEdit() { return getUpdatedStatements().isEmpty(); } }
StatementUpdate { @JsonIgnore public boolean isEmptyEdit() { return getUpdatedStatements().isEmpty(); } StatementUpdate(StatementDocument currentDocument,
			List<Statement> addStatements, List<Statement> deleteStatements); }
StatementUpdate { @JsonIgnore public boolean isEmptyEdit() { return getUpdatedStatements().isEmpty(); } StatementUpdate(StatementDocument currentDocument,
			List<Statement> addStatements, List<Statement> deleteStatements); @JsonIgnore String getJsonUpdateString(); StatementDocument performEdit(WbEditingAction action, boolean editAsBot, String summary, List<String> tags); @JsonProperty("claims") @JsonInclude(Include.NON_EMPTY) List<Statement> getUpdatedStatements(); @JsonIgnore boolean isEmptyEdit(); void setGuidGenerator(GuidGenerator generator); }
StatementUpdate { @JsonIgnore public boolean isEmptyEdit() { return getUpdatedStatements().isEmpty(); } StatementUpdate(StatementDocument currentDocument,
			List<Statement> addStatements, List<Statement> deleteStatements); @JsonIgnore String getJsonUpdateString(); StatementDocument performEdit(WbEditingAction action, boolean editAsBot, String summary, List<String> tags); @JsonProperty("claims") @JsonInclude(Include.NON_EMPTY) List<Statement> getUpdatedStatements(); @JsonIgnore boolean isEmptyEdit(); void setGuidGenerator(GuidGenerator generator);  }