Class FileTable<T extends org.gorpipe.gor.model.Row>

java.lang.Object
org.gorpipe.gor.table.BaseTable<T>
org.gorpipe.gor.table.files.FileTable<T>
All Implemented Interfaces:
org.gorpipe.gor.table.Table<T>
Direct Known Subclasses:
GorTable, NorTable

public abstract class FileTable<T extends org.gorpipe.gor.model.Row> extends org.gorpipe.gor.table.BaseTable<T>
Table class representing file (gor/gorz/nor/tsv etc) The internal data is stored in temp files.
  • Field Details

    • tempOutFilePath

      protected String tempOutFilePath
  • Constructor Details

    • FileTable

      public FileTable(org.gorpipe.gor.table.BaseTable.Builder builder)
    • FileTable

      public FileTable(URI uri, org.gorpipe.gor.model.FileReader inputFileReader)
  • Method Details

    • getLines

      public Stream<String> getLines()
    • insert

      public void insert(Collection<T> lines)
    • insert

      public void insert(String... lines)
    • insertEntries

      public void insertEntries(Collection<org.gorpipe.gor.table.dictionary.DictionaryEntry> entries)
    • insertFiles

      protected void insertFiles(String... gorFiles)
    • delete

      public void delete(Collection<T> lines)
    • delete

      public void delete(String... lines)
    • deleteEntries

      public void deleteEntries(Collection<org.gorpipe.gor.table.dictionary.DictionaryEntry> entries)
    • createDeleteTempFile

      protected void createDeleteTempFile(String... lines)
    • lineStringsToEntries

      protected List<T> lineStringsToEntries(String[] lines)
    • createRow

      protected T createRow(String line)
    • getInputTempFileEnding

      protected abstract String getInputTempFileEnding()
    • getGorCommand

      protected abstract String getGorCommand()
    • saveTempMainFile

      public void saveTempMainFile()
      Specified by:
      saveTempMainFile in class org.gorpipe.gor.table.BaseTable<T extends org.gorpipe.gor.model.Row>
    • initialize

      public void initialize()
      Specified by:
      initialize in interface org.gorpipe.gor.table.Table<T extends org.gorpipe.gor.model.Row>
      Overrides:
      initialize in class org.gorpipe.gor.table.BaseTable<T extends org.gorpipe.gor.model.Row>
    • getTransactionFolderPath

      protected Path getTransactionFolderPath()
    • writeToFile

      protected void writeToFile(Path filePath, Collection<T> lines) throws IOException
      Throws:
      IOException
    • writeRowToStream

      protected void writeRowToStream(org.gorpipe.gor.model.Row r, OutputStream os) throws IOException
      Throws:
      IOException
    • createInsertTempFileCommand

      protected abstract String createInsertTempFileCommand(String mainFile, String outFile, String... insertFiles)
    • getPostProcessing

      protected String getPostProcessing()
    • getMainFile

      protected String getMainFile()