Package com.opengamma.integration.copier.sheet

Examples of com.opengamma.integration.copier.sheet.SheetFormat


      throw new OpenGammaRuntimeException("HistoricalTimeSeriesSource from conrtext is not a RedisSimulationSeriesSource, got " + getToolContext().getHistoricalTimeSeriesSource() + ": note this tool must be run with a toolcontext config file not via -c http://localhost");
    }
    final RedisSimulationSeriesSource source = (RedisSimulationSeriesSource) getToolContext().getHistoricalTimeSeriesSource();

    String fileName = getCommandLine().getOptionValue(FILE_NAME_OPT);
    SheetFormat sheetFormat = SheetFormat.of(fileName);

    // most of these fields are dropped in redis - used here to allow us to use existing machinery
    String dataSource = getCommandLine().getOptionValue(TIME_SERIES_DATASOURCE_OPT);
    String dataProvider = getCommandLine().getOptionValue(TIME_SERIES_DATAPROVIDER_OPT);
    String dataField = getCommandLine().getOptionValue(TIME_SERIES_DATAFIELD_OPT);
View Full Code Here


      stream = new BufferedInputStream(new FileInputStream(filename));
    } catch (FileNotFoundException e) {
      throw new OpenGammaRuntimeException("Could not open file " + filename + " for reading: " + e);
    }
   
    SheetFormat sheetFormat = SheetFormat.of(filename);
    switch (sheetFormat) {
      case XLS:
      case CSV:
        // Check that the asset class was specified on the command line
        return new SingleSheetSimplePortfolioReader(sheetFormat, stream, new ExchangeTradedRowParser(securityProvider));
View Full Code Here

                                                                           _referenceDataProvider,
                                                                           dataProvider,
                                                                           dataFields);
      final PortfolioWriter portfolioWriter =
          new MasterPortfolioWriter(portfolioName, _portfolioMaster, _positionMaster, _securityMaster, false, false, true);
      SheetFormat format = getFormatForFileName(fileName);
      RowParser rowParser = new ExchangeTradedRowParser(_securityProvider);
      final PortfolioReader portfolioReader = new SingleSheetSimplePortfolioReader(format, fileStream, rowParser);
      StreamingOutput streamingOutput = new StreamingOutput() {
        @Override
        public void write(OutputStream output) throws IOException, WebApplicationException {
View Full Code Here

   * Loads the test portfolio into the position master.
   */
  @Override
  protected void doRun() {
    String fileName = getCommandLine().getOptionValue(FILE_NAME_OPT);
    SheetFormat sheetFormat = SheetFormat.of(fileName);
    try {
      new TimeSeriesLoader(getToolContext().getHistoricalTimeSeriesMaster()).run(
          sheetFormat,
          new BufferedInputStream(new FileInputStream(fileName)),
          getCommandLine().getOptionValue(TIME_SERIES_DATASOURCE_OPT),
View Full Code Here

TOP

Related Classes of com.opengamma.integration.copier.sheet.SheetFormat

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.