Package com.simplicite.util.integration
Class CSVLineBasedAdapter
- java.lang.Object
-
- com.simplicite.util.integration.SimpleAdapter
-
- com.simplicite.util.integration.LineBasedAdapter
-
- com.simplicite.util.integration.CSVLineBasedAdapter
-
- All Implemented Interfaces:
AdapterInterface
,java.io.Serializable
public abstract class CSVLineBasedAdapter extends LineBasedAdapter
Abstract adapter dedicated to CSV line based input streams
The only method to implement is the single line level processValues() method- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CSVLineBasedAdapter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
appendError(java.lang.String[] values)
Append one error record in a new line (if the Error writer exists)char
getQuote()
Get quote charchar
getSeparator()
Get separator charjava.lang.String
processLine(long lineNumber, java.lang.String line)
Line processing to overrideabstract java.lang.String
processValues(long lineNumber, java.lang.String[] values)
Line values processing to overridevoid
setQuote(char q)
Set quote charvoid
setSeparator(char s)
Set separator char-
Methods inherited from class com.simplicite.util.integration.LineBasedAdapter
postProcess, process
-
Methods inherited from class com.simplicite.util.integration.SimpleAdapter
append, appendError, appendError, appendLog, appendLog, close, directProcess, getBooleanParameter, getBooleanParameter, getConsole, getErrorStream, getErrorWriter, getGrant, getInputReader, getInputStream, getIntParameter, getIntParameter, getLogStream, getLogWriter, getLongParameter, getLongParameter, getName, getOrigin, getOutputStream, getOutputWriter, getParameter, getParameter, getParameters, getProcessCount, getStatus, getTrackingId, init, preProcess, setConsole, setErrorStream, setInputData, setInputStream, setLogStream, setOutputStream, setParameter, setParameter, setParameter, setParameter, setProcessCount, setStatus
-
-
-
-
Method Detail
-
setSeparator
public void setSeparator(char s)
Set separator char- Parameters:
s
- Separator char (defaults is ;)
-
getSeparator
public char getSeparator()
Get separator char
-
setQuote
public void setQuote(char q)
Set quote char- Parameters:
q
- Quote char (defaults is ")
-
getQuote
public char getQuote()
Get quote char
-
processLine
public java.lang.String processLine(long lineNumber, java.lang.String line) throws PlatformException, java.lang.InterruptedException
Description copied from class:LineBasedAdapter
Line processing to override
- Specified by:
processLine
in classLineBasedAdapter
- Parameters:
lineNumber
- Input line number (1 is the first line)line
- Input line- Returns:
- Processed line as XML statements or null
- Throws:
PlatformException
java.lang.InterruptedException
-
processValues
public abstract java.lang.String processValues(long lineNumber, java.lang.String[] values) throws PlatformException, java.lang.InterruptedException
Line values processing to override- Parameters:
lineNumber
- Input line number (1 is the first line)values
- Input line values- Returns:
- Processed line as XML statements or null
- Throws:
PlatformException
java.lang.InterruptedException
-
appendError
public void appendError(java.lang.String[] values)
Append one error record in a new line (if the Error writer exists)- Parameters:
values
- Values
-
-