Commit e0302a67 authored by Eirik Alvær's avatar Eirik Alvær

Fixes #2070, #2071. Makes correlation and regression work again.

parent 9ce7cd95
...@@ -61,14 +61,13 @@ public final class CorrelationResource extends AbstractResource { ...@@ -61,14 +61,13 @@ public final class CorrelationResource extends AbstractResource {
return OperationRunner.runWithExceptionHandling(new Operation() { return OperationRunner.runWithExceptionHandling(new Operation() {
@Override @Override
public Object run() throws Exception { public Object run() throws Exception {
MissingDeletionType missingDeletionType = MissingDeletionType.valueOf(missingDeletion);
classVariables.server = serverHandler.getServer(); classVariables.server = serverHandler.getServer();
classVariables.study = ResourceExtractor.getStudy(studyId, classVariables.server); classVariables.study = ResourceExtractor.getStudy(studyId, classVariables.server);
classVariables.correlationVariables = ResourceExtractor.getVariables(correlationVariables, classVariables.server); classVariables.correlationVariables = ResourceExtractor.getVariables(correlationVariables, classVariables.server);
classVariables.weightVariables = ResourceExtractor.getVariables(weightVariables, classVariables.server); classVariables.weightVariables = ResourceExtractor.getVariables(weightVariables, classVariables.server);
classVariables.caseSubsetExpression = caseSubset; classVariables.caseSubsetExpression = caseSubset;
if (null != missingDeletionType) { if (missingDeletion != null) {
classVariables.missingDeletionType = missingDeletionType; classVariables.missingDeletionType = MissingDeletionType.valueOf(missingDeletion);
} }
CorrelationResult correlationResult = performCorrelation(classVariables); CorrelationResult correlationResult = performCorrelation(classVariables);
......
...@@ -68,15 +68,14 @@ public final class RegressionResource extends AbstractResource { ...@@ -68,15 +68,14 @@ public final class RegressionResource extends AbstractResource {
return OperationRunner.runWithExceptionHandling(new Operation() { return OperationRunner.runWithExceptionHandling(new Operation() {
@Override @Override
public Object run() throws Exception { public Object run() throws Exception {
MissingDeletionType missingDeletionType = MissingDeletionType.valueOf(missingDeletion);
classVariables.server = serverHandler.getServer(); classVariables.server = serverHandler.getServer();
classVariables.study = ResourceExtractor.getStudy(studyId, classVariables.server); classVariables.study = ResourceExtractor.getStudy(studyId, classVariables.server);
classVariables.dependentVariable = ResourceExtractor.getVariable(dependentVariable, classVariables.server); classVariables.dependentVariable = ResourceExtractor.getVariable(dependentVariable, classVariables.server);
classVariables.independentVariables = ResourceExtractor.getVariables(independentVariables, classVariables.server); classVariables.independentVariables = ResourceExtractor.getVariables(independentVariables, classVariables.server);
classVariables.weightVariables = ResourceExtractor.getVariables(weightVariables, classVariables.server); classVariables.weightVariables = ResourceExtractor.getVariables(weightVariables, classVariables.server);
classVariables.caseSubsetExpression = caseSubset; classVariables.caseSubsetExpression = caseSubset;
if (null != missingDeletionType) { if (missingDeletion != null) {
classVariables.missingDeletionType = missingDeletionType; classVariables.missingDeletionType = MissingDeletionType.valueOf(missingDeletion);
} }
LinearRegressionResult linearRegressionResult = performRegression(classVariables); LinearRegressionResult linearRegressionResult = performRegression(classVariables);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment