Class FullMediaInfoUpdate

  • All Implemented Interfaces:
    org.wikidata.wdtk.datamodel.interfaces.EntityUpdate, org.wikidata.wdtk.datamodel.interfaces.LabeledDocumentUpdate, org.wikidata.wdtk.datamodel.interfaces.LabeledStatementDocumentUpdate, org.wikidata.wdtk.datamodel.interfaces.MediaInfoUpdate, org.wikidata.wdtk.datamodel.interfaces.StatementDocumentUpdate

    public class FullMediaInfoUpdate
    extends org.wikidata.wdtk.datamodel.implementation.MediaInfoUpdateImpl
    implements org.wikidata.wdtk.datamodel.interfaces.MediaInfoUpdate
    An extension of WDTK's MediaInfoUpdate which also lets us change the file name of a file and/or replace its contents.
    Author:
    Antonin Delpeuch
    • Constructor Summary

      Constructors 
      Constructor Description
      FullMediaInfoUpdate​(org.wikidata.wdtk.datamodel.interfaces.MediaInfoIdValue entityId, long baseRevisionId, org.wikidata.wdtk.datamodel.interfaces.TermUpdate labels, org.wikidata.wdtk.datamodel.interfaces.StatementUpdate statementUpdate, String filePath, String fileName, String wikitext, boolean overrideWikitext)
      Creates an update on an existing mediainfo entity.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      String getFileName()
      If not null, the new on-wiki filename associated with the entity.
      String getFilePath()
      If not null, the path or URL to the file which should replace the media contents of this entity.
      String getWikitext()
      The wikitext which should replace any existing wikitext on the page.
      boolean isEmpty()  
      boolean isOverridingWikitext()
      Whether any existing wikitext should be overridden
      • Methods inherited from class org.wikidata.wdtk.datamodel.implementation.MediaInfoUpdateImpl

        equals, getEntityId, hashCode
      • Methods inherited from class org.wikidata.wdtk.datamodel.implementation.LabeledDocumentUpdateImpl

        getLabels
      • Methods inherited from class org.wikidata.wdtk.datamodel.implementation.StatementDocumentUpdateImpl

        getStatements
      • Methods inherited from class org.wikidata.wdtk.datamodel.implementation.EntityUpdateImpl

        getBaseRevisionId
      • Methods inherited from interface org.wikidata.wdtk.datamodel.interfaces.EntityUpdate

        getBaseRevisionId
      • Methods inherited from interface org.wikidata.wdtk.datamodel.interfaces.LabeledDocumentUpdate

        getLabels
      • Methods inherited from interface org.wikidata.wdtk.datamodel.interfaces.MediaInfoUpdate

        getEntityId
      • Methods inherited from interface org.wikidata.wdtk.datamodel.interfaces.StatementDocumentUpdate

        getStatements
    • Constructor Detail

      • FullMediaInfoUpdate

        public FullMediaInfoUpdate​(org.wikidata.wdtk.datamodel.interfaces.MediaInfoIdValue entityId,
                                   long baseRevisionId,
                                   org.wikidata.wdtk.datamodel.interfaces.TermUpdate labels,
                                   org.wikidata.wdtk.datamodel.interfaces.StatementUpdate statementUpdate,
                                   String filePath,
                                   String fileName,
                                   String wikitext,
                                   boolean overrideWikitext)
        Creates an update on an existing mediainfo entity.
        Parameters:
        entityId - the MediaInfo id of the entity to update
        baseRevisionId - the expected current revision id of the entity to edit.
        labels - the edits on captions
        statementUpdate - the edits on statements
        filePath - if not null, the path or URL to the file to use to replace the current contents of the file
        fileName - if not null, the new on-wiki filename to move the file to
    • Method Detail

      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface org.wikidata.wdtk.datamodel.interfaces.EntityUpdate
        Overrides:
        isEmpty in class org.wikidata.wdtk.datamodel.implementation.LabeledDocumentUpdateImpl
      • getFilePath

        public String getFilePath()
        If not null, the path or URL to the file which should replace the media contents of this entity. If null, the contents of the entity are left untouched.
      • getFileName

        public String getFileName()
        If not null, the new on-wiki filename associated with the entity. If null, the filename is left untouched.
      • getWikitext

        public String getWikitext()
        The wikitext which should replace any existing wikitext on the page. If null, the wikitext is left untouched.
        Returns:
      • isOverridingWikitext

        public boolean isOverridingWikitext()
        Whether any existing wikitext should be overridden