@Persistent public class WiktionarySense extends Object implements IWiktionarySense
IWiktionarySense interface.
See there for details.| Modifier and Type | Field and Description |
|---|---|
protected WiktionaryEntry |
entry |
protected long |
entryId |
protected List<IWiktionaryExample> |
examples |
protected IWikiString |
gloss |
protected int |
index |
protected String |
marker |
protected List<IQuotation> |
quotations |
protected List<IWikiString> |
references |
protected List<IWiktionaryRelation> |
relations |
protected List<IWiktionaryTranslation> |
translations |
| Constructor and Description |
|---|
WiktionarySense() |
| Modifier and Type | Method and Description |
|---|---|
void |
addExample(IWiktionaryExample example)
Add the given example to this sense.
|
void |
addQuotation(IQuotation quotation)
Add the given quotation to this sense.
|
void |
addReference(IWikiString reference)
Add the given reference to this sense.
|
void |
addRelation(IWiktionaryRelation relation)
Add the given relation to this sense.
|
void |
addTranslation(IWiktionaryTranslation translation)
Add the given translation to this sense.
|
IWiktionaryEntry |
getEntry()
Returns a reference to the
IWiktionaryEntry that contains
this sense. |
long |
getEntryId()
Shorthand for
getEntry().getId(). |
List<IWiktionaryExample> |
getExamples()
Returns a list of sense examples or
null if no sense
examples are encoded. |
IWikiString |
getGloss()
Returns the sense description as a
IWikiString. |
String |
getId()
Returns an ID of this sense that is unique for all senses
of the containing
IWiktionaryEntry. |
int |
getIndex()
Returns the index of this sense.
|
String |
getKey()
Returns a unique ID for this word sense.
|
String |
getMarker()
Returns the marker for this sense as defined in Wiktionary.
|
IWiktionaryPage |
getPage()
Returns a reference to the
IWiktionaryPage that contains
this sense. |
List<IQuotation> |
getQuotations()
Returns a list of quotations or
null if no
quotations are encoded. |
List<IWikiString> |
getReferences()
Returns a list of references for this sense or
null if no referemces are encoded. |
List<IWiktionaryRelation> |
getRelations()
Returns the list of all sense relations (or
null
if no relations are encoded). |
List<IWiktionaryRelation> |
getRelations(RelationType relationType)
Returns the list of sense relations of the given relation type.
|
List<IWiktionaryTranslation> |
getTranslations()
Returns the list of all translations (or
null
if no translations are encoded). |
List<IWiktionaryTranslation> |
getTranslations(ILanguage language)
Returns the list of translations into the given language.
|
void |
init(WiktionaryEntry entry)
Initialize the sense using the given Wiktionary entry.
|
void |
setGloss(IWikiString gloss)
Add the given sense definition to this sense.
|
protected void |
setIndex(int index)
Assigns the given index to this sense.
|
void |
setMarker(String marker)
Assigns the given sense marker to this sense.
|
String |
toString() |
protected int index
protected String marker
protected transient WiktionaryEntry entry
protected long entryId
protected IWikiString gloss
protected List<IWiktionaryExample> examples
protected List<IQuotation> quotations
protected List<IWikiString> references
protected List<IWiktionaryRelation> relations
protected List<IWiktionaryTranslation> translations
public void init(WiktionaryEntry entry)
public String getKey()
IWiktionarySenseIWiktionarySenses of the IWiktionaryEdition. Note
however that the ID of a sense may differ between different software
versions or dump dates.getKey in interface IWiktionarySensepublic String getId()
IWiktionarySenseIWiktionaryEntry. Use IWiktionarySense.getKey()
for a globally unique identifier.getId in interface IWiktionarySensepublic long getEntryId()
getEntry().getId().public int getIndex()
IWiktionarySenseIWiktionaryEntry. The first sense has index 1.
Note that this is not generally the index marker used in Wiktionary:
the first sense has for example always index 1, although it might
be marked with "[2]" or "[1a]". See IWiktionarySense.getMarker() for details.getIndex in interface IWiktionarySenseprotected void setIndex(int index)
public String getMarker()
IWiktionarySensegetMarker in interface IWiktionarySensepublic void setMarker(String marker)
public IWiktionaryEntry getEntry()
IWiktionarySenseIWiktionaryEntry that contains
this sense.getEntry in interface IWiktionarySensepublic IWiktionaryPage getPage()
IWiktionarySenseIWiktionaryPage that contains
this sense.getPage in interface IWiktionarySensepublic IWikiString getGloss()
IWiktionarySenseIWikiString.getGloss in interface IWiktionarySensepublic void setGloss(IWikiString gloss)
public void addExample(IWiktionaryExample example)
public List<IWiktionaryExample> getExamples()
IWiktionarySensenull if no sense
examples are encoded.getExamples in interface IWiktionarySensepublic void addQuotation(IQuotation quotation)
public List<IQuotation> getQuotations()
IWiktionarySensenull if no
quotations are encoded.getQuotations in interface IWiktionarySensepublic void addReference(IWikiString reference)
public List<IWikiString> getReferences()
IWiktionarySensenull if no referemces are encoded.getReferences in interface IWiktionarySensepublic void addRelation(IWiktionaryRelation relation)
public List<IWiktionaryRelation> getRelations()
IWiktionarySensenull
if no relations are encoded).getRelations in interface IWiktionarySensepublic List<IWiktionaryRelation> getRelations(RelationType relationType)
IWiktionarySensegetRelations in interface IWiktionarySensepublic void addTranslation(IWiktionaryTranslation translation)
public List<IWiktionaryTranslation> getTranslations(ILanguage language)
IWiktionarySensegetTranslations in interface IWiktionarySensepublic List<IWiktionaryTranslation> getTranslations()
IWiktionarySensenull
if no translations are encoded).getTranslations in interface IWiktionarySenseCopyright © 2011-2016 Ubiquitous Knowledge Processing (UKP) Lab. All Rights Reserved.