first part
This commit is contained in:
parent
09bcb13dd8
commit
9e702667a4
|
@ -0,0 +1,40 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
<attribute name="optional" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
<attribute name="test" value="true"/>
|
||||
<attribute name="optional" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" output="target/classes" path="src/main/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
<attribute name="test" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
|
@ -86,3 +86,4 @@ local.properties
|
|||
# Typically, this file would be tracked if it contains build/dependency configurations:
|
||||
#.project
|
||||
|
||||
/target/
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
17.0.9
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>dnet-directindex-application</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -0,0 +1,458 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>3.3.5</version>
|
||||
<relativePath />
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>eu.dnetlib.dhp</groupId>
|
||||
<artifactId>dnet-directindex-application</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
<name>GNU Affero General Public License v3.0 or later</name>
|
||||
<url>https://spdx.org/licenses/AGPL-3.0-or-later.html#licenseText</url>
|
||||
<distribution>repo</distribution>
|
||||
<comments>This program is free software: you can redistribute it and/or modify it under the terms of the
|
||||
GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.</comments>
|
||||
</license>
|
||||
</licenses>
|
||||
|
||||
<issueManagement>
|
||||
<system>Redmine</system>
|
||||
<url>https://issue.openaire.research-infrastructures.eu/projects/openaire</url>
|
||||
</issueManagement>
|
||||
|
||||
<ciManagement>
|
||||
<system>jenkins</system>
|
||||
<url>https://jenkins-dnet.d4science.org/</url>
|
||||
</ciManagement>
|
||||
|
||||
<scm>
|
||||
<connection>scm:git:gitea@code-repo.d4science.org:D-Net/dnet-directindex-applcation.git</connection>
|
||||
<developerConnection>scm:git:gitea@code-repo.d4science.org:D-Net/dnet-directindex-applcation.git</developerConnection>
|
||||
<url>https://code-repo.d4science.org/D-Net/dnet-directindex-applcation/</url>
|
||||
<tag>HEAD</tag>
|
||||
</scm>
|
||||
|
||||
<description>Direct Index API using the SWORD protocol</description>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>dnet45-releases-snapshot</id>
|
||||
<name>D-Net 45 snapshot</name>
|
||||
<url>https://maven.d4science.org/nexus/content/repositories/dnet45-snapshots</url>
|
||||
<layout>default</layout>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>dnet45-releases</id>
|
||||
<name>D-Net 45 releases</name>
|
||||
<url>https://maven.d4science.org/nexus/content/repositories/dnet45-releases</url>
|
||||
<layout>default</layout>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
</repository>
|
||||
<repository>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
<id>cloudera</id>
|
||||
<name>Cloudera Repository</name>
|
||||
<url>https://repository.cloudera.com/artifactory/cloudera-repos</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>dnet-deps</id>
|
||||
<name>D-Net Dependencies</name>
|
||||
<url>https://maven.d4science.org/nexus/content/repositories/dnet-deps/</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
<layout>default</layout>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- Spring Modules -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-security</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-jdbc</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-cache</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Commons -->
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-pool2</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-junit-jupiter</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-cli</groupId>
|
||||
<artifactId>commons-cli</artifactId>
|
||||
<version>1.4</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
<version>1.9</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>2.10.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>dom4j</groupId>
|
||||
<artifactId>dom4j</artifactId>
|
||||
<version>1.6.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>xml-apis</groupId>
|
||||
<artifactId>xml-apis</artifactId>
|
||||
<version>1.4.01</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>jaxen</groupId>
|
||||
<artifactId>jaxen</artifactId>
|
||||
<version>1.1.6</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-model</artifactId>
|
||||
<version>3.8.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.vladmihalcea</groupId>
|
||||
<artifactId>hibernate-types-52</artifactId>
|
||||
<version>2.9.13</version>
|
||||
</dependency>
|
||||
|
||||
<!-- JAXB API, java.xml.bind module -->
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
<version>2.3.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- JAXB Runtime, com.sun.xml.bind module -->
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
<version>2.3.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Mail -->
|
||||
<dependency>
|
||||
<groupId>javax.mail</groupId>
|
||||
<artifactId>mail</artifactId>
|
||||
<version>1.4.7</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Swagger -->
|
||||
<dependency>
|
||||
<groupId>org.springdoc</groupId>
|
||||
<artifactId>springdoc-openapi-ui</artifactId>
|
||||
<version>1.6.10</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Hadoop -->
|
||||
<dependency>
|
||||
<groupId>org.apache.hadoop</groupId>
|
||||
<artifactId>hadoop-client</artifactId>
|
||||
<version>2.6.0-cdh5.9.2</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.hadoop</groupId>
|
||||
<artifactId>hadoop-aws</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!-- Bioschemas BMUSE -->
|
||||
<dependency>
|
||||
<groupId>hwu.elixir</groupId>
|
||||
<artifactId>bmuse-core</artifactId>
|
||||
<version>0.5.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.any23</groupId>
|
||||
<artifactId>apache-any23-core</artifactId>
|
||||
<version>2.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.rdf4j</groupId>
|
||||
<artifactId>rdf4j-rio-rdfxml</artifactId>
|
||||
<version>3.7.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.rdf4j</groupId>
|
||||
<artifactId>rdf4j-model</artifactId>
|
||||
<version>3.7.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jsoup</groupId>
|
||||
<artifactId>jsoup</artifactId>
|
||||
<version>1.13.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.seleniumhq.selenium</groupId>
|
||||
<artifactId>selenium-java</artifactId>
|
||||
<version>3.141.59</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-validator</groupId>
|
||||
<artifactId>commons-validator</artifactId>
|
||||
<version>1.6</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<build>
|
||||
<directory>target</directory>
|
||||
<outputDirectory>target/classes</outputDirectory>
|
||||
<finalName>${project.artifactId}-${project.version}</finalName>
|
||||
<testOutputDirectory>target/test-classes</testOutputDirectory>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||
<version>3.0.0</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-site-plugin</artifactId>
|
||||
<version>3.7.1</version>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${maven.compiler.plugin.version}</version>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<encoding>${project.build.sourceEncoding}</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>3.0.2</version>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<version>3.0.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-sources</id>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>jar-no-fork</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>3.0.0-M4</version>
|
||||
<configuration>
|
||||
<redirectTestOutputToFile>true</redirectTestOutputToFile>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>3.2.0</version>
|
||||
<configuration>
|
||||
<detectLinks>true</detectLinks>
|
||||
<doclint>none</doclint>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>3.0.0</version>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-site-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-release-plugin</artifactId>
|
||||
<version>2.5.3</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
||||
<extensions>
|
||||
<extension>
|
||||
<groupId>org.apache.maven.wagon</groupId>
|
||||
<artifactId>wagon-ssh</artifactId>
|
||||
<version>2.10</version>
|
||||
</extension>
|
||||
</extensions>
|
||||
</build>
|
||||
<distributionManagement>
|
||||
<snapshotRepository>
|
||||
<id>dnet45-snapshots</id>
|
||||
<name>DNet45 Snapshots</name>
|
||||
<url>https://maven.d4science.org/nexus/content/repositories/dnet45-snapshots</url>
|
||||
<layout>default</layout>
|
||||
</snapshotRepository>
|
||||
<repository>
|
||||
<id>dnet45-releases</id>
|
||||
<url>https://maven.d4science.org/nexus/content/repositories/dnet45-releases</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
<reporting>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<configuration>
|
||||
<detectLinks>true</detectLinks>
|
||||
<doclint>none</doclint>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</reporting>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<maven.compiler.plugin.version>3.6.0</maven.compiler.plugin.version>
|
||||
<java.version>17</java.version>
|
||||
<dhp-schemas-version>2.14.0</dhp-schemas-version>
|
||||
<apache.solr.version>7.1.0</apache.solr.version>
|
||||
<mongodb.driver.version>3.4.2</mongodb.driver.version>
|
||||
<prometheus.version>0.10.0</prometheus.version>
|
||||
<javamelody.version>1.71.0</javamelody.version>
|
||||
<maven.javadoc.failOnError>false</maven.javadoc.failOnError>
|
||||
<dockerfile-maven-version>1.3.6</dockerfile-maven-version>
|
||||
<bioschemas-commons-io-version>2.6</bioschemas-commons-io-version>
|
||||
</properties>
|
||||
</project>
|
|
@ -0,0 +1,13 @@
|
|||
package eu.dnetlib.app.directindex;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class DirectIndexApplication {
|
||||
|
||||
public static void main(final String[] args) {
|
||||
SpringApplication.run(DirectIndexApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
package eu.dnetlib.app.directindex.sword;
|
||||
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController("/api/directindex/file")
|
||||
public class SwordFileSetUrlController {
|
||||
|
||||
@PutMapping("/")
|
||||
public @ResponseBody Object replaceFileSet(
|
||||
@RequestHeader("Authorization") final String authorization,
|
||||
@RequestHeader("Content-Disposition") final String contentDisposition,
|
||||
@RequestHeader("Content-Length") final String contentLength,
|
||||
@RequestHeader("Content-Type") final String contentType,
|
||||
@RequestHeader("Digest") final String digest,
|
||||
@RequestHeader("If-Match") final boolean ifMatch,
|
||||
@RequestHeader("On-Behalf-Of") final String onBehalfOf,
|
||||
@RequestHeader(value = "Packaging", defaultValue = "http://purl.org/net/sword/3.0/package/Binary") final String packaging) {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
@DeleteMapping("/")
|
||||
public @ResponseBody Object deleteFileSet(
|
||||
@RequestHeader("Authorization") final String authorization,
|
||||
@RequestHeader("If-Match") final boolean ifMatch,
|
||||
@RequestHeader("On-Behalf-Of") final String onBehalfOf) {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
package eu.dnetlib.app.directindex.sword;
|
||||
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController("/api/directindex/files")
|
||||
public class SwordFileUrlController {
|
||||
|
||||
@GetMapping("/")
|
||||
public @ResponseBody Object getFile(
|
||||
@RequestHeader("Authorization") final String authorization,
|
||||
@RequestHeader("On-Behalf-Of") final String onBehalfOf) {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
@PutMapping("/")
|
||||
public @ResponseBody Object replaceFile(
|
||||
@RequestHeader("Authorization") final String authorization,
|
||||
@RequestHeader("Content-Disposition") final String contentDisposition,
|
||||
@RequestHeader("Content-Length") final String contentLength,
|
||||
@RequestHeader("Content-Type") final String contentType,
|
||||
@RequestHeader("Digest") final String digest,
|
||||
@RequestHeader("If-Match") final boolean ifMatch,
|
||||
@RequestHeader("On-Behalf-Of") final String onBehalfOf) {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
@DeleteMapping("/")
|
||||
public @ResponseBody Object deleteFile(
|
||||
@RequestHeader("Authorization") final String authorization,
|
||||
@RequestHeader("If-Match") final boolean ifMatch,
|
||||
@RequestHeader("On-Behalf-Of") final String onBehalfOf) {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
package eu.dnetlib.app.directindex.sword;
|
||||
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController("/api/directindex/metadata")
|
||||
public class SwordMetadataUrlController {
|
||||
|
||||
@GetMapping("/")
|
||||
public @ResponseBody Object getMetadata(
|
||||
@RequestHeader("Authorization") final String authorization,
|
||||
@RequestHeader("On-Behalf-Of") final String onBehalfOf) {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
@PutMapping("/")
|
||||
public @ResponseBody Object replaceMetadata(@RequestHeader("Authorization") final String authorization,
|
||||
@RequestHeader("Content-Disposition") final String contentDisposition,
|
||||
@RequestHeader("Content-Length") final String contentLength,
|
||||
@RequestHeader("Content-Type") final String contentType,
|
||||
@RequestHeader("Digest") final String digest,
|
||||
@RequestHeader("If-Match") final boolean ifMatch,
|
||||
@RequestHeader("On-Behalf-Of") final String onBehalfOf,
|
||||
@RequestHeader(value = "Metadata-Format", defaultValue = "http://purl.org/net/sword/3.0/types/Metadata") final String mdFormat) {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
@DeleteMapping("/")
|
||||
public @ResponseBody Object deleteMetadata(
|
||||
@RequestHeader("Authorization") final String authorization,
|
||||
@RequestHeader("If-Match") final boolean ifMatch,
|
||||
@RequestHeader("On-Behalf-Of") final String onBehalfOf) {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
package eu.dnetlib.app.directindex.sword;
|
||||
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController("/api/directindex/obj")
|
||||
public class SwordObjectUrlController {
|
||||
|
||||
@GetMapping("/")
|
||||
public @ResponseBody Object getObjectStatus(
|
||||
@RequestHeader("Authorization") final String authorization,
|
||||
@RequestHeader("On-Behalf-Of") final String onBehalfOf) {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
@PostMapping("/")
|
||||
public @ResponseBody Object appendObjectData(
|
||||
@RequestHeader("Authorization") final String authorization,
|
||||
@RequestHeader("Content-Disposition") final String contentDisposition,
|
||||
@RequestHeader("Content-Length") final String contentLength,
|
||||
@RequestHeader("Content-Type") final String contentType,
|
||||
@RequestHeader("Digest") final String digest,
|
||||
@RequestHeader("If-Match") final boolean ifMatch,
|
||||
@RequestHeader(value = "In-Progress", defaultValue = "false") final boolean inProgress,
|
||||
@RequestHeader("On-Behalf-Of") final String onBehalfOf,
|
||||
@RequestHeader(value = "Packaging", defaultValue = "http://purl.org/net/sword/3.0/package/Binary") final String packaging,
|
||||
@RequestHeader(value = "Metadata-Format", defaultValue = "http://purl.org/net/sword/3.0/types/Metadata") final String mdFormat) {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
@PutMapping("/")
|
||||
public @ResponseBody Object replaceObject(
|
||||
@RequestHeader("Authorization") final String authorization,
|
||||
@RequestHeader("Content-Disposition") final String contentDisposition,
|
||||
@RequestHeader("Content-Length") final String contentLength,
|
||||
@RequestHeader("Content-Type") final String contentType,
|
||||
@RequestHeader("Digest") final String digest,
|
||||
@RequestHeader("If-Match") final boolean ifMatch,
|
||||
@RequestHeader(value = "In-Progress", defaultValue = "false") final boolean inProgress,
|
||||
@RequestHeader("On-Behalf-Of") final String onBehalfOf,
|
||||
@RequestHeader(value = "Packaging", defaultValue = "http://purl.org/net/sword/3.0/package/Binary") final String packaging,
|
||||
@RequestHeader(value = "Metadata-Format", defaultValue = "http://purl.org/net/sword/3.0/types/Metadata") final String mdFormat) {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
@DeleteMapping("/")
|
||||
public @ResponseBody Object deleteObject(
|
||||
@RequestHeader("Authorization") final String authorization,
|
||||
@RequestHeader("If-Match") final boolean ifMatch,
|
||||
@RequestHeader("On-Behalf-Of") final String onBehalfOf) {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
package eu.dnetlib.app.directindex.sword;
|
||||
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController("/api/swordv3/XXXXXX")
|
||||
public class SwordServiceUrlController {
|
||||
|
||||
@GetMapping("/")
|
||||
public @ResponseBody Object getServiceDocument(
|
||||
@RequestHeader("Authorization") final String authorization,
|
||||
@RequestHeader("On-Behalf-Of") final String onBehalfOf) {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
@PostMapping("/")
|
||||
public @ResponseBody Object makeNewObject(
|
||||
@RequestHeader("Authorization") final String authorization,
|
||||
@RequestHeader("Content-Disposition") final String contentDisposition,
|
||||
@RequestHeader("Content-Length") final String contentLength,
|
||||
@RequestHeader("Content-Type") final String contentType,
|
||||
@RequestHeader("Digest") final String digest,
|
||||
@RequestHeader(value = "In-Progress", defaultValue = "false") final boolean inProgress,
|
||||
@RequestHeader(value = "Metadata-Format", defaultValue = "http://purl.org/net/sword/3.0/types/Metadata") final String mdFormat,
|
||||
@RequestHeader("On-Behalf-Of") final String onBehalfOf,
|
||||
@RequestHeader(value = "Packaging", defaultValue = "http://purl.org/net/sword/3.0/package/Binary") final String packaging,
|
||||
@RequestHeader("Slug") final String slug) {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
package eu.dnetlib.app.directindex.sword;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController("/api/directindex/staging")
|
||||
public class SwordTemporaryUrlController {
|
||||
|
||||
@Value("${dnet.directindex.baseurl}")
|
||||
public String baseUrl;
|
||||
|
||||
@PostMapping("/")
|
||||
// Create a Temporary-URL for Segmented File Upload
|
||||
public @ResponseBody Object createTempUrl(
|
||||
@RequestHeader("Authorization") final String authorization,
|
||||
@RequestHeader("Content-Disposition") final String contentDisposition,
|
||||
@RequestHeader("On-Behalf-Of") final String onBehalfOf) {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
@GetMapping("/{tempfile}")
|
||||
public @ResponseBody Object getUploadInfo(
|
||||
@RequestHeader("Authorization") final String authorization,
|
||||
@RequestHeader("On-Behalf-Of") final String onBehalfOf,
|
||||
@PathVariable final String tempfile) {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
@PostMapping("/{tempfile}")
|
||||
public @ResponseBody Object uploadSegment(
|
||||
@RequestHeader("Authorization") final String authorization,
|
||||
@RequestHeader("Content-Disposition") final String contentDisposition,
|
||||
@RequestHeader("Content-Length") final String contentLength,
|
||||
@RequestHeader("Digest") final String digest,
|
||||
@RequestHeader("On-Behalf-Of") final String onBehalfOf,
|
||||
@PathVariable final String tempfile) {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
@DeleteMapping("/{tempfile}")
|
||||
public @ResponseBody Object abortUplodad(
|
||||
@RequestHeader("Authorization") final String authorization,
|
||||
@RequestHeader("On-Behalf-Of") final String onBehalfOf,
|
||||
@PathVariable final String tempfile) {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
dnet.directindex.baseurl = http://localhost:8280
|
Loading…
Reference in New Issue