Package com.opengamma.master.historicaltimeseries

Examples of com.opengamma.master.historicaltimeseries.HistoricalTimeSeriesInfoSearchResult


        newDataPoints);
   
    // Retrieve the hts contents from the master
    HistoricalTimeSeriesInfoSearchRequest request = new HistoricalTimeSeriesInfoSearchRequest();
    request.setExternalIdSearch(new ExternalIdSearch(EXISTING_HTSINFO_EXTERNALID));
    HistoricalTimeSeriesInfoSearchResult result = htsMaster.search(request);
    LocalDateDoubleTimeSeries retrievedDataPoints = null;
    if (result != null && result.getFirstInfo() != null) {
      retrievedDataPoints = htsMaster.getTimeSeries(
          htsMaster.get(result.getFirstInfo().getUniqueId()).getInfo().getTimeSeriesObjectId().atLatestVersion()).getTimeSeries();
    }
   
    // Assert that the retrieved contents is as expected (combined existing and new dates/values)
    LocalDate[] combinedDates = {LocalDate.of(2010,1,1), LocalDate.of(2010,2,1), LocalDate.of(2011,1,1), LocalDate.of(2011,2,1)};
    double[] combinedValues = {1.0, 1.5, 2.0, 2.5};
View Full Code Here


        dataPoints);
   
    // Retrieve and check the hts master contents
    HistoricalTimeSeriesInfoSearchRequest request = new HistoricalTimeSeriesInfoSearchRequest();
    request.setExternalIdSearch(new ExternalIdSearch(NEW_HTSINFO_EXTERNALID));
    HistoricalTimeSeriesInfoSearchResult result = htsMaster.search(request);
    LocalDateDoubleTimeSeries retrievedDataPoints = null;
    if (result != null && result.getFirstInfo() != null) {
      retrievedDataPoints = htsMaster.getTimeSeries(
          htsMaster.get(result.getFirstInfo().getUniqueId()).getInfo().getTimeSeriesObjectId().atLatestVersion()).getTimeSeries();
    }
    assert(dataPoints.equals(retrievedDataPoints));
  }
View Full Code Here

    reader.writeTo(writer);
   
    // Retrieve hts master contents
    HistoricalTimeSeriesInfoSearchRequest request = new HistoricalTimeSeriesInfoSearchRequest();
    request.setExternalIdSearch(new ExternalIdSearch(ExternalId.of(ID_SCHEME, readId)));
    HistoricalTimeSeriesInfoSearchResult result = htsMaster.search(request);
    LocalDateDoubleTimeSeries retrievedDataPoints = null;
    if (result != null && result.getFirstInfo() != null) {
      retrievedDataPoints = htsMaster.getTimeSeries(
          htsMaster.get(result.getFirstInfo().getUniqueId()).getInfo().getTimeSeriesObjectId().atLatestVersion()).getTimeSeries();
    }
   
    assert(compareDataPoints.equals(retrievedDataPoints));
  }
View Full Code Here

TOP

Related Classes of com.opengamma.master.historicaltimeseries.HistoricalTimeSeriesInfoSearchResult

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.