Package org.openrefine.wikibase.updates
Class FullMediaInfoUpdate
- java.lang.Object
-
- org.wikidata.wdtk.datamodel.implementation.EntityUpdateImpl
-
- org.wikidata.wdtk.datamodel.implementation.StatementDocumentUpdateImpl
-
- org.wikidata.wdtk.datamodel.implementation.LabeledDocumentUpdateImpl
-
- org.wikidata.wdtk.datamodel.implementation.MediaInfoUpdateImpl
-
- org.openrefine.wikibase.updates.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'sMediaInfoUpdate
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 class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.wikidata.wdtk.datamodel.interfaces.EntityUpdate
getBaseRevisionId
-
-
-
-
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 updatebaseRevisionId
- the expected current revision id of the entity to edit.labels
- the edits on captionsstatementUpdate
- the edits on statementsfilePath
- if not null, the path or URL to the file to use to replace the current contents of the filefileName
- if not null, the new on-wiki filename to move the file to
-
-
Method Detail
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceorg.wikidata.wdtk.datamodel.interfaces.EntityUpdate
- Overrides:
isEmpty
in classorg.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
-
-