public class RawPageWrapper extends Object implements org.wikidata.wdtk.dumpfiles.MwRevision
| Constructor and Description |
|---|
RawPageWrapper(RawPage raw) |
| 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.
|
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.
|
public RawPageWrapper(RawPage raw)
public String getPrefixedTitle()
Returns the title string of the revised page, including namespace prefixes and subpages, if any. The string is formatted as it would be on an HTML page and not as in the URL used by MediaWiki for the page. For example, spaces are represented as spaces and not as underscores. For example
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.
getPrefixedTitle in interface org.wikidata.wdtk.dumpfiles.MwRevisionpublic String getTitle()
Returns the title string of the revised page without any namespace prefixes. The string is formatted as it would be on an HTML page and not as in the URL used by MediaWiki for the page. For example, spaces are represented as spaces and not as underscores. For example
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.
getTitle in interface org.wikidata.wdtk.dumpfiles.MwRevisionpublic int getNamespace()
Returns the id of the MediaWiki namespace of the revised page. The meaning of this id depends on the configuration of the site that the page is from. Usually, 0 is the main namespace. Even ids usually refer to normal article pages while their odd successors represent the corresponding talk namespace.
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.
getNamespace in interface org.wikidata.wdtk.dumpfiles.MwRevisionpublic int getPageId()
getPageId in interface org.wikidata.wdtk.dumpfiles.MwRevisionpublic long getRevisionId()
getRevisionId in interface org.wikidata.wdtk.dumpfiles.MwRevisionpublic String getTimeStamp()
getTimeStamp in interface org.wikidata.wdtk.dumpfiles.MwRevisionpublic String getText()
getFormat(). To interpret
it properly, one should also know the content model, obtained from
getModel().getText in interface org.wikidata.wdtk.dumpfiles.MwRevisionpublic String getModel()
getFormat().getModel in interface org.wikidata.wdtk.dumpfiles.MwRevisionpublic String getFormat()
getModel(). Like the content model, the format might change
between revisions of a page, but this is very rare in practice.getFormat in interface org.wikidata.wdtk.dumpfiles.MwRevisionpublic String getComment()
getComment in interface org.wikidata.wdtk.dumpfiles.MwRevisionpublic String getContributor()
hasRegisteredContributor().getContributor in interface org.wikidata.wdtk.dumpfiles.MwRevisionpublic int getContributorId()
getContributorId in interface org.wikidata.wdtk.dumpfiles.MwRevisionpublic boolean hasRegisteredContributor()
hasRegisteredContributor in interface org.wikidata.wdtk.dumpfiles.MwRevisionCopyright © 2015. All rights reserved.