|
CSVObjects Framework | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.anupam.csv.CSVParserFactory
public final class CSVParserFactory
Singleton factory for creating the CSVParser parser objects
for clients' of the framework. This factory uses the
csv-mapping.xml mapping configuration to create CSV parsers
customized for the POJO bean to parse. This is the first interface for
clients of the framework.
CSVParser| Method Summary | |
|---|---|
CSVBeanMapping |
getBeanMapping(String beanName)
Returns the requested bean mapping configuration. |
CSVParser |
getCSVParser(String mappingName,
Reader csvReader)
Returns a new CSV file parser for the specified mapping and the specified CSV reader stream. |
CSVParser |
getCSVParser(String mappingName,
String csvFileName,
boolean inClassPath)
Returns a new CSV file parser for the specified mapping, and the specified CSV file. |
static CSVParserFactory |
getSingleton()
Returns the singleton instance of this factory. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static CSVParserFactory getSingleton()
throws CSVOException
CSVOException - thrown if the singleton cannot be createdpublic CSVBeanMapping getBeanMapping(String beanName)
beanName - the POJO bean for which the mapping is to be returned
null if not found
public CSVParser getCSVParser(String mappingName,
String csvFileName,
boolean inClassPath)
throws FileNotFoundException
mappingName - the CSV mapping to for which the parser should be createdcsvFileName - the CSV file to be parsedinClassPath - indicates whether the CSV file is in the classpath
null if not found
FileNotFoundException - thrown if the specified CSV file cannot be foundgetCSVParser(String,java.io.Reader)
public CSVParser getCSVParser(String mappingName,
Reader csvReader)
mappingName - the CSV mapping for which the parser should be returnedcsvReader - the CSV stream to parse
null if not foundgetCSVParser(String,String,boolean)
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||