|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.olafpanz.translationtable.ODSLoader
final class ODSLoader
Create translation files from .odt table: - Interface that defines all translation keys. This ensures that keys are only used once - Translation table for all specified languages. - Error messages for wrong formats
| Field Summary | |
|---|---|
private static java.lang.String |
CONTENT_NAME
Name of the content file within the ods file. |
private org.w3c.dom.Document |
doc
The document to process. |
private TranslationTableParameters |
param
Parameters for creation. |
| Constructor Summary | |
|---|---|
ODSLoader(TranslationTableParameters param)
Create new class to create the translation table. |
|
| Method Summary | |
|---|---|
java.util.List<TranslationDocument> |
load()
Create translations tables for one file |
private java.lang.String |
readCellValue(org.w3c.dom.NodeList rows,
int row,
int column)
Read a column from a given row. |
private java.util.List<TranslationDocument> |
readSheet()
Read the all pages from document. |
private TranslationDocument |
readTable(org.w3c.dom.Element table)
Process one table |
(package private) static java.util.Locale |
toLocale(java.lang.String locString)
Create locale from string |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final java.lang.String CONTENT_NAME
private org.w3c.dom.Document doc
private final TranslationTableParameters param
| Constructor Detail |
|---|
public ODSLoader(TranslationTableParameters param)
param - Parameters for code generation| Method Detail |
|---|
public java.util.List<TranslationDocument> load()
throws java.io.IOException,
javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException
java.io.IOException - File loading might mail.
javax.xml.parsers.ParserConfigurationException - Parsing of document might fail
org.xml.sax.SAXException - Parsing of document might failstatic final java.util.Locale toLocale(java.lang.String locString)
locString - The locale string
private final java.lang.String readCellValue(org.w3c.dom.NodeList rows,
int row,
int column)
rows - List of rows in xmlrow - The row to usecolumn - The column index
private final java.util.List<TranslationDocument> readSheet()
private final TranslationDocument readTable(org.w3c.dom.Element table)
table - The table to process.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||