Skip to content
Snippets Groups Projects
Commit d7322712 authored by Manuel Spuhler's avatar Manuel Spuhler
Browse files

Cleanup

parent 7fb39245
No related branches found
No related tags found
No related merge requests found
...@@ -52,10 +52,6 @@ To use this image, you need a running instance of PostgreSQL and to configure th ...@@ -52,10 +52,6 @@ To use this image, you need a running instance of PostgreSQL and to configure th
### ENDPOINTS ### ENDPOINTS
* WOKEN_PORT_8088_TCP_ADDR: default value is "woken".
* WOKEN_PORT_8088_TCP_PORT default value is "8088".
* WOKEN_AKKA_PATH default value is "/user/entrypoint".
* EXAREME_URL: URL to Exareme server, default value is "http://hbps2.chuv.ch:9090". * EXAREME_URL: URL to Exareme server, default value is "http://hbps2.chuv.ch:9090".
* WORKFLOW_URL: URL to Workflow server * WORKFLOW_URL: URL to Workflow server
* JWT_SECRET: "secret" * JWT_SECRET: "secret"
......
...@@ -8,12 +8,6 @@ spring: ...@@ -8,12 +8,6 @@ spring:
username: {{ default .Env.PORTAL_DB_USER "postgres" }} username: {{ default .Env.PORTAL_DB_USER "postgres" }}
password: {{ .Env.PORTAL_DB_PASSWORD }} password: {{ .Env.PORTAL_DB_PASSWORD }}
driver-class-name: org.postgresql.Driver driver-class-name: org.postgresql.Driver
metaDatasource:
url: {{ default .Env.META_DB_URL "jdbc:postgresql://172.22.0.1:5432/meta" }}
schema: {{ default .Env.META_DB_SCHEMA "public" }}
username: {{ default .Env.META_DB_USER "postgres" }}
password: {{ .Env.META_DB_PASSWORD }}
driver-class-name: org.postgresql.Driver
data: data:
jpa: jpa:
......
...@@ -47,7 +47,6 @@ ...@@ -47,7 +47,6 @@
<spring-data-jpa.version>1.10.11.RELEASE</spring-data-jpa.version> <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> <spring-boot-starter-actuator.version>1.4.7.RELEASE</spring-boot-starter-actuator.version>
<aspectjweaver.version>1.8.9</aspectjweaver.version> <aspectjweaver.version>1.8.9</aspectjweaver.version>
<woken-messages.version>3.0.14</woken-messages.version>
<javax-inject.version>1</javax-inject.version> <javax-inject.version>1</javax-inject.version>
<akka.version>2.5.22</akka.version> <akka.version>2.5.22</akka.version>
<spring-context.version>4.3.4.RELEASE</spring-context.version> <spring-context.version>4.3.4.RELEASE</spring-context.version>
...@@ -225,11 +224,7 @@ ...@@ -225,11 +224,7 @@
<artifactId>aspectjweaver</artifactId> <artifactId>aspectjweaver</artifactId>
<version>${aspectjweaver.version}</version> <version>${aspectjweaver.version}</version>
</dependency> </dependency>
<dependency>
<groupId>ch.chuv.lren.woken</groupId>
<artifactId>woken-messages_2.11</artifactId>
<version>${woken-messages.version}</version>
</dependency>
<dependency> <dependency>
<groupId>javax.inject</groupId> <groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId> <artifactId>javax.inject</artifactId>
......
package eu.hbp.mip.configuration; package eu.hbp.mip.configuration;
import org.flywaydb.core.Flyway; import org.flywaydb.core.Flyway;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder; import org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder;
import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.orm.jpa.EntityScan; import org.springframework.boot.orm.jpa.EntityScan;
import org.springframework.context.annotation.*; import org.springframework.context.annotation.*;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories; import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.orm.jpa.JpaVendorAdapter; import org.springframework.orm.jpa.JpaVendorAdapter;
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter; import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
...@@ -32,18 +28,6 @@ public class PersistenceConfiguration { ...@@ -32,18 +28,6 @@ public class PersistenceConfiguration {
return DataSourceBuilder.create().build(); return DataSourceBuilder.create().build();
} }
@Bean(name = "metaDatasource")
@ConfigurationProperties(prefix="spring.metaDatasource")
public DataSource metaDataSource() {
return DataSourceBuilder.create().build();
}
@Bean
@Autowired
@Qualifier("metaJdbcTemplate")
public JdbcTemplate metaJdbcTemplate() {
return new JdbcTemplate(metaDataSource());
}
@Bean(name = "entityManagerFactory") @Bean(name = "entityManagerFactory")
@DependsOn("flyway") @DependsOn("flyway")
......
package eu.hbp.mip.controllers; package eu.hbp.mip.controllers;
import akka.dispatch.OnSuccess;
import com.google.gson.*; import com.google.gson.*;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.google.gson.Gson; import com.google.gson.Gson;
...@@ -10,7 +9,6 @@ import eu.hbp.mip.model.*; ...@@ -10,7 +9,6 @@ import eu.hbp.mip.model.*;
import eu.hbp.mip.repositories.ExperimentRepository; import eu.hbp.mip.repositories.ExperimentRepository;
import eu.hbp.mip.repositories.ModelRepository; import eu.hbp.mip.repositories.ModelRepository;
import eu.hbp.mip.utils.HTTPUtil; import eu.hbp.mip.utils.HTTPUtil;
import ch.chuv.lren.woken.messages.query.QueryResult;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
...@@ -21,8 +19,6 @@ import org.springframework.beans.factory.annotation.Value; ...@@ -21,8 +19,6 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import scala.concurrent.ExecutionContext;
import scala.concurrent.Future;
import eu.hbp.mip.utils.JWTUtil; import eu.hbp.mip.utils.JWTUtil;
import java.io.IOException; import java.io.IOException;
......
...@@ -4,10 +4,7 @@ ...@@ -4,10 +4,7 @@
package eu.hbp.mip.controllers; package eu.hbp.mip.controllers;
import ch.chuv.lren.woken.messages.query.filters.FilterRule;
import com.github.slugify.Slugify; import com.github.slugify.Slugify;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import eu.hbp.mip.model.Model; import eu.hbp.mip.model.Model;
import eu.hbp.mip.model.User; import eu.hbp.mip.model.User;
import eu.hbp.mip.model.UserInfo; import eu.hbp.mip.model.UserInfo;
...@@ -17,11 +14,9 @@ import io.swagger.annotations.*; ...@@ -17,11 +14,9 @@ import io.swagger.annotations.*;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import scala.Option;
import java.io.IOException; import java.io.IOException;
import java.util.*; import java.util.*;
......
...@@ -2,21 +2,11 @@ package eu.hbp.mip.model; ...@@ -2,21 +2,11 @@ package eu.hbp.mip.model;
import com.google.gson.*; import com.google.gson.*;
import com.google.gson.annotations.Expose; import com.google.gson.annotations.Expose;
import com.google.gson.reflect.TypeToken;
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 ch.chuv.lren.woken.messages.query.filters.FilterRule;
import ch.chuv.lren.woken.messages.variables.FeatureIdentifier;
import org.hibernate.annotations.Cascade; import org.hibernate.annotations.Cascade;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import scala.Option;
import scala.collection.JavaConversions;
import javax.persistence.*; import javax.persistence.*;
import java.lang.reflect.Type;
import java.util.*; import java.util.*;
/** /**
......
package eu.hbp.mip.model; package eu.hbp.mip.model;
import com.google.gson.Gson; import com.google.gson.Gson;
import eu.hbp.mip.utils.TypesConvert;
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; import java.util.LinkedList;
import java.util.List; import java.util.List;
......
package eu.hbp.mip.utils;
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;
import java.util.LinkedList;
import java.util.List;
import java.util.stream.Collectors;
/**
* Created by mirco on 06.01.17.
*/
public class TypesConvert {
public static scala.collection.immutable.List<FeatureIdentifier> variablesToIdentifiers(List<Variable> vars) {
List<FeatureIdentifier> varIds = new LinkedList<>();
for (Variable v: vars) {
if (!v.getCode().isEmpty()) {
varIds.add(new VariableId(v.getCode()));
}
}
return JavaConversions.asScalaBuffer(varIds).toList();
}
public static scala.collection.immutable.List<CodeValue> algoParamsToScala(List<AlgorithmParam> aps) {
List<CodeValue> cvs = aps.stream().map(p -> new CodeValue(p.getCode(), p.getValue())).collect(Collectors.toList());
return JavaConversions.asScalaBuffer(cvs).toList();
}
}
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