Package com.opengamma.id

Examples of com.opengamma.id.ExternalIdBundleWithDates.toBundle()


            HistoricalTimeSeriesInfoDocument added = _htsMaster.add(new HistoricalTimeSeriesInfoDocument(info));
            assertNotNull(added);
            assertNotNull(added.getUniqueId());
           
            Map<ExternalIdBundle, LocalDateDoubleTimeSeries> resultMap = _historicalTimeSeriesProvider.getHistoricalTimeSeries(
                Collections.singleton(bundleWithDates.toBundle()), BloombergConstants.BLOOMBERG_DATA_SOURCE_NAME, dataProvider, dataField, LocalDateRange.of(start, end, true));
            LocalDateDoubleTimeSeries timeSeries = resultMap.get(bundleWithDates.toBundle());
            UniqueId tsUid = _htsMaster.updateTimeSeriesDataPoints(added.getInfo().getTimeSeriesObjectId(), timeSeries);
           
            HistoricalTimeSeries hts = _htsMaster.getTimeSeries(tsUid);
            assertNotNull(hts);
View Full Code Here


            assertNotNull(added);
            assertNotNull(added.getUniqueId());
           
            Map<ExternalIdBundle, LocalDateDoubleTimeSeries> resultMap = _historicalTimeSeriesProvider.getHistoricalTimeSeries(
                Collections.singleton(bundleWithDates.toBundle()), BloombergConstants.BLOOMBERG_DATA_SOURCE_NAME, dataProvider, dataField, LocalDateRange.of(start, end, true));
            LocalDateDoubleTimeSeries timeSeries = resultMap.get(bundleWithDates.toBundle());
            UniqueId tsUid = _htsMaster.updateTimeSeriesDataPoints(added.getInfo().getTimeSeriesObjectId(), timeSeries);
           
            HistoricalTimeSeries hts = _htsMaster.getTimeSeries(tsUid);
            assertNotNull(hts);
            assertEquals(timeSeries, hts.getTimeSeries());
View Full Code Here

   */
  private Map<ExternalId, HistoricalTimeSeriesInfoDocument> extractBuids(Iterable<HistoricalTimeSeriesInfoDocument> documents) {
    Map<ExternalId, HistoricalTimeSeriesInfoDocument> buids = Maps.newHashMap();
    for (HistoricalTimeSeriesInfoDocument doc : documents) {
      ExternalIdBundleWithDates identifierBundleWithDates = doc.getInfo().getExternalIdBundle();
      ExternalIdBundle bundle = identifierBundleWithDates.toBundle();
      ExternalId buid = bundle.getExternalId(ExternalSchemes.BLOOMBERG_BUID);
      if (buid == null) {
        throw new OpenGammaRuntimeException("no buid for " + bundle);
      }
      buids.put(buid, doc);
View Full Code Here

    // reverse map and normalize identifiers
    for (Entry<ExternalId, ExternalIdBundleWithDates> entry : externalId2WithDates.entrySet()) {
      ExternalId requestIdentifier = entry.getKey();
      ExternalIdBundleWithDates bundle = entry.getValue();
      bundle = BloombergDataUtils.addTwoDigitYearCode(bundle);
      bundle2WithDates.put(bundle.toBundle(), bundle);
      withDates2ExternalId.put(bundle, requestIdentifier);
    }
   
    // fetch time-series and store to master
    if (bundle2WithDates.size() > 0) {
View Full Code Here

        ManageableHistoricalTimeSeriesInfo info = new ManageableHistoricalTimeSeriesInfo();
        ExternalIdBundleWithDates bundleWithDates = identifiersToBundleWithDates.get(identifers);
        info.setExternalIdBundle(bundleWithDates);
        info.setDataField(dataField);
        info.setDataSource(BLOOMBERG_DATA_SOURCE_NAME);
        ExternalIdBundle bundle = bundleWithDates.toBundle(LocalDate.now(OpenGammaClock.getInstance()));
        String idStr = Objects.firstNonNull(
            bundle.getValue(ExternalSchemes.BLOOMBERG_TICKER),
            Objects.firstNonNull(
              bundle.getExternalId(ExternalSchemes.BLOOMBERG_BUID),
              bundle.getExternalIds().iterator().next())).toString();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.