Package com.opengamma.integration.copier.portfolio.writer

Examples of com.opengamma.integration.copier.portfolio.writer.SingleSheetSimplePortfolioWriter


//          return new SingleSheetSimplePortfolioWriter(filename, new ExchangeTradedRowParser(s_context.getBloombergSecuritySource()));
//        } else {
       
        RowParser rowParser = JodaBeanRowParser.newJodaBeanRowParser(securityType);
        if (rowParser != null) {
          return new SingleSheetSimplePortfolioWriter(filename, rowParser, includeTrades);
        } else {
          throw new OpenGammaRuntimeException("Could not create a row parser for security type " + securityType);
        }
//        }
      } else if (SheetFormat.of(filename) == SheetFormat.ZIP) {
View Full Code Here


        ? s_securityTypes
        : getCommandLine().getOptionValues(SECURITY_TYPE_OPT);

    // Create portfolio writers to write header rows
    for (String securityType : securityTypes) {
      PortfolioWriter portfolioWriter = new SingleSheetSimplePortfolioWriter(securityType + ".csv",
          JodaBeanRowParser.newJodaBeanRowParser(securityType));
      portfolioWriter.close();
    }
  }
View Full Code Here

    portSearchResult.setDocuments(Collections.singletonList(portfolioDocument));
   
    // Masters to file
    portfolioReader = new MasterPortfolioReader(PORTFOLIO_NAME, portfolioMaster, positionMaster, securitySource);
    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
    portfolioWriter = new SingleSheetSimplePortfolioWriter(SheetFormat.CSV, outputStream, SECURITY_TYPE);
    portfolioCopier.copy(portfolioReader, portfolioWriter);
    portfolioReader.close();
    portfolioWriter.close();

    // Compare source and destination
View Full Code Here

TOP

Related Classes of com.opengamma.integration.copier.portfolio.writer.SingleSheetSimplePortfolioWriter

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.