Examples of MarketDataSpecification


Examples of com.opengamma.engine.marketdata.spec.MarketDataSpecification

  }

  @Test
  public void uriMarketDataSnapshot() throws UnsupportedEncodingException {
    String snapshotId = "Foo~1";
    MarketDataSpecification marketData = MarketData.user(UniqueId.parse(snapshotId));
    URI uri = DependencyGraphTraceProviderResource.uriMarketData(_baseUri, Lists.newArrayList(marketData));
    String url = decode(uri);
    assertEquals(s_testUrl + "marketDataSnapshot/" + snapshotId, url);
  }
View Full Code Here

Examples of com.opengamma.engine.marketdata.spec.MarketDataSpecification

    String url = decode(uri);
    assertEquals(s_testUrl + "marketDataSnapshot/" + snapshotId, url);
  }
  @Test
  public void uriMarketDataLiveDefault() throws UnsupportedEncodingException {
    MarketDataSpecification marketData = MarketData.live();
    URI uri = DependencyGraphTraceProviderResource.uriMarketData(_baseUri, Lists.newArrayList(marketData));
    String url = decode(uri);
    assertEquals(s_testUrl + "marketDataLiveDefault", url);
  }
View Full Code Here

Examples of com.opengamma.engine.marketdata.spec.MarketDataSpecification

    assertEquals(s_testUrl + "marketDataLiveDefault", url);
  }

  @Test
  public void uriMarketDataLive() throws UnsupportedEncodingException {
    MarketDataSpecification marketData = MarketData.live("BB");
    URI uri = DependencyGraphTraceProviderResource.uriMarketData(_baseUri, Lists.newArrayList(marketData));
    String url = decode(uri);
    assertEquals(s_testUrl + "marketDataLive/BB", url);
  }
View Full Code Here

Examples of com.opengamma.engine.marketdata.spec.MarketDataSpecification

    assertEquals(s_testUrl + "marketDataLive/BB", url);
  }
  @Test
  public void uriMarketDataHistorical() throws UnsupportedEncodingException {
    LocalDate now = LocalDate.now();
    MarketDataSpecification marketData = MarketData.historical(now, "ts");
    URI uri = DependencyGraphTraceProviderResource.uriMarketData(_baseUri, Lists.newArrayList(marketData));
    String url = decode(uri);
    assertEquals(s_testUrl + "marketDataHistorical/" + now + "/ts", url);
  }
View Full Code Here

Examples of com.opengamma.engine.marketdata.spec.MarketDataSpecification

    }
    List<MarketDataSpecification> specs = Lists.newArrayListWithCapacity(requestedMarketDataSpecs.size());
    for (MarketDataSpecification spec : requestedMarketDataSpecs) {
      if (spec instanceof LiveMarketDataSpecification) {
        LiveMarketDataSpecification liveSpec = (LiveMarketDataSpecification) spec;
        MarketDataSpecification oldSpec = _marketDataSpecRepo.getSpecification(liveSpec.getDataSource());
        if (oldSpec == null) {
          throw new IllegalArgumentException("No live data source found called " + liveSpec.getDataSource());
        }
        specs.add(oldSpec);
      } else {
View Full Code Here

Examples of com.opengamma.engine.marketdata.spec.MarketDataSpecification

      }
      String aggregatorName = (String) data.get("aggregatorName");
      String marketDataType = (String) data.get("marketDataType");
      String versionDateTime = (String) data.get("versionDateTime");

      MarketDataSpecification marketDataSpec;
      EnumSet<ViewExecutionFlags> flags;
      VersionCorrection versionCorrection;
      if (versionDateTime != null) {
        Instant versionAsOf = Instant.parse(versionDateTime);
        versionCorrection = VersionCorrection.ofVersionAsOf(versionAsOf);
View Full Code Here

Examples of com.opengamma.engine.marketdata.spec.MarketDataSpecification

  @Test
  public void getTraceMarketDataLiveDefault() {
    DependencyGraphTraceBuilderProperties properties = new DependencyGraphTraceBuilderProperties();

    MarketDataSpecification marketData = MarketData.live();

    properties = properties.addMarketData(marketData);

    URI uri = _provider.buildUri(properties);
View Full Code Here

Examples of com.opengamma.engine.marketdata.spec.MarketDataSpecification

  @Test
  public void getTraceMarketDataLive() {
    DependencyGraphTraceBuilderProperties properties = new DependencyGraphTraceBuilderProperties();

    MarketDataSpecification marketData = MarketData.live("BB");

    properties = properties.addMarketData(marketData);

    URI uri = _provider.buildUri(properties);
View Full Code Here

Examples of com.opengamma.engine.marketdata.spec.MarketDataSpecification

  @Test
  public void getTraceMarketDataHistorical() {
    DependencyGraphTraceBuilderProperties properties = new DependencyGraphTraceBuilderProperties();
    LocalDate now = LocalDate.now();
    MarketDataSpecification marketData = MarketData.historical(now, "timeseries");

    properties = properties.addMarketData(marketData);

    URI uri = _provider.buildUri(properties);
View Full Code Here

Examples of com.opengamma.engine.marketdata.spec.MarketDataSpecification

    return new ArrayList<String>(_nameToSpec.keySet());
  }
 
  @Override
  public MarketDataSpecification getSpecification(String providerName) {
    MarketDataSpecification spec = _nameToSpec.get(providerName);
    if (spec == null) {
      throw new IllegalArgumentException("No provider with name '" + providerName + "' is registered with the repository");
    }
    return spec;
  }
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.