diff --git a/measurement-provider/pom.xml b/measurement-provider/pom.xml
index 7a6f20a..9d5a28b 100644
--- a/measurement-provider/pom.xml
+++ b/measurement-provider/pom.xml
@@ -5,7 +5,7 @@
4.0.0
life.qbic
- data-access-server
+ data-download-server
1.0-SNAPSHOT
@@ -27,7 +27,7 @@
- ${project.groupId}.data_access.measurement.provider
+ ${project.groupId}.data_download.measurement.provider
diff --git a/measurement-provider/src/main/java/life/qbic/data_access/measurements/api/FileInfo.java b/measurement-provider/src/main/java/life/qbic/data_access/measurements/api/FileInfo.java
deleted file mode 100644
index e7a71a1..0000000
--- a/measurement-provider/src/main/java/life/qbic/data_access/measurements/api/FileInfo.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package life.qbic.data_access.measurements.api;
-
-/**
- * TODO!
- * short description
- *
- *
detailed description
- *
- * @since
- */
-public record FileInfo(String path, long length, long crc32, long registrationMillis, long lastModifiedMillis) {
-
-}
diff --git a/measurement-provider/src/main/java/life/qbic/data_access/measurements/api/Measurement.java b/measurement-provider/src/main/java/life/qbic/data_access/measurements/api/Measurement.java
deleted file mode 100644
index 296a1dc..0000000
--- a/measurement-provider/src/main/java/life/qbic/data_access/measurements/api/Measurement.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package life.qbic.data_access.measurements.api;
-
-/**
- * TODO!
- * short description
- *
- * detailed description
- *
- * @since
- */
-public record Measurement(MeasurementId id, MeasurementInfo info, MeasurementData data) {
-
-}
diff --git a/measurement-provider/src/main/java/life/qbic/data_access/measurements/api/MeasurementData.java b/measurement-provider/src/main/java/life/qbic/data_access/measurements/api/MeasurementData.java
deleted file mode 100644
index 4725336..0000000
--- a/measurement-provider/src/main/java/life/qbic/data_access/measurements/api/MeasurementData.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package life.qbic.data_access.measurements.api;
-
-import java.io.InputStream;
-
-/**
- * TODO!
- * short description
- *
- * detailed description
- *
- * @since
- */
-public interface MeasurementData {
- InputStream stream();
-}
diff --git a/measurement-provider/src/main/java/life/qbic/data_access/measurements/api/MeasurementDataProvider.java b/measurement-provider/src/main/java/life/qbic/data_access/measurements/api/MeasurementDataProvider.java
deleted file mode 100644
index 2ca882b..0000000
--- a/measurement-provider/src/main/java/life/qbic/data_access/measurements/api/MeasurementDataProvider.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package life.qbic.data_access.measurements.api;
-
-/**
- * TODO!
- * short description
- *
- * detailed description
- *
- * @since
- */
-public interface MeasurementDataProvider {
-
- MeasurementData loadData(MeasurementId measurementId);
-
-}
diff --git a/measurement-provider/src/main/java/life/qbic/data_access/measurements/api/MeasurementInfo.java b/measurement-provider/src/main/java/life/qbic/data_access/measurements/api/MeasurementInfo.java
deleted file mode 100644
index 163a8e5..0000000
--- a/measurement-provider/src/main/java/life/qbic/data_access/measurements/api/MeasurementInfo.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package life.qbic.data_access.measurements.api;
-
-/**
- * TODO!
- * short description
- *
- * detailed description
- *
- * @since
- */
-public record MeasurementInfo(long size, int fileCount) {
-
-}
diff --git a/measurement-provider/src/main/java/life/qbic/data_access/measurements/api/DataFile.java b/measurement-provider/src/main/java/life/qbic/data_download/measurements/api/DataFile.java
similarity index 89%
rename from measurement-provider/src/main/java/life/qbic/data_access/measurements/api/DataFile.java
rename to measurement-provider/src/main/java/life/qbic/data_download/measurements/api/DataFile.java
index 523a8b4..f81a0d9 100644
--- a/measurement-provider/src/main/java/life/qbic/data_access/measurements/api/DataFile.java
+++ b/measurement-provider/src/main/java/life/qbic/data_download/measurements/api/DataFile.java
@@ -1,4 +1,4 @@
-package life.qbic.data_access.measurements.api;
+package life.qbic.data_download.measurements.api;
import static java.util.Objects.requireNonNull;
@@ -7,12 +7,7 @@
import java.util.StringJoiner;
/**
- * TODO!
- * short description
- *
- * detailed description
- *
- * @since
+ * A file with data
*/
public class DataFile {
diff --git a/measurement-provider/src/main/java/life/qbic/data_download/measurements/api/FileInfo.java b/measurement-provider/src/main/java/life/qbic/data_download/measurements/api/FileInfo.java
new file mode 100644
index 0000000..3400627
--- /dev/null
+++ b/measurement-provider/src/main/java/life/qbic/data_download/measurements/api/FileInfo.java
@@ -0,0 +1,8 @@
+package life.qbic.data_download.measurements.api;
+
+/**
+ * Information about a file
+ */
+public record FileInfo(String path, long length, long crc32, long registrationMillis, long lastModifiedMillis) {
+
+}
diff --git a/measurement-provider/src/main/java/life/qbic/data_download/measurements/api/Measurement.java b/measurement-provider/src/main/java/life/qbic/data_download/measurements/api/Measurement.java
new file mode 100644
index 0000000..7d7e357
--- /dev/null
+++ b/measurement-provider/src/main/java/life/qbic/data_download/measurements/api/Measurement.java
@@ -0,0 +1,8 @@
+package life.qbic.data_download.measurements.api;
+
+/**
+ * A measurement
+ */
+public record Measurement(MeasurementId id, MeasurementInfo info, MeasurementData data) {
+
+}
diff --git a/measurement-provider/src/main/java/life/qbic/data_download/measurements/api/MeasurementData.java b/measurement-provider/src/main/java/life/qbic/data_download/measurements/api/MeasurementData.java
new file mode 100644
index 0000000..85b5edc
--- /dev/null
+++ b/measurement-provider/src/main/java/life/qbic/data_download/measurements/api/MeasurementData.java
@@ -0,0 +1,10 @@
+package life.qbic.data_download.measurements.api;
+
+import java.io.InputStream;
+
+/**
+ * Measurement data
+ */
+public interface MeasurementData {
+ InputStream stream();
+}
diff --git a/measurement-provider/src/main/java/life/qbic/data_download/measurements/api/MeasurementDataProvider.java b/measurement-provider/src/main/java/life/qbic/data_download/measurements/api/MeasurementDataProvider.java
new file mode 100644
index 0000000..25ffcde
--- /dev/null
+++ b/measurement-provider/src/main/java/life/qbic/data_download/measurements/api/MeasurementDataProvider.java
@@ -0,0 +1,10 @@
+package life.qbic.data_download.measurements.api;
+
+/**
+ * Provides measurement data given a measurement
+ */
+public interface MeasurementDataProvider {
+
+ MeasurementData loadData(MeasurementId measurementId);
+
+}
diff --git a/measurement-provider/src/main/java/life/qbic/data_access/measurements/api/MeasurementDataReader.java b/measurement-provider/src/main/java/life/qbic/data_download/measurements/api/MeasurementDataReader.java
similarity index 66%
rename from measurement-provider/src/main/java/life/qbic/data_access/measurements/api/MeasurementDataReader.java
rename to measurement-provider/src/main/java/life/qbic/data_download/measurements/api/MeasurementDataReader.java
index b7a2d08..a671b49 100644
--- a/measurement-provider/src/main/java/life/qbic/data_access/measurements/api/MeasurementDataReader.java
+++ b/measurement-provider/src/main/java/life/qbic/data_download/measurements/api/MeasurementDataReader.java
@@ -1,14 +1,9 @@
-package life.qbic.data_access.measurements.api;
+package life.qbic.data_download.measurements.api;
import java.io.InputStream;
/**
- * TODO!
- * short description
- *
- * detailed description
- *
- * @since
+ * Reads measurement data
*/
public interface MeasurementDataReader extends AutoCloseable {
diff --git a/measurement-provider/src/main/java/life/qbic/data_access/measurements/api/MeasurementFinder.java b/measurement-provider/src/main/java/life/qbic/data_download/measurements/api/MeasurementFinder.java
similarity index 65%
rename from measurement-provider/src/main/java/life/qbic/data_access/measurements/api/MeasurementFinder.java
rename to measurement-provider/src/main/java/life/qbic/data_download/measurements/api/MeasurementFinder.java
index be61f73..db8214e 100644
--- a/measurement-provider/src/main/java/life/qbic/data_access/measurements/api/MeasurementFinder.java
+++ b/measurement-provider/src/main/java/life/qbic/data_download/measurements/api/MeasurementFinder.java
@@ -1,4 +1,4 @@
-package life.qbic.data_access.measurements.api;
+package life.qbic.data_download.measurements.api;
public interface MeasurementFinder {
MeasurementInfo findById(MeasurementId measurementId);
diff --git a/measurement-provider/src/main/java/life/qbic/data_access/measurements/api/MeasurementId.java b/measurement-provider/src/main/java/life/qbic/data_download/measurements/api/MeasurementId.java
similarity index 61%
rename from measurement-provider/src/main/java/life/qbic/data_access/measurements/api/MeasurementId.java
rename to measurement-provider/src/main/java/life/qbic/data_download/measurements/api/MeasurementId.java
index 775f72d..e0b2bc7 100644
--- a/measurement-provider/src/main/java/life/qbic/data_access/measurements/api/MeasurementId.java
+++ b/measurement-provider/src/main/java/life/qbic/data_download/measurements/api/MeasurementId.java
@@ -1,4 +1,4 @@
-package life.qbic.data_access.measurements.api;
+package life.qbic.data_download.measurements.api;
/**
* The ID of a measurement.
diff --git a/measurement-provider/src/main/java/life/qbic/data_download/measurements/api/MeasurementInfo.java b/measurement-provider/src/main/java/life/qbic/data_download/measurements/api/MeasurementInfo.java
new file mode 100644
index 0000000..8a03d2e
--- /dev/null
+++ b/measurement-provider/src/main/java/life/qbic/data_download/measurements/api/MeasurementInfo.java
@@ -0,0 +1,8 @@
+package life.qbic.data_download.measurements.api;
+
+/**
+ * Information about a measurement
+ */
+public record MeasurementInfo(long size, int fileCount) {
+
+}
diff --git a/measurement-provider/src/main/java/module-info.java b/measurement-provider/src/main/java/module-info.java
index 102a7b2..7544b5f 100644
--- a/measurement-provider/src/main/java/module-info.java
+++ b/measurement-provider/src/main/java/module-info.java
@@ -1,3 +1,3 @@
-module life.qbic.data_access.measurements {
- exports life.qbic.data_access.measurements.api;
+module life.qbic.data_download.measurements {
+ exports life.qbic.data_download.measurements.api;
}
diff --git a/openbis-connector/pom.xml b/openbis-connector/pom.xml
index 2a144bb..896c012 100644
--- a/openbis-connector/pom.xml
+++ b/openbis-connector/pom.xml
@@ -8,7 +8,7 @@
life.qbic
- data-access-server
+ data-download-server
1.0-SNAPSHOT
@@ -87,7 +87,7 @@
- ${project.groupId}.data_access.openbis.connector
+ ${project.groupId}.data_download.openbis.connector
diff --git a/openbis-connector/src/main/java/deactivated.module-info.java b/openbis-connector/src/main/java/deactivated.module-info.java
index 60e1c3e..f08b225 100644
--- a/openbis-connector/src/main/java/deactivated.module-info.java
+++ b/openbis-connector/src/main/java/deactivated.module-info.java
@@ -1,5 +1,5 @@
-//import life.qbic.data_access.measurements.api.MeasurementDataReader;
-//import life.qbic.data_access.openbis.DatasetFileStreamReaderImpl;
+//import life.qbic.data_download.measurements.api.MeasurementDataReader;
+//import life.qbic.data_download.openbis.DatasetFileStreamReaderImpl;
//
///**
// * TODO!
@@ -9,8 +9,8 @@
// *
// * @since
// */
-//module life.qbic.data_access.openbis {
-// requires life.qbic.data_access.measurements;
+//module life.qbic.data_download.openbis {
+// requires life.qbic.data_download.measurements;
// requires spring.context;
// requires spring.beans;
// requires org.slf4j;
diff --git a/openbis-connector/src/main/java/life/qbic/data_access/openbis/ApiV3.java b/openbis-connector/src/main/java/life/qbic/data_download/openbis/ApiV3.java
similarity index 82%
rename from openbis-connector/src/main/java/life/qbic/data_access/openbis/ApiV3.java
rename to openbis-connector/src/main/java/life/qbic/data_download/openbis/ApiV3.java
index 807ac14..cb764dc 100644
--- a/openbis-connector/src/main/java/life/qbic/data_access/openbis/ApiV3.java
+++ b/openbis-connector/src/main/java/life/qbic/data_download/openbis/ApiV3.java
@@ -1,19 +1,17 @@
-package life.qbic.data_access.openbis;
+package life.qbic.data_download.openbis;
import ch.ethz.sis.openbis.generic.asapi.v3.IApplicationServerApi;
import ch.ethz.sis.openbis.generic.dssapi.v3.IDataStoreServerApi;
import ch.systemsx.cisd.common.spring.HttpInvokerUtils;
/**
- * TODO!
- * short description
- *
- * detailed description
- *
- * @since
+ * A provider for openbis apis v3
*/
public class ApiV3 {
+ private ApiV3() {
+ //hide the implicit constructor
+ }
public static IApplicationServerApi applicationServer(String url) {
return HttpInvokerUtils.createServiceStub(IApplicationServerApi.class, url + IApplicationServerApi.SERVICE_URL, 100_000L);
}
diff --git a/openbis-connector/src/main/java/life/qbic/data_access/openbis/DatasetFileStreamReaderImpl.java b/openbis-connector/src/main/java/life/qbic/data_download/openbis/DatasetFileStreamReaderImpl.java
similarity index 88%
rename from openbis-connector/src/main/java/life/qbic/data_access/openbis/DatasetFileStreamReaderImpl.java
rename to openbis-connector/src/main/java/life/qbic/data_download/openbis/DatasetFileStreamReaderImpl.java
index 24adb25..0e96426 100644
--- a/openbis-connector/src/main/java/life/qbic/data_access/openbis/DatasetFileStreamReaderImpl.java
+++ b/openbis-connector/src/main/java/life/qbic/data_download/openbis/DatasetFileStreamReaderImpl.java
@@ -1,4 +1,4 @@
-package life.qbic.data_access.openbis;
+package life.qbic.data_download.openbis;
import static java.util.Objects.nonNull;
@@ -6,17 +6,12 @@
import ch.ethz.sis.openbis.generic.dssapi.v3.dto.datasetfile.download.DataSetFileDownload;
import ch.ethz.sis.openbis.generic.dssapi.v3.dto.datasetfile.download.DataSetFileDownloadReader;
import java.io.InputStream;
-import life.qbic.data_access.measurements.api.DataFile;
-import life.qbic.data_access.measurements.api.FileInfo;
-import life.qbic.data_access.measurements.api.MeasurementDataReader;
+import life.qbic.data_download.measurements.api.DataFile;
+import life.qbic.data_download.measurements.api.FileInfo;
+import life.qbic.data_download.measurements.api.MeasurementDataReader;
/**
- * TODO!
- * short description
- *
- * detailed description
- *
- * @since
+ * Reads openbis data streams
*/
public class DatasetFileStreamReaderImpl implements MeasurementDataReader {
diff --git a/openbis-connector/src/main/java/life/qbic/data_access/openbis/OpenBisConnector.java b/openbis-connector/src/main/java/life/qbic/data_download/openbis/OpenBisConnector.java
similarity index 91%
rename from openbis-connector/src/main/java/life/qbic/data_access/openbis/OpenBisConnector.java
rename to openbis-connector/src/main/java/life/qbic/data_download/openbis/OpenBisConnector.java
index 1ba25de..eec0cca 100644
--- a/openbis-connector/src/main/java/life/qbic/data_access/openbis/OpenBisConnector.java
+++ b/openbis-connector/src/main/java/life/qbic/data_download/openbis/OpenBisConnector.java
@@ -1,4 +1,4 @@
-package life.qbic.data_access.openbis;
+package life.qbic.data_download.openbis;
import static java.util.Objects.requireNonNull;
import static java.util.function.Predicate.not;
@@ -20,23 +20,18 @@
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
-import life.qbic.data_access.measurements.api.MeasurementData;
-import life.qbic.data_access.measurements.api.MeasurementDataProvider;
-import life.qbic.data_access.measurements.api.MeasurementFinder;
-import life.qbic.data_access.measurements.api.MeasurementId;
-import life.qbic.data_access.measurements.api.MeasurementInfo;
-import life.qbic.data_access.openbis.SessionFactory.OpenBisSession;
+import life.qbic.data_download.measurements.api.MeasurementData;
+import life.qbic.data_download.measurements.api.MeasurementDataProvider;
+import life.qbic.data_download.measurements.api.MeasurementFinder;
+import life.qbic.data_download.measurements.api.MeasurementId;
+import life.qbic.data_download.measurements.api.MeasurementInfo;
+import life.qbic.data_download.openbis.SessionFactory.OpenBisSession;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
/**
- * TODO!
- * short description
- *
- * detailed description
- *
- * @since
+ * A connector to the openBIS system.
*/
@Component("openbisConnector")
public class OpenBisConnector implements MeasurementFinder, MeasurementDataProvider {
diff --git a/openbis-connector/src/main/java/life/qbic/data_access/openbis/SessionFactory.java b/openbis-connector/src/main/java/life/qbic/data_download/openbis/SessionFactory.java
similarity index 96%
rename from openbis-connector/src/main/java/life/qbic/data_access/openbis/SessionFactory.java
rename to openbis-connector/src/main/java/life/qbic/data_download/openbis/SessionFactory.java
index f8e9721..4da90ee 100644
--- a/openbis-connector/src/main/java/life/qbic/data_access/openbis/SessionFactory.java
+++ b/openbis-connector/src/main/java/life/qbic/data_download/openbis/SessionFactory.java
@@ -1,4 +1,4 @@
-package life.qbic.data_access.openbis;
+package life.qbic.data_download.openbis;
import static java.util.Objects.requireNonNull;
import static org.slf4j.LoggerFactory.getLogger;
@@ -10,12 +10,7 @@
import org.springframework.stereotype.Service;
/**
- * TODO!
- * short description
- *
- * detailed description
- *
- * @since
+ * Creates openbis sessions
*/
@Service("openbisSessionFactory")
public class SessionFactory {
diff --git a/openbis-connector/src/main/java/life/qbic/data_access/openbis/UnspecificMeasurementData.java b/openbis-connector/src/main/java/life/qbic/data_download/openbis/UnspecificMeasurementData.java
similarity index 68%
rename from openbis-connector/src/main/java/life/qbic/data_access/openbis/UnspecificMeasurementData.java
rename to openbis-connector/src/main/java/life/qbic/data_download/openbis/UnspecificMeasurementData.java
index 4628034..fc39ae2 100644
--- a/openbis-connector/src/main/java/life/qbic/data_access/openbis/UnspecificMeasurementData.java
+++ b/openbis-connector/src/main/java/life/qbic/data_download/openbis/UnspecificMeasurementData.java
@@ -1,15 +1,11 @@
-package life.qbic.data_access.openbis;
+package life.qbic.data_download.openbis;
import java.io.InputStream;
-import life.qbic.data_access.measurements.api.MeasurementData;
+import life.qbic.data_download.measurements.api.MeasurementData;
/**
- * TODO!
- * short description
- *
- * detailed description
- *
- * @since
+ * A default implementation of {@link MeasurementData}. No specific type of measurement but can be
+ * streamed.
*/
public class UnspecificMeasurementData implements MeasurementData {
diff --git a/openbis-connector/src/test/java/life/qbic/data_access/openbis/DatasetFileStreamReaderImplTest.java b/openbis-connector/src/test/java/life/qbic/data_download/openbis/DatasetFileStreamReaderImplTest.java
similarity index 90%
rename from openbis-connector/src/test/java/life/qbic/data_access/openbis/DatasetFileStreamReaderImplTest.java
rename to openbis-connector/src/test/java/life/qbic/data_download/openbis/DatasetFileStreamReaderImplTest.java
index 5781be7..b7548d0 100644
--- a/openbis-connector/src/test/java/life/qbic/data_access/openbis/DatasetFileStreamReaderImplTest.java
+++ b/openbis-connector/src/test/java/life/qbic/data_download/openbis/DatasetFileStreamReaderImplTest.java
@@ -1,4 +1,4 @@
-package life.qbic.data_access.openbis;
+package life.qbic.data_download.openbis;
import static org.junit.jupiter.api.Assertions.*;
diff --git a/pom.xml b/pom.xml
index d76a0e9..6737b8e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
4.0.0
life.qbic
- data-access-server
+ data-download-server
1.0-SNAPSHOT
pom
diff --git a/rest-api/src/main/java/deactivated.module-info.java b/rest-api/src/main/java/deactivated.module-info.java
index 1112c96..4da1764 100644
--- a/rest-api/src/main/java/deactivated.module-info.java
+++ b/rest-api/src/main/java/deactivated.module-info.java
@@ -1,7 +1,7 @@
/*
* as long as not all dependencies are modularized, this needs to open itself to the unnamed package.
*/
-//module life.qbic.data_access.rest {
+//module life.qbic.data_download.rest {
// requires spring.boot;
// requires spring.boot.autoconfigure;
// requires spring.web;
diff --git a/rest-api/src/main/java/life/qbic/data_access/rest/AppConfig.java b/rest-api/src/main/java/life/qbic/data_download/rest/AppConfig.java
similarity index 77%
rename from rest-api/src/main/java/life/qbic/data_access/rest/AppConfig.java
rename to rest-api/src/main/java/life/qbic/data_download/rest/AppConfig.java
index 874e796..0fc7405 100644
--- a/rest-api/src/main/java/life/qbic/data_access/rest/AppConfig.java
+++ b/rest-api/src/main/java/life/qbic/data_download/rest/AppConfig.java
@@ -1,12 +1,10 @@
-package life.qbic.data_access.rest;
+package life.qbic.data_download.rest;
import java.util.List;
-import java.util.ServiceLoader;
-import life.qbic.data_access.measurements.api.MeasurementDataReader;
-import life.qbic.data_access.openbis.DatasetFileStreamReaderImpl;
-import life.qbic.data_access.openbis.OpenBisConnector;
-import life.qbic.data_access.openbis.SessionFactory;
-import org.aspectj.internal.lang.reflect.InterTypeMethodDeclarationImpl;
+import life.qbic.data_download.measurements.api.MeasurementDataReader;
+import life.qbic.data_download.openbis.DatasetFileStreamReaderImpl;
+import life.qbic.data_download.openbis.OpenBisConnector;
+import life.qbic.data_download.openbis.SessionFactory;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.MessageSource;
@@ -15,12 +13,7 @@
import org.springframework.context.support.ReloadableResourceBundleMessageSource;
/**
- * TODO!
- * short description
- *
- * detailed description
- *
- * @since
+ * Configuration for application dependencies
*/
@Configuration
public class AppConfig {
diff --git a/rest-api/src/main/java/life/qbic/data_access/rest/DataAccessRestServer.java b/rest-api/src/main/java/life/qbic/data_download/rest/DataDownloadRestServer.java
similarity index 54%
rename from rest-api/src/main/java/life/qbic/data_access/rest/DataAccessRestServer.java
rename to rest-api/src/main/java/life/qbic/data_download/rest/DataDownloadRestServer.java
index f52a1cd..51f0e6b 100644
--- a/rest-api/src/main/java/life/qbic/data_access/rest/DataAccessRestServer.java
+++ b/rest-api/src/main/java/life/qbic/data_download/rest/DataDownloadRestServer.java
@@ -1,16 +1,15 @@
-package life.qbic.data_access.rest;
+package life.qbic.data_download.rest;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
- * TODO!
- * The application class
+ * The download server
*/
@SpringBootApplication
-public class DataAccessRestServer {
+public class DataDownloadRestServer {
public static void main(String[] args) {
- SpringApplication.run(DataAccessRestServer.class, args);
+ SpringApplication.run(DataDownloadRestServer.class, args);
}
}
diff --git a/rest-api/src/main/java/life/qbic/data_access/rest/download/DownloadController.java b/rest-api/src/main/java/life/qbic/data_download/rest/download/DownloadController.java
similarity index 81%
rename from rest-api/src/main/java/life/qbic/data_access/rest/download/DownloadController.java
rename to rest-api/src/main/java/life/qbic/data_download/rest/download/DownloadController.java
index c9e6040..dd454b5 100644
--- a/rest-api/src/main/java/life/qbic/data_access/rest/download/DownloadController.java
+++ b/rest-api/src/main/java/life/qbic/data_download/rest/download/DownloadController.java
@@ -1,4 +1,4 @@
-package life.qbic.data_access.rest.download;
+package life.qbic.data_download.rest.download;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
@@ -11,24 +11,19 @@
import java.io.OutputStream;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
-import java.util.Locale;
-import life.qbic.data_access.measurements.api.DataFile;
-import life.qbic.data_access.measurements.api.MeasurementData;
-import life.qbic.data_access.measurements.api.MeasurementDataProvider;
-import life.qbic.data_access.measurements.api.MeasurementDataReader;
-import life.qbic.data_access.measurements.api.MeasurementFinder;
-import life.qbic.data_access.measurements.api.MeasurementId;
+import life.qbic.data_download.measurements.api.DataFile;
+import life.qbic.data_download.measurements.api.MeasurementData;
+import life.qbic.data_download.measurements.api.MeasurementDataProvider;
+import life.qbic.data_download.measurements.api.MeasurementDataReader;
+import life.qbic.data_download.measurements.api.MeasurementId;
-import life.qbic.data_access.measurements.api.MeasurementInfo;
-import life.qbic.data_access.rest.exceptions.GlobalException;
-import life.qbic.data_access.rest.exceptions.GlobalException.ErrorCode;
-import life.qbic.data_access.rest.exceptions.GlobalException.ErrorParameters;
-import life.qbic.data_access.rest.exceptions.MeasurementNotFoundException;
-import life.qbic.data_access.util.zip.api.FileInfo;
-import life.qbic.data_access.util.zip.api.FileTimes;
-import life.qbic.data_access.util.zip.manipulation.BufferedZippingFunctions;
+import life.qbic.data_download.rest.exceptions.GlobalException;
+import life.qbic.data_download.rest.exceptions.GlobalException.ErrorCode;
+import life.qbic.data_download.rest.exceptions.GlobalException.ErrorParameters;
+import life.qbic.data_download.util.zip.api.FileInfo;
+import life.qbic.data_download.util.zip.api.FileTimes;
+import life.qbic.data_download.util.zip.manipulation.BufferedZippingFunctions;
import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
diff --git a/rest-api/src/main/java/life/qbic/data_access/rest/exceptions/ErrorMessageTranslationService.java b/rest-api/src/main/java/life/qbic/data_download/rest/exceptions/ErrorMessageTranslationService.java
similarity index 91%
rename from rest-api/src/main/java/life/qbic/data_access/rest/exceptions/ErrorMessageTranslationService.java
rename to rest-api/src/main/java/life/qbic/data_download/rest/exceptions/ErrorMessageTranslationService.java
index 0bc4c08..0c47aab 100644
--- a/rest-api/src/main/java/life/qbic/data_access/rest/exceptions/ErrorMessageTranslationService.java
+++ b/rest-api/src/main/java/life/qbic/data_download/rest/exceptions/ErrorMessageTranslationService.java
@@ -1,10 +1,9 @@
-package life.qbic.data_access.rest.exceptions;
+package life.qbic.data_download.rest.exceptions;
import java.util.Locale;
import java.util.Optional;
-import life.qbic.data_access.rest.exceptions.GlobalException.ErrorCode;
-import life.qbic.data_access.rest.exceptions.GlobalException.ErrorParameters;
-import org.springframework.beans.factory.annotation.Autowired;
+import life.qbic.data_download.rest.exceptions.GlobalException.ErrorCode;
+import life.qbic.data_download.rest.exceptions.GlobalException.ErrorParameters;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.MessageSource;
import org.springframework.stereotype.Service;
diff --git a/rest-api/src/main/java/life/qbic/data_access/rest/exceptions/GlobalException.java b/rest-api/src/main/java/life/qbic/data_download/rest/exceptions/GlobalException.java
similarity index 99%
rename from rest-api/src/main/java/life/qbic/data_access/rest/exceptions/GlobalException.java
rename to rest-api/src/main/java/life/qbic/data_download/rest/exceptions/GlobalException.java
index 0f552e8..5b98db0 100644
--- a/rest-api/src/main/java/life/qbic/data_access/rest/exceptions/GlobalException.java
+++ b/rest-api/src/main/java/life/qbic/data_download/rest/exceptions/GlobalException.java
@@ -1,4 +1,4 @@
-package life.qbic.data_access.rest.exceptions;
+package life.qbic.data_download.rest.exceptions;
import java.util.Arrays;
import java.util.StringJoiner;
diff --git a/rest-api/src/main/java/life/qbic/data_access/rest/exceptions/GlobalExceptionHandler.java b/rest-api/src/main/java/life/qbic/data_download/rest/exceptions/GlobalExceptionHandler.java
similarity index 84%
rename from rest-api/src/main/java/life/qbic/data_access/rest/exceptions/GlobalExceptionHandler.java
rename to rest-api/src/main/java/life/qbic/data_download/rest/exceptions/GlobalExceptionHandler.java
index ab5eaa5..35b5435 100644
--- a/rest-api/src/main/java/life/qbic/data_access/rest/exceptions/GlobalExceptionHandler.java
+++ b/rest-api/src/main/java/life/qbic/data_download/rest/exceptions/GlobalExceptionHandler.java
@@ -1,8 +1,8 @@
-package life.qbic.data_access.rest.exceptions;
+package life.qbic.data_download.rest.exceptions;
import static org.slf4j.LoggerFactory.getLogger;
-import life.qbic.data_access.rest.exceptions.ErrorMessageTranslationService.UserFriendlyErrorMessage;
+import life.qbic.data_download.rest.exceptions.ErrorMessageTranslationService.UserFriendlyErrorMessage;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
@@ -13,12 +13,8 @@
import org.springframework.web.bind.annotation.ExceptionHandler;
/**
- * TODO!
- * short description
- *
- * detailed description
- *
- * @since
+ * The global exception handler. This exception handler takes effect after authentication and
+ * authorization of a user. It catches all exceptions thrown in a controller.
*/
@ControllerAdvice
public class GlobalExceptionHandler {
diff --git a/rest-api/src/main/java/life/qbic/data_access/rest/exceptions/MeasurementNotFoundException.java b/rest-api/src/main/java/life/qbic/data_download/rest/exceptions/MeasurementNotFoundException.java
similarity index 80%
rename from rest-api/src/main/java/life/qbic/data_access/rest/exceptions/MeasurementNotFoundException.java
rename to rest-api/src/main/java/life/qbic/data_download/rest/exceptions/MeasurementNotFoundException.java
index cf88369..13d44c2 100644
--- a/rest-api/src/main/java/life/qbic/data_access/rest/exceptions/MeasurementNotFoundException.java
+++ b/rest-api/src/main/java/life/qbic/data_download/rest/exceptions/MeasurementNotFoundException.java
@@ -1,12 +1,7 @@
-package life.qbic.data_access.rest.exceptions;
+package life.qbic.data_download.rest.exceptions;
/**
- * TODO!
- * short description
- *
- * detailed description
- *
- * @since
+ * Thrown when a measurement was not found
*/
public class MeasurementNotFoundException extends RuntimeException {
diff --git a/zip/pom.xml b/zip/pom.xml
index 7c6c0f3..0646ee7 100644
--- a/zip/pom.xml
+++ b/zip/pom.xml
@@ -5,7 +5,7 @@
4.0.0
life.qbic
- data-access-server
+ data-download-server
1.0-SNAPSHOT
@@ -28,7 +28,7 @@
- ${project.groupId}.data_access.zip
+ ${project.groupId}.data_download.zip
diff --git a/zip/src/main/java/life/qbic/data_access/util/zip/api/FileInfo.java b/zip/src/main/java/life/qbic/data_download/util/zip/api/FileInfo.java
similarity index 81%
rename from zip/src/main/java/life/qbic/data_access/util/zip/api/FileInfo.java
rename to zip/src/main/java/life/qbic/data_download/util/zip/api/FileInfo.java
index e39756b..d10e087 100644
--- a/zip/src/main/java/life/qbic/data_access/util/zip/api/FileInfo.java
+++ b/zip/src/main/java/life/qbic/data_download/util/zip/api/FileInfo.java
@@ -1,11 +1,8 @@
-package life.qbic.data_access.util.zip.api;
+package life.qbic.data_download.util.zip.api;
import static java.util.Objects.isNull;
import static java.util.Objects.requireNonNull;
-import java.nio.file.attribute.FileTime;
-import java.util.Optional;
-
/**
* Information about a file
*/
diff --git a/zip/src/main/java/life/qbic/data_access/util/zip/api/FileTimes.java b/zip/src/main/java/life/qbic/data_download/util/zip/api/FileTimes.java
similarity index 94%
rename from zip/src/main/java/life/qbic/data_access/util/zip/api/FileTimes.java
rename to zip/src/main/java/life/qbic/data_download/util/zip/api/FileTimes.java
index 3ba465f..93fea04 100644
--- a/zip/src/main/java/life/qbic/data_access/util/zip/api/FileTimes.java
+++ b/zip/src/main/java/life/qbic/data_download/util/zip/api/FileTimes.java
@@ -1,4 +1,4 @@
-package life.qbic.data_access.util.zip.api;
+package life.qbic.data_download.util.zip.api;
import java.nio.file.attribute.FileTime;
import java.util.Optional;
diff --git a/zip/src/main/java/life/qbic/data_access/util/zip/manipulation/BufferedZippingFunctions.java b/zip/src/main/java/life/qbic/data_download/util/zip/manipulation/BufferedZippingFunctions.java
similarity index 95%
rename from zip/src/main/java/life/qbic/data_access/util/zip/manipulation/BufferedZippingFunctions.java
rename to zip/src/main/java/life/qbic/data_download/util/zip/manipulation/BufferedZippingFunctions.java
index 80e2b2e..db58838 100644
--- a/zip/src/main/java/life/qbic/data_access/util/zip/manipulation/BufferedZippingFunctions.java
+++ b/zip/src/main/java/life/qbic/data_download/util/zip/manipulation/BufferedZippingFunctions.java
@@ -1,4 +1,4 @@
-package life.qbic.data_access.util.zip.manipulation;
+package life.qbic.data_download.util.zip.manipulation;
import static java.util.Objects.isNull;
import static java.util.Objects.requireNonNull;
@@ -8,7 +8,7 @@
import java.io.OutputStream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
-import life.qbic.data_access.util.zip.api.FileInfo;
+import life.qbic.data_download.util.zip.api.FileInfo;
public class BufferedZippingFunctions {
diff --git a/zip/src/main/java/life/qbic/data_access/util/zip/manipulation/ZippingException.java b/zip/src/main/java/life/qbic/data_download/util/zip/manipulation/ZippingException.java
similarity index 91%
rename from zip/src/main/java/life/qbic/data_access/util/zip/manipulation/ZippingException.java
rename to zip/src/main/java/life/qbic/data_download/util/zip/manipulation/ZippingException.java
index e0aedf0..6bed53a 100644
--- a/zip/src/main/java/life/qbic/data_access/util/zip/manipulation/ZippingException.java
+++ b/zip/src/main/java/life/qbic/data_download/util/zip/manipulation/ZippingException.java
@@ -1,4 +1,4 @@
-package life.qbic.data_access.util.zip.manipulation;
+package life.qbic.data_download.util.zip.manipulation;
/**
* Zipping a file or directory failed.
diff --git a/zip/src/main/java/module-info.java b/zip/src/main/java/module-info.java
index 1bd5399..e6e1712 100644
--- a/zip/src/main/java/module-info.java
+++ b/zip/src/main/java/module-info.java
@@ -1,12 +1,4 @@
-/**
- * TODO!
- * short description
- *
- * detailed description
- *
- * @since
- */
-module life.qbic.data_access.zip {
- exports life.qbic.data_access.util.zip.api;
- exports life.qbic.data_access.util.zip.manipulation;
+module life.qbic.data_download.zip {
+ exports life.qbic.data_download.util.zip.api;
+ exports life.qbic.data_download.util.zip.manipulation;
}