Package com.opengamma.integration.copier.sheet.reader

Examples of com.opengamma.integration.copier.sheet.reader.SheetReader


        String secType = fullPath[fullPath.length - 1].substring(0, fullPath[fullPath.length - 1].lastIndexOf('.'));

        _currentPath = (String[]) ArrayUtils.subarray(fullPath, 0, fullPath.length - 1);
       
        // Set up a sheet reader and a row parser for the current CSV file in the ZIP archive
        SheetReader sheet = new CsvSheetReader(_zipFile.getInputStream(entry));
       
        RowParser parser = JodaBeanRowParser.newJodaBeanRowParser(secType);
        if (parser == null) {
          s_logger.error("Could not build a row parser for security type '" + secType + "'");
          return null;
View Full Code Here


   
    // Build a mock sheet reader with some rows
    LocalDate[] dates = {LocalDate.of(2010,1,1), LocalDate.of(2011,1,1)};
    double[] times = {1.0, 2.0};
    LocalDateDoubleTimeSeries lddts = ImmutableLocalDateDoubleTimeSeries.of(dates, times);
    SheetReader mockSheetReader = buildMockSheetReader(lddts);
    TimeSeriesReader reader = new SingleSheetMultiTimeSeriesReader(
            mockSheetReader, DATA_SOURCE, DATA_PROVIDER, DATA_FIELD, OBSERVATION_TIME, ID_SCHEME, DATE_FORMAT);
   
    // Write
    TimeSeriesWriter mockTimeSeriesWriter = mock(TimeSeriesWriter.class);
View Full Code Here

   
    DateTimeFormatterBuilder builder = new DateTimeFormatterBuilder();
    builder.appendPattern(DATE_FORMAT);
    DateTimeFormatter dateFormat = builder.toFormatter();

    SheetReader mock = mock(SheetReader.class);
    OngoingStubbing<Map<String, String>> stub = when(mock.loadNextRow());
    for (Map.Entry<LocalDate, Double> entry : lddts) {
      Map<String, String> row = new HashMap<String, String>();
      row.put("id", EXISTING_HTSINFO_EXTERNALID.getValue());
      row.put("date", entry.getKey().toString(dateFormat));
      row.put("value", entry.getValue().toString());
View Full Code Here

TOP

Related Classes of com.opengamma.integration.copier.sheet.reader.SheetReader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.