public class WikipediaDBdata
extends java.lang.Object
| Constructor and Description |
|---|
WikipediaDBdata() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getformatTitleGivenID(int id,
java.lang.String language,
int year,
WikipediaDriverManager dmc)
Retrieves the title of an article with ID
id from table "page"
The connection must be ready before. |
static java.lang.String |
getformatWPtitle(java.sql.ResultSet rs,
java.lang.String colName)
Given a
ResultSet object extracts from column colName and formats a
Wikipedia title as expected to be found in table page |
static java.lang.String |
getLanglinksTableName(java.lang.String language,
int year)
Generates the name of the table langlinks as stored in the database for a
given language and year
|
static java.lang.String |
getPageTableName(java.lang.String language,
int year)
Generates the name of the table page as stored in the database for a
given language and year
|
static java.lang.String |
getRedirectTableName(java.lang.String language,
int year)
Generates the name of the table redirect as stored in the database for a
given language and year
|
static boolean |
isRedirect(int id,
java.lang.String language,
int year,
WikipediaDriverManager dmc)
Looks in the "page" table of the corresponding
language and
year if the id is a redirect. |
static int |
resolveIfRedirect(int id,
int type,
java.lang.String language,
int year,
WikipediaDriverManager dmc)
Looks for a
resolvedId given the original id only in case it
corresponds to a redirect. |
static int |
resolveRedirect(int id,
int type,
java.lang.String language,
int year,
WikipediaDriverManager dmc)
Looks for a
resolvedId given an original redirect id. |
public static java.lang.String getformatWPtitle(java.sql.ResultSet rs,
java.lang.String colName)
ResultSet object extracts from column colName and formats a
Wikipedia title as expected to be found in table pagers - colName - public static java.lang.String getformatTitleGivenID(int id,
java.lang.String language,
int year,
WikipediaDriverManager dmc)
id from table "page"
The connection must be ready before.
The existence of table "page" must be checked before.id - language - year - dmc - public static int resolveIfRedirect(int id,
int type,
java.lang.String language,
int year,
WikipediaDriverManager dmc)
resolvedId given the original id only in case it
corresponds to a redirect. Chains of redirects are also followed.
The connection must be ready before.
The existence of the tables "page" and "redirect" must be checked before.id - type - language - year - dmc - public static int resolveRedirect(int id,
int type,
java.lang.String language,
int year,
WikipediaDriverManager dmc)
resolvedId given an original redirect id. Chains of
redirects are also followed.
The connection must be ready before.
The existence of the tables "page" and "redirect" must be checked before.id - type - language - year - dmc - public static boolean isRedirect(int id,
java.lang.String language,
int year,
WikipediaDriverManager dmc)
throws java.sql.SQLException
language and
year if the id is a redirect.
The connection must be ready before.
The existence of the table must be checked before.id - language - year - dmc - java.sql.SQLExceptionpublic static java.lang.String getPageTableName(java.lang.String language,
int year)
language - year - public static java.lang.String getLanglinksTableName(java.lang.String language,
int year)
language - year - public static java.lang.String getRedirectTableName(java.lang.String language,
int year)
language - year -