public class ArticleSelector
extends java.lang.Object
| Constructor and Description |
|---|
ArticleSelector(java.io.File categories,
java.util.Locale locale,
int year)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
extract(short depth)
Extracts the articles associated to the indicated categories.
|
java.lang.Integer[] |
getArticles() |
void |
idsToFile(java.lang.String output)
Stores the IDs of the extracted articles into a file; one ID per line.
|
static void |
main(java.lang.String[] args) |
void |
toFile(java.io.File output)
TODO ???
|
public ArticleSelector(java.io.File categories,
java.util.Locale locale,
int year)
categories - File with the list of category IDswikiConnection - Wikipedia connectionjava.io.IOException - If the categories files cannot be readpublic void extract(short depth)
throws WikiApiException,
java.io.IOException
WikiApiExceptionjava.io.IOExceptionpublic void toFile(java.io.File output)
output - File wherein the articles must been written.public void idsToFile(java.lang.String output)
output - Name for the file wherein the articles must been written.java.io.IOExceptionpublic java.lang.Integer[] getArticles()
public static void main(java.lang.String[] args)
throws WikiApiException,
java.io.IOException
args - language year categories [depth]WikiApiExceptionjava.io.IOException