Package org.openrefine.wikibase.updates
Class MediaInfoEditBuilder
- java.lang.Object
-
- org.openrefine.wikibase.updates.MediaInfoEditBuilder
-
public class MediaInfoEditBuilder extends Object
Constructs aMediaInfoEdit
incrementally.- Author:
- Antonin Delpeuch
-
-
Constructor Summary
Constructors Constructor Description MediaInfoEditBuilder(org.wikidata.wdtk.datamodel.interfaces.EntityIdValue id)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MediaInfoEditBuilder
addContributingRowId(long rowId)
MediaInfoEditBuilder
addFileName(String name)
Sets the file name to use when uploading (for new entities) or to move to (for existing entities).MediaInfoEditBuilder
addFilePath(String path)
Sets the path of the file to be uploaded.MediaInfoEditBuilder
addLabel(org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue label, boolean override)
Adds a label to the entity.MediaInfoEditBuilder
addLabels(Set<org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue> labels, boolean override)
Adds a list of labels to the entity.MediaInfoEditBuilder
addStatement(StatementEdit statement)
Adds an update to a statement.MediaInfoEditBuilder
addStatements(List<StatementEdit> statements)
Add a list of statement, as inaddStatement(org.openrefine.wikibase.updates.StatementEdit)
.MediaInfoEditBuilder
addWikitext(String wikitext)
Sets the wikitext to be inserted in the edit (otherwise it is left as such)MediaInfoEdit
build()
Constructs theMediaInfoEdit
.MediaInfoEditBuilder
setOverrideWikitext(boolean overrideWikitext)
Sets whether the wikitext should override any existing one
-
-
-
Method Detail
-
addStatement
public MediaInfoEditBuilder addStatement(StatementEdit statement)
Adds an update to a statement.- Parameters:
statement
- the statement to add or update
-
addStatements
public MediaInfoEditBuilder addStatements(List<StatementEdit> statements)
Add a list of statement, as inaddStatement(org.openrefine.wikibase.updates.StatementEdit)
.- Parameters:
statements
- the statements to add
-
addLabel
public MediaInfoEditBuilder addLabel(org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue label, boolean override)
Adds a label to the entity.- Parameters:
label
- the label to addoverride
- whether the label should be added even if there is already a label in that language
-
addLabels
public MediaInfoEditBuilder addLabels(Set<org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue> labels, boolean override)
Adds a list of labels to the entity.- Parameters:
labels
- the labels to addoverride
- whether the label should be added even if there is already a label in that language
-
addFilePath
public MediaInfoEditBuilder addFilePath(String path)
Sets the path of the file to be uploaded. Can be null for edits on existing entities.
-
addFileName
public MediaInfoEditBuilder addFileName(String name)
Sets the file name to use when uploading (for new entities) or to move to (for existing entities).
-
addWikitext
public MediaInfoEditBuilder addWikitext(String wikitext)
Sets the wikitext to be inserted in the edit (otherwise it is left as such)
-
setOverrideWikitext
public MediaInfoEditBuilder setOverrideWikitext(boolean overrideWikitext)
Sets whether the wikitext should override any existing one
-
addContributingRowId
public MediaInfoEditBuilder addContributingRowId(long rowId)
-
build
public MediaInfoEdit build()
Constructs theMediaInfoEdit
.- Returns:
-
-