org.pentaho.platform.dataaccess.datasource.wizard.csv
Class CsvModelService
java.lang.Object
  
org.pentaho.platform.engine.core.system.PentahoBase
      
org.pentaho.platform.dataaccess.datasource.wizard.csv.CsvModelService
- All Implemented Interfaces: 
 - Serializable, ILogger
 
public class CsvModelService
- extends PentahoBase
 
- See Also:
 - Serialized Form
 
 
 
| Fields inherited from interface org.pentaho.platform.api.engine.ILogger | 
ACTIVITY_LOG, DEBUG, ERROR, FATAL, INFO, INSTANCE_LOG, SESSION_LOG, SOLUTION_LOG, TRACE, UNKNOWN, WARN | 
 
 
| 
Method Summary | 
 ModelInfo | 
generateFields(String project,
               String filename,
               int rowLimit,
               String delimiter,
               String enclosure,
               int headerRows,
               boolean doData,
               boolean doColumns,
               String encoding)
 
            | 
 String | 
getEncoding(String fileName)
 
            | 
 ModelInfo | 
getFileContents(String project,
                String name,
                String delimiter,
                String enclosure,
                int rows,
                boolean isFirstRowHeader,
                String encoding)
 
            | 
 org.apache.commons.logging.Log | 
getLogger()
 
            | 
 ModelInfo | 
getModelInfo(String project,
             String filename)
 
            | 
 void | 
saveModelInfo(ModelInfo modelInfo)
 
            | 
 
| Methods inherited from class org.pentaho.platform.engine.core.system.PentahoBase | 
debug, debug, error, error, fatal, fatal, genLogIdFromInfo, genLogIdFromInfo, genLogIdFromSession, getLoggingLevel, getLogId, getObjectName, info, info, setLoggingLevel, setLogId, trace, trace, warn, warn | 
 
 
NUMBER_FORMATS
public static final List<String> NUMBER_FORMATS
DEFAULT_RELATIVE_UPLOAD_FILE_PATH
public static final String DEFAULT_RELATIVE_UPLOAD_FILE_PATH
TMP_FILE_PATH
public static final String TMP_FILE_PATH
CsvModelService
public CsvModelService()
getFileContents
public ModelInfo getFileContents(String project,
                                 String name,
                                 String delimiter,
                                 String enclosure,
                                 int rows,
                                 boolean isFirstRowHeader,
                                 String encoding)
                          throws Exception
- Throws:
 Exception
 
generateFields
public ModelInfo generateFields(String project,
                                String filename,
                                int rowLimit,
                                String delimiter,
                                String enclosure,
                                int headerRows,
                                boolean doData,
                                boolean doColumns,
                                String encoding)
                         throws Exception
- Throws:
 Exception
 
getLogger
public org.apache.commons.logging.Log getLogger()
- Specified by:
 getLogger in class PentahoBase
 
 
getEncoding
public String getEncoding(String fileName)
                   throws Exception
- Throws:
 Exception
 
saveModelInfo
public void saveModelInfo(ModelInfo modelInfo)
                   throws IOException
- Throws:
 IOException
 
getModelInfo
public ModelInfo getModelInfo(String project,
                              String filename)
                       throws FileNotFoundException
- Throws:
 FileNotFoundException