|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.di.fc.Function
com.ibm.di.fc.ParserFC
public class ParserFC
This is a function component that wraps parser operations. The configured parser is used in read/write mode depending on the type of object passed to this FC. If the passed type is an com.ibm.di.entry.Entry object, the write operation is used, otherwise the function will try to coerce the input param to an input stream in order to use the parser read operation. system.getFC("ibmdi.ParserFC").perform (new Entry()); // Returns the encoded string/byte array system.getFC("ibmdi.ParserFC").perform (file|string|inputstream|reader); // Returns the parsed entry
Field Summary |
---|
Fields inherited from class com.ibm.di.fc.Function |
---|
logger |
Constructor Summary | |
---|---|
ParserFC()
|
Method Summary | |
---|---|
ParserInterface |
getParser()
This method provides access to the ParserInterface implementation
used internally. |
java.lang.String |
getVersion()
Version information. |
java.lang.Object |
perform(java.lang.Object obj)
If this method is called with an object of type java.lang.String, java.io.File, java.io.InputStream or java.io.Reader the configured parser is provided that object as input and the returned value is an Entry object resulting from the parsing. |
java.lang.Object |
querySchema(java.lang.Object o)
This method queries the schema for this ParserFC. |
Entry |
readEntry(java.lang.Object param)
Returns the entry from the parser read operation |
void |
setDebug(boolean debug)
Modify the debug mode setting of this component. |
void |
terminate()
Closes the parser |
boolean |
updateSchema(FunctionConfig config)
This method modifies the schema in the provided configuration. |
java.lang.Object |
writeEntry(java.lang.Object obj)
Returns the string or byte array from the parser write operation |
Methods inherited from class com.ibm.di.fc.Function |
---|
debug, getConfiguration, getContext, getDebug, getLog, getParam, getRSInterface, getUI, initialize, initialize, logmsg, setConfiguration, setContext, setLog, setParam, setRSInterface, verifyInitialized |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ParserFC()
Method Detail |
---|
public java.lang.Object perform(java.lang.Object obj) throws java.lang.Exception
obj
- the input object for the function
java.lang.Exception
- An exception is thrown if this method fails.public java.lang.Object writeEntry(java.lang.Object obj) throws java.lang.Exception
obj
- The entry object to encode
java.lang.Exception
- Any exception thrown by the parserpublic Entry readEntry(java.lang.Object param) throws java.lang.Exception
param
- The parser input object
java.lang.Exception
- Any exception thrown by the parserpublic boolean updateSchema(FunctionConfig config) throws java.lang.Exception
updateSchema
in interface FunctionInterface
updateSchema
in class Function
config
- FunctionConfig
java.lang.Exception
- : neverpublic java.lang.Object querySchema(java.lang.Object o) throws java.lang.Exception
querySchema
in interface FunctionInterface
querySchema
in class Function
o
- Boolean.TRUE for inputschema, Boolean.FALSE for outputschema
java.lang.Exception
- : if the parser fails to loadEntry
,
Vector
public ParserInterface getParser()
ParserInterface
implementation
used internally.
null
if the parser have not been loaded yet.public java.lang.String getVersion()
public void terminate() throws java.lang.Exception
terminate
in interface FunctionInterface
terminate
in class Function
java.lang.Exception
- An exception is thrown if this method fails.public void setDebug(boolean debug)
Modify the debug mode setting of this component. May be called by different threads.
This method is for internal use only. Do not call it from user code.
setDebug
in class Function
debug
- the debug mode setting
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |