Class MediaInfoEditBuilder


  • public class MediaInfoEditBuilder
    extends Object
    Constructs a MediaInfoEdit incrementally.
    Author:
    Antonin Delpeuch
    • Constructor Detail

      • MediaInfoEditBuilder

        public MediaInfoEditBuilder​(org.wikidata.wdtk.datamodel.interfaces.EntityIdValue id)
        Constructor.
        Parameters:
        id - the subject of the document. It can be a reconciled entity value for new entities.
    • Method Detail

      • addStatement

        public MediaInfoEditBuilder addStatement​(StatementEdit statement)
        Adds an update to a statement.
        Parameters:
        statement - the statement to add or update
      • addLabel

        public MediaInfoEditBuilder addLabel​(org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue label,
                                             boolean override)
        Adds a label to the entity.
        Parameters:
        label - the label to add
        override - 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 add
        override - 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