@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.IOException
XMLStreamException
public final boolean equals(Object o)
equals
in class Object
rev()
,
wikiScriptURI()
public boolean isLatestRevision()
PageRevision
isLatestRevision
in interface PageRevision
public final int pageID()
PageRevision
pageID
in interface PageRevision
public final String pageName()
PageRevision
pageName
in interface PageRevision
public final URI pageURI()
PageRevision
pageURI
in interface PageRevision
PageRevision.revURI()
public final int rev()
PageRevision
rev
in interface PageRevision
public final int revLatest()
PageRevision
revLatest
in interface PageRevision
public final URI revURI()
PageRevision
revURI
in interface PageRevision
PageRevision.pageURI()
public final URI wikiScriptURI()
PageRevision
http://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