test_class.declarator: con
test_class.original_string: MockBasicApiConnection con;
test_class.type: MockBasicApiConnection
test_class.var_name: con
test_class.declarator: Q5 = Datamodel.makeWikidataItemIdValue("Q5")
test_class.original_string: ItemIdValue Q5 = Datamodel.makeWikidataItemIdValue("Q5");
test_class.type: ItemIdValue
test_class.var_name: Q5
test_class.declarator: P31 = Datamodel.makeWikidataPropertyIdValue("P31")
test_class.original_string: PropertyIdValue P31 = Datamodel.makeWikidataPropertyIdValue("P31");
test_class.type: PropertyIdValue
test_class.var_name: P31
test_class.file: wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/WikibaseDataEditorTest.java
test_class.identifier: WikibaseDataEditorTest
test_case.body: @Test
  	public void testCreateItemCachedToken() throws IOException,
  			MediaWikiApiErrorException {
  		WikibaseDataEditor wde = new WikibaseDataEditor(this.con,
  				Datamodel.SITE_WIKIDATA);
  
  		ItemDocument itemDocument = ItemDocumentBuilder.forItemId(
  				ItemIdValue.NULL).build();
  		ItemDocument expectedResultDocument = ItemDocumentBuilder
  				.forItemId(Datamodel.makeWikidataItemIdValue("Q1234"))
  				.withRevisionId(1234).build();
  		String resultData = JsonSerializer
  				.getJsonString(expectedResultDocument);
  		String expectedResult = "{\"entity\":" + resultData + ",\"success\":1}";
  
  		Map<String, String> params = new HashMap<>();
  		params.put("action", "wbeditentity");
  		params.put("summary", "My summary");
  		params.put("new", "item");
  		params.put("token", "42307b93c79b0cb558d2dfb4c3c92e0955e06041+\\");
  		params.put("format", "json");
  		params.put("maxlag", "5");
  		String data = JsonSerializer.getJsonString(itemDocument);
  		params.put("data", data);
  		con.setWebResource(params, expectedResult);
  
  		// Create item twice
  		wde.createItemDocument(itemDocument, "My summary", null);
  		ItemDocument result = wde
  				.createItemDocument(itemDocument, "My summary", null);
  
  		assertEquals(expectedResultDocument, result);
  	}
test_case.class_method_signature: WikibaseDataEditorTest.testCreateItemCachedToken()
test_case.full_signature: @Test public void testCreateItemCachedToken()
test_case.identifier: testCreateItemCachedToken
test_case.invocations: build forItemId build withRevisionId forItemId makeWikidataItemIdValue getJsonString put put put put put put getJsonString put setWebResource createItemDocument createItemDocument assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCreateItemCachedToken()
focal_class.declarator: wbEditingAction
focal_class.modifier: final
focal_class.original_string: final WbEditingAction wbEditingAction;
focal_class.type: WbEditingAction
focal_class.var_name: wbEditingAction
focal_class.declarator: wikibaseDataFetcher
focal_class.modifier: final
focal_class.original_string: final WikibaseDataFetcher wikibaseDataFetcher;
focal_class.type: WikibaseDataFetcher
focal_class.var_name: wikibaseDataFetcher
focal_class.declarator: guidGenerator
focal_class.modifier: final
focal_class.original_string: final GuidGenerator guidGenerator;
focal_class.type: GuidGenerator
focal_class.var_name: guidGenerator
focal_class.declarator: siteIri
focal_class.modifier: final
focal_class.original_string: final String siteIri;
focal_class.type: String
focal_class.var_name: siteIri
focal_class.declarator: editAsBot = false
focal_class.original_string: boolean editAsBot = false;
focal_class.type: boolean
focal_class.var_name: editAsBot
focal_class.file: wdtk-wikibaseapi/src/main/java/org/wikidata/wdtk/wikibaseapi/WikibaseDataEditor.java
focal_class.identifier: WikibaseDataEditor
focal_class.class_method_signature: WikibaseDataEditor.WikibaseDataEditor(ApiConnection connection, String siteUri)
focal_class.full_signature: public  WikibaseDataEditor(ApiConnection connection, String siteUri)
focal_class.identifier: WikibaseDataEditor
focal_class.modifiers: public
focal_class.parameters: (ApiConnection connection, String siteUri)
focal_class.signature:  WikibaseDataEditor(ApiConnection connection, String siteUri)
focal_class.class_method_signature: WikibaseDataEditor.WikibaseDataEditor(ApiConnection connection, String siteUri, GuidGenerator generator)
focal_class.full_signature: public  WikibaseDataEditor(ApiConnection connection, String siteUri, GuidGenerator generator)
focal_class.identifier: WikibaseDataEditor
focal_class.modifiers: public
focal_class.parameters: (ApiConnection connection, String siteUri, GuidGenerator generator)
focal_class.signature:  WikibaseDataEditor(ApiConnection connection, String siteUri, GuidGenerator generator)
focal_class.class_method_signature: WikibaseDataEditor.editAsBot()
focal_class.full_signature: public boolean editAsBot()
focal_class.identifier: editAsBot
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean editAsBot()
focal_class.class_method_signature: WikibaseDataEditor.setEditAsBot(boolean editAsBot)
focal_class.full_signature: public void setEditAsBot(boolean editAsBot)
focal_class.identifier: setEditAsBot
focal_class.modifiers: public
focal_class.parameters: (boolean editAsBot)
focal_class.return: void
focal_class.signature: void setEditAsBot(boolean editAsBot)
focal_class.class_method_signature: WikibaseDataEditor.getMaxLag()
focal_class.full_signature: public int getMaxLag()
focal_class.identifier: getMaxLag
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getMaxLag()
focal_class.class_method_signature: WikibaseDataEditor.setMaxLag(int maxLag)
focal_class.full_signature: public void setMaxLag(int maxLag)
focal_class.identifier: setMaxLag
focal_class.modifiers: public
focal_class.parameters: (int maxLag)
focal_class.return: void
focal_class.signature: void setMaxLag(int maxLag)
focal_class.class_method_signature: WikibaseDataEditor.getMaxLagMaxRetries()
focal_class.full_signature: public int getMaxLagMaxRetries()
focal_class.identifier: getMaxLagMaxRetries
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getMaxLagMaxRetries()
focal_class.class_method_signature: WikibaseDataEditor.setMaxLagMaxRetries(int retries)
focal_class.full_signature: public void setMaxLagMaxRetries(int retries)
focal_class.identifier: setMaxLagMaxRetries
focal_class.modifiers: public
focal_class.parameters: (int retries)
focal_class.return: void
focal_class.signature: void setMaxLagMaxRetries(int retries)
focal_class.class_method_signature: WikibaseDataEditor.getMaxLagFirstWaitTime()
focal_class.full_signature: public int getMaxLagFirstWaitTime()
focal_class.identifier: getMaxLagFirstWaitTime
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getMaxLagFirstWaitTime()
focal_class.class_method_signature: WikibaseDataEditor.setMaxLagFirstWaitTime(int time)
focal_class.full_signature: public void setMaxLagFirstWaitTime(int time)
focal_class.identifier: setMaxLagFirstWaitTime
focal_class.modifiers: public
focal_class.parameters: (int time)
focal_class.return: void
focal_class.signature: void setMaxLagFirstWaitTime(int time)
focal_class.class_method_signature: WikibaseDataEditor.getMaxLagBackOffFactor()
focal_class.full_signature: public double getMaxLagBackOffFactor()
focal_class.identifier: getMaxLagBackOffFactor
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: double
focal_class.signature: double getMaxLagBackOffFactor()
focal_class.class_method_signature: WikibaseDataEditor.setMaxLagBackOffFactor(double value)
focal_class.full_signature: public void setMaxLagBackOffFactor(double value)
focal_class.identifier: setMaxLagBackOffFactor
focal_class.modifiers: public
focal_class.parameters: (double value)
focal_class.return: void
focal_class.signature: void setMaxLagBackOffFactor(double value)
focal_class.class_method_signature: WikibaseDataEditor.getAverageTimePerEdit()
focal_class.full_signature: public int getAverageTimePerEdit()
focal_class.identifier: getAverageTimePerEdit
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getAverageTimePerEdit()
focal_class.class_method_signature: WikibaseDataEditor.setAverageTimePerEdit(int milliseconds)
focal_class.full_signature: public void setAverageTimePerEdit(int milliseconds)
focal_class.identifier: setAverageTimePerEdit
focal_class.modifiers: public
focal_class.parameters: (int milliseconds)
focal_class.return: void
focal_class.signature: void setAverageTimePerEdit(int milliseconds)
focal_class.class_method_signature: WikibaseDataEditor.getRemainingEdits()
focal_class.full_signature: public int getRemainingEdits()
focal_class.identifier: getRemainingEdits
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getRemainingEdits()
focal_class.class_method_signature: WikibaseDataEditor.setRemainingEdits(int remainingEdits)
focal_class.full_signature: public void setRemainingEdits(int remainingEdits)
focal_class.identifier: setRemainingEdits
focal_class.modifiers: public
focal_class.parameters: (int remainingEdits)
focal_class.return: void
focal_class.signature: void setRemainingEdits(int remainingEdits)
focal_class.class_method_signature: WikibaseDataEditor.disableEditing()
focal_class.full_signature: public void disableEditing()
focal_class.identifier: disableEditing
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void disableEditing()
focal_class.class_method_signature: WikibaseDataEditor.createItemDocument(ItemDocument itemDocument,
  			String summary, List<String> tags)
focal_class.full_signature: public ItemDocument createItemDocument(ItemDocument itemDocument,
  			String summary, List<String> tags)
focal_class.identifier: createItemDocument
focal_class.modifiers: public
focal_class.parameters: (ItemDocument itemDocument,
  			String summary, List<String> tags)
focal_class.return: ItemDocument
focal_class.signature: ItemDocument createItemDocument(ItemDocument itemDocument,
  			String summary, List<String> tags)
focal_class.class_method_signature: WikibaseDataEditor.createPropertyDocument(
  			PropertyDocument propertyDocument, String summary, List<String> tags)
focal_class.full_signature: public PropertyDocument createPropertyDocument(
  			PropertyDocument propertyDocument, String summary, List<String> tags)
focal_class.identifier: createPropertyDocument
focal_class.modifiers: public
focal_class.parameters: (
  			PropertyDocument propertyDocument, String summary, List<String> tags)
focal_class.return: PropertyDocument
focal_class.signature: PropertyDocument createPropertyDocument(
  			PropertyDocument propertyDocument, String summary, List<String> tags)
focal_class.class_method_signature: WikibaseDataEditor.editItemDocument(ItemDocument itemDocument,
  			boolean clear, String summary, List<String> tags)
focal_class.full_signature: public ItemDocument editItemDocument(ItemDocument itemDocument,
  			boolean clear, String summary, List<String> tags)
focal_class.identifier: editItemDocument
focal_class.modifiers: public
focal_class.parameters: (ItemDocument itemDocument,
  			boolean clear, String summary, List<String> tags)
focal_class.return: ItemDocument
focal_class.signature: ItemDocument editItemDocument(ItemDocument itemDocument,
  			boolean clear, String summary, List<String> tags)
focal_class.class_method_signature: WikibaseDataEditor.editPropertyDocument(
  			PropertyDocument propertyDocument, boolean clear, String summary,
  			List<String> tags)
focal_class.full_signature: public PropertyDocument editPropertyDocument(
  			PropertyDocument propertyDocument, boolean clear, String summary,
  			List<String> tags)
focal_class.identifier: editPropertyDocument
focal_class.modifiers: public
focal_class.parameters: (
  			PropertyDocument propertyDocument, boolean clear, String summary,
  			List<String> tags)
focal_class.return: PropertyDocument
focal_class.signature: PropertyDocument editPropertyDocument(
  			PropertyDocument propertyDocument, boolean clear, String summary,
  			List<String> tags)
focal_class.class_method_signature: WikibaseDataEditor.editMediaInfoDocument(
  			MediaInfoDocument mediaInfoDocument, boolean clear, String summary,
  			List<String> tags)
focal_class.full_signature: public MediaInfoDocument editMediaInfoDocument(
  			MediaInfoDocument mediaInfoDocument, boolean clear, String summary,
  			List<String> tags)
focal_class.identifier: editMediaInfoDocument
focal_class.modifiers: public
focal_class.parameters: (
  			MediaInfoDocument mediaInfoDocument, boolean clear, String summary,
  			List<String> tags)
focal_class.return: MediaInfoDocument
focal_class.signature: MediaInfoDocument editMediaInfoDocument(
  			MediaInfoDocument mediaInfoDocument, boolean clear, String summary,
  			List<String> tags)
focal_class.class_method_signature: WikibaseDataEditor.updateStatements(ItemIdValue itemIdValue,
  			List<Statement> addStatements, List<Statement> deleteStatements,
  			String summary, List<String> tags)
focal_class.full_signature: public ItemDocument updateStatements(ItemIdValue itemIdValue,
  			List<Statement> addStatements, List<Statement> deleteStatements,
  			String summary, List<String> tags)
focal_class.identifier: updateStatements
focal_class.modifiers: public
focal_class.parameters: (ItemIdValue itemIdValue,
  			List<Statement> addStatements, List<Statement> deleteStatements,
  			String summary, List<String> tags)
focal_class.return: ItemDocument
focal_class.signature: ItemDocument updateStatements(ItemIdValue itemIdValue,
  			List<Statement> addStatements, List<Statement> deleteStatements,
  			String summary, List<String> tags)
focal_class.class_method_signature: WikibaseDataEditor.updateTermsStatements(ItemIdValue itemIdValue,
  			List<MonolingualTextValue> addLabels,
  			List<MonolingualTextValue> addDescriptions,
  			List<MonolingualTextValue> addAliases,
  			List<MonolingualTextValue> deleteAliases,
  			List<Statement> addStatements,
  			List<Statement> deleteStatements,
  			String summary,
  			List<String> tags)
focal_class.full_signature: public ItemDocument updateTermsStatements(ItemIdValue itemIdValue,
  			List<MonolingualTextValue> addLabels,
  			List<MonolingualTextValue> addDescriptions,
  			List<MonolingualTextValue> addAliases,
  			List<MonolingualTextValue> deleteAliases,
  			List<Statement> addStatements,
  			List<Statement> deleteStatements,
  			String summary,
  			List<String> tags)
focal_class.identifier: updateTermsStatements
focal_class.modifiers: public
focal_class.parameters: (ItemIdValue itemIdValue,
  			List<MonolingualTextValue> addLabels,
  			List<MonolingualTextValue> addDescriptions,
  			List<MonolingualTextValue> addAliases,
  			List<MonolingualTextValue> deleteAliases,
  			List<Statement> addStatements,
  			List<Statement> deleteStatements,
  			String summary,
  			List<String> tags)
focal_class.return: ItemDocument
focal_class.signature: ItemDocument updateTermsStatements(ItemIdValue itemIdValue,
  			List<MonolingualTextValue> addLabels,
  			List<MonolingualTextValue> addDescriptions,
  			List<MonolingualTextValue> addAliases,
  			List<MonolingualTextValue> deleteAliases,
  			List<Statement> addStatements,
  			List<Statement> deleteStatements,
  			String summary,
  			List<String> tags)
focal_class.class_method_signature: WikibaseDataEditor.updateStatements(PropertyIdValue propertyIdValue,
  			List<Statement> addStatements, List<Statement> deleteStatements,
  			String summary, List<String> tags)
focal_class.full_signature: public PropertyDocument updateStatements(PropertyIdValue propertyIdValue,
  			List<Statement> addStatements, List<Statement> deleteStatements,
  			String summary, List<String> tags)
focal_class.identifier: updateStatements
focal_class.modifiers: public
focal_class.parameters: (PropertyIdValue propertyIdValue,
  			List<Statement> addStatements, List<Statement> deleteStatements,
  			String summary, List<String> tags)
focal_class.return: PropertyDocument
focal_class.signature: PropertyDocument updateStatements(PropertyIdValue propertyIdValue,
  			List<Statement> addStatements, List<Statement> deleteStatements,
  			String summary, List<String> tags)
focal_class.class_method_signature: WikibaseDataEditor.updateStatements(T currentDocument,
  			List<Statement> addStatements, List<Statement> deleteStatements,
  			String summary, List<String> tags)
focal_class.full_signature: @SuppressWarnings("unchecked") public T updateStatements(T currentDocument,
  			List<Statement> addStatements, List<Statement> deleteStatements,
  			String summary, List<String> tags)
focal_class.identifier: updateStatements
focal_class.modifiers: @SuppressWarnings("unchecked") public
focal_class.parameters: (T currentDocument,
  			List<Statement> addStatements, List<Statement> deleteStatements,
  			String summary, List<String> tags)
focal_class.return: T
focal_class.signature: T updateStatements(T currentDocument,
  			List<Statement> addStatements, List<Statement> deleteStatements,
  			String summary, List<String> tags)
focal_class.class_method_signature: WikibaseDataEditor.updateTermsStatements(T currentDocument,
  			List<MonolingualTextValue> addLabels,
  			List<MonolingualTextValue> addDescriptions,
  			List<MonolingualTextValue> addAliases,
  			List<MonolingualTextValue> deleteAliases,
  			List<Statement> addStatements, List<Statement> deleteStatements,
  			String summary, List<String> tags)
focal_class.full_signature: @SuppressWarnings("unchecked") public T updateTermsStatements(T currentDocument,
  			List<MonolingualTextValue> addLabels,
  			List<MonolingualTextValue> addDescriptions,
  			List<MonolingualTextValue> addAliases,
  			List<MonolingualTextValue> deleteAliases,
  			List<Statement> addStatements, List<Statement> deleteStatements,
  			String summary, List<String> tags)
focal_class.identifier: updateTermsStatements
focal_class.modifiers: @SuppressWarnings("unchecked") public
focal_class.parameters: (T currentDocument,
  			List<MonolingualTextValue> addLabels,
  			List<MonolingualTextValue> addDescriptions,
  			List<MonolingualTextValue> addAliases,
  			List<MonolingualTextValue> deleteAliases,
  			List<Statement> addStatements, List<Statement> deleteStatements,
  			String summary, List<String> tags)
focal_class.return: T
focal_class.signature: T updateTermsStatements(T currentDocument,
  			List<MonolingualTextValue> addLabels,
  			List<MonolingualTextValue> addDescriptions,
  			List<MonolingualTextValue> addAliases,
  			List<MonolingualTextValue> deleteAliases,
  			List<Statement> addStatements, List<Statement> deleteStatements,
  			String summary, List<String> tags)
focal_class.class_method_signature: WikibaseDataEditor.nullEdit(ItemIdValue itemId)
focal_class.full_signature: public void nullEdit(ItemIdValue itemId)
focal_class.identifier: nullEdit
focal_class.modifiers: public
focal_class.parameters: (ItemIdValue itemId)
focal_class.return: void
focal_class.signature: void nullEdit(ItemIdValue itemId)
focal_class.class_method_signature: WikibaseDataEditor.nullEdit(PropertyIdValue propertyId)
focal_class.full_signature: public void nullEdit(PropertyIdValue propertyId)
focal_class.identifier: nullEdit
focal_class.modifiers: public
focal_class.parameters: (PropertyIdValue propertyId)
focal_class.return: void
focal_class.signature: void nullEdit(PropertyIdValue propertyId)
focal_class.class_method_signature: WikibaseDataEditor.nullEdit(T currentDocument)
focal_class.full_signature: @SuppressWarnings("unchecked") public T nullEdit(T currentDocument)
focal_class.identifier: nullEdit
focal_class.modifiers: @SuppressWarnings("unchecked") public
focal_class.parameters: (T currentDocument)
focal_class.return: T
focal_class.signature: T nullEdit(T currentDocument)
focal_method.body: public ItemDocument createItemDocument(ItemDocument itemDocument,
  			String summary, List<String> tags) throws IOException, MediaWikiApiErrorException {
  		String data = JsonSerializer.getJsonString(itemDocument);
  		return (ItemDocument) this.wbEditingAction.wbEditEntity(null, null,
  				null, "item", data, false, this.editAsBot, 0, summary, tags);
  	}
focal_method.class_method_signature: WikibaseDataEditor.createItemDocument(ItemDocument itemDocument,
  			String summary, List<String> tags)
focal_method.full_signature: public ItemDocument createItemDocument(ItemDocument itemDocument,
  			String summary, List<String> tags)
focal_method.identifier: createItemDocument
focal_method.invocations: getJsonString wbEditEntity
focal_method.modifiers: public
focal_method.parameters: (ItemDocument itemDocument,
  			String summary, List<String> tags)
focal_method.return: ItemDocument
focal_method.signature: ItemDocument createItemDocument(ItemDocument itemDocument,
  			String summary, List<String> tags)