org.decisiondeck.jmcda.persist.text
Class CsvImporter

java.lang.Object
  extended by org.decisiondeck.jmcda.persist.text.CsvImporter

public class CsvImporter
extends Object

Imports evaluations written in a CSV format. One way to create a correct CSV file is to use OpenOffice calc, save as CSV, decimal separator must be dot (use e.g. english linguistics), export parameters for the CSV filter: UTF-8, field-sep comma, text-sep double quote, raw cell data (do not record cell 'as is').

Accepts missing values, and even empty evaluations, in which case only the criteria and alternatives are set. Accepts a completely empty row or column, as long as all headers (rows and columns) are set.


Constructor Summary
CsvImporter()
           
CsvImporter(InputSupplier<? extends Reader> source)
           
 
Method Summary
 InputSupplier<? extends Reader> getSource()
           
 IProblemData read()
           
 void setSource(InputSupplier<? extends Reader> source)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CsvImporter

public CsvImporter(InputSupplier<? extends Reader> source)

CsvImporter

public CsvImporter()
Method Detail

getSource

public InputSupplier<? extends Reader> getSource()

setSource

public void setSource(InputSupplier<? extends Reader> source)

read

public IProblemData read()
                  throws InvalidInputException,
                         IOException
Throws:
InvalidInputException
IOException


Copyright © 2011. All Rights Reserved.