001package votorola.a.position; // Copyright 2010-2013, Michael Allan.  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Votorola Software"), to deal in the Votorola Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicence, and/or sell copies of the Votorola Software, and to permit persons to whom the Votorola Software is furnished to do so, subject to the following conditions: The preceding copyright notice and this permission notice shall be included in all copies or substantial portions of the Votorola Software. THE VOTOROLA SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE VOTOROLA SOFTWARE OR THE USE OR OTHER DEALINGS IN THE VOTOROLA SOFTWARE.
002
003import java.net.*;
004
005
006/** A particular revision of a wiki page.
007  */
008public interface PageRevision extends java.io.Serializable // where serialized?  DraftPair
009{
010
011
012   // - P a g e - R e v i s i o n --------------------------------------------------------
013
014
015    /** Returns true iff rev() == revLatest().
016      */
017    public boolean isLatestRevision();
018
019
020
021    /** The page identifier.
022      *
023      *   @see <a href='http://www.mediawiki.org/wiki/Manual:Page_table#page_id' target='_top'
024      *                                              >Manual:Page_table#page_id</a>
025      */
026    public int pageID();
027
028
029
030    /** The name of the page including the namespace.
031      */
032    public String pageName();
033
034
035
036    /** The location of the page non-specific to any particular revision.
037      *
038      *     @see #revURI()
039      */
040    public URI pageURI();
041
042
043
044    /** The revision identifier.
045      *
046      *   @see <a href='http://www.mediawiki.org/wiki/Manual:Revision_table#rev_id' target='_top'
047      *                                              >Manual:Revision_table#rev_id</a>
048      */
049    public int rev();
050
051
052
053    /** The revision identifier of the latest page revision.
054      *
055      *   @see <a href='http://www.mediawiki.org/wiki/Manual:Page_table#page_latest' target='_top'
056      *                                              >Manual:Page_table#page_latest</a>
057      */
058    public int revLatest();
059
060
061
062    /** The location of the revision.  It is guaranteed to end with a query component,
063      * ready for appending additional query parameters.
064      *
065      *     @see #pageURI()
066      */
067    public URI revURI();
068
069
070
071    /** The base location for script execution in the containing wiki, without a trailing
072      * slash (/).  For example <code>http://reluk.ca/mediawiki</code>.  Script requests
073      * may be constructed by appending the script path and parameters:<pre
074      *
075     *>    wikiScriptURI().toASCIIString() + "/index.php?oldid=1138"</pre>
076      */
077    public URI wikiScriptURI();
078
079
080}