|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.di.parser.ParserImpl
com.ibm.di.parser.ScriptParser
public class ScriptParser
To operate, a Script Parser must implement a few functions. The functions do not use parameters. Passing data between the hosting Connector and the script is done by using predefined objects. One of these predefined objects is the result object which is used to communicate status information. Upon entry into either function, the status field is set to normal which causes the hosting Parser to continue calls. Signaling end-of-input or errors is done by setting the status and message fields in this object. The entry object is populated on calls to writeEntry and is expected to be populated in the readEntry function. When reading entries you have the inp BufferedReader object available for reading character data from a stream. When writing entries you have the out BufferedWriter object available for writing character data to a stream.
Field Summary |
---|
Fields inherited from class com.ibm.di.parser.ParserImpl |
---|
_debug, myConfiguration |
Constructor Summary | |
---|---|
ScriptParser()
|
Method Summary | |
---|---|
void |
closeParser()
This method is called by the hosting component (e.g. |
void |
flush()
This method is called by the hosting component (e.g. |
java.lang.String |
getName()
Retrieves name of the FC. |
java.lang.String |
getVersion()
Version information. |
void |
initParser()
Initializes parser's components. |
java.lang.Object |
querySchema(java.lang.Object source)
Discover the schema for the Parser. For example, a XML Parser could return a representation of the XML Schema or the DTD referenced in a XML file. |
Entry |
readEntry()
Return the next entry from the current input stream. |
void |
writeEntry(Entry entry)
Write an entry to the current output stream. |
Methods inherited from class com.ibm.di.parser.ParserImpl |
---|
debug, debugMode, getClassInstance, getContext, getDebug, getInputStream, getOutputStream, getParam, getParser, getReader, getWriter, isDeltaSupported, logmsg, registerScriptBeans, setConfiguration, setContext, setDebug, setInputStream, setInputStream, setInputStream, setOutputStream, setOutputStream, setParam, setParser |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ScriptParser()
Method Detail |
---|
public void initParser() throws java.lang.Exception
initParser
in interface ParserInterface
initParser
in class ParserImpl
java.lang.Exception
- if an error occurs.public java.lang.String getName()
public void writeEntry(Entry entry) throws java.lang.Exception
entry
- The entry to write
java.lang.Exception
- if an error occurs.public Entry readEntry() throws java.lang.Exception
java.lang.Exception
public java.lang.Object querySchema(java.lang.Object source) throws java.lang.Exception
querySchema
in interface ParserInterface
querySchema
in class ParserImpl
source
- The object on which to discover schema
java.lang.Exception
- If an I/O error occurspublic java.lang.String getVersion()
public void closeParser() throws java.lang.Exception
closeParser
in interface ParserInterface
closeParser
in class ParserImpl
java.lang.Exception
- If an I/O error occurspublic void flush() throws java.lang.Exception
flush
in interface ParserInterface
flush
in class ParserImpl
java.lang.Exception
- If an I/O error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |