Tabnine Logo
CsvMapReader.getHeader
Code IndexAdd Tabnine to your IDE (free)

How to use
getHeader
method
in
org.supercsv.io.CsvMapReader

Best Java code snippets using org.supercsv.io.CsvMapReader.getHeader (Showing top 6 results out of 315)

origin: org.wikibrainapi/wikibrain-spatial

String [] header = reader.getHeader(true);
while (true) {
  Map<String, String> row = reader.read(header);
origin: shilad/wikibrain

String [] header = reader.getHeader(true);
while (true) {
  Map<String, String> row = reader.read(header);
origin: openscoring/openscoring

static
public TableEvaluationRequest readTable(BufferedReader reader, CsvPreference format) throws IOException {
  CsvMapReader parser = new CsvMapReader(reader, format);
  String[] header = parser.getHeader(true);
  List<String> columns = Arrays.asList(header);
  TableEvaluationRequest tableRequest = new TableEvaluationRequest()
    .setColumns(columns);
  String idColumn = tableRequest.getIdColumn();
  List<EvaluationRequest> requests = new ArrayList<>();
  while(true){
    Map<String, String> row = parser.read(header);
    if(row == null){
      break;
    }
    String id = null;
    if(idColumn != null){
      id = row.remove(idColumn);
    }
    EvaluationRequest request = new EvaluationRequest(id)
      .setArguments(row);
    requests.add(request);
  }
  tableRequest.setRequests(requests);
  parser.close();
  return tableRequest;
}
origin: shilad/wikibrain

/**
 * TODO: keep track of duplicate or missing keys with special status codes
 * @param shapeFile
 * @return
 * @throws IOException
 */
private Map<String, MappingInfo> readExisting(WikiBrainShapeFile shapeFile) throws IOException {
  HashMap<String, MappingInfo> mapping = new HashMap<String, MappingInfo>();
  if (!shapeFile.hasMappingFile()) {
    return mapping;
  }
  CsvMapReader reader = new CsvMapReader(
      WpIOUtils.openBufferedReader(shapeFile.getMappingFile()),
      CsvPreference.STANDARD_PREFERENCE
  );
  String [] header = reader.getHeader(true);
  while (true) {
    Map<String, String> row = reader.read(header);
    if (row == null) {
      break;
    }
    MappingInfo info = new MappingInfo(row);
    if (!info.isUnknown()) {
      mapping.put(info.key, info);
    }
  }
  return mapping;
}
origin: org.wikibrainapi/wikibrain-spatial

/**
 * TODO: keep track of duplicate or missing keys with special status codes
 * @param shapeFile
 * @return
 * @throws IOException
 */
private Map<String, MappingInfo> readExisting(WikiBrainShapeFile shapeFile) throws IOException {
  HashMap<String, MappingInfo> mapping = new HashMap<String, MappingInfo>();
  if (!shapeFile.hasMappingFile()) {
    return mapping;
  }
  CsvMapReader reader = new CsvMapReader(
      WpIOUtils.openBufferedReader(shapeFile.getMappingFile()),
      CsvPreference.STANDARD_PREFERENCE
  );
  String [] header = reader.getHeader(true);
  while (true) {
    Map<String, String> row = reader.read(header);
    if (row == null) {
      break;
    }
    MappingInfo info = new MappingInfo(row);
    if (!info.isUnknown()) {
      mapping.put(info.key, info);
    }
  }
  return mapping;
}
origin: OpenSextant/opensextant

int linenum = 0;
String[] columns = in.getHeader(true);
Map<String, String> testRow = null;
org.supercsv.ioCsvMapReadergetHeader

Popular methods of CsvMapReader

  • <init>
    Constructs a new CsvMapReader with the supplied (custom) Tokenizer and CSV preferences. The tokenize
  • read
  • close
  • executeProcessors
  • getColumns
  • readRow

Popular in Java

  • Making http post requests using okhttp
  • scheduleAtFixedRate (ScheduledExecutorService)
  • addToBackStack (FragmentTransaction)
  • requestLocationUpdates (LocationManager)
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • JFrame (javax.swing)
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now