Skip to content

Commit

Permalink
Remove lombok. Add record
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Sikina authored and Luke-Sikina committed Oct 9, 2024
1 parent 0fb5346 commit f3f64c2
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 31 deletions.
2 changes: 0 additions & 2 deletions client-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>

<dependencies>
Expand Down
2 changes: 2 additions & 0 deletions data/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
<artifactId>data</artifactId>

<name>data</name>
<properties>
</properties>

<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
package edu.harvard.hms.dbmi.avillach.hpds.data.genotype;

import lombok.Builder;
import lombok.Value;
import lombok.extern.jackson.Jacksonized;

@Jacksonized
@Value
@Builder
public class InfoColumnMeta {

String key, description;
boolean continuous;
Float min, max;
public record InfoColumnMeta(String key, String description, boolean continuous, Float min, Float max) {

}
2 changes: 0 additions & 2 deletions genomic-processor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
<artifactId>genomic-processor</artifactId>

<properties>
<maven.compiler.source>18</maven.compiler.source>
<maven.compiler.target>18</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

Expand Down
5 changes: 4 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
<module>war</module>
</modules>
<properties>
<maven.compiler.release>21</maven.compiler.release>
<java.version>21</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<dockerfile-maven-version>1.4.10</dockerfile-maven-version>
<aws.version>2.20.153</aws.version>
Expand Down Expand Up @@ -118,7 +120,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<release>11</release>
<!--this is the target Java version-->
<release>21</release>
</configuration>
</plugin>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,13 +389,13 @@ public Set<String> getInfoStoreValues(String conceptPath) {
@Override
public List<InfoColumnMeta> getInfoColumnMeta() {
return getInfoStoreColumns().stream().map(infoStores::get)
.map(fileBackedByteIndexedInfoStore -> InfoColumnMeta.builder()
.key(fileBackedByteIndexedInfoStore.column_key)
.description(fileBackedByteIndexedInfoStore.description)
.continuous(fileBackedByteIndexedInfoStore.isContinuous)
.min(fileBackedByteIndexedInfoStore.min)
.max(fileBackedByteIndexedInfoStore.max)
.build()
.map(fileBackedByteIndexedInfoStore -> new InfoColumnMeta(
fileBackedByteIndexedInfoStore.column_key,
fileBackedByteIndexedInfoStore.description,
fileBackedByteIndexedInfoStore.isContinuous,
fileBackedByteIndexedInfoStore.min,
fileBackedByteIndexedInfoStore.max
)
)
.collect(Collectors.toList());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public void getInfoStoreValues() {
public void getInfoColumnMeta() {
List<InfoColumnMeta> infoColumnMeta = genomicProcessorRestClient.getInfoColumnMeta();
for (InfoColumnMeta columnMeta : infoColumnMeta) {
if (columnMeta.getKey().equals("Variant_consequence_calculated")) {
if (columnMeta.key().equals("Variant_consequence_calculated")) {
return;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,12 @@ public SearchResults search(@RequestBody QueryRequest searchJson) {
//FileBackedByteIndexedInfoStore store = abstractProcessor.getInfoStore(infoColumn);
String query = searchJson.getQuery().toString();
String lowerCase = query.toLowerCase();
boolean storeIsNumeric = infoColumnMeta.isContinuous();
if (infoColumnMeta.getDescription().toLowerCase().contains(lowerCase)
|| infoColumnMeta.getKey().toLowerCase().contains(lowerCase)) {
infoResults.put(infoColumnMeta.getKey(),
ImmutableMap.of("description", infoColumnMeta.getDescription(), "values",
storeIsNumeric ? new ArrayList<String>() : abstractProcessor.searchInfoConceptValues(infoColumnMeta.getKey(), ""), "continuous",
boolean storeIsNumeric = infoColumnMeta.continuous();
if (infoColumnMeta.description().toLowerCase().contains(lowerCase)
|| infoColumnMeta.key().toLowerCase().contains(lowerCase)) {
infoResults.put(infoColumnMeta.key(),
ImmutableMap.of("description", infoColumnMeta.description(), "values",
storeIsNumeric ? new ArrayList<String>() : abstractProcessor.searchInfoConceptValues(infoColumnMeta.key(), ""), "continuous",
storeIsNumeric));
}
});
Expand Down

0 comments on commit f3f64c2

Please sign in to comment.