Skip to content

Commit

Permalink
Merge branch 'refs/heads/development' into feature/dm-1122-enable-pat…
Browse files Browse the repository at this point in the history
…-token-auth
  • Loading branch information
KochTobi committed Mar 25, 2024
2 parents 2ebdae7 + cdf0151 commit 5c8db7e
Show file tree
Hide file tree
Showing 39 changed files with 129 additions and 214 deletions.
4 changes: 2 additions & 2 deletions measurement-provider/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>life.qbic</groupId>
<artifactId>data-access-server</artifactId>
<artifactId>data-download-server</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>

Expand All @@ -27,7 +27,7 @@
<configuration>
<archive>
<manifestEntries>
<Automatic-Module-Name>${project.groupId}.data_access.measurement.provider</Automatic-Module-Name>
<Automatic-Module-Name>${project.groupId}.data_download.measurement.provider</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package life.qbic.data_access.measurements.api;
package life.qbic.data_download.measurements.api;

import static java.util.Objects.requireNonNull;

Expand All @@ -7,12 +7,7 @@
import java.util.StringJoiner;

/**
* TODO!
* <b>short description</b>
*
* <p>detailed description</p>
*
* @since <version tag>
* A file with data
*/
public class DataFile {

Expand Down
Original file line number Diff line number Diff line change
@@ -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) {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package life.qbic.data_download.measurements.api;

/**
* A measurement
*/
public record Measurement(MeasurementId id, MeasurementInfo info, MeasurementData data) {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package life.qbic.data_download.measurements.api;

import java.io.InputStream;

/**
* Measurement data
*/
public interface MeasurementData {
InputStream stream();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package life.qbic.data_download.measurements.api;

/**
* Provides measurement data given a measurement
*/
public interface MeasurementDataProvider {

MeasurementData loadData(MeasurementId measurementId);

}
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
package life.qbic.data_access.measurements.api;
package life.qbic.data_download.measurements.api;

import java.io.InputStream;

/**
* TODO!
* <b>short description</b>
*
* <p>detailed description</p>
*
* @since <version tag>
* Reads measurement data
*/
public interface MeasurementDataReader extends AutoCloseable {

Expand Down
Original file line number Diff line number Diff line change
@@ -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);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package life.qbic.data_access.measurements.api;
package life.qbic.data_download.measurements.api;

/**
* The ID of a measurement.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package life.qbic.data_download.measurements.api;

/**
* Information about a measurement
*/
public record MeasurementInfo(long size, int fileCount) {

}
4 changes: 2 additions & 2 deletions measurement-provider/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -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;
}
4 changes: 2 additions & 2 deletions openbis-connector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<parent>
<groupId>life.qbic</groupId>
<artifactId>data-access-server</artifactId>
<artifactId>data-download-server</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>

Expand Down Expand Up @@ -87,7 +87,7 @@
<configuration>
<archive>
<manifestEntries>
<Automatic-Module-Name>${project.groupId}.data_access.openbis.connector</Automatic-Module-Name>
<Automatic-Module-Name>${project.groupId}.data_download.openbis.connector</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
Expand Down
8 changes: 4 additions & 4 deletions openbis-connector/src/main/java/deactivated.module-info.java
Original file line number Diff line number Diff line change
@@ -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!
Expand All @@ -9,8 +9,8 @@
// *
// * @since <version tag>
// */
//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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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!
* <b>short description</b>
*
* <p>detailed description</p>
*
* @since <version tag>
* 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);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
package life.qbic.data_access.openbis;
package life.qbic.data_download.openbis;

import static java.util.Objects.nonNull;

import ch.ethz.sis.openbis.generic.asapi.v3.dto.datastore.DataStore;
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!
* <b>short description</b>
*
* <p>detailed description</p>
*
* @since <version tag>
* Reads openbis data streams
*/
public class DatasetFileStreamReaderImpl implements MeasurementDataReader {

Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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!
* <b>short description</b>
*
* <p>detailed description</p>
*
* @since <version tag>
* A connector to the openBIS system.
*/
@Component("openbisConnector")
public class OpenBisConnector implements MeasurementFinder, MeasurementDataProvider {
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -10,12 +10,7 @@
import org.springframework.stereotype.Service;

/**
* TODO!
* <b>short description</b>
*
* <p>detailed description</p>
*
* @since <version tag>
* Creates openbis sessions
*/
@Service("openbisSessionFactory")
public class SessionFactory {
Expand Down
Original file line number Diff line number Diff line change
@@ -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!
* <b>short description</b>
*
* <p>detailed description</p>
*
* @since <version tag>
* A default implementation of {@link MeasurementData}. No specific type of measurement but can be
* streamed.
*/
public class UnspecificMeasurementData implements MeasurementData {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package life.qbic.data_access.openbis;
package life.qbic.data_download.openbis;

import static org.junit.jupiter.api.Assertions.*;

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>

<groupId>life.qbic</groupId>
<artifactId>data-access-server</artifactId>
<artifactId>data-download-server</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
Expand Down
2 changes: 1 addition & 1 deletion rest-api/src/main/java/deactivated.module-info.java
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Loading

0 comments on commit 5c8db7e

Please sign in to comment.