destinationInstance, correlationsInstance, descriptionInstance);
}
public ExponentialNumericTransformer getExponentialNumericTransformer(
Model model, Resource resource) throws Exception {
ExponentialNumericTransformer expNum = (ExponentialNumericTransformer)
getResourceFromCache(resource, ExponentialNumericTransformer.class);
if(expNum != null) {
return expNum;
}
MetricTransformerInstances metTraInstance =
getMetricTransformer(model, resource);
Double baseInstance;
try {
baseInstance = getBaseObject(model, resource);
} catch(DiscardException e) {
return null;
}
if(baseInstance == null) {
expNum = new ExponentialNumericTransformer(
metTraInstance.sourceMetric, metTraInstance.destinationMetric,
metTraInstance.correlationBetweenMetrics);
} else {
expNum = new ExponentialNumericTransformer(
metTraInstance.sourceMetric, metTraInstance.destinationMetric,
metTraInstance.correlationBetweenMetrics, baseInstance);
}
expNum.setResource(resource);
addResourceInstanceToCache(resource, expNum);
expNum.setDescription(metTraInstance.description);
return expNum;
}