Package org.openrefine.wikibase.updates
Class MediaInfoEditBuilder
- java.lang.Object
-
- org.openrefine.wikibase.updates.MediaInfoEditBuilder
-
public class MediaInfoEditBuilder extends Object
Constructs aMediaInfoEditincrementally.- 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 MediaInfoEditBuilderaddContributingRowId(long rowId)MediaInfoEditBuilderaddFileName(String name)Sets the file name to use when uploading (for new entities) or to move to (for existing entities).MediaInfoEditBuilderaddFilePath(String path)Sets the path of the file to be uploaded.MediaInfoEditBuilderaddLabel(org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue label, boolean override)Adds a label to the entity.MediaInfoEditBuilderaddLabels(Set<org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue> labels, boolean override)Adds a list of labels to the entity.MediaInfoEditBuilderaddStatement(StatementEdit statement)Adds an update to a statement.MediaInfoEditBuilderaddStatements(List<StatementEdit> statements)Add a list of statement, as inaddStatement(org.openrefine.wikibase.updates.StatementEdit).MediaInfoEditBuilderaddWikitext(String wikitext)Sets the wikitext to be inserted in the edit (otherwise it is left as such)MediaInfoEditbuild()Constructs theMediaInfoEdit.MediaInfoEditBuildersetOverrideWikitext(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:
-
-