@Entity public class WiktionaryPage extends Object implements IWiktionaryPage
IWiktionaryPage interface.
See there for details.| Modifier and Type | Field and Description |
|---|---|
protected String |
author |
protected List<String> |
categories |
protected List<WiktionaryEntry> |
entries |
protected ILanguage |
entryLanguage |
protected String |
entryLanguageStr |
protected long |
id |
protected Set<String> |
interWikiLinks |
protected String |
normalizedTitle |
protected String |
redirectTarget |
protected long |
revision |
protected Date |
timestamp |
protected String |
title |
| Constructor and Description |
|---|
WiktionaryPage()
Instanciates a new, empty page.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCategory(String category)
Add the given category to the list of categories.
|
void |
addEntry(WiktionaryEntry entry)
Add the given entry to the list of senses.
|
void |
addInterWikiLink(String language)
Add the given interwiki link to the list of interwiki links.
|
WiktionaryEntry |
createEntry()
Factory method for creating a new entry.
|
List<WiktionaryEntry> |
entries()
Internal interface that is used by the parsers.
|
String |
getAuthor()
Returns the author of this revision - i.e., the name of the user
that made the last change to the page.
|
List<String> |
getCategories()
Returns all categories of the Wiktionary page that are manually
defined.
|
List<? extends IWiktionaryEntry> |
getEntries()
Returns the list of all
IWiktionaryEntrys. |
WiktionaryEntry |
getEntry(int index)
Returns the
IWiktionaryEntry with the given index. |
int |
getEntryCount()
Returns the number of
IWiktionaryEntrys encoded on this
page. |
ILanguage |
getEntryLanguage()
Returns the language that this page is written in.
|
long |
getId()
Returns the unique ID for this page.
|
Set<String> |
getInterWikiLinks()
Returns a list of inter-wiki links of this Wiktionary page.
|
String |
getKey()
Returns a unique ID for this page.
|
String |
getRedirectTarget()
Returns the page title that a redirect page targets at.
|
long |
getRevision()
Returns the ID of this revision - i.e., a unique number of the
last change made to the page.
|
Date |
getTimestamp()
Returns the timestamp of this revision - i.e., the date of the
last change of the page.
|
String |
getTitle()
Returns the title of this Wiktionary page which usually corresponds
to the lemma of all lexical entries described on this page.
|
void |
init()
Initialize the page and all of its entries.
|
static String |
normalizeTitle(String title)
Static helper method for normalizing the title.
|
void |
setAuthor(String author)
Assigns the given author name to this page.
|
void |
setEntryLanguage(ILanguage entryLanguage)
Assigns the given entry language to this page.
|
void |
setId(long id)
Assign the specified page ID.
|
void |
setRedirectTarget(String redirectTarget)
Assigns the given redirect target to this page.
|
void |
setRevision(long revision)
Assigns the given revision ID to this page.
|
void |
setTimestamp(Date timestamp)
Assigns the given timestamp to this page.
|
void |
setTitle(String title)
Assigns the given title to this page.
|
String |
toString() |
@PrimaryKey protected long id
@SecondaryKey(relate=ONE_TO_ONE) protected String title
@SecondaryKey(relate=MANY_TO_ONE) protected String normalizedTitle
protected Date timestamp
protected long revision
protected String author
protected transient ILanguage entryLanguage
protected String entryLanguageStr
protected String redirectTarget
protected List<WiktionaryEntry> entries
public void init()
public WiktionaryEntry createEntry()
public String getKey()
IWiktionaryPageIWiktionaryPages of the IWiktionaryEdition and
remains persistent regardless of the JWKTL software version or
the date of the XML data dump of Wiktionary.getKey in interface IWiktionaryPagepublic long getId()
IWiktionaryPageIWiktionaryPage.getKey(), but returns the ID as a numerical value.getId in interface IWiktionaryPagepublic void setId(long id)
public String getTitle()
IWiktionaryPagegetTitle in interface IWiktionaryPagepublic void setTitle(String title)
public Date getTimestamp()
IWiktionaryPagegetTimestamp in interface IWiktionaryPagepublic void setTimestamp(Date timestamp)
public long getRevision()
IWiktionaryPagegetRevision in interface IWiktionaryPagepublic void setRevision(long revision)
public String getAuthor()
IWiktionaryPagegetAuthor in interface IWiktionaryPagepublic void setAuthor(String author)
public ILanguage getEntryLanguage()
IWiktionaryPageIWiktionaryEdition.getLanguage(). As opposed to that,
the language of a word can be retrieved by
IWiktionaryEntry.getWordLanguage(). There is, for example,
a Wiktionary page "plant" in the German Wiktionary language edition
that encodes a lexical entry on the word "plant" of the English
language. The entry language would be German and the word language
would be English in this case.getEntryLanguage in interface IWiktionaryPagepublic void setEntryLanguage(ILanguage entryLanguage)
public void addCategory(String category)
public List<String> getCategories()
IWiktionaryPagenull.getCategories in interface IWiktionaryPagepublic void addInterWikiLink(String language)
public Set<String> getInterWikiLinks()
IWiktionaryPageIWiktionarySense.getTranslations() for word translations.
The returned list is never null.getInterWikiLinks in interface IWiktionaryPagepublic String getRedirectTarget()
IWiktionaryPagenull if the page is not a redirection page.getRedirectTarget in interface IWiktionaryPagepublic void setRedirectTarget(String redirectTarget)
public void addEntry(WiktionaryEntry entry)
public WiktionaryEntry getEntry(int index)
IWiktionaryPageIWiktionaryEntry with the given index. The index
is a running number starting at zero.getEntry in interface IWiktionaryPagepublic int getEntryCount()
IWiktionaryPageIWiktionaryEntrys encoded on this
page.getEntryCount in interface IWiktionaryPagepublic List<? extends IWiktionaryEntry> getEntries()
IWiktionaryPageIWiktionaryEntrys. The list is
never null and yields equivalent results to using
IWiktionaryPage.getEntry(int) for all indices from zero to
IWiktionaryPage.getEntryCount().getEntries in interface IWiktionaryPagepublic List<WiktionaryEntry> entries()
Copyright © 2011-2016 Ubiquitous Knowledge Processing (UKP) Lab. All Rights Reserved.