|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.umd.cloud9.collection.Indexable
edu.umd.cloud9.collection.wikipedia.WikipediaPage
public class WikipediaPage
A page from Wikipedia.
| Field Summary | |
|---|---|
static String |
XML_END_TAG
End delimiter of the page, which is < /page>. |
static String |
XML_START_TAG
Start delimiter of the page, which is < page>. |
| Constructor Summary | |
|---|---|
WikipediaPage()
Creates an empty WikipediaPage object. |
|
| Method Summary | |
|---|---|
List<String> |
extractLinkDestinations()
|
String |
findInterlanguageLink(String lang)
Returns the inter-language link to a specific language (if any). |
String |
getContent()
Returns the contents of this page (title + text). |
String |
getDisplayContent()
|
String |
getDisplayContentType()
|
String |
getDocid()
Returns the article title (i.e., the docid). |
String |
getRawXML()
Returns the raw XML of this page. |
String |
getTitle()
Returns the title of this page. |
String |
getWikiMarkup()
Returns the text of this page. |
boolean |
isArticle()
Checks to see if this page is an actual article, and not, for example, "File:", "Category:", "Wikipedia:", etc. |
boolean |
isDisambiguation()
Checks to see if this page is a disambiguation page. |
boolean |
isEmpty()
Checks to see if this page is an empty page. |
boolean |
isRedirect()
Checks to see if this page is a redirect page. |
boolean |
isStub()
Checks to see if this article is a stub. |
void |
readFields(DataInput in)
Serializes this object. |
static void |
readPage(WikipediaPage page,
String s)
Reads a raw XML string into a WikipediaPage object. |
void |
write(DataOutput out)
Deserializes this object. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String XML_START_TAG
page>.
public static final String XML_END_TAG
/page>.
| Constructor Detail |
|---|
public WikipediaPage()
WikipediaPage object.
| Method Detail |
|---|
public void write(DataOutput out)
throws IOException
IOException
public void readFields(DataInput in)
throws IOException
IOExceptionpublic String getDocid()
getDocid in class Indexablepublic String getContent()
getContent in class Indexablepublic String getDisplayContent()
getDisplayContent in class Indexablepublic String getDisplayContentType()
getDisplayContentType in class Indexablepublic String getRawXML()
public String getWikiMarkup()
public String getTitle()
public boolean isDisambiguation()
WikipediaPage is either an article, a disambiguation page,
a redirect page, or an empty page.
true if this page is a disambiguation pagepublic boolean isRedirect()
WikipediaPage is either an article, a disambiguation page,
a redirect page, or an empty page.
true if this page is a redirect pagepublic boolean isEmpty()
WikipediaPage
is either an article, a disambiguation page, a redirect page, or an empty
page.
true if this page is an empty pagepublic boolean isStub()
true if this article is a stubpublic boolean isArticle()
true if this page is an actual articlepublic String findInterlanguageLink(String lang)
lang - language
null otherwisepublic List<String> extractLinkDestinations()
public static void readPage(WikipediaPage page,
String s)
WikipediaPage object.
page - the WikipediaPage objects - raw XML string
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||