Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cqp-storage-elasticsearch/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {

group = "com.quantori"
description = "Chem query platform. Storage Elasticsearch"
version = "0.0.11"
version = "0.0.12"

tasks.named<Javadoc>("javadoc") {
exclude(
Expand All @@ -16,8 +16,8 @@ tasks.named<Javadoc>("javadoc") {
}

dependencies {
implementation("com.quantori:cqp-api:0.0.13")
implementation("com.quantori:cqp-core:0.0.10")
implementation("com.quantori:cqp-api:0.0.14")
implementation("com.quantori:cqp-core:0.0.13")
implementation("co.elastic.clients:elasticsearch-java:8.6.2")
implementation(libs.jackson)
implementation(libs.jackson.jsr310)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ Map<String, Map<String, Property>> getPropertiesMapping(String[] libraryIds) {
public Library createLibrary(String libraryName, LibraryType libraryType, Map<String, Property> propertiesMapping,
Map<String, Object> serviceData) {
var creatable = switch (libraryType) {
case MOLECULES -> moleculesAllocator;
case REACTIONS -> reactionsAllocator;
case molecules -> moleculesAllocator;
case reactions -> reactionsAllocator;
default -> throw new ElasticsearchStorageException(
"Not supported operation create library for library " + libraryName);
};
Expand Down Expand Up @@ -277,8 +277,8 @@ public Map<String, Object> getDefaultServiceData() {

@Override
public boolean deleteLibrary(Library library) {
if (library.getType() != LibraryType.REACTIONS &&
library.getType() != LibraryType.MOLECULES) {
if (library.getType() != LibraryType.reactions &&
library.getType() != LibraryType.molecules) {
throw new ElasticsearchStorageException("A library type must be molecule or reaction");
}

Expand All @@ -288,8 +288,8 @@ public boolean deleteLibrary(Library library) {
// delete library indexes for molecules / reactions
if (deleted) {
var removable = switch (library.getType()) {
case MOLECULES -> moleculesAllocator;
case REACTIONS -> reactionsAllocator;
case molecules -> moleculesAllocator;
case reactions -> reactionsAllocator;
default -> throw new ElasticsearchStorageException(
"Not supported operation remove library for library " + library.getId());
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ private OperationStatus createAndUpdatePropertiesMapping(String libraryId, Libra
Map<String, Property> propertiesMapping) {
Library library = Mapper.toLibrary(libraryId, libraryDocument);
var updatable = switch (library.getType()) {
case MOLECULES -> moleculesAllocator;
case REACTIONS -> reactionsAllocator;
case molecules -> moleculesAllocator;
case reactions -> reactionsAllocator;
default -> throw new ElasticsearchStorageException(
"Not supported operation create library for library " + libraryDocument.getName());
};
Expand Down
Loading