public ItemDocument editItemDocument(ItemDocument itemDocument,
			boolean clear, String summary) throws IOException,
			MediaWikiApiErrorException {
		String data = JsonSerializer.getJsonString(itemDocument);
		return (ItemDocument) this.wbEditingAction.wbEditEntity(itemDocument
				.getEntityId().getId(), null, null, null, data, clear,
				this.editAsBot, itemDocument.getRevisionId(), summary);
	}
public ItemDocument editItemDocument ( ItemDocument itemDocument , boolean clear , String summary ) throws IOException , MediaWikiApiErrorException { String data = JsonSerializer . getJsonString ( itemDocument ) ; return ( ItemDocument ) this . wbEditingAction . wbEditEntity ( itemDocument . getEntityId ( ) . getId ( ) , null , null , null , data , clear , this . editAsBot , itemDocument . getRevisionId ( ) , summary ) ; }
Writes the data for the given item document with the summary message as
given. Optionally, the existing data is cleared (deleted).
<p>
The id of the given item document is used to specify which item document
should be changed. The site IRI will be ignored for this.
<p>
The revision id of the given item document is used to specify the base
revision, enabling the API to detect edit conflicts. The value 0 can be
used to omit this. It is strongly recommended to give a revision id when
making edits where the outcome depends on the previous state of the data
(i.e., any edit that does not use "clear").
<p>
If the data is not cleared, then the existing data will largely be
preserved. Statements with empty ids will be added without checking if
they exist already; statements with (valid) ids will replace any existing
statements with these ids or just be added if there are none. Labels,
descriptions, and aliases will be preserved for all languages for which
no data is given at all. For aliases this means that writing one alias in
a language will overwrite all aliases in this language, so some care is
needed.

@param itemDocument
the document that contains the data to be written
@param clear
if true, the existing data will be replaced by the given data;
if false, the given data will be added to the existing data,
overwriting only parts that are set to new values
@param summary
additional summary message for the edit, or null to omit this
@return the modified item document, or null if there was an error
@throws IOException
if there was an IO problem, such as missing network
connection
@throws MediaWikiApiErrorException