|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.olafpanz.translationtable.TranslationDocument
final class TranslationDocument
Contains a loaded translation document.
| Field Summary | |
|---|---|
private java.lang.String |
classComment
Comment for generated class. |
private java.lang.String |
className
Class base name. |
private java.util.List<LocaleDef> |
locales
List of supported locales in order or usage in data. |
private java.lang.String |
name
Base name of table within multi-table file. |
private java.lang.String |
packageName
Name of package. |
private int[] |
templateLocales
Default locales of locale, positions correspond to locales. |
private java.util.Set<TranslationEntry> |
translations
All translation entries. |
| Constructor Summary | |
|---|---|
TranslationDocument(java.lang.String className,
java.lang.String packageName,
java.lang.String classComment,
java.lang.String name,
java.util.List<LocaleDef> locales)
Create new document |
|
| Method Summary | |
|---|---|
boolean |
addTranslation(TranslationEntry entry)
Add a translation key |
java.lang.String |
getClassComment()
|
java.lang.String |
getClassName()
|
int |
getDefaultLocale()
The default locale is the locale that is used if no specific translations exists for a locale |
private static int |
getIndex(java.util.List<LocaleDef> lst,
java.util.Locale loc)
Search for an locale within a list of LocaleDef |
java.util.List<LocaleDef> |
getLocales()
List of supported locales in order or usage in data. |
java.lang.String |
getName()
|
java.lang.String |
getPackageName()
|
int |
getTemplateLocaleIndex(int localeIndex)
Returns index of template locale |
java.util.Set<TranslationEntry> |
getTranslations()
All translation entries. |
boolean |
hasBundle()
Check, if at least one Bundle-Translation exists |
boolean |
hasRCP()
Check, if at least one RCP-Translation exists |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final java.util.Set<TranslationEntry> translations
private final java.util.List<LocaleDef> locales
private final java.lang.String name
private final java.lang.String packageName
private final java.lang.String className
private final java.lang.String classComment
private final int[] templateLocales
locales.
| Constructor Detail |
|---|
public TranslationDocument(java.lang.String className,
java.lang.String packageName,
java.lang.String classComment,
java.lang.String name,
java.util.List<LocaleDef> locales)
className - Class base name.packageName - Name of package.classComment - Comment for generated class.name - Base name of table within multi-table file.locales - List of locales in the document| Method Detail |
|---|
private static int getIndex(java.util.List<LocaleDef> lst,
java.util.Locale loc)
lst - Null is not allowed.loc - Null is not allowed.
public java.util.Set<TranslationEntry> getTranslations()
public int getTemplateLocaleIndex(int localeIndex)
localeIndex - Index of locale for that the default locale is requested
public int getDefaultLocale()
public java.util.List<LocaleDef> getLocales()
public java.lang.String getName()
public java.lang.String getPackageName()
public java.lang.String getClassName()
public java.lang.String getClassComment()
public boolean addTranslation(TranslationEntry entry)
entry - null is not allowed.
public boolean hasBundle()
public boolean hasRCP()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||