|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.xerox.jxip.JXip
public class JXip
The purpose of this class is to provide a Java implementation of the XIP library.
| Constructor Summary | |
|---|---|
JXip()
Constructor for the JXip object |
|
JXip(java.lang.String[] libsArr,
boolean loadingLibInJar)
Constructor for the JXip object the libraries inside the jar are not loaded |
|
| Method Summary | |
|---|---|
static java.lang.String |
duplicateString(java.lang.String str)
This method is used to be sured than the string created by a C++ native method will be duplicated before calling the deleteLocalJStringRef method which tell the GC to garbage this data |
java.lang.String |
getEnv(java.lang.String name)
Get the value of a native environment variable |
java.lang.String |
getErrorMsg()
return the error message of the previous xip function call |
java.lang.String |
GetVersion()
Get version about the current XIP C++ Library used. |
void |
InitErrorMsg()
Reset and clear the error message buffer |
static void |
main(java.lang.String[] args)
|
java.lang.String |
parseString(int gHandler,
java.lang.String textInput,
char xml,
char apply_grammar)
parse one string |
java.lang.String |
parseStringCharSet(int gHandler,
java.lang.String textInput,
java.lang.String charSet,
char xml,
char apply_grammar)
parse the string: Encodes this String into a sequence of bytes using the named charset storing the result into a new byte array and parse this array. |
java.lang.String |
parseStringStructure(int gHandler,
java.lang.String textInput,
char xml,
char apply_grammar)
parse a string that contains a tree structure |
java.lang.String |
parseStringXml(int gHandler,
java.lang.String textInput)
Parse one String. |
java.lang.String |
parseStringXmlOS(int gHandler,
java.lang.String input)
Parse one String. |
java.lang.String |
parseStringXmlOS(int gHandler,
java.lang.String input,
int depth,
char xml,
char apply)
Parse one String. |
void |
printSysInfo()
print system info |
void |
setEnv(java.lang.String name,
java.lang.String value)
change the value of a native environment variable |
void |
XipAddFlagDisplay(int gHandler,
long displayFlag,
int col)
add display flag |
java.util.Vector<java.lang.String> |
XipAliasList(int gHandler)
get the list of aliases |
int |
XipCleanXMLAlias(int gHandler,
java.lang.String alias)
This method clean the data in memory corresponding to the xmltree |
void |
XipFreeGrammar(int gHandler)
|
java.lang.String |
XipGetGrammarCharset(int gHandler)
Return the encoding charset of the grammar source files |
java.util.Vector<java.lang.String> |
XipGetListCategories(int gHandler)
|
java.util.Vector<java.lang.String> |
XipGetListDependencies(int gHandler)
|
java.lang.String |
XipGetSourceCharset(int gHandler)
Return the encoding charset of the source (FST) |
java.lang.String |
XipGetStringVariable(int gHandler,
java.lang.String variableName)
get a variable string value |
int |
XipGrammarLoading(java.lang.String grammarFileName,
java.lang.String ntmFileName,
java.lang.String hmmFileName,
int enableXml)
loading grammars, NTM and HMM ressources files. |
int |
XipGrmFile(java.lang.String grmFileName,
int enableXml,
boolean loadFst)
load grammar files using a grm file |
int |
XipLicense(int gHandler)
returns the number of days before the grammar licence expires |
int |
XipLoadGrammar(java.lang.String grammarFileName,
java.lang.String ntmFileName,
java.lang.String hmmFileName,
int enableXml)
loading grammars, NTM and HMM ressources files. |
int |
XipLoadXMLDataBase(int gHandler,
java.lang.String fileName,
java.lang.String alias)
load a XML database file |
int |
XipParameterFile(int gHandler,
java.lang.String fileName)
load a parameter file |
int |
XipParseFileToFile(int gHandler,
java.lang.String input,
java.lang.String output,
char xml,
char apply)
|
java.lang.String |
XipParseFileXmlOS(int gHandler,
java.lang.String inputFile,
int depth,
char xml,
char apply)
|
int |
XipParseFileXMLToFile(int gHandler,
java.lang.String input,
java.lang.String output,
int depth,
char xml,
char apply)
|
int |
XipReloadGrammar(int gHandler,
boolean reloadParameter,
java.lang.String grmFileName)
Reload a grammar |
void |
XipRemoveFlagDisplay(int gHandler,
long displayFlag)
remove a display flag |
void |
XipSetDependencyExtraction(int gHandler,
boolean extraction)
|
void |
XipSetDisplayMode(int gHandler,
long displayMode,
int col)
select a display mode |
boolean |
xipSetIndentFilePathname(int gHandler,
java.lang.String path)
|
int |
XipSetIntVariable(int gHandler,
java.lang.String variableName,
int value)
set a int variable |
int |
XipSetStringVariable(int gHandler,
java.lang.String variableName,
java.lang.String variableValue)
set a variable |
boolean |
xipSetWorkingFilesPath(int gHandler,
java.lang.String path)
define the path for any output file |
boolean |
XipTestFlagDisplay(int gHandler,
long displayFlag)
test a display flag |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JXip()
throws java.lang.Exception
java.lang.Exception
public JXip(java.lang.String[] libsArr,
boolean loadingLibInJar)
throws java.lang.Exception
libsArr - array of dynamic libraries to loadloadingLibInJar - if true the dynamic libraries inside the jar will
be also loaded, otherwise they are not loaded
java.lang.Exception| Method Detail |
|---|
public static java.lang.String duplicateString(java.lang.String str)
str -
public void setEnv(java.lang.String name,
java.lang.String value)
throws java.lang.Exception
name - the environment variable namevalue - The new value
java.lang.Exception
public java.lang.String getEnv(java.lang.String name)
throws java.lang.Exception
name - The environment variable name.
java.lang.Exception
public int XipGrmFile(java.lang.String grmFileName,
int enableXml,
boolean loadFst)
throws java.lang.Exception
grmFileName - the grm file nameenableXml - when set to one, this parameter tells XIP that the input
complies with the XIP XML DTDloadFst - if true loads the FST otherwise parse only the grammar
file without loading FST
java.lang.Exception
public int XipLoadGrammar(java.lang.String grammarFileName,
java.lang.String ntmFileName,
java.lang.String hmmFileName,
int enableXml)
throws java.lang.Exception
grammarFileName - the grammar file name (.../english.xip)ntmFileName - the NTM script file name(.../ntmscript)hmmFileName - the HMM file nameenableXml - When set to one , this parameter tells XIP that the
input complies with the XIP XML DTD
java.lang.Exception
public int XipGrammarLoading(java.lang.String grammarFileName,
java.lang.String ntmFileName,
java.lang.String hmmFileName,
int enableXml)
throws java.lang.Exception
grammarFileName - the grammar file name (.../english.xip)ntmFileName - the NTM script file name(.../ntmscript)hmmFileName - the HMM file nameenableXml - When set to one , this parameter tells XIP that the
input complies with the XIP XML DTD
java.lang.Exception
public int XipReloadGrammar(int gHandler,
boolean reloadParameter,
java.lang.String grmFileName)
throws java.lang.Exception
gHandler - the handler to the grammar to reloadreloadParameter - if true then the paramter files will be reloaded
otherwise they will be not reloadedgrmFileName - the grm file of the grammar to reload
java.lang.Exception
public int XipCleanXMLAlias(int gHandler,
java.lang.String alias)
throws java.lang.Exception
gHandler - the handler to the grammar to reloadalias - the alias
java.lang.Exception
public int XipSetIntVariable(int gHandler,
java.lang.String variableName,
int value)
throws java.lang.Exception
gHandler - a handler to the grammar.variableName - the variable namevalue -
java.lang.Exception
public int XipSetStringVariable(int gHandler,
java.lang.String variableName,
java.lang.String variableValue)
throws java.lang.Exception
gHandler - a handler to the grammar.variableName - the variable namevariableValue - the variable value
java.lang.Exception
public java.lang.String XipGetStringVariable(int gHandler,
java.lang.String variableName)
throws java.lang.Exception
gHandler - a handler to the grammar.variableName - the variable name
java.lang.Exception
public int XipLoadXMLDataBase(int gHandler,
java.lang.String fileName,
java.lang.String alias)
throws java.lang.Exception
gHandler - a handler to the grammar.fileName - the XML database filealias - the alias name to associate with the database file
java.lang.Exception
public java.util.Vector<java.lang.String> XipAliasList(int gHandler)
throws java.lang.Exception
gHandler - a handler to the grammar.
java.lang.Exception
public int XipParameterFile(int gHandler,
java.lang.String fileName)
throws java.lang.Exception
gHandler - a handler to a grammarfileName - a parameter file name
java.lang.Exception
public void XipSetDisplayMode(int gHandler,
long displayMode,
int col)
throws java.lang.Exception
gHandler - a handler to a grammardisplayMode - the display mode valuecol - number of char by line
java.lang.Exception
public void XipAddFlagDisplay(int gHandler,
long displayFlag,
int col)
throws java.lang.Exception
gHandler - a handler to a grammardisplayFlag - the display flagcol - number of char by line
java.lang.Exception
public void XipRemoveFlagDisplay(int gHandler,
long displayFlag)
throws java.lang.Exception
gHandler - a handler to a grammardisplayFlag - the display flag
java.lang.Exception
public boolean XipTestFlagDisplay(int gHandler,
long displayFlag)
throws java.lang.Exception
gHandler - a handler to a grammardisplayFlag - the display flag
java.lang.Exception
public java.lang.String GetVersion()
throws java.lang.Exception
java.lang.Exception
public int XipLicense(int gHandler)
throws java.lang.Exception
gHandler - a handler to a grammar
java.lang.Exception
public java.lang.String parseString(int gHandler,
java.lang.String textInput,
char xml,
char apply_grammar)
throws java.lang.Exception
gHandler - a handler to a grammartextInput - string to parsexml - XML_NONE=0, XML_OUTPUT=1,XML_INSERT=2apply_grammar -
java.lang.Exception
public java.lang.String parseStringStructure(int gHandler,
java.lang.String textInput,
char xml,
char apply_grammar)
throws java.lang.Exception
gHandler - a handler to a grammartextInput - structure string to parsexml - XML_NONE=0, XML_OUTPUT=1,XML_INSERT=2apply_grammar -
java.lang.Exception
public java.lang.String parseStringXml(int gHandler,
java.lang.String textInput)
throws java.lang.Exception
gHandler - a handler to a grammartextInput - String to parse.
java.lang.Exception
public java.lang.String parseStringCharSet(int gHandler,
java.lang.String textInput,
java.lang.String charSet,
char xml,
char apply_grammar)
throws java.lang.Exception
gHandler - a handler to a grammartextInput - string to parsexml - XML_NONE=0, XML_OUTPUT=1,XML_INSERT=2apply_grammar - charSet - iso-8859-1, utf-8, ...
java.lang.Exception
public java.lang.String XipParseFileXmlOS(int gHandler,
java.lang.String inputFile,
int depth,
char xml,
char apply)
throws java.lang.Exception
gHandler - a handler to a grammarinputFile - depth - xml - apply -
java.lang.Exception
public java.lang.String parseStringXmlOS(int gHandler,
java.lang.String input,
int depth,
char xml,
char apply)
throws java.lang.Exception
gHandler - a handler to a grammar a handler to a grammarinput - text to parsedepth - xml - XML_NONE=0, XML_OUTPUT=1,XML_INSERT=2apply -
java.lang.Exception
public java.lang.String parseStringXmlOS(int gHandler,
java.lang.String input)
throws java.lang.Exception
gHandler - a handler to a grammarinput - text to parse
java.lang.Exception
public void XipSetDependencyExtraction(int gHandler,
boolean extraction)
throws java.lang.Exception
gHandler - a handler to a grammarextraction -
java.lang.Exception
public void XipFreeGrammar(int gHandler)
throws java.lang.Exception
gHandler - a handler to a grammar
java.lang.Exception
public int XipParseFileToFile(int gHandler,
java.lang.String input,
java.lang.String output,
char xml,
char apply)
throws java.lang.Exception
gHandler - a handler to a grammaroutput - xml - apply - input -
java.lang.Exception
public int XipParseFileXMLToFile(int gHandler,
java.lang.String input,
java.lang.String output,
int depth,
char xml,
char apply)
throws java.lang.Exception
gHandler - a handler to a grammaroutput - depth - xml - apply - input -
java.lang.Exception
public java.util.Vector<java.lang.String> XipGetListCategories(int gHandler)
throws java.lang.Exception
java.lang.Exception
public java.util.Vector<java.lang.String> XipGetListDependencies(int gHandler)
throws java.lang.Exception
java.lang.Exceptionpublic void InitErrorMsg()
public java.lang.String XipGetSourceCharset(int gHandler)
throws java.lang.Exception
gHandler - Grammar handler
java.lang.Exception
public java.lang.String XipGetGrammarCharset(int gHandler)
throws java.lang.Exception
gHandler - Grammar handler
java.lang.Exceptionpublic java.lang.String getErrorMsg()
public boolean xipSetIndentFilePathname(int gHandler,
java.lang.String path)
throws java.lang.Exception
gHandler - a handler to a grammarpath - Indent File Pathname
java.lang.Exception
public boolean xipSetWorkingFilesPath(int gHandler,
java.lang.String path)
throws java.lang.Exception
gHandler - a handler to a grammarpath - the Path for any output file
java.lang.Exceptionpublic void printSysInfo()
public static void main(java.lang.String[] args)
args -
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||