@ThreadSafe public class PageRevision1 extends Object implements PageRevision
| Modifier | Constructor and Description |
|---|---|
protected |
PageRevision1(PageRevision rP)
Constructs a PageRevision1 as a copy of another instance of a page revision.
|
protected |
PageRevision1(URI _wikiScriptURI,
int _pageID,
String _pageName,
int _rev,
int _revLatest,
String wikiLocation,
boolean maybeUgly)
Constructs a PageRevision1.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o)
Returns true iff o is a PageRevision having the same (equals) wiki script location
and revision identifier.
|
boolean |
isLatestRevision()
Returns true iff rev() == revLatest().
|
int |
pageID()
The page identifier.
|
String |
pageName()
The name of the page including the namespace.
|
URI |
pageURI()
The location of the page non-specific to any particular revision.
|
static PageRevision |
readPageRevision(URI wikiScriptURI,
XMLStreamReader _xml,
boolean _toLatest)
Attempts to construct a PageRevision1 from the response to a page query.
|
int |
rev()
The revision identifier.
|
int |
revLatest()
The revision identifier of the latest page revision.
|
URI |
revURI()
The location of the revision.
|
String |
toString()
Returns "r.
|
URI |
wikiScriptURI()
The base location for script execution in the containing wiki, without a trailing
slash (/).
|
protected PageRevision1(URI _wikiScriptURI, int _pageID, String _pageName, int _rev, int _revLatest, String wikiLocation, boolean maybeUgly)
_pageName - it will be normalized.maybeUgly - whether the wiki location might be the standard access
location ending in "index.php" for example, or is definitely a pretty alias
per $wgUsePathInfo.wikiScriptURI(),
pageID(),
rev(),
revLatest()protected PageRevision1(PageRevision rP)
public static PageRevision readPageRevision(URI wikiScriptURI, XMLStreamReader _xml, boolean _toLatest) throws IOException, XMLStreamException
_xml - a reader for the response to a page query that covers properties
'info' or (if !_toLatest) 'info|revisions' in which at least one 'page'
element might remain to be read._toLatest - true to read the revision from info 'lastrevid', or false to
read it from the 'revisions' that are included in the query.MediaWiki.NoSuchItem - if a requested page or revision does not exist.IOExceptionXMLStreamExceptionpublic final boolean equals(Object o)
equals in class Objectrev(),
wikiScriptURI()public boolean isLatestRevision()
PageRevisionisLatestRevision in interface PageRevisionpublic final int pageID()
PageRevisionpageID in interface PageRevisionpublic final String pageName()
PageRevisionpageName in interface PageRevisionpublic final URI pageURI()
PageRevisionpageURI in interface PageRevisionPageRevision.revURI()public final int rev()
PageRevisionrev in interface PageRevisionpublic final int revLatest()
PageRevisionrevLatest in interface PageRevisionpublic final URI revURI()
PageRevisionrevURI in interface PageRevisionPageRevision.pageURI()public final URI wikiScriptURI()
PageRevisionhttp://reluk.ca/mediawiki. Script requests
may be constructed by appending the script path and parameters:wikiScriptURI().toASCIIString() + "/index.php?oldid=1138"
wikiScriptURI in interface PageRevision