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

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


      }
      // Create a portfolio writer to persist imported positions, trades and securities to the OG masters
      return new MasterPortfolioWriter(portfolioName, portfolioMaster, positionMaster, securityMaster, false, false, false);
    } else {
      // Create a dummy portfolio writer to pretty-print instead of persisting
      return new PrettyPrintingPortfolioWriter(true);        
   
  }
View Full Code Here


        throw new OpenGammaRuntimeException("Input filename should end in .ZIP");
      }

    } else {
      // Create a dummy portfolio writer to pretty-print instead of persisting
      return new PrettyPrintingPortfolioWriter(true);
    }
  }
View Full Code Here

        throw new OpenGammaRuntimeException("Input filename should end in .CSV, .XLS or .ZIP");
      }

    } else {     
      // Create a dummy portfolio writer to pretty-print instead of persisting
      return new PrettyPrintingPortfolioWriter(true);
    }
  }
View Full Code Here

                                       false);

    } else {

      // Create a dummy portfolio writer to pretty-print instead of persisting
      return new PrettyPrintingPortfolioWriter(true);
    }
  }
View Full Code Here

          new MasterPortfolioReader(
              portfolioDocument.getPortfolio().getName(),
              getToolContext().getPortfolioMaster(),
              getToolContext().getPositionMaster(),
              getToolContext().getSecuritySource()),
          new PrettyPrintingPortfolioWriter(false),
          getCommandLine().hasOption(DELETE_POSITIONS_OPT),
          getCommandLine().hasOption(DELETE_SECURITIES_OPT));
     
      if (getCommandLine().hasOption(DELETE_PORTFOLIOS_OPT)) {
        if (getCommandLine().hasOption(WRITE_OPT)) {
View Full Code Here

  @Override
  protected void doRun() {
    IntegrationToolContext context = getToolContext();

    // Create portfolio writer
    PortfolioWriter portfolioWriter = new PrettyPrintingPortfolioWriter(getCommandLine().hasOption(VERBOSE_OPT));

    // Construct portfolio reader
    PortfolioReader portfolioReader = new MasterPortfolioReader(
        getCommandLine().getOptionValue(PORTFOLIO_NAME_OPT),
        context.getPortfolioMaster(),
        context.getPositionMaster(),
        context.getSecuritySource());
   
    // Create portfolio copier
    ResolvingPortfolioCopier portfolioCopier = new ResolvingPortfolioCopier(
        context.getHistoricalTimeSeriesMaster(),
        context.getHistoricalTimeSeriesProvider(),
        context.getBloombergReferenceDataProvider(),
        getOptionValue(TIME_SERIES_DATAPROVIDER_OPT, "CMPL"),
        getCommandLine().getOptionValues(TIME_SERIES_DATAFIELD_OPT) == null ?
            new String[]{"PX_LAST"} : getCommandLine().getOptionValues(TIME_SERIES_DATAFIELD_OPT)
    );
   
    // Create visitor for verbose/quiet mode
    PortfolioCopierVisitor portfolioCopierVisitor;
    if (getCommandLine().hasOption(VERBOSE_OPT)) {
      portfolioCopierVisitor = new VerbosePortfolioCopierVisitor();
    } else {
      portfolioCopierVisitor = new QuietPortfolioCopierVisitor();
    }
   
    // Call the portfolio loader with the supplied arguments
    portfolioCopier.copy(portfolioReader, portfolioWriter, portfolioCopierVisitor);
   
    // close stuff
    portfolioReader.close();
    portfolioWriter.close();
  }
View Full Code Here

TOP

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

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.