info.bliki.api
Class Page

java.lang.Object
  extended by info.bliki.api.PageInfo
      extended by info.bliki.api.Page

public class Page
extends PageInfo

Manages page data from the Wikimedia API


Field Summary
protected static int BLOCK_SIZE
           
 
Fields inherited from class info.bliki.api.PageInfo
ns, pageid, title
 
Constructor Summary
Page()
           
 
Method Summary
 boolean addCategory(PageInfo arg0)
           
 boolean addLink(Link arg0)
           
 boolean containsCategory(PageInfo o)
           
 boolean containsLink(Link o)
           
 void downloadImageUrl(java.io.OutputStream outputStream)
          If this page was created with User#queryImageinfo() you can download the image with this method.
 void downloadImageUrl(java.io.OutputStream outputStream, java.lang.String url)
          If this page was created with User#queryImageinfo() you can download the image with this method.
 PageInfo getCategory(int index)
           
 java.lang.String getCurrentContent()
           
 Revision getCurrentRevision()
           
 java.lang.String getEditToken()
           
 java.lang.String getImageThumbUrl()
           
 java.lang.String getImageUrl()
          Set the imageUrl of this page if this is an [[Image:...]]
 Link getLink(int index)
           
 void setCurrentRevision(Revision revision)
           
 void setEditToken(java.lang.String editToken)
           
 void setImageThumbUrl(java.lang.String imageThumbUrl)
           
 void setImageUrl(java.lang.String imageUrl)
          Set the imageUrl of this page if this is an [[Image:...]]
 int sizeOfCategoryList()
           
 int sizeOfLinksList()
           
 java.lang.String toString()
           
 
Methods inherited from class info.bliki.api.PageInfo
equals, getNs, getPageid, getTitle, hashCode, setNs, setPageid, setTitle
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

BLOCK_SIZE

protected static final int BLOCK_SIZE
See Also:
Constant Field Values
Constructor Detail

Page

public Page()
Method Detail

getImageUrl

public java.lang.String getImageUrl()
Set the imageUrl of this page if this is an [[Image:...]] page. Information retrieved with prop=imageinfo

Parameters:
fImageUrl - the image url if possible; the empty string "" otherwise.

getImageThumbUrl

public java.lang.String getImageThumbUrl()

setImageUrl

public void setImageUrl(java.lang.String imageUrl)
Set the imageUrl of this page if this is an [[Image:...]] page. Information retrieved with prop=imageinfo

Parameters:
imageUrl -

setImageThumbUrl

public void setImageThumbUrl(java.lang.String imageThumbUrl)

toString

public java.lang.String toString()
Overrides:
toString in class PageInfo

addCategory

public boolean addCategory(PageInfo arg0)

containsCategory

public boolean containsCategory(PageInfo o)

getCategory

public PageInfo getCategory(int index)

sizeOfCategoryList

public int sizeOfCategoryList()

addLink

public boolean addLink(Link arg0)

containsLink

public boolean containsLink(Link o)

getLink

public Link getLink(int index)

getEditToken

public java.lang.String getEditToken()

setEditToken

public void setEditToken(java.lang.String editToken)

downloadImageUrl

public void downloadImageUrl(java.io.OutputStream outputStream)
If this page was created with User#queryImageinfo() you can download the image with this method.
Note: this method doesn't close the given output stream!

Parameters:
outputStream - the output stream where the image should be written to. For example, if you would save the image in a file, you can use FileOutputStream.

downloadImageUrl

public void downloadImageUrl(java.io.OutputStream outputStream,
                             java.lang.String url)
If this page was created with User#queryImageinfo() you can download the image with this method.
Note: this method doesn't close the given output stream!

Parameters:
outputStream - the output stream where the image should be written to. For example, if you would save the image in a file, you can use FileOutputStream.

sizeOfLinksList

public int sizeOfLinksList()

getCurrentRevision

public Revision getCurrentRevision()

setCurrentRevision

public void setCurrentRevision(Revision revision)

getCurrentContent

public java.lang.String getCurrentContent()


Copyright © 2012 Java Wikipedia API (Bliki engine). All Rights Reserved.