|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.isogen.i18nsupport.StaticTextDatabase
Manages loading static text datatabase documents. Exposes four hash tables that are then used by other classes to do lookup of translated text strings. This design reflects an initial quick refactor to pull all the text database loading code out of the I18nService class to try to make things a little cleaner. However, there is still more refactoring that could be done to improve the code.
Field Summary | |
java.util.Hashtable |
attributeMap
|
static java.lang.String[] |
availableLanguages
|
java.util.Hashtable |
langCodes
|
java.util.Hashtable |
textAfter
|
java.util.Hashtable |
textBefore
|
Constructor Summary | |
StaticTextDatabase()
|
Method Summary | |
boolean |
hasKey(java.lang.String inKey,
java.lang.String langCode)
Returns true if the specified key has an entry in the database. |
void |
loadStaticTextDatabase(java.lang.String dbDocPath)
Deprecated. This form of call should be replaced with the form that takes a URL as its argument. Loads the specified static text database document into the in-memory database. |
void |
loadStaticTextDatabase(java.net.URL dbDocUrl)
Loads the specified static text database document into the in-memory database. |
java.lang.String |
printStaticTextDatabase()
Returns a string containing a report of the in-memory translation table. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public java.util.Hashtable textBefore
public java.util.Hashtable textAfter
public java.util.Hashtable attributeMap
public static java.lang.String[] availableLanguages
public java.util.Hashtable langCodes
Constructor Detail |
public StaticTextDatabase()
Method Detail |
public boolean hasKey(java.lang.String inKey, java.lang.String langCode) throws I18nServiceError
I18nServiceError
public void loadStaticTextDatabase(java.lang.String dbDocPath) throws I18nServiceError
dbDocPath
- The system-specific path to the static text database
document (e.g., static_text_database.xml).
I18nServiceError
public void loadStaticTextDatabase(java.net.URL dbDocUrl) throws I18nServiceError
dbDocUrl
- The URL of the static text database document.
I18nServiceError
public java.lang.String printStaticTextDatabase() throws I18nServiceError
I18nServiceError
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |