|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--com.g11ntoolkit.tokenizer.FileTokenizer
|
+--com.g11ntoolkit.tokenizer.TokSQLFile
Tokenizes the specified buffer as an SQL file.
This is tailored specifically for Portal SQL files. It extracts only strings enclosed in single quotes. It extracts all candidate strings regardless of their position in the file.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
See License Agreement.
| Field Summary | |
private static java.lang.String |
localeString
The locale for the input file. |
private static java.util.logging.Logger |
log
The log used for all messages from this class. |
protected static java.lang.String |
theContextFileName
The context input file name saved for later use. |
protected static java.util.ResourceBundle |
xliffrb
Constants, messages, and variables used by the tools and classes for XLIFF processing. |
| Fields inherited from class com.g11ntoolkit.tokenizer.FileTokenizer |
context, encoding, inFileBuffer, jspVars, mrb, product, productVersion, revContext, targetLocale, tokContext, token, vrb |
| Constructor Summary | |
TokSQLFile()
Establishes an instance of the class with no input information. |
|
TokSQLFile(java.lang.String anEncoding)
Establishes an instance of the class and saves all the input information for use in processing the file. |
|
TokSQLFile(java.lang.String anEncoding,
java.util.Locale aLocale)
Establishes an instance of the class and saves all the input information for use in processing the file. |
|
TokSQLFile(java.lang.String anEncoding,
java.util.Locale aLocale,
Token aToken)
Establishes an instance of the class and saves all the input information for use in processing the file. |
|
| Method Summary | |
static void |
main(java.lang.String[] args)
Allows this tool to be run from the command line. |
private XLEntry |
newXLEntry(java.lang.String fn,
java.lang.String sc,
java.lang.String tuse)
Returns a new XLEntry for the extracted string. |
static StrFile |
tokenize(java.lang.String inFileName,
java.lang.String contextFileName,
java.util.Locale targetLocale,
java.lang.String localeString)
Tokenizes the buffer and writes the SQL file tok file and str file out. |
| Methods inherited from class com.g11ntoolkit.tokenizer.FileTokenizer |
cleanConcats, getEncoding, getFileBuffer, getKey, getProductName, getProductVersion, getToken, keys, readFile, readFilePlain, setContext, setEncoding, setProductName, setProductVersion, setupTok, setupTok, tokens |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static java.util.logging.Logger log
protected static java.util.ResourceBundle xliffrb
protected static java.lang.String theContextFileName
private static java.lang.String localeString
| Constructor Detail |
public TokSQLFile()
It is useful for setting up the class for the check function.
public TokSQLFile(java.lang.String anEncoding,
java.util.Locale aLocale,
Token aToken)
throws FileTokenizerError
anEncoding - a String specifying the encoding of the input fileaLocale - a Locale object specifying the locale of the stringsaToken - a Token object for use in the tokenized file created
FileTokenizerError - when anything goes wrong
public TokSQLFile(java.lang.String anEncoding,
java.util.Locale aLocale)
throws FileTokenizerError
anEncoding - a String specifying the encoding of the input fileaLocale - a Locale specifying the target locale
FileTokenizerError - when anything goes wrong
public TokSQLFile(java.lang.String anEncoding)
throws FileTokenizerError
anEncoding - a String specifying the encoding of the input file
FileTokenizerError - when anything goes wrong| Method Detail |
public static void main(java.lang.String[] args)
throws FileTokRunError
Sets up the environment then uses the tokenize method to extract the strings.
args - a String array specifying the command line parameters. The order does not matter except that the arguments that are paired must be paired in order. The arguments are not case sensitive.
FileTokRunError
private XLEntry newXLEntry(java.lang.String fn,
java.lang.String sc,
java.lang.String tuse)
XLEntry for the extracted string.
fn - a String specifying the name of the file that contains the stringsc - a String specifying the stringtuse - a String specifying the tuse part of the context
XLEntry for the string
public static StrFile tokenize(java.lang.String inFileName,
java.lang.String contextFileName,
java.util.Locale targetLocale,
java.lang.String localeString)
throws FileTokenizerError
It uses the super class setupTok method to do the common work of reading the file into a string buffer.
inFileName - a String specifying the input file namecontextFileName - a String specifying the input file name to use as the token id and contexttargetLocale - a Locale specifying the intended target locale
FileTokenizerError - if any errors occur during processing.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||