com.silverpeas.util.csv
Class CSVReader

java.lang.Object
  extended by com.silverpeas.util.csv.CSVReader

public class CSVReader
extends Object


Field Summary
protected  String[] m_colDefaultValues
           
protected  String[] m_colMandatory
           
protected  String[] m_colNames
           
protected  String[] m_colTypes
           
protected  int m_nbCols
           
protected  String m_separator
           
protected  String[] m_specificColMandatory
           
protected  int[] m_specificColMaxLengthes
           
protected  String[] m_specificColNames
           
protected  String[] m_specificColTypes
           
protected  int m_specificNbCols
           
protected  String[] m_specificParameterNames
           
protected  ResourceLocator m_utilMessages
           
 
Constructor Summary
CSVReader(String language)
          Constructeur
 
Method Summary
 String[] getM_colDefaultValues()
           
 String getM_colDefaultValues(int i)
           
 String[] getM_colMandatory()
           
 String[] getM_colTypes()
           
 String getM_colTypes(int i)
           
 int getM_nbCols()
           
 String getM_separator()
           
 int getM_specificColMaxLength(int i)
           
 int[] getM_specificColMaxLengthes()
           
 String getM_specificColName(int i)
           
 String[] getM_specificColNames()
           
 String getM_specificColType(int i)
           
 String[] getM_specificColTypes()
           
 int getM_specificNbCols()
           
 String getM_specificParameterName(int i)
           
 String[] getM_specificParameterNames()
           
 void initCSVFormat(String propertiesFile, String rootPropertyName, String separator)
           
 void initCSVFormat(String propertiesFile, String rootPropertyName, String separator, String specificPropertiesFile, String specificRootPropertyName)
           
 boolean isColumnNumberControlEnabled()
           
 boolean isExtraColumnsControlEnabled()
           
protected  String[] parseArrayValue(String arrayValue)
           
 Variant[] parseLine(String theLine, int lineNumber)
           
 Variant[][] parseStream(InputStream is)
           
 void setColumnNumberControlEnabled(boolean columnNumberControlEnabled)
           
 void setExtraColumnsControlEnabled(boolean extraColumnsControlEnabled)
           
 void setM_specificNbCols(int cols)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_nbCols

protected int m_nbCols

m_colNames

protected String[] m_colNames

m_colTypes

protected String[] m_colTypes

m_colDefaultValues

protected String[] m_colDefaultValues

m_colMandatory

protected String[] m_colMandatory

m_separator

protected String m_separator

m_utilMessages

protected ResourceLocator m_utilMessages

m_specificNbCols

protected int m_specificNbCols

m_specificColNames

protected String[] m_specificColNames

m_specificColMaxLengthes

protected int[] m_specificColMaxLengthes

m_specificColTypes

protected String[] m_specificColTypes

m_specificColMandatory

protected String[] m_specificColMandatory

m_specificParameterNames

protected String[] m_specificParameterNames
Constructor Detail

CSVReader

public CSVReader(String language)
Constructeur

Parameters:
language -
Method Detail

isExtraColumnsControlEnabled

public boolean isExtraColumnsControlEnabled()

setExtraColumnsControlEnabled

public void setExtraColumnsControlEnabled(boolean extraColumnsControlEnabled)

isColumnNumberControlEnabled

public boolean isColumnNumberControlEnabled()

setColumnNumberControlEnabled

public void setColumnNumberControlEnabled(boolean columnNumberControlEnabled)

initCSVFormat

public void initCSVFormat(String propertiesFile,
                          String rootPropertyName,
                          String separator)

initCSVFormat

public void initCSVFormat(String propertiesFile,
                          String rootPropertyName,
                          String separator,
                          String specificPropertiesFile,
                          String specificRootPropertyName)

parseStream

public Variant[][] parseStream(InputStream is)
                        throws UtilTrappedException
Throws:
UtilTrappedException

parseLine

public Variant[] parseLine(String theLine,
                           int lineNumber)
                    throws UtilTrappedException
Throws:
UtilTrappedException

parseArrayValue

protected String[] parseArrayValue(String arrayValue)

getM_nbCols

public int getM_nbCols()
Returns:
Returns the m_nbCols.

getM_separator

public String getM_separator()
Returns:
Returns the m_separator.

getM_colDefaultValues

public String[] getM_colDefaultValues()
Returns:
Returns the m_colDefaultValues.

getM_colMandatory

public String[] getM_colMandatory()

getM_colDefaultValues

public String getM_colDefaultValues(int i)
Returns:
Returns the m_colDefaultValues[i]

getM_colTypes

public String[] getM_colTypes()
Returns:
Returns the m_colTypes.

getM_colTypes

public String getM_colTypes(int i)
Returns:
Returns the m_colTypes[i]

getM_specificNbCols

public int getM_specificNbCols()
Returns:
Returns the m_specificNbCols.

setM_specificNbCols

public void setM_specificNbCols(int cols)
Parameters:
cols - The m_specificNbCols to set.

getM_specificColNames

public String[] getM_specificColNames()
Returns:
Returns the m_specificColNames.

getM_specificColName

public String getM_specificColName(int i)
Returns:
Returns the m_specificColName index i.

getM_specificColTypes

public String[] getM_specificColTypes()
Returns:
Returns the m_specificColTypes.

getM_specificColType

public String getM_specificColType(int i)
Returns:
Returns the m_specificColName index i.

getM_specificParameterNames

public String[] getM_specificParameterNames()
Returns:
Returns the m_specificParameterNames.

getM_specificParameterName

public String getM_specificParameterName(int i)
Returns:
Returns the m_specificParameterNames.

getM_specificColMaxLengthes

public int[] getM_specificColMaxLengthes()
Returns:
Returns the m_specificColMaxLengthes.

getM_specificColMaxLength

public int getM_specificColMaxLength(int i)
Returns:
Returns the m_specificColMaxLengthes[i].


Copyright © 2016 Silverpeas. All Rights Reserved.