forked from D-Net/dnet-hadoop
added common module
This commit is contained in:
parent
1a1ec7da8e
commit
b316467608
|
@ -3,7 +3,7 @@
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>eu.dnetlib</groupId>
|
<groupId>eu.dnetlib.dhp</groupId>
|
||||||
<artifactId>dhp-mdstore-manager-app</artifactId>
|
<artifactId>dhp-mdstore-manager-app</artifactId>
|
||||||
<version>1.1.0-SNAPSHOT</version>
|
<version>1.1.0-SNAPSHOT</version>
|
||||||
|
|
||||||
|
@ -56,6 +56,13 @@
|
||||||
<version>2.6</version>
|
<version>2.6</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Common -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>eu.dnetlib.dhp</groupId>
|
||||||
|
<artifactId>dhp-common</artifactId>
|
||||||
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- Swagger -->
|
<!-- Swagger -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.springfox</groupId>
|
<groupId>io.springfox</groupId>
|
||||||
|
|
|
@ -17,12 +17,12 @@ import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
|
import eu.dnetlib.data.mdstore.manager.common.model.MDStore;
|
||||||
|
import eu.dnetlib.data.mdstore.manager.common.model.MDStoreCurrentVersion;
|
||||||
|
import eu.dnetlib.data.mdstore.manager.common.model.MDStoreVersion;
|
||||||
|
import eu.dnetlib.data.mdstore.manager.common.model.MDStoreWithInfo;
|
||||||
import eu.dnetlib.data.mdstore.manager.exceptions.MDStoreManagerException;
|
import eu.dnetlib.data.mdstore.manager.exceptions.MDStoreManagerException;
|
||||||
import eu.dnetlib.data.mdstore.manager.exceptions.NoContentException;
|
import eu.dnetlib.data.mdstore.manager.exceptions.NoContentException;
|
||||||
import eu.dnetlib.data.mdstore.manager.model.MDStore;
|
|
||||||
import eu.dnetlib.data.mdstore.manager.model.MDStoreCurrentVersion;
|
|
||||||
import eu.dnetlib.data.mdstore.manager.model.MDStoreVersion;
|
|
||||||
import eu.dnetlib.data.mdstore.manager.model.MDStoreWithInfo;
|
|
||||||
import eu.dnetlib.data.mdstore.manager.repository.MDStoreCurrentVersionRepository;
|
import eu.dnetlib.data.mdstore.manager.repository.MDStoreCurrentVersionRepository;
|
||||||
import eu.dnetlib.data.mdstore.manager.repository.MDStoreRepository;
|
import eu.dnetlib.data.mdstore.manager.repository.MDStoreRepository;
|
||||||
import eu.dnetlib.data.mdstore.manager.repository.MDStoreVersionRepository;
|
import eu.dnetlib.data.mdstore.manager.repository.MDStoreVersionRepository;
|
||||||
|
@ -72,7 +72,7 @@ public class MDStoreController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "Create a new mdstore")
|
@ApiOperation(value = "Create a new mdstore")
|
||||||
@RequestMapping(value = "/new/{format}/{layout}/{interpretation}", method = RequestMethod.PUT)
|
@RequestMapping(value = "/new/{format}/{layout}/{interpretation}", method = RequestMethod.GET)
|
||||||
public MDStoreWithInfo createMDStore(
|
public MDStoreWithInfo createMDStore(
|
||||||
@ApiParam("mdstore format") @PathVariable final String format,
|
@ApiParam("mdstore format") @PathVariable final String format,
|
||||||
@ApiParam("mdstore layout") @PathVariable final String layout,
|
@ApiParam("mdstore layout") @PathVariable final String layout,
|
||||||
|
|
|
@ -3,7 +3,7 @@ package eu.dnetlib.data.mdstore.manager.repository;
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import eu.dnetlib.data.mdstore.manager.model.MDStoreCurrentVersion;
|
import eu.dnetlib.data.mdstore.manager.common.model.MDStoreCurrentVersion;
|
||||||
|
|
||||||
@Repository
|
@Repository
|
||||||
public interface MDStoreCurrentVersionRepository extends JpaRepository<MDStoreCurrentVersion, String> {
|
public interface MDStoreCurrentVersionRepository extends JpaRepository<MDStoreCurrentVersion, String> {
|
||||||
|
|
|
@ -3,7 +3,7 @@ package eu.dnetlib.data.mdstore.manager.repository;
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import eu.dnetlib.data.mdstore.manager.model.MDStore;
|
import eu.dnetlib.data.mdstore.manager.common.model.MDStore;
|
||||||
|
|
||||||
@Repository
|
@Repository
|
||||||
public interface MDStoreRepository extends JpaRepository<MDStore, String> {
|
public interface MDStoreRepository extends JpaRepository<MDStore, String> {
|
||||||
|
|
|
@ -3,7 +3,7 @@ package eu.dnetlib.data.mdstore.manager.repository;
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import eu.dnetlib.data.mdstore.manager.model.MDStoreVersion;
|
import eu.dnetlib.data.mdstore.manager.common.model.MDStoreVersion;
|
||||||
|
|
||||||
@Repository
|
@Repository
|
||||||
public interface MDStoreVersionRepository extends JpaRepository<MDStoreVersion, String> {
|
public interface MDStoreVersionRepository extends JpaRepository<MDStoreVersion, String> {
|
||||||
|
|
|
@ -2,7 +2,7 @@ package eu.dnetlib.data.mdstore.manager.repository;
|
||||||
|
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import eu.dnetlib.data.mdstore.manager.model.MDStoreWithInfo;
|
import eu.dnetlib.data.mdstore.manager.common.model.MDStoreWithInfo;
|
||||||
|
|
||||||
@Repository
|
@Repository
|
||||||
public interface MDStoreWithInfoRepository extends ReadOnlyRepository<MDStoreWithInfo, String> {
|
public interface MDStoreWithInfoRepository extends ReadOnlyRepository<MDStoreWithInfo, String> {
|
||||||
|
|
|
@ -21,7 +21,7 @@ app.controller('mdstoreManagerController', function($scope, $http) {
|
||||||
if (dsName || dsId || apiId) {
|
if (dsName || dsId || apiId) {
|
||||||
url += '?dsName=' + encodeURIComponent(dsName) + '&dsId=' + encodeURIComponent(dsId) + '&apiId=' + encodeURIComponent(apiId);
|
url += '?dsName=' + encodeURIComponent(dsName) + '&dsId=' + encodeURIComponent(dsId) + '&apiId=' + encodeURIComponent(apiId);
|
||||||
}
|
}
|
||||||
$http.put(url).success(function(data) {
|
$http.get(url).success(function(data) {
|
||||||
$scope.reload();
|
$scope.reload();
|
||||||
}).error(function() {
|
}).error(function() {
|
||||||
alert("error");
|
alert("error");
|
||||||
|
|
|
@ -22,12 +22,12 @@
|
||||||
<groupId>commons-codec</groupId>
|
<groupId>commons-codec</groupId>
|
||||||
<artifactId>commons-codec</artifactId>
|
<artifactId>commons-codec</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.persistence</groupId>
|
||||||
|
<artifactId>javax.persistence-api</artifactId>
|
||||||
|
<version>2.2</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package eu.dnetlib.data.mdstore.manager.model;
|
package eu.dnetlib.data.mdstore.manager.common.model;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
|
@ -1,4 +1,4 @@
|
||||||
package eu.dnetlib.data.mdstore.manager.model;
|
package eu.dnetlib.data.mdstore.manager.common.model;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package eu.dnetlib.data.mdstore.manager.model;
|
package eu.dnetlib.data.mdstore.manager.common.model;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
|
@ -1,4 +1,4 @@
|
||||||
package eu.dnetlib.data.mdstore.manager.model;
|
package eu.dnetlib.data.mdstore.manager.common.model;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
|
@ -1,4 +1,4 @@
|
||||||
#Created by Apache Maven 3.5.2
|
#Created by Apache Maven 3.6.0
|
||||||
version=1.0.0
|
version=1.0.0
|
||||||
groupId=eu.dnetlib
|
groupId=eu.dnetlib
|
||||||
artifactId=dhp-collector-worker
|
artifactId=dhp-collector-worker
|
||||||
|
|
Loading…
Reference in New Issue