|
||||||||||
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 | |
---|---|
String |
getVersion()
Return version information |
Object |
perform(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. |
Entry |
readEntry(Object param)
Returns the entry from the parser read operation |
boolean |
updateSchema(FunctionConfig config)
This method modifies the schema in the provided configuration. |
Object |
writeEntry(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, getLog, getParam, getUI, initialize, initialize, logmsg, setConfiguration, setContext, setLog, setParam, terminate, 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 Object perform(Object obj) throws Exception
obj
- the input object for the function
Exception
- An exception is thrown if this method fails.public Object writeEntry(Object obj) throws Exception
obj
- The entry object to encode
Exception
- Any exception thrown by the parserpublic Entry readEntry(Object param) throws Exception
param
- The parser input object
Exception
- Any exception thrown by the parserpublic boolean updateSchema(FunctionConfig config) throws Exception
updateSchema
in interface FunctionInterface
updateSchema
in class Function
Exception
public String getVersion()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |