|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.olafpanz.translationtable.TranslationEntry
final class TranslationEntry
Contains one translation entry.
| Field Summary | |
|---|---|
private java.lang.String |
desc
Description of this entry |
private java.lang.String |
group
A translation entry might belong to a group. |
private java.lang.String |
key
Key to this entry |
private java.util.List<java.lang.String> |
translations
List of translation, is corresponding to locales in TranslationTable. |
private TranslationDataType |
type
Type of this entry |
| Constructor Summary | |
|---|---|
TranslationEntry(java.lang.String key,
java.lang.String group,
TranslationDataType type,
java.lang.String desc,
java.util.List<java.lang.String> translations)
Create a translation entry |
|
| Method Summary | |
|---|---|
void |
collectImports(java.util.Set<java.lang.String> imports,
int localeIndex,
TranslationDocument doc)
Collect all used imports |
int |
compareTo(TranslationEntry arg0)
Compare with another translation entry by key. |
private java.lang.String |
convert2Character(java.lang.String str)
Convert a declarative string to code that creates a character. |
private java.lang.String |
convert2KeyStroke(java.lang.String str)
Convert a descriptive string to a key stroke define. |
static java.lang.String |
createKey(TranslationDataType type,
java.lang.String group,
java.lang.String plainKey)
Create a key from type and plan key. |
java.lang.String |
getDesc()
|
java.lang.String |
getGroup()
|
java.lang.String |
getGroupKey()
Return combination of group and key |
java.lang.String |
getJavaDoc(java.util.List<LocaleDef> locales,
java.lang.String indend,
TranslationDocument doc)
Create java doc comment of this entry. |
java.lang.String |
getKey()
|
java.lang.String |
getPlainKey()
This is the key without type prefix |
private java.lang.String |
getRawTranslationString(int translationIndex,
TranslationDocument doc)
Request the raw translation string for a language at an index position. |
java.util.List<java.lang.String> |
getTranslations()
|
TranslationDataType |
getType()
|
java.lang.String |
getValueAsString(int translationIndex,
TranslationDocument doc)
Evaluate the string that should be written to file for a given index. |
java.lang.String |
toString()
Debug only |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private final java.lang.String key
private final TranslationDataType type
private final java.lang.String desc
private final java.util.List<java.lang.String> translations
private final java.lang.String group
| Constructor Detail |
|---|
public TranslationEntry(java.lang.String key,
java.lang.String group,
TranslationDataType type,
java.lang.String desc,
java.util.List<java.lang.String> translations)
key - Key to this entrygroup - A translation entry might belong to a group. This might be
null.type - Type of this entrydesc - Desription of this entrytranslations - List of translation, is corresponding to locales in
TranslationTable.| Method Detail |
|---|
public static java.lang.String createKey(TranslationDataType type,
java.lang.String group,
java.lang.String plainKey)
type - The typeplainKey - The plain key.group - Group of this translation value.
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public int compareTo(TranslationEntry arg0)
compareTo in interface java.lang.Comparable<TranslationEntry>arg0 - The other entry
private final java.lang.String convert2Character(java.lang.String str)
str - The declarative String
private final java.lang.String convert2KeyStroke(java.lang.String str)
str - The descriptive string
public java.lang.String getDesc()
public java.lang.String getJavaDoc(java.util.List<LocaleDef> locales,
java.lang.String indend,
TranslationDocument doc)
locales - Current locale list, used to create list of translationsindend - Indend, used for new line.doc - Document is needed to resolve translation string.
public java.lang.String getGroup()
public java.lang.String getKey()
public java.lang.String getGroupKey()
public java.lang.String getPlainKey()
public java.util.List<java.lang.String> getTranslations()
public TranslationDataType getType()
private java.lang.String getRawTranslationString(int translationIndex,
TranslationDocument doc)
translationIndex - Index of requested translation.doc - Document is needed for default language resolving.
public java.lang.String getValueAsString(int translationIndex,
TranslationDocument doc)
translationIndex - The index of the tanslationdoc - Document is needed to resolve derived languages.
public void collectImports(java.util.Set<java.lang.String> imports,
int localeIndex,
TranslationDocument doc)
imports - Fill this set with results.localeIndex - Index of locale to collect imports for.doc - Document is needed to resolve derived languages.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||