Package net.ontopia.topicmaps.db2tm
Class CSVDataSource
- java.lang.Object
-
- net.ontopia.topicmaps.db2tm.CSVDataSource
-
- All Implemented Interfaces:
DataSourceIF
public class CSVDataSource extends Object implements DataSourceIF
INTERNAL: Data source that reads CSV files from a directory.
-
-
Field Summary
Fields Modifier and Type Field Description protected String
encoding
protected int
ignoreFirstLines
protected RelationMapping
mapping
protected File
path
protected char
quoteCharacter
protected char
separator
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
INTERNAL: Closes the data source so that it can release any open resources.ChangelogReaderIF
getChangelogReader(Changelog changelog, String startOrder)
INTERNAL: Returns a changelog reader.String
getMaxOrderValue(Changelog changelog)
INTERNAL: Returns the maximum value of the order column for the specified changelog.TupleReaderIF
getReader(String relation)
INTERNAL: Returns a tuple reader for the given relation.Collection<Relation>
getRelations()
INTERNAL: Returns the relations that the data source knows of.protected void
setEncoding(String encoding)
protected void
setIgnoreFirstLines(int ignoreFirstLines)
protected void
setPath(String _path)
protected void
setQuoteCharacter(char quoteCharacter)
protected void
setSeparator(char separator)
String
toString()
-
-
-
Field Detail
-
mapping
protected final RelationMapping mapping
-
path
protected File path
-
encoding
protected String encoding
-
separator
protected char separator
-
quoteCharacter
protected char quoteCharacter
-
ignoreFirstLines
protected int ignoreFirstLines
-
-
Method Detail
-
setPath
protected void setPath(String _path)
-
setEncoding
protected void setEncoding(String encoding)
-
setSeparator
protected void setSeparator(char separator)
-
setQuoteCharacter
protected void setQuoteCharacter(char quoteCharacter)
-
setIgnoreFirstLines
protected void setIgnoreFirstLines(int ignoreFirstLines)
-
getRelations
public Collection<Relation> getRelations()
Description copied from interface:DataSourceIF
INTERNAL: Returns the relations that the data source knows of. The collection return contains Relation instances.- Specified by:
getRelations
in interfaceDataSourceIF
-
getReader
public TupleReaderIF getReader(String relation)
Description copied from interface:DataSourceIF
INTERNAL: Returns a tuple reader for the given relation.- Specified by:
getReader
in interfaceDataSourceIF
-
getChangelogReader
public ChangelogReaderIF getChangelogReader(Changelog changelog, String startOrder)
Description copied from interface:DataSourceIF
INTERNAL: Returns a changelog reader.- Specified by:
getChangelogReader
in interfaceDataSourceIF
-
getMaxOrderValue
public String getMaxOrderValue(Changelog changelog)
Description copied from interface:DataSourceIF
INTERNAL: Returns the maximum value of the order column for the specified changelog.- Specified by:
getMaxOrderValue
in interfaceDataSourceIF
-
close
public void close()
Description copied from interface:DataSourceIF
INTERNAL: Closes the data source so that it can release any open resources.- Specified by:
close
in interfaceDataSourceIF
-
-