Package com.opengamma.provider.historicaltimeseries

Examples of com.opengamma.provider.historicaltimeseries.HistoricalTimeSeriesProvider


  }

  //-------------------------------------------------------------------------
  @Override
  protected HistoricalTimeSeriesProviderGetResult doBulkGet(HistoricalTimeSeriesProviderGetRequest request) {
    HistoricalTimeSeriesProvider underlying = _providers.get(request.getDataSource());
    if (underlying == null) {
      throw new IllegalArgumentException("Unknown data source: " + request.getDataSource());
    }
    return underlying.getHistoricalTimeSeries(request);
  }
View Full Code Here


    final HistoricalTimeSeriesMaster historicalTimeSeriesMaster = getToolContext().getHistoricalTimeSeriesMaster();
    if (historicalTimeSeriesMaster == null) {
      s_logger.warn("Historical timeseries master is missing in toolContext");
      return;
    }
    HistoricalTimeSeriesProvider historicalTimeSeriesProvider = getToolContext().getHistoricalTimeSeriesProvider();
    if (historicalTimeSeriesProvider == null) {
      s_logger.warn("Historical timeseries provider is missing in toolContext");
      return;
    }
    ReferenceDataProvider bloombergReferenceDataProvider = getToolContext().getBloombergReferenceDataProvider();
View Full Code Here

    CommandLine commandLine = getCommandLine();
    String findProvider = getCommandLineOption(commandLine, FIND_PROVIDER_OPTION);
    String replaceWithProvider = getCommandLineOption(commandLine, REPLACE_WITH_PROVIDER_OPTION);
   
    HistoricalTimeSeriesMaster htsMaster = getToolContext().getHistoricalTimeSeriesMaster();
    HistoricalTimeSeriesProvider htsProvider = getToolContext().getHistoricalTimeSeriesProvider();
   
    BloombergHistoricalTimeSeriesLoader loader = new BloombergHistoricalTimeSeriesLoader(htsMaster, htsProvider,
        new BloombergIdentifierProvider(getToolContext().getBloombergReferenceDataProvider()));
   
    for (HistoricalTimeSeriesInfoDocument infoDoc : HistoricalTimeSeriesInfoSearchIterator.iterable(htsMaster, getHistoricalSearchRequest(findProvider))) {
      ExternalIdBundle bundle = infoDoc.getInfo().getExternalIdBundle().toBundle();
      ExternalId buid = bundle.getExternalId(ExternalSchemes.BLOOMBERG_BUID);
      ExternalId ticker = bundle.getExternalId(ExternalSchemes.BLOOMBERG_TICKER);
      String dataField = infoDoc.getInfo().getDataField();
      if (buid != null) {
        s_logger.info("replacing {} {}", buid, ticker);
        try {
          LocalDateDoubleTimeSeries hts = htsProvider.getHistoricalTimeSeries(ExternalIdBundle.of(buid),
              BLOOMBERG_DATA_SOURCE_NAME, replaceWithProvider, dataField);
          if (hts != null) {
            Map<ExternalId, UniqueId> addedTS = loader.loadTimeSeries(Sets.newHashSet(buid), replaceWithProvider, dataField, null, null);
            if (addedTS.get(buid) != null) {
              htsMaster.remove(infoDoc.getUniqueId());
View Full Code Here

    }
    if (getProvider5() != null) {
      maxLevel = buildProviders(repo, getProvider5(), map, acceptedTypes, maxLevel);
    }
   
    final HistoricalTimeSeriesProvider provider = new DelegatingHistoricalTimeSeriesProvider(map);
    final ComponentInfo info = new ComponentInfo(HistoricalTimeSeriesProvider.class, getClassifier());
    info.addAttribute(ComponentInfoAttributes.LEVEL, (maxLevel + 1));
    info.addAttribute(ComponentInfoAttributes.REMOTE_CLIENT_JAVA, RemoteHistoricalTimeSeriesProvider.class);
    info.addAttribute(ComponentInfoAttributes.ACCEPTED_TYPES, Joiner.on(',').join(acceptedTypes));
    repo.registerComponent(info, provider);
View Full Code Here

  private boolean _publishRest = true;

  //-------------------------------------------------------------------------
  @Override
  public void init(ComponentRepository repo, LinkedHashMap<String, String> configuration) throws Exception {
    final HistoricalTimeSeriesProvider provider = initHistoricalTimeSeriesProvider(repo);
    final ComponentInfo info = new ComponentInfo(HistoricalTimeSeriesProvider.class, getClassifier());
    info.addAttribute(ComponentInfoAttributes.LEVEL, 1);
    info.addAttribute(ComponentInfoAttributes.REMOTE_CLIENT_JAVA, RemoteHistoricalTimeSeriesProvider.class);
    info.addAttribute(ComponentInfoAttributes.ACCEPTED_TYPES, getAcceptedTypes());
    repo.registerComponent(info, provider);
View Full Code Here

TOP

Related Classes of com.opengamma.provider.historicaltimeseries.HistoricalTimeSeriesProvider

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.