Package com.opengamma.master.historicaltimeseries

Examples of com.opengamma.master.historicaltimeseries.HistoricalTimeSeriesInfoSearchRequest


  public void constructorWithNull() throws Exception {
    new MasterHistoricalTimeSeriesSource(null, null);
  }

  public void getHistoricalTimeSeriesByExternalIdWithMetaData() throws Exception {
    HistoricalTimeSeriesInfoSearchRequest request = new HistoricalTimeSeriesInfoSearchRequest(IDENTIFIERS);
    request.setValidityDate(LocalDate.now());
    request.setDataSource(BBG_DATA_SOURCE);
    request.setDataProvider(CMPL_DATA_PROVIDER);
    request.setDataField(CLOSE_DATA_FIELD);
   
    HistoricalTimeSeriesInfoSearchResult searchResult = new HistoricalTimeSeriesInfoSearchResult();
    HistoricalTimeSeriesInfoDocument doc = new HistoricalTimeSeriesInfoDocument();
    doc.setUniqueId(UID);
   
View Full Code Here


  public void getHistoricalWithInclusiveExclusiveDates() throws Exception {
    LocalDate end = DateUtils.previousWeekDay();
    LocalDate start = end.minusDays(7);
   
    HistoricalTimeSeriesInfoSearchRequest request = new HistoricalTimeSeriesInfoSearchRequest(IDENTIFIERS);
    request.setValidityDate(LocalDate.now());
    request.setDataSource(BBG_DATA_SOURCE);
    request.setDataProvider(CMPL_DATA_PROVIDER);
    request.setDataField(CLOSE_DATA_FIELD);
    LocalDateDoubleTimeSeries timeSeries = randomTimeSeries();
   
    HistoricalTimeSeriesInfoSearchResult searchResult = new HistoricalTimeSeriesInfoSearchResult();
    HistoricalTimeSeriesInfoDocument doc = new HistoricalTimeSeriesInfoDocument();
    doc.setUniqueId(UID);
View Full Code Here

    TimeSeriesWriter writer = new MasterTimeSeriesWriter(htsMaster);
    writer.writeDataPoints(EXISTING_HTSINFO_EXTERNALID, DATA_SOURCE, DATA_PROVIDER, DATA_FIELD, OBSERVATION_TIME,
        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();
View Full Code Here

    TimeSeriesWriter writer = new MasterTimeSeriesWriter(htsMaster);
    writer.writeDataPoints(NEW_HTSINFO_EXTERNALID, DATA_SOURCE, DATA_PROVIDER, DATA_FIELD, OBSERVATION_TIME,
        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();
View Full Code Here

    HistoricalTimeSeriesMaster htsMaster = buildHistoricalTimeSeriesMaster(existingDataPoints);
    TimeSeriesWriter writer = new MasterTimeSeriesWriter(htsMaster);
    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();
View Full Code Here

TOP

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

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.