Skip to content

Commit

Permalink
WIP: some changes to pom.xml files
Browse files Browse the repository at this point in the history
  • Loading branch information
jcschaff committed Jan 14, 2025
1 parent 49a20b3 commit 04e086d
Show file tree
Hide file tree
Showing 9 changed files with 73 additions and 74 deletions.
2 changes: 2 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@
<jackson-core.version>2.15.2</jackson-core.version>
<jackson-databind.version>2.15.2</jackson-databind.version>
<jackson-dataformat-yaml.version>2.15.2</jackson-dataformat-yaml.version>
<jackson-datatype.version>2.15.2</jackson-datatype.version>
<jakarta-annotation.version>1.3.5</jakarta-annotation.version>
<jama.version>1.0.3</jama.version>
<jaxb-api.version>2.3.0</jaxb-api.version>
<jaxb-core.version>2.3.0</jaxb-core.version>
Expand Down
11 changes: 0 additions & 11 deletions vcell-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,6 @@
<artifactId>vcell-util</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.vcell</groupId>
<artifactId>vcell-apiclient</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
Expand Down Expand Up @@ -656,12 +651,6 @@
<artifactId>commons-codec</artifactId>
<version>${commons-codec.version}</version>
</dependency>
<dependency>
<groupId>org.vcell</groupId>
<artifactId>vcell-restclient</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>

</dependencies>

<profiles>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import org.vcell.restclient.model.FieldDataReference;
import org.vcell.restclient.model.FieldDataSaveResults;
import org.vcell.restclient.model.FieldDataShape;
import org.vcell.restclient.utils.DtoModelTransforms;
import org.vcell.restq.TestEndpointUtils;
import org.vcell.restq.config.CDIVCellConfigProvider;
import org.vcell.restq.db.AgroalConnectionFactory;
Expand Down Expand Up @@ -115,16 +116,16 @@ public void testAddAndDeleteFieldDataFromFile() throws ApiException {
///////////////////
AnalyzedResultsFromFieldData saveFieldDataFromFile = new AnalyzedResultsFromFieldData();
saveFieldDataFromFile.setShortSpecData(matrix); saveFieldDataFromFile.varNames(varNames);
saveFieldDataFromFile.times(times); saveFieldDataFromFile.origin(Origin.originToDTO(origin)); saveFieldDataFromFile.extent(Extent.extentToDTO(extent));
saveFieldDataFromFile.isize(ISize.iSizeToDTO(iSize)); saveFieldDataFromFile.annotation("test annotation"); saveFieldDataFromFile.name("TestFile");
saveFieldDataFromFile.times(times); saveFieldDataFromFile.origin(DtoModelTransforms.originToDTO(origin)); saveFieldDataFromFile.extent(DtoModelTransforms.extentToDTO(extent));
saveFieldDataFromFile.isize(DtoModelTransforms.iSizeToDTO(iSize)); saveFieldDataFromFile.annotation("test annotation"); saveFieldDataFromFile.name("TestFile");
FieldDataSaveResults results = fieldDataResourceApi.createFieldDataFromAnalyzedFile(saveFieldDataFromFile);

// File is Saved on File System
FieldDataShape fieldDataInfo = fieldDataResourceApi.getFieldDataShapeFromID(results.getFieldDataID());
Assertions.assertEquals(saveFieldDataFromFile.getName(), results.getFieldDataName());
Assertions.assertTrue(origin.compareEqual(Origin.dtoToOrigin(fieldDataInfo.getOrigin())));
Assertions.assertTrue(extent.compareEqual(Extent.dtoToExtent(fieldDataInfo.getExtent())));
Assertions.assertTrue(iSize.compareEqual(ISize.dtoToISize(fieldDataInfo.getIsize())));
Assertions.assertTrue(origin.compareEqual(DtoModelTransforms.dtoToOrigin(fieldDataInfo.getOrigin())));
Assertions.assertTrue(extent.compareEqual(DtoModelTransforms.dtoToExtent(fieldDataInfo.getExtent())));
Assertions.assertTrue(iSize.compareEqual(DtoModelTransforms.dtoToISize(fieldDataInfo.getIsize())));
Assertions.assertEquals(times, fieldDataInfo.getTimes());

// It's in the DB
Expand Down Expand Up @@ -171,9 +172,9 @@ public void testFileUploading() throws ApiException, IOException {

FieldDataShape fieldDataInfo = fieldDataResourceApi.getFieldDataShapeFromID(saveResults.getFieldDataID());
Assertions.assertNotNull(fieldDataInfo);
Assertions.assertTrue(Origin.dtoToOrigin(fieldDataInfo.getOrigin()).compareEqual(new Origin(0.0, 0.0, 0.0)));
Assertions.assertTrue(Extent.dtoToExtent(fieldDataInfo.getExtent()).compareEqual(new Extent(684.9333393978472, 684.9333393978472, 1)));
Assertions.assertTrue(ISize.dtoToISize(fieldDataInfo.getIsize()).compareEqual(new ISize(256, 256, 1)));
Assertions.assertTrue(DtoModelTransforms.dtoToOrigin(fieldDataInfo.getOrigin()).compareEqual(new Origin(0.0, 0.0, 0.0)));
Assertions.assertTrue(DtoModelTransforms.dtoToExtent(fieldDataInfo.getExtent()).compareEqual(new Extent(684.9333393978472, 684.9333393978472, 1)));
Assertions.assertTrue(DtoModelTransforms.dtoToISize(fieldDataInfo.getIsize()).compareEqual(new ISize(256, 256, 1)));
Assertions.assertEquals(1, fieldDataInfo.getTimes().size());

fieldDataResourceApi.deleteFieldData(saveResults.getFieldDataID());
Expand Down
25 changes: 10 additions & 15 deletions vcell-restclient/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -199,27 +199,32 @@
<!-- </profiles>-->

<dependencies>
<dependency>
<groupId>org.vcell</groupId>
<artifactId>vcell-util</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>

<!-- JSON processing: jackson -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson-version}</version>
<version>${jackson-core.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson-version}</version>
<version>${jackson-annotations.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson-version}</version>
<version>${jackson-databind.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<version>${jackson-version}</version>
<version>${jackson-datatype.version}</version>
</dependency>
<dependency>
<groupId>com.nimbusds</groupId>
Expand All @@ -242,7 +247,7 @@
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
<version>${jakarta-annotation-version}</version>
<version>${jakarta-annotation.version}</version>
<scope>provided</scope>
</dependency>

Expand Down Expand Up @@ -274,16 +279,6 @@
<scope>compile</scope>
</dependency>


</dependencies>

<properties>
<!-- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>-->
<!-- <maven.compiler.source>11</maven.compiler.source>-->
<!-- <maven.compiler.target>11</maven.compiler.target>-->
<jackson-version>2.15.2</jackson-version>
<!-- <jackson-databind-nullable-version>0.2.6</jackson-databind-nullable-version>-->
<jakarta-annotation-version>1.3.5</jakarta-annotation-version>
<!-- <spotless.version>2.27.2</spotless.version>-->
</properties>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package org.vcell.restclient.utils;


import org.vcell.util.Extent;
import org.vcell.util.Origin;

public class DtoModelTransforms {

public static org.vcell.restclient.model.ISize iSizeToDTO(org.vcell.util.ISize iSize){
org.vcell.restclient.model.ISize iSizeDTO = new org.vcell.restclient.model.ISize();
iSizeDTO.setX(iSize.getX());
iSizeDTO.setY(iSize.getY());
iSizeDTO.setZ(iSize.getZ());
return iSizeDTO;
}

public static org.vcell.util.ISize dtoToISize(org.vcell.restclient.model.ISize dto){
return new org.vcell.util.ISize(dto.getX(), dto.getY(), dto.getZ());
}

public static org.vcell.restclient.model.Origin originToDTO(Origin origin){
org.vcell.restclient.model.Origin dtoOrigin = new org.vcell.restclient.model.Origin();
dtoOrigin.setX(origin.getX());
dtoOrigin.setY(origin.getY());
dtoOrigin.setZ(origin.getZ());
return dtoOrigin;
}

public static Origin dtoToOrigin(org.vcell.restclient.model.Origin dtoOrigin){
return new Origin(dtoOrigin.getX(), dtoOrigin.getY(), dtoOrigin.getZ());
}


public static org.vcell.restclient.model.Extent extentToDTO(Extent extent) {
org.vcell.restclient.model.Extent newExtent = new org.vcell.restclient.model.Extent();
newExtent.setX(extent.getX());
newExtent.setY(extent.getY());
newExtent.setZ(extent.getZ());
return newExtent;
}

public static Extent dtoToExtent(org.vcell.restclient.model.Extent dto) {
return new Extent(dto.getX(), dto.getY(), dto.getZ());
}


}
10 changes: 5 additions & 5 deletions vcell-util/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,15 @@
<artifactId>jaxb-core</artifactId>
<version>${jaxb-core.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson-version}</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>${jaxb-impl.version}</version>
</dependency>
<dependency>
<groupId>org.vcell</groupId>
<artifactId>vcell-restclient</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
12 changes: 0 additions & 12 deletions vcell-util/src/main/java/org/vcell/util/Extent.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,6 @@ public class Extent implements java.io.Serializable, Matchable {
private double z;
public Extent() {}//For jaxb

public static org.vcell.restclient.model.Extent extentToDTO(Extent extent) {
org.vcell.restclient.model.Extent newExtent = new org.vcell.restclient.model.Extent();
newExtent.setX(extent.getX());
newExtent.setY(extent.getY());
newExtent.setZ(extent.getZ());
return newExtent;
}

public static Extent dtoToExtent(org.vcell.restclient.model.Extent dto) {
return new Extent(dto.getX(), dto.getY(), dto.getZ());
}

/**
* Origin constructor comment.
*/
Expand Down
11 changes: 0 additions & 11 deletions vcell-util/src/main/java/org/vcell/util/ISize.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,6 @@ public class ISize implements java.io.Serializable, Matchable {
private int y;
private int z;

public static org.vcell.restclient.model.ISize iSizeToDTO(ISize iSize){
org.vcell.restclient.model.ISize iSizeDTO = new org.vcell.restclient.model.ISize();
iSizeDTO.setX(iSize.getX());
iSizeDTO.setY(iSize.getY());
iSizeDTO.setZ(iSize.getZ());
return iSizeDTO;
}

public static ISize dtoToISize(org.vcell.restclient.model.ISize dto){
return new ISize(dto.getX(), dto.getY(), dto.getZ());
}
public ISize(){}

/**
Expand Down
12 changes: 0 additions & 12 deletions vcell-util/src/main/java/org/vcell/util/Origin.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,6 @@ public class Origin implements java.io.Serializable, Matchable {
private double z;
public Origin() {}//For jaxb

public static org.vcell.restclient.model.Origin originToDTO(Origin origin){
org.vcell.restclient.model.Origin dtoOrigin = new org.vcell.restclient.model.Origin();
dtoOrigin.setX(origin.getX());
dtoOrigin.setY(origin.getY());
dtoOrigin.setZ(origin.getZ());
return dtoOrigin;
}

public static Origin dtoToOrigin(org.vcell.restclient.model.Origin dtoOrigin){
return new Origin(dtoOrigin.getX(), dtoOrigin.getY(), dtoOrigin.getZ());
}

/**
* Origin constructor comment.
*/
Expand Down

0 comments on commit 04e086d

Please sign in to comment.