edu.jhu.nlp.wikipedia
Class WikiPage

java.lang.Object
  extended by edu.jhu.nlp.wikipedia.WikiPage

public class WikiPage
extends java.lang.Object

Data structures for a wikipedia page.


Constructor Summary
WikiPage()
           
 
Method Summary
 java.util.Vector<java.lang.String> getCategories()
           
 java.lang.String getID()
           
 InfoBox getInfoBox()
           
 java.util.Vector<java.lang.String> getLinks()
           
 java.lang.String getRedirectPage()
           
 java.lang.String getText()
           
 java.lang.String getTitle()
           
 java.lang.String getTranslatedTitle(java.lang.String languageCode)
           
 java.lang.String getWikiText()
          Use this method to get the wiki text associated with this page.
 boolean isDisambiguationPage()
           
 boolean isRedirect()
           
 boolean isSpecialPage()
           
 boolean isStub()
           
 void setID(java.lang.String id)
           
 void setTitle(java.lang.String title)
          Set the page title.
 void setWikiText(java.lang.String wtext)
          Set the wiki text associated with this page.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WikiPage

public WikiPage()
Method Detail

setTitle

public void setTitle(java.lang.String title)
Set the page title. This is not intended for direct use.

Parameters:
title -

setWikiText

public void setWikiText(java.lang.String wtext)
Set the wiki text associated with this page. This setter also introduces side effects. This is not intended for direct use.

Parameters:
wtext - wiki-formatted text

getTitle

public java.lang.String getTitle()
Returns:
a string containing the page title.

getTranslatedTitle

public java.lang.String getTranslatedTitle(java.lang.String languageCode)
Parameters:
languageCode -
Returns:
a string containing the title translated in the given languageCode.
See Also:
Language

isDisambiguationPage

public boolean isDisambiguationPage()
Returns:
true if this a disambiguation page.

isSpecialPage

public boolean isSpecialPage()
Returns:
true for "special pages" -- like Category:, Wikipedia:, etc

getWikiText

public java.lang.String getWikiText()
Use this method to get the wiki text associated with this page. Useful for custom processing the wiki text.

Returns:
a string containing the wiki text.

isRedirect

public boolean isRedirect()
Returns:
true if this is a redirection page

isStub

public boolean isStub()
Returns:
true if this is a stub page

getRedirectPage

public java.lang.String getRedirectPage()
Returns:
the title of the page being redirected to.

getText

public java.lang.String getText()
Returns:
plain text stripped of all wiki formatting.

getCategories

public java.util.Vector<java.lang.String> getCategories()
Returns:
a list of categories the page belongs to, null if this a redirection/disambiguation page

getLinks

public java.util.Vector<java.lang.String> getLinks()
Returns:
a list of links contained in the page

setID

public void setID(java.lang.String id)

getInfoBox

public InfoBox getInfoBox()

getID

public java.lang.String getID()