Package com.opengamma.engine.marketdata

Examples of com.opengamma.engine.marketdata.OverrideOperationCompiler.compile()


    final OverrideOperationCompiler compiler = OpenGammaExecutionContext.getOverrideOperationCompiler(executionContext);
    if (compiler == null) {
      throw new IllegalStateException("No override operation compiler for " + shift + " in execution context");
    }
    s_logger.debug("Applying {} to yield curve {}", shift, curve);
    final Object result = compiler.compile(shift, executionContext.getComputationTargetResolver()).apply(desiredValue, curve);
    s_logger.debug("Got result {}", result);
    return Collections.singleton(new ComputedValue(new ValueSpecification(inputSpec.getValueName(), inputSpec.getTargetSpecification(), properties.get()), result));
  }

}
View Full Code Here


    final OverrideOperationCompiler compiler = OpenGammaExecutionContext.getOverrideOperationCompiler(executionContext);
    if (compiler == null) {
      throw new IllegalStateException("No override operation compiler for " + shift + " in execution context");
    }
    s_logger.debug("Applying {} to {}", shift, marketData);
    final OverrideOperation operation = compiler.compile(shift, executionContext.getComputationTargetResolver());
    for (final Map.Entry<ExternalIdBundle, Double> dataPoint : marketData.getDataPointSet()) {
      s_logger.debug("Applying to {}", dataPoint);
      final Object result = operation.apply(new ValueRequirement(MarketDataRequirementNames.MARKET_VALUE, ComputationTargetType.PRIMITIVE, dataPoint.getKey()),
          dataPoint.getValue());
      s_logger.debug("Got result {}", result);
View Full Code Here

    final OverrideOperationCompiler compiler = OpenGammaExecutionContext.getOverrideOperationCompiler(executionContext);
    if (compiler == null) {
      throw new IllegalStateException("No override operation compiler for " + shift + " in execution context");
    }
    s_logger.debug("Applying {} to yield curve {}", shift, inputValue);
    final T result = apply(executionContext, compiler.compile(shift, executionContext.getComputationTargetResolver()), inputValue, input.getSpecification());
    s_logger.debug("Got result {}", result);
    return Collections.singleton(new ComputedValue(new ValueSpecification(desiredValue.getValueName(), target.toSpecification(), desiredValue.getConstraints()), result));
  }

}
View Full Code Here

          compiler = getViewProcessContext().getOverrideOperationCompiler();
          resolver = getViewProcessContext().getFunctionCompilationService().getFunctionCompilationContext().getRawComputationTargetResolver().atVersionCorrection(getVersionCorrection());
        }
        final String shiftExpr = marketDataShift.iterator().next();
        try {
          operation = compiler.compile(shiftExpr, resolver);
        } catch (final IllegalArgumentException e) {
          s_logger.error("Market data shift for  {} not valid - {}", calcConfig.getName(), shiftExpr);
          s_logger.info("Invalid market data shift", e);
        }
      }
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.