diff --git a/pom.xml b/pom.xml index c269ffe67b3e24e1874b6e19f2100f0443a5d5a1..eebdaa2712d3ebb7f150e551074bcf2f131ebdfc 100644 --- a/pom.xml +++ b/pom.xml @@ -47,7 +47,7 @@ <spring-data-jpa.version>1.10.11.RELEASE</spring-data-jpa.version> <spring-boot-starter-actuator.version>1.4.7.RELEASE</spring-boot-starter-actuator.version> <aspectjweaver.version>1.8.9</aspectjweaver.version> - <woken-messages.version>2.3.1</woken-messages.version> + <woken-messages.version>2.4.2</woken-messages.version> <javax-inject.version>1</javax-inject.version> <akka.version>2.5.9</akka.version> <spring-context.version>4.3.4.RELEASE</spring-context.version> @@ -192,7 +192,7 @@ <version>${aspectjweaver.version}</version> </dependency> <dependency> - <groupId>eu.humanbrainproject.mip</groupId> + <groupId>ch.chuv.lren.woken</groupId> <artifactId>woken-messages_2.11</artifactId> <version>${woken-messages.version}</version> </dependency> diff --git a/src/main/java/eu/hbp/mip/akka/ExperimentActor.java b/src/main/java/eu/hbp/mip/akka/ExperimentActor.java index 804b5fad67e12eda4c68c0166a7a217044d92527..21b415266c53694c7a6adebbe7093178f4a3f891 100644 --- a/src/main/java/eu/hbp/mip/akka/ExperimentActor.java +++ b/src/main/java/eu/hbp/mip/akka/ExperimentActor.java @@ -1,7 +1,7 @@ package eu.hbp.mip.akka; import akka.actor.AbstractActor; -import eu.hbp.mip.woken.messages.query.QueryResult; +import ch.chuv.lren.woken.messages.query.QueryResult; import eu.hbp.mip.model.Experiment; import eu.hbp.mip.repositories.ExperimentRepository; import org.slf4j.Logger; diff --git a/src/main/java/eu/hbp/mip/akka/WokenClientController.java b/src/main/java/eu/hbp/mip/akka/WokenClientController.java index 7557e637df5f501fc7d67b9a3383c2c64df9acbb..3cc463857d927b17e4210cce5013eac638939a28 100644 --- a/src/main/java/eu/hbp/mip/akka/WokenClientController.java +++ b/src/main/java/eu/hbp/mip/akka/WokenClientController.java @@ -8,8 +8,8 @@ import akka.cluster.client.ClusterClient; import akka.cluster.client.ClusterClientSettings; import akka.pattern.Patterns; import akka.util.Timeout; -import eu.hbp.mip.woken.messages.query.Query; -import eu.hbp.mip.woken.messages.query.QueryResult; +import ch.chuv.lren.woken.messages.query.Query; +import ch.chuv.lren.woken.messages.query.QueryResult; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; diff --git a/src/main/java/eu/hbp/mip/controllers/ExperimentApi.java b/src/main/java/eu/hbp/mip/controllers/ExperimentApi.java index 99848086ec07a1c17c28adc895f3fe6395fcefc8..711ca45b3ac9b9defafc7271e92d208dfe09aea3 100644 --- a/src/main/java/eu/hbp/mip/controllers/ExperimentApi.java +++ b/src/main/java/eu/hbp/mip/controllers/ExperimentApi.java @@ -13,7 +13,7 @@ import eu.hbp.mip.repositories.ExperimentRepository; import eu.hbp.mip.repositories.ModelRepository; import eu.hbp.mip.utils.HTTPUtil; import eu.hbp.mip.utils.JSONUtil; -import eu.hbp.mip.woken.messages.query.QueryResult; +import ch.chuv.lren.woken.messages.query.QueryResult; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; @@ -258,7 +258,7 @@ public class ExperimentApi extends WokenClientController { User user = securityConfiguration.getUser(); // this runs in the background. For future optimization: use a thread pool - final eu.hbp.mip.woken.messages.query.ExperimentQuery experimentQuery = experiment.prepareQuery(user.getUsername()); + final ch.chuv.lren.woken.messages.query.ExperimentQuery experimentQuery = experiment.prepareQuery(user.getUsername()); final ExecutionContext ec = getExecutor(); Future<Object> response = sendWokenQuery(experimentQuery, 24*3600); diff --git a/src/main/java/eu/hbp/mip/controllers/MethodsApi.java b/src/main/java/eu/hbp/mip/controllers/MethodsApi.java index e7f81753d804e7964f9fc51617b199285268d1b9..073fbf3b6b44ab54e2ef3643285e5f3ea06d62e1 100644 --- a/src/main/java/eu/hbp/mip/controllers/MethodsApi.java +++ b/src/main/java/eu/hbp/mip/controllers/MethodsApi.java @@ -4,8 +4,8 @@ import com.google.gson.Gson; import com.google.gson.JsonObject; import com.google.gson.JsonParser; import eu.hbp.mip.akka.WokenClientController; -import eu.hbp.mip.woken.messages.query.MethodsQuery$; -import eu.hbp.mip.woken.messages.query.MethodsResponse; +import ch.chuv.lren.woken.messages.query.MethodsQuery$; +import ch.chuv.lren.woken.messages.query.MethodsResponse; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.slf4j.Logger; diff --git a/src/main/java/eu/hbp/mip/model/Experiment.java b/src/main/java/eu/hbp/mip/model/Experiment.java index 3c2d3654c33eb158e2f6182e5f6fe8fcb424ae70..38e535cb52d51f978d14f1a01673bcc6df971aa6 100644 --- a/src/main/java/eu/hbp/mip/model/Experiment.java +++ b/src/main/java/eu/hbp/mip/model/Experiment.java @@ -7,16 +7,15 @@ import com.google.gson.JsonObject; import com.google.gson.JsonParser; import com.google.gson.annotations.Expose; import com.google.gson.reflect.TypeToken; -import eu.hbp.mip.woken.messages.datasets.DatasetId; -import eu.hbp.mip.woken.messages.query.ExperimentQuery; -import eu.hbp.mip.woken.messages.query.*; +import ch.chuv.lren.woken.messages.datasets.DatasetId; +import ch.chuv.lren.woken.messages.query.ExperimentQuery; +import ch.chuv.lren.woken.messages.query.*; import eu.hbp.mip.utils.TypesConvert; -import eu.hbp.mip.woken.messages.query.filters.FilterRule; -import eu.hbp.mip.woken.messages.variables.FeatureIdentifier; +import ch.chuv.lren.woken.messages.query.filters.FilterRule; +import ch.chuv.lren.woken.messages.variables.FeatureIdentifier; import org.hibernate.annotations.Cascade; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import scala.None$; import scala.Option; import scala.collection.JavaConversions; @@ -98,7 +97,7 @@ public class Experiment { public ExperimentQuery prepareQuery(String user) { if (model == null || model.getQuery() == null) - return new ExperimentQuery(null, null, null, null, null, null, null, null, null, null, null); + return new ExperimentQuery(null, null, null, null, null, Option.empty(), null, null, null, null, null, null); List<AlgorithmSpec> algorithms = new LinkedList<>(); Type algoList = new TypeToken<LinkedList<eu.hbp.mip.model.Algorithm>>(){}.getType(); @@ -132,9 +131,9 @@ public class Experiment { Option<FilterRule> filters = conv.toFilterRule(filtersJson); UserId userId = new UserId(user); - return new ExperimentQuery(userId, variablesSeq, covariablesSeq, groupingSeq, filters, + return new ExperimentQuery(userId, variablesSeq, covariablesSeq, groupingSeq, filters, Option.empty(), trainingDatasets, testingDatasets, algorithmsSeq, validationDatasets, - validationsSeq, None$.empty()); + validationsSeq, Option.empty()); } diff --git a/src/main/java/eu/hbp/mip/model/MiningQuery.java b/src/main/java/eu/hbp/mip/model/MiningQuery.java index 49d8cadb2b743ebe532726ca208808d01d458b8d..51cb91c3a7dc033c247be43617e0ed168ed1d39b 100644 --- a/src/main/java/eu/hbp/mip/model/MiningQuery.java +++ b/src/main/java/eu/hbp/mip/model/MiningQuery.java @@ -3,11 +3,11 @@ package eu.hbp.mip.model; import ch.chuv.lren.mip.portal.WokenConversions; import com.google.gson.Gson; import eu.hbp.mip.utils.TypesConvert; -import eu.hbp.mip.woken.messages.datasets.DatasetId; -import eu.hbp.mip.woken.messages.query.ExecutionPlan; -import eu.hbp.mip.woken.messages.query.UserId; -import eu.hbp.mip.woken.messages.query.filters.FilterRule; -import eu.hbp.mip.woken.messages.variables.FeatureIdentifier; +import ch.chuv.lren.woken.messages.datasets.DatasetId; +import ch.chuv.lren.woken.messages.query.ExecutionPlan; +import ch.chuv.lren.woken.messages.query.UserId; +import ch.chuv.lren.woken.messages.query.filters.FilterRule; +import ch.chuv.lren.woken.messages.variables.FeatureIdentifier; import scala.Option; import java.util.LinkedList; @@ -87,9 +87,9 @@ public class MiningQuery { this.algorithm = algorithm; } - public eu.hbp.mip.woken.messages.query.MiningQuery prepareQuery(String user) { + public ch.chuv.lren.woken.messages.query.MiningQuery prepareQuery(String user) { - eu.hbp.mip.woken.messages.query.AlgorithmSpec scalaAlgorithm = new eu.hbp.mip.woken.messages.query.AlgorithmSpec( + ch.chuv.lren.woken.messages.query.AlgorithmSpec scalaAlgorithm = new ch.chuv.lren.woken.messages.query.AlgorithmSpec( algorithm.getCode(), TypesConvert.algoParamsToScala(algorithm.getParameters())); scala.collection.immutable.List<FeatureIdentifier> variablesSeq = @@ -105,8 +105,8 @@ public class MiningQuery { String filtersJson = getFilters(); Option<FilterRule> filters = conv.toFilterRule(filtersJson); - return new eu.hbp.mip.woken.messages.query.MiningQuery(userId, - variablesSeq, covariablesSeq, groupingSeq, filters, datasets, scalaAlgorithm, Option.<ExecutionPlan>empty()); + return new ch.chuv.lren.woken.messages.query.MiningQuery(userId, + variablesSeq, covariablesSeq, groupingSeq, filters, Option.empty(), datasets, scalaAlgorithm, Option.empty()); } @Override diff --git a/src/main/java/eu/hbp/mip/utils/TypesConvert.java b/src/main/java/eu/hbp/mip/utils/TypesConvert.java index d00d026761855011b7a97d5848ecdca7d5b87a2c..2e473997bf1f5777d8678f8308c07205e71c8521 100644 --- a/src/main/java/eu/hbp/mip/utils/TypesConvert.java +++ b/src/main/java/eu/hbp/mip/utils/TypesConvert.java @@ -1,8 +1,8 @@ package eu.hbp.mip.utils; -import eu.hbp.mip.woken.messages.query.CodeValue; -import eu.hbp.mip.woken.messages.variables.FeatureIdentifier; -import eu.hbp.mip.woken.messages.variables.VariableId; +import ch.chuv.lren.woken.messages.query.CodeValue; +import ch.chuv.lren.woken.messages.variables.FeatureIdentifier; +import ch.chuv.lren.woken.messages.variables.VariableId; import eu.hbp.mip.model.AlgorithmParam; import eu.hbp.mip.model.Variable; import scala.collection.JavaConversions; diff --git a/src/main/resources/application.conf b/src/main/resources/application.conf index 2547a00f5df61e6e6fc65498faf4e27983891825..23a49772785dc1100acb9ab6230c082ff841b80c 100644 --- a/src/main/resources/application.conf +++ b/src/main/resources/application.conf @@ -15,11 +15,11 @@ akka { } serializers { - query-result-serializer = "eu.hbp.mip.woken.messages.query.QueryResultSerializer" + query-result-serializer = "ch.chuv.lren.woken.messages.query.QueryResultSerializer" } serialization-bindings { - "eu.hbp.mip.woken.messages.query.QueryResult" = query-result-serializer + "ch.chuv.lren.woken.messages.query.QueryResult" = query-result-serializer } enable-additional-serialization-bindings = off allow-java-serialization = on diff --git a/src/main/scala/ch.chuv.lren/mip/portal/WokenConversions.scala b/src/main/scala/ch.chuv.lren/mip/portal/WokenConversions.scala index abdaa5d66f52446e5bcadb6d7e8fd99c09ef896b..1b773335b4a12672f84ffb2212928a18d4d95bf1 100644 --- a/src/main/scala/ch.chuv.lren/mip/portal/WokenConversions.scala +++ b/src/main/scala/ch.chuv.lren/mip/portal/WokenConversions.scala @@ -1,9 +1,9 @@ package ch.chuv.lren.mip.portal import eu.hbp.mip.model.Variable -import eu.hbp.mip.woken.messages.datasets.DatasetId -import eu.hbp.mip.woken.messages.query.filters.FilterRule -import eu.hbp.mip.woken.messages.query.filters.queryFiltersProtocol._ +import ch.chuv.lren.woken.messages.datasets.DatasetId +import ch.chuv.lren.woken.messages.query.filters.FilterRule +import ch.chuv.lren.woken.messages.query.filters.queryFiltersProtocol._ import org.springframework.stereotype.Component import spray.json._