public interface MwRevision
Modifier and Type | Field and Description |
---|---|
static String |
MODEL_WIKIBASE_ITEM
The model used for MediaWiki revisions representing Wikibase items.
|
static String |
MODEL_WIKIBASE_LEXEME
The model used for MediaWiki revisions representing Wikibase lexemes.
|
static String |
MODEL_WIKIBASE_PROPERTY
The model used for MediaWiki revisions representing Wikibase properties.
|
static String |
MODEL_WIKITEXT
The model used for MediaWiki revisions in traditional Wikitext.
|
static long |
NO_REVISION_ID
The revision id set when the revision does not exist
|
Modifier and Type | Method and Description |
---|---|
String |
getComment()
Returns the comment string that was used for making the edit that led to
this revision.
|
String |
getContributor()
Returns the name for the contributor that made the edit that led to this
revision.
|
int |
getContributorId()
Returns the user id of the contributor who made the edit that led to this
revision, or -1 if the edit was not made by a registered user.
|
String |
getFormat()
Returns the format of the revision text.
|
String |
getModel()
Returns the content model of the revision.
|
int |
getNamespace()
Returns the id of the MediaWiki namespace of the revised page.
|
int |
getPageId()
Returns the numeric page id of the revised page.
|
long |
getParentRevisionId()
Returns the numeric id of the parent revision.
|
String |
getPrefixedTitle()
Returns the title string of the revised page, including namespace
prefixes and subpages, if any.
|
long |
getRevisionId()
Returns the numeric id of the current revision.
|
String |
getText()
Returns the text content of the current revision.
|
String |
getTimeStamp()
Returns the time stamp at which the current revision was made.
|
String |
getTitle()
Returns the title string of the revised page without any namespace
prefixes.
|
boolean |
hasRegisteredContributor()
Returns true if the contributor who made the edit that led to this
revision was logged in with a user account.
|
static final String MODEL_WIKITEXT
static final String MODEL_WIKIBASE_ITEM
static final String MODEL_WIKIBASE_PROPERTY
static final String MODEL_WIKIBASE_LEXEME
static final long NO_REVISION_ID
String getPrefixedTitle()
On a single MediaWiki site, the prefixed page title is a key for a page at any given moment. However, users may change the title and namespace by moving pages. The page id provides a better clue to identify pages across history.
String getTitle()
On a single MediaWiki site, the combination of page title and page namespace is a key for a page at any given moment. However, users may change the title and namespace by moving pages. The page id provides a better clue to identify pages across history.
int getNamespace()
On a single MediaWiki site, the combination of page title and page namespace is a key for a page at any given moment. However, users may change the title and namespace by moving pages. The page id provides a better clue to identify pages across history.
int getPageId()
long getRevisionId()
long getParentRevisionId()
String getTimeStamp()
String getText()
getFormat()
. To interpret
it properly, one should also know the content model, obtained from
getModel()
.String getModel()
getFormat()
.String getFormat()
getModel()
. Like the content model, the format might change
between revisions of a page, but this is very rare in practice.String getComment()
String getContributor()
hasRegisteredContributor()
.int getContributorId()
boolean hasRegisteredContributor()
Copyright © 2014–2024 Wikidata Toolkit Developers. Generated from source code published under the Apache License 2.0. For more information, see the Wikidata Toolkit homepage