public abstract class BaseEntry extends Object implements DictionaryEntry
Modifier and Type | Class and Description |
---|---|
protected static class |
BaseEntry.BaseEntryRef
Reference to a base dictionary entry.
|
static interface |
BaseEntry.MarkerDictionary
Interface implemented by dictionaries which support creating dictionary entries from
markers as used in this class.
|
DictionaryEntry.AttributeGroup
Modifier and Type | Field and Description |
---|---|
protected Dictionary |
dictionary |
protected DefaultAttributeSet |
emptySet |
protected int |
entryMarker
Unique marker of this dictionary entry relative to other dictionary entries in
this dictionary.
|
protected AttributeSet |
generalA |
protected AttributeSet |
readingA |
protected DictionaryEntryReference |
reference |
protected AttributeSet |
translationA |
protected AttributeSet[] |
translationRomA |
protected String[][] |
translations |
protected AttributeSet |
wordA |
Constructor and Description |
---|
BaseEntry(int _entryMarker,
List<List<String>> _translations,
AttributeSet _generalA,
AttributeSet _wordA,
AttributeSet _readingA,
AttributeSet _translationA,
List<AttributeSet> _translationRomA,
Dictionary _dictionary) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Dictionary |
getDictionary()
Returns the dictionary from which this entry originated.
|
AttributeSet |
getGeneralAttributes()
Return the set of attributes which apply to the whole entry.
|
AttributeSet |
getReadingAttributes()
Returns the set of attributes which apply to all readings.
|
AttributeSet |
getReadingAttributes(int alternative)
Returns the set of attributes which apply to a particular reading.
|
DictionaryEntryReference |
getReference()
Creates a new reference to this entry.
|
String |
getTranslation(int rom,
int crm,
int synonym)
Returns a translation of this entry.
|
AttributeSet |
getTranslationAttributes()
Returns the set of attributes which apply to all translations.
|
AttributeSet |
getTranslationAttributes(int rom)
Returns the set of attributes which apply to a particular range of meanings.
|
AttributeSet |
getTranslationAttributes(int rom,
int crm)
Returns the set of attributes which apply to a particular closely related meaning.
|
AttributeSet |
getTranslationAttributes(int rom,
int crm,
int synonym)
Returns the set of attributes which apply to a particular translation.
|
int |
getTranslationCrmCount(int rom)
Returns the number of closely related meanings of one range of meanings.
|
int |
getTranslationRomCount()
Returns the number of ranges of meanings.
|
int |
getTranslationSynonymCount(int rom,
int crm)
Returns the number of synonyms for one closely related meaning, range of meanings.
|
AttributeSet |
getWordAttributes()
Returns the set of attributes which apply to all word alternatives.
|
int |
hashCode() |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getReading, getReadingAlternativeCount, getWord, getWordAlternativeCount, getWordAttributes
protected String[][] translations
protected AttributeSet generalA
protected AttributeSet wordA
protected AttributeSet readingA
protected AttributeSet translationA
protected AttributeSet[] translationRomA
protected Dictionary dictionary
protected int entryMarker
entryMarker
, and for dictionary entry objects created from different
dictionary entries the marker must always be different. The marker usually is the
position where the entry is found in the dictionary, since this is unique.protected DictionaryEntryReference reference
protected DefaultAttributeSet emptySet
public BaseEntry(int _entryMarker, List<List<String>> _translations, AttributeSet _generalA, AttributeSet _wordA, AttributeSet _readingA, AttributeSet _translationA, List<AttributeSet> _translationRomA, Dictionary _dictionary)
public AttributeSet getGeneralAttributes()
DictionaryEntry
getGeneralAttributes
in interface DictionaryEntry
public AttributeSet getWordAttributes()
DictionaryEntry
getWordAttributes
in interface DictionaryEntry
public AttributeSet getReadingAttributes(int alternative)
DictionaryEntry
getReadingAttributes
in interface DictionaryEntry
alternative
- Index (0-based) of the reading requested.public AttributeSet getReadingAttributes()
DictionaryEntry
getReadingAttributes
in interface DictionaryEntry
public String getTranslation(int rom, int crm, int synonym)
DictionaryEntry
getTranslation
in interface DictionaryEntry
rom
- Requested range of meanings (0-based).crm
- Requested closely related meaning (0-based).synonym
- Requested synonym of a translation (0-based).public int getTranslationRomCount()
DictionaryEntry
getTranslationRomCount
in interface DictionaryEntry
public int getTranslationCrmCount(int rom)
DictionaryEntry
getTranslationCrmCount
in interface DictionaryEntry
rom
- Requested range of meanings (0-based).public int getTranslationSynonymCount(int rom, int crm)
DictionaryEntry
getTranslationSynonymCount
in interface DictionaryEntry
rom
- Requested range of meanings (0-based).crm
- Requested closely related meaning (0-based).public AttributeSet getTranslationAttributes(int rom, int crm, int synonym)
DictionaryEntry
getTranslationAttributes
in interface DictionaryEntry
rom
- Requested range of meanings (0-based).crm
- Requested closely related meaning (0-based).synonym
- Requested synonym of a translation (0-based).public AttributeSet getTranslationAttributes(int rom, int crm)
DictionaryEntry
getTranslationAttributes
in interface DictionaryEntry
rom
- Requested range of meanings (0-based).crm
- Requested closely related meaning (0-based).public AttributeSet getTranslationAttributes(int rom)
DictionaryEntry
getTranslationAttributes
in interface DictionaryEntry
rom
- Requested range of meanings (0-based).public AttributeSet getTranslationAttributes()
DictionaryEntry
getTranslationAttributes
in interface DictionaryEntry
public Dictionary getDictionary()
DictionaryEntry
getDictionary
in interface DictionaryEntry
public DictionaryEntryReference getReference()
MarkerDictionary
interface, a
BaseEntryRef
is created, otherwise a reference which simply stores
and returns the reference to this entry is returned.getReference
in interface DictionaryEntry
Copyright © 2001-2013 the JGloss developers. All Rights Reserved.