Class CSVLineBasedAdapter

  • All Implemented Interfaces:
    AdapterInterface, java.io.Serializable

    public abstract class CSVLineBasedAdapter
    extends LineBasedAdapter
    Abstract adapter dedicated to CSV line based input streams.
    This class (and its child classes) cannot be instanciated.
    They correspond to an Adapter configuration item.
    The only method to implement is the single line level processValues() method.
    See Also:
    Serialized Form
    • Constructor Detail

      • CSVLineBasedAdapter

        public CSVLineBasedAdapter()
    • 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 implement.
        Specified by:
        processLine in class LineBasedAdapter
        Parameters:
        lineNumber - Input line number (1 is the first line)
        line - Input line
        Returns:
        Processed line as XML statements or null
        Throws:
        PlatformException - in case of processing error
        java.lang.InterruptedException - if interrupted
      • 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