MwRevisionpublic class MwRevisionImpl extends java.lang.Object implements MwRevision
MwRevision. The implementation is meant to be used
as a lightweight container that is reusable and thus mutable, but only using
package-private access. Even without the re-use (which might be reconsidered)
the package-private mutability makes sense during the stateful XML parsing
process.MODEL_WIKIBASE_ITEM, MODEL_WIKIBASE_PROPERTY, MODEL_WIKITEXT| Constructor | Description |
|---|---|
MwRevisionImpl() |
Constructor.
|
MwRevisionImpl(MwRevision mwRevision) |
Copy constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.String |
getComment() |
Returns the comment string that was used for making the edit that led to
this revision.
|
java.lang.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.
|
java.lang.String |
getFormat() |
Returns the format of the revision text.
|
java.lang.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.
|
java.lang.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.
|
java.lang.String |
getText() |
Returns the text content of the current revision.
|
java.lang.String |
getTimeStamp() |
Returns the time stamp at which the current revision was made.
|
java.lang.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.
|
java.lang.String |
toString() |
public MwRevisionImpl()
public MwRevisionImpl(MwRevision mwRevision)
public java.lang.String getPrefixedTitle()
MwRevisionOn 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.
getPrefixedTitle in interface MwRevisionpublic java.lang.String getTitle()
MwRevisionOn 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.
getTitle in interface MwRevisionpublic int getNamespace()
MwRevisionOn 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.
getNamespace in interface MwRevisionpublic int getPageId()
MwRevisiongetPageId in interface MwRevisionpublic long getRevisionId()
MwRevisiongetRevisionId in interface MwRevisionpublic java.lang.String getTimeStamp()
MwRevisiongetTimeStamp in interface MwRevisionpublic java.lang.String getText()
MwRevisionMwRevision.getFormat(). To interpret
it properly, one should also know the content model, obtained from
MwRevision.getModel().getText in interface MwRevisionpublic java.lang.String getModel()
MwRevisionMwRevision.getFormat().getModel in interface MwRevisionpublic java.lang.String getFormat()
MwRevisionMwRevision.getModel(). Like the content model, the format might change
between revisions of a page, but this is very rare in practice.getFormat in interface MwRevisionpublic java.lang.String getComment()
MwRevisiongetComment in interface MwRevisionpublic java.lang.String getContributor()
MwRevisionMwRevision.hasRegisteredContributor().getContributor in interface MwRevisionpublic int getContributorId()
MwRevisiongetContributorId in interface MwRevisionpublic boolean hasRegisteredContributor()
MwRevisionhasRegisteredContributor in interface MwRevisionpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2014–2017 Wikidata Toolkit Developers. Generated from source code published under the Apache License 2.0. For more information, see the Wikidata Toolkit homepage