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 Details

    • 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 Details

    • 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 interface DataSourceIF
    • getReader

      public TupleReaderIF getReader(String relation)
      Description copied from interface: DataSourceIF
      INTERNAL: Returns a tuple reader for the given relation.
      Specified by:
      getReader in interface DataSourceIF
    • getChangelogReader

      public ChangelogReaderIF getChangelogReader(Changelog changelog, String startOrder)
      Description copied from interface: DataSourceIF
      INTERNAL: Returns a changelog reader.
      Specified by:
      getChangelogReader in interface DataSourceIF
    • 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 interface DataSourceIF
    • 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 interface DataSourceIF
    • toString

      public String toString()
      Overrides:
      toString in class Object