From 0395d527a9ccf9112a3021ffc66dbf57bf2a9c7a Mon Sep 17 00:00:00 2001 From: Joe Ho Date: Wed, 3 Mar 2021 12:42:19 -0500 Subject: [PATCH 001/415] Add REX enableStructuredRegion option --- .../rosette/apimodel/PolymorphicRequestTest.java | 10 ++++++++++ .../basistech/rosette/apimodel/EntitiesOptions.java | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/json/src/test/java/com/basistech/rosette/apimodel/PolymorphicRequestTest.java b/json/src/test/java/com/basistech/rosette/apimodel/PolymorphicRequestTest.java index 60e5342fd..d54861c8a 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/PolymorphicRequestTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/PolymorphicRequestTest.java @@ -54,6 +54,16 @@ public void testRequestTypes() throws Exception { assertTrue(request instanceof DocumentRequest); assertFalse(((DocumentRequest) request).getOptions().getIncludePermID()); + json = "{\"content\": \"what is my type\", \"language\": \"eng\", \"options\": {\"enableStructuredRegion\": true}}"; + request = mapper.readValue(json, new TypeReference>() { }); + assertTrue(request instanceof DocumentRequest); + assertTrue(((DocumentRequest) request).getOptions().getEnableStructuredRegion()); + + json = "{\"content\": \"what is my type\", \"language\": \"eng\", \"options\": {\"enableStructuredRegion\": false}}"; + request = mapper.readValue(json, new TypeReference>() { }); + assertTrue(request instanceof DocumentRequest); + assertFalse(((DocumentRequest) request).getOptions().getEnableStructuredRegion()); + json = "{\"name1\": {\"text\": \"Joe\"}, \"name2\": {\"text\": \"Geo\"}}"; request = mapper.readValue(json, NameSimilarityRequest.class); assertTrue(request instanceof NameSimilarityRequest); diff --git a/model/src/main/java/com/basistech/rosette/apimodel/EntitiesOptions.java b/model/src/main/java/com/basistech/rosette/apimodel/EntitiesOptions.java index 77f40d6b1..f3f999be6 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/EntitiesOptions.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/EntitiesOptions.java @@ -83,4 +83,9 @@ public class EntitiesOptions extends Options { * @return case sensitivity of model to use. Can be one of caseSensitive, caseInsensitive or automatic. */ private final String caseSensitivity; + + /** + * @return the enableStructuredRegion flag. + */ + private final Boolean enableStructuredRegion; } From 72697b5a0afafe11084bd9be0a809439e561b3be Mon Sep 17 00:00:00 2001 From: Joe Ho Date: Wed, 3 Mar 2021 16:46:54 -0500 Subject: [PATCH 002/415] Apply default --- .../java/com/basistech/rosette/apimodel/EntitiesOptions.java | 1 + 1 file changed, 1 insertion(+) diff --git a/model/src/main/java/com/basistech/rosette/apimodel/EntitiesOptions.java b/model/src/main/java/com/basistech/rosette/apimodel/EntitiesOptions.java index f3f999be6..e630965cb 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/EntitiesOptions.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/EntitiesOptions.java @@ -35,6 +35,7 @@ public class EntitiesOptions extends Options { .calculateSalience(false) .linkEntities(true) .modelType("statistical") + .enableStructuredRegion(false) .build(); /** From 7685ebe7da2d62da4149b033a1786a5d7c1883f7 Mon Sep 17 00:00:00 2001 From: Joe Ho Date: Fri, 5 Mar 2021 11:54:20 -0500 Subject: [PATCH 003/415] Add events --- .../api/common/AbstractRosetteAPI.java | 4 +- .../rosette/examples/EventsExample.java | 50 +++++++++++++++++++ .../apimodel/PolymorphicRequestTest.java | 6 ++- .../com/basistech/rosette/apimodel/Event.java | 42 ++++++++++++++++ .../rosette/apimodel/EventsOptions.java | 47 +++++++++++++++++ .../rosette/apimodel/EventsResponse.java | 39 +++++++++++++++ 6 files changed, 186 insertions(+), 2 deletions(-) create mode 100644 examples/src/main/java/com/basistech/rosette/examples/EventsExample.java create mode 100644 model/src/main/java/com/basistech/rosette/apimodel/Event.java create mode 100644 model/src/main/java/com/basistech/rosette/apimodel/EventsOptions.java create mode 100644 model/src/main/java/com/basistech/rosette/apimodel/EventsResponse.java diff --git a/common/src/main/java/com/basistech/rosette/api/common/AbstractRosetteAPI.java b/common/src/main/java/com/basistech/rosette/api/common/AbstractRosetteAPI.java index ef9c7bad9..ebf102355 100644 --- a/common/src/main/java/com/basistech/rosette/api/common/AbstractRosetteAPI.java +++ b/common/src/main/java/com/basistech/rosette/api/common/AbstractRosetteAPI.java @@ -54,6 +54,7 @@ public abstract class AbstractRosetteAPI implements AutoCloseable { public static final String INFO_SERVICE_PATH = "/info"; public static final String PING_SERVICE_PATH = "/ping"; public static final String SUPPORTED_LANGUAGES_SUBPATH = "/supported-languages"; + public static final String EVENTS_SERVICE_PATH = "/events"; public static final Set DOC_ENDPOINTS = new HashSet<>(Arrays.asList( LANGUAGE_SERVICE_PATH, @@ -74,7 +75,8 @@ public abstract class AbstractRosetteAPI implements AutoCloseable { SIMILAR_TERMS_SERVICE_PATH, SYNTAX_DEPENDENCIES_SERVICE_PATH, TRANSLITERATION_SERVICE_PATH, - TOPICS_SERVICE_PATH + TOPICS_SERVICE_PATH, + EVENTS_SERVICE_PATH )); public static final Set NAMES_ENDPOINTS = new HashSet<>(Arrays.asList( diff --git a/examples/src/main/java/com/basistech/rosette/examples/EventsExample.java b/examples/src/main/java/com/basistech/rosette/examples/EventsExample.java new file mode 100644 index 000000000..e5f90a20a --- /dev/null +++ b/examples/src/main/java/com/basistech/rosette/examples/EventsExample.java @@ -0,0 +1,50 @@ +/* +* Copyright 2021 Basis Technology Corp. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package com.basistech.rosette.examples; + +import com.basistech.rosette.api.HttpRosetteAPI; +import com.basistech.rosette.apimodel.DocumentRequest; +import com.basistech.rosette.apimodel.EventsOptions; +import com.basistech.rosette.apimodel.EventsResponse; +import com.basistech.util.LanguageCode; + +/** + * Example which demonstrates the events API. + */ +public class EventsExample extends ExampleBase { + public static void main(String[] args) { + try { + new EventsExample().run(); + } catch (Exception e) { + e.printStackTrace(); + System.exit(1); + } + } + + private void run() throws Exception { + String topicsData = "I am looking for flights to Super Bowl 2022 in Inglewood, LA."; + HttpRosetteAPI rosetteApi = new HttpRosetteAPI.Builder() + .key(getApiKeyFromSystemProperty()) + .url(getAltUrlFromSystemProperty()) + .build(); + DocumentRequest request = DocumentRequest.builder() + .language(LanguageCode.ENGLISH) + .content(topicsData) + .build(); + EventsResponse resp = rosetteApi.perform(HttpRosetteAPI.EVENTS_SERVICE_PATH, request, EventsResponse.class); + System.out.println(responseToJson(resp)); + } +} diff --git a/json/src/test/java/com/basistech/rosette/apimodel/PolymorphicRequestTest.java b/json/src/test/java/com/basistech/rosette/apimodel/PolymorphicRequestTest.java index 60e5342fd..d1e1b3ec2 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/PolymorphicRequestTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/PolymorphicRequestTest.java @@ -36,7 +36,11 @@ public void init() { @Test public void testRequestTypes() throws Exception { String json = "{\"content\": \"what is my type\", \"language\": \"eng\", \"options\": {\"calculateConfidence\": true}}"; - Request request = mapper.readValue(json, new TypeReference>() { }); + Request request = mapper.readValue(json, new TypeReference>() { }); + assertTrue(request instanceof DocumentRequest); + + json = "{\"content\": \"what is my type\", \"language\": \"eng\", \"options\": {\"calculateConfidence\": true}}"; + request = mapper.readValue(json, new TypeReference>() { }); assertTrue(request instanceof DocumentRequest); json = "{\"content\": \"what is my type\", \"language\": \"eng\", \"options\": {\"includeDBpediaType\": true, \"calculateConfidence\": true}}"; diff --git a/model/src/main/java/com/basistech/rosette/apimodel/Event.java b/model/src/main/java/com/basistech/rosette/apimodel/Event.java new file mode 100644 index 000000000..fcca50b7d --- /dev/null +++ b/model/src/main/java/com/basistech/rosette/apimodel/Event.java @@ -0,0 +1,42 @@ +/* +* Copyright 2021 Basis Technology Corp. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package com.basistech.rosette.apimodel; + +import com.basistech.rosette.annotations.JacksonMixin; +import lombok.Builder; +import lombok.Value; + +import java.util.List; + +/** + * Event + */ +@Value +@Builder +@JacksonMixin +public class Event { + + /** + * @return the event type + */ + private final String type; + + /** + * @return the confidence score for the event (0.0-1.0) + */ + private final Double confidence; +} diff --git a/model/src/main/java/com/basistech/rosette/apimodel/EventsOptions.java b/model/src/main/java/com/basistech/rosette/apimodel/EventsOptions.java new file mode 100644 index 000000000..a7d0cd585 --- /dev/null +++ b/model/src/main/java/com/basistech/rosette/apimodel/EventsOptions.java @@ -0,0 +1,47 @@ +/* + * Copyright 2021 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.basistech.rosette.apimodel; + +import com.basistech.rosette.annotations.JacksonMixin; +import lombok.Builder; +import lombok.Value; + +/** + * Events options + */ +@Value +@Builder +@JacksonMixin +public class EventsOptions extends Options { + /** + * Default options + */ + public static final EventsOptions DEFAULT = EventsOptions.builder() + .calculateConfidence(false) + .modelType("stubModel") + .build(); + + /** + * @return the calculateConfidence flag. + */ + private final Boolean calculateConfidence; + + /** + * @return the modelType to use. + */ + private final String modelType; +} diff --git a/model/src/main/java/com/basistech/rosette/apimodel/EventsResponse.java b/model/src/main/java/com/basistech/rosette/apimodel/EventsResponse.java new file mode 100644 index 000000000..ab329b7d0 --- /dev/null +++ b/model/src/main/java/com/basistech/rosette/apimodel/EventsResponse.java @@ -0,0 +1,39 @@ +/* +* Copyright 2021 Basis Technology Corp. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package com.basistech.rosette.apimodel; + +import com.basistech.rosette.annotations.JacksonMixin; +import lombok.Builder; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +import java.util.List; + +/** + * Simple api response data model for events + */ +@Getter +@EqualsAndHashCode +@Builder +@JacksonMixin +public final class EventsResponse extends Response { + + /** + * @return the list of events + */ + private final List evnents; +} From 71e4aa92662421ab30d8bd1d1be710a6d9c771b5 Mon Sep 17 00:00:00 2001 From: Joe Ho Date: Fri, 5 Mar 2021 11:58:36 -0500 Subject: [PATCH 004/415] typo --- .../java/com/basistech/rosette/apimodel/EventsResponse.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/src/main/java/com/basistech/rosette/apimodel/EventsResponse.java b/model/src/main/java/com/basistech/rosette/apimodel/EventsResponse.java index ab329b7d0..2188ca886 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/EventsResponse.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/EventsResponse.java @@ -35,5 +35,5 @@ public final class EventsResponse extends Response { /** * @return the list of events */ - private final List evnents; + private final List events; } From 02233fd0ec1aa8147311cc6e6bc3ddf6692a064c Mon Sep 17 00:00:00 2001 From: Katsuya Tomioka Date: Tue, 30 Mar 2021 14:02:59 -0400 Subject: [PATCH 005/415] master: [maven-release-plugin] prepare release rosette-api-java-binding-1.18.100 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index c3e00247c..ca3d98743 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.1-SNAPSHOT + 1.18.100 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index d0089628d..73fe98c73 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.1-SNAPSHOT + 1.18.100 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index df114427a..d154b890c 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.1-SNAPSHOT + 1.18.100 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 40c246cb1..9c80de2f1 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.1-SNAPSHOT + 1.18.100 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index ed407d7a8..f65eb98ae 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.1-SNAPSHOT + 1.18.100 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 6c5edc445..d7ba3507b 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.1-SNAPSHOT + 1.18.100 rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 2126895c7..aacb0f551 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.18.1-SNAPSHOT + 1.18.100 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.14.0 + rosette-api-java-binding-1.18.100 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 7a0754acb..06e8115f5 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.1-SNAPSHOT + 1.18.100 com.basistech.rosette rosette-api-release From 10f057dd8986034963aa55bbdf752eb51231c0b4 Mon Sep 17 00:00:00 2001 From: Katsuya Tomioka Date: Tue, 30 Mar 2021 14:03:04 -0400 Subject: [PATCH 006/415] master: [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index ca3d98743..dacfee826 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.100 + 1.18.101-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 73fe98c73..c47f0a342 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.100 + 1.18.101-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index d154b890c..4bca23e33 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.100 + 1.18.101-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 9c80de2f1..63ddc56ab 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.100 + 1.18.101-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index f65eb98ae..0220f8e99 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.100 + 1.18.101-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index d7ba3507b..6db6859a1 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.100 + 1.18.101-SNAPSHOT rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index aacb0f551..fe8c5eb8b 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.18.100 + 1.18.101-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.18.100 + rosette-api-java-binding-1.14.0 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 06e8115f5..dddde86b7 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.100 + 1.18.101-SNAPSHOT com.basistech.rosette rosette-api-release From 6bdbf678f8e7c31974519cacaf3826a86c4181e9 Mon Sep 17 00:00:00 2001 From: Katsuya Tomioka Date: Tue, 30 Mar 2021 15:01:47 -0400 Subject: [PATCH 007/415] master: [maven-release-plugin] prepare release rosette-api-java-binding-1.18.101 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index dacfee826..6ed2d363e 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.101-SNAPSHOT + 1.18.101 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index c47f0a342..704ab721b 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.101-SNAPSHOT + 1.18.101 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 4bca23e33..ffc43c3b6 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.101-SNAPSHOT + 1.18.101 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 63ddc56ab..f1ba3b17a 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.101-SNAPSHOT + 1.18.101 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 0220f8e99..faffa9616 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.101-SNAPSHOT + 1.18.101 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 6db6859a1..430c62e3a 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.101-SNAPSHOT + 1.18.101 rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index fe8c5eb8b..a074ed1fb 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.18.101-SNAPSHOT + 1.18.101 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.14.0 + rosette-api-java-binding-1.18.101 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index dddde86b7..ce58f3c55 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.101-SNAPSHOT + 1.18.101 com.basistech.rosette rosette-api-release From 6bd1bcc8a41bb981481c03517927eb0749e47ddb Mon Sep 17 00:00:00 2001 From: Katsuya Tomioka Date: Tue, 30 Mar 2021 15:01:51 -0400 Subject: [PATCH 008/415] master: [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 6ed2d363e..bec15de77 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.101 + 1.18.102-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 704ab721b..0aa744bcd 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.101 + 1.18.102-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index ffc43c3b6..ffc95d5c7 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.101 + 1.18.102-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index f1ba3b17a..7b7d46ba5 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.101 + 1.18.102-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index faffa9616..367a4fcf9 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.101 + 1.18.102-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 430c62e3a..3f353cda1 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.101 + 1.18.102-SNAPSHOT rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index a074ed1fb..cb38a2182 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.18.101 + 1.18.102-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.18.101 + rosette-api-java-binding-1.14.0 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index ce58f3c55..abe722695 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.101 + 1.18.102-SNAPSHOT com.basistech.rosette rosette-api-release From d239af7c0bbebe1ac5df8f4b1751f570989cbd8c Mon Sep 17 00:00:00 2001 From: Katsuya Tomioka Date: Tue, 13 Apr 2021 13:43:49 -0400 Subject: [PATCH 009/415] WS-2181: add events. --- .../apimodel/PolymorphicRequestTest.java | 2 +- .../com/basistech/rosette/apimodel/Event.java | 42 ------------------- .../rosette/apimodel/EventsOptions.java | 10 +---- .../rosette/apimodel/EventsResponse.java | 1 + pom.xml | 5 ++- 5 files changed, 7 insertions(+), 53 deletions(-) delete mode 100644 model/src/main/java/com/basistech/rosette/apimodel/Event.java diff --git a/json/src/test/java/com/basistech/rosette/apimodel/PolymorphicRequestTest.java b/json/src/test/java/com/basistech/rosette/apimodel/PolymorphicRequestTest.java index 06d6e6737..03c473f2c 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/PolymorphicRequestTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/PolymorphicRequestTest.java @@ -35,7 +35,7 @@ public void init() { @Test public void testRequestTypes() throws Exception { - String json = "{\"content\": \"what is my type\", \"language\": \"eng\", \"options\": {\"calculateConfidence\": true}}"; + String json = "{\"content\": \"what is my type\", \"language\": \"eng\", \"options\": {\"workspaceId\": \"ws1\"}}"; Request request = mapper.readValue(json, new TypeReference>() { }); assertTrue(request instanceof DocumentRequest); diff --git a/model/src/main/java/com/basistech/rosette/apimodel/Event.java b/model/src/main/java/com/basistech/rosette/apimodel/Event.java deleted file mode 100644 index fcca50b7d..000000000 --- a/model/src/main/java/com/basistech/rosette/apimodel/Event.java +++ /dev/null @@ -1,42 +0,0 @@ -/* -* Copyright 2021 Basis Technology Corp. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package com.basistech.rosette.apimodel; - -import com.basistech.rosette.annotations.JacksonMixin; -import lombok.Builder; -import lombok.Value; - -import java.util.List; - -/** - * Event - */ -@Value -@Builder -@JacksonMixin -public class Event { - - /** - * @return the event type - */ - private final String type; - - /** - * @return the confidence score for the event (0.0-1.0) - */ - private final Double confidence; -} diff --git a/model/src/main/java/com/basistech/rosette/apimodel/EventsOptions.java b/model/src/main/java/com/basistech/rosette/apimodel/EventsOptions.java index a7d0cd585..07f95a3a1 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/EventsOptions.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/EventsOptions.java @@ -31,17 +31,11 @@ public class EventsOptions extends Options { * Default options */ public static final EventsOptions DEFAULT = EventsOptions.builder() - .calculateConfidence(false) - .modelType("stubModel") + .workspaceId("_unset_") .build(); - /** - * @return the calculateConfidence flag. - */ - private final Boolean calculateConfidence; - /** * @return the modelType to use. */ - private final String modelType; + private final String workspaceId; } diff --git a/model/src/main/java/com/basistech/rosette/apimodel/EventsResponse.java b/model/src/main/java/com/basistech/rosette/apimodel/EventsResponse.java index 2188ca886..13c17a761 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/EventsResponse.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/EventsResponse.java @@ -17,6 +17,7 @@ package com.basistech.rosette.apimodel; import com.basistech.rosette.annotations.JacksonMixin; +import com.basistech.rosette.dm.Event; import lombok.Builder; import lombok.EqualsAndHashCode; import lombok.Getter; diff --git a/pom.xml b/pom.xml index cb38a2182..c3f559850 100644 --- a/pom.xml +++ b/pom.xml @@ -54,6 +54,7 @@ 2.4 3.10.2 1.5 + 2.7.1-SNAPSHOT annotations @@ -74,12 +75,12 @@ com.basistech adm-model - 2.5.2 + ${bt-adm-version} com.basistech adm-json - 2.5.2 + ${bt-adm-version} From 761f87c598798c7da348748183cfe03d3beb77f1 Mon Sep 17 00:00:00 2001 From: Katsuya Tomioka Date: Tue, 4 May 2021 15:20:52 -0400 Subject: [PATCH 010/415] WS-2181: update adm -> 2.7.1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c3f559850..559e34b52 100644 --- a/pom.xml +++ b/pom.xml @@ -54,7 +54,7 @@ 2.4 3.10.2 1.5 - 2.7.1-SNAPSHOT + 2.7.1 annotations From 43a05b371f3c2b83f9f490456756e85a95f77d2e Mon Sep 17 00:00:00 2001 From: Katsuya Tomioka Date: Wed, 5 May 2021 09:56:42 -0400 Subject: [PATCH 011/415] WS-2181: doc --- DEVELOPER.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/DEVELOPER.md b/DEVELOPER.md index 26ea73292..422862e57 100644 --- a/DEVELOPER.md +++ b/DEVELOPER.md @@ -5,7 +5,9 @@ To be updated.. #### Internal Releasing -TBD.. + +To perform an internal release, use `-Drelease-profile=internal-release` in `release:perform`. + #### Old Stuff [Docker](examples/docker) bits for running examples. Maybe just remove? From 78da29235069d042b5fa8d17cfdb82c3716c4bef Mon Sep 17 00:00:00 2001 From: Katsuya Tomioka Date: Wed, 5 May 2021 09:58:39 -0400 Subject: [PATCH 012/415] WS-2181: [maven-release-plugin] prepare release rosette-api-java-binding-1.18.102 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index bec15de77..8368c6af4 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.102-SNAPSHOT + 1.18.102 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 0aa744bcd..c82ef85bd 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.102-SNAPSHOT + 1.18.102 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index ffc95d5c7..b1a2912cd 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.102-SNAPSHOT + 1.18.102 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 7b7d46ba5..b07ccf436 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.102-SNAPSHOT + 1.18.102 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 367a4fcf9..9c6fccf8a 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.102-SNAPSHOT + 1.18.102 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 3f353cda1..d228b59b7 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.102-SNAPSHOT + 1.18.102 rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 559e34b52..2143b38b8 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.18.102-SNAPSHOT + 1.18.102 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.14.0 + rosette-api-java-binding-1.18.102 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index abe722695..39a854d46 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.102-SNAPSHOT + 1.18.102 com.basistech.rosette rosette-api-release From c34f0f0b998eb73a530a63cbfcaab92cb53dc694 Mon Sep 17 00:00:00 2001 From: Katsuya Tomioka Date: Wed, 5 May 2021 09:58:44 -0400 Subject: [PATCH 013/415] WS-2181: [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 8368c6af4..43f8f2127 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.102 + 1.18.103-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index c82ef85bd..9bac13ffb 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.102 + 1.18.103-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index b1a2912cd..6e5f81c58 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.102 + 1.18.103-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index b07ccf436..7c7c3ee3d 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.102 + 1.18.103-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 9c6fccf8a..c625f2042 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.102 + 1.18.103-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index d228b59b7..38af72223 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.102 + 1.18.103-SNAPSHOT rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 2143b38b8..3f4de9f46 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.18.102 + 1.18.103-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.18.102 + rosette-api-java-binding-1.14.0 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 39a854d46..2ba5b50e7 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.102 + 1.18.103-SNAPSHOT com.basistech.rosette rosette-api-release From 56de8b5565ff52a5e8095a5ab28c002b1b03c1d3 Mon Sep 17 00:00:00 2001 From: Katsuya Tomioka Date: Thu, 6 May 2021 14:30:40 -0400 Subject: [PATCH 014/415] WS-2181: update adm --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3f4de9f46..732a5d08d 100644 --- a/pom.xml +++ b/pom.xml @@ -54,7 +54,7 @@ 2.4 3.10.2 1.5 - 2.7.1 + 2.7.2 annotations From c5f0fe661679c9a46a2c5e54cd4363a86491f6d7 Mon Sep 17 00:00:00 2001 From: Katsuya Tomioka Date: Thu, 6 May 2021 14:33:26 -0400 Subject: [PATCH 015/415] WS-2181: [maven-release-plugin] prepare release rosette-api-java-binding-1.18.103 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 43f8f2127..f1f5b44d9 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.103-SNAPSHOT + 1.18.103 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 9bac13ffb..ae752eed1 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.103-SNAPSHOT + 1.18.103 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 6e5f81c58..b21095eb2 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.103-SNAPSHOT + 1.18.103 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 7c7c3ee3d..492088ffb 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.103-SNAPSHOT + 1.18.103 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index c625f2042..c1a199d78 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.103-SNAPSHOT + 1.18.103 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 38af72223..a400bcd09 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.103-SNAPSHOT + 1.18.103 rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 732a5d08d..5578184a0 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.18.103-SNAPSHOT + 1.18.103 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.14.0 + rosette-api-java-binding-1.18.103 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 2ba5b50e7..59c1c8395 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.103-SNAPSHOT + 1.18.103 com.basistech.rosette rosette-api-release From 58f3adada68498aee7ae3ebe18c437bdac4358ce Mon Sep 17 00:00:00 2001 From: Katsuya Tomioka Date: Thu, 6 May 2021 14:33:30 -0400 Subject: [PATCH 016/415] WS-2181: [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index f1f5b44d9..9f5d0c271 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.103 + 1.18.104-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index ae752eed1..6317fbcb4 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.103 + 1.18.104-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index b21095eb2..cb7f28fde 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.103 + 1.18.104-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 492088ffb..17fb98297 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.103 + 1.18.104-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index c1a199d78..c01b32938 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.103 + 1.18.104-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index a400bcd09..41fb40239 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.103 + 1.18.104-SNAPSHOT rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 5578184a0..c713df920 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.18.103 + 1.18.104-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.18.103 + rosette-api-java-binding-1.14.0 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 59c1c8395..24ca264c7 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.18.103 + 1.18.104-SNAPSHOT com.basistech.rosette rosette-api-release From a2aa2e4520c605ad5cbfe0e3f6ef9302687a55ac Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Fri, 4 Jun 2021 13:57:49 -0500 Subject: [PATCH 017/415] NO-JIRA: Move http-components upgrade to a new PR. No other changes. --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c713df920..09051e986 100644 --- a/pom.xml +++ b/pom.xml @@ -43,7 +43,7 @@ 3.2.0 3.0.0 - 4.5.2 + 4.5.13 3.0.0 3.7.0 + https://s01.oss.sonatype.org 1.5 2.7.2 From 69c910f57dc5577609df16ee0512dcc52ff35250 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Fri, 17 Dec 2021 16:00:25 -0500 Subject: [PATCH 055/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.20.0 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 1911a7092..959e06477 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0-SNAPSHOT + 1.20.0 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 89c44529c..8b2981a24 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0-SNAPSHOT + 1.20.0 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index b2f55dcda..45df2e9d1 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0-SNAPSHOT + 1.20.0 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 5c2817735..bed296fff 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0-SNAPSHOT + 1.20.0 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index b528573e1..72e5b3656 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0-SNAPSHOT + 1.20.0 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 7afac4e2a..14db3a960 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0-SNAPSHOT + 1.20.0 rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 291e665ad..efdf41eed 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.20.0-SNAPSHOT + 1.20.0 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.19.1 + rosette-api-java-binding-1.20.0 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index c2cd7113c..65e6d3c0b 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0-SNAPSHOT + 1.20.0 com.basistech.rosette rosette-api-release From 9c2f5573476844f8a1d1239c3f6767084126c08f Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Fri, 17 Dec 2021 16:00:27 -0500 Subject: [PATCH 056/415] [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 959e06477..e44b9546f 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0 + 1.20.1-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 8b2981a24..875287a17 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0 + 1.20.1-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 45df2e9d1..6c36ab05f 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0 + 1.20.1-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index bed296fff..b758a5652 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0 + 1.20.1-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 72e5b3656..cc27b4db5 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0 + 1.20.1-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 14db3a960..d0b90caf1 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0 + 1.20.1-SNAPSHOT rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index efdf41eed..872025ac2 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.20.0 + 1.20.1-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.20.0 + rosette-api-java-binding-1.19.1 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 65e6d3c0b..932598407 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0 + 1.20.1-SNAPSHOT com.basistech.rosette rosette-api-release From 52eff6b9189a5035cc7608dbb51d53f8fea2151c Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Fri, 17 Dec 2021 15:11:08 -0600 Subject: [PATCH 057/415] NO-JIRA: Rollback version updates, and use a different property for the new server. --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- dep.txt | 65 +++++++++++++++++++++++++++++++++++++++++++++ examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 +-- release/pom.xml | 2 +- 9 files changed, 74 insertions(+), 9 deletions(-) create mode 100644 dep.txt diff --git a/annotations/pom.xml b/annotations/pom.xml index e44b9546f..1911a7092 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.1-SNAPSHOT + 1.20.0-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 875287a17..89c44529c 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.1-SNAPSHOT + 1.20.0-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 6c36ab05f..b2f55dcda 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.1-SNAPSHOT + 1.20.0-SNAPSHOT rosette-api-common rosette-api-common diff --git a/dep.txt b/dep.txt new file mode 100644 index 000000000..6380f43c1 --- /dev/null +++ b/dep.txt @@ -0,0 +1,65 @@ +[INFO] Scanning for projects... +[INFO] Inspecting build with total of 8 modules... +[INFO] Installing Nexus Staging features: +[INFO] ... total of 8 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin +[INFO] ------------------------------------------------------------------------ +[INFO] Reactor Build Order: +[INFO] +[INFO] rosette-api-java-binding [pom] +[INFO] rosette-api-annotations [jar] +[INFO] rosette-api-model [jar] +[INFO] rosette-api-json [jar] +[INFO] rosette-api-common [jar] +[INFO] rosette-api [jar] +[INFO] rosette-api-examples [jar] +[INFO] rosette-api-release [pom] +[INFO] +[INFO] -----------< com.basistech.rosette:rosette-api-java-binding >----------- +[INFO] Building rosette-api-java-binding 1.20.0-SNAPSHOT [1/8] +[INFO] --------------------------------[ pom ]--------------------------------- +[INFO] +[INFO] --- maven-dependency-plugin:2.10:tree (default-cli) @ rosette-api-java-binding --- +[INFO] com.basistech.rosette:rosette-api-java-binding:pom:1.20.0-SNAPSHOT +[INFO] +[INFO] -----------< com.basistech.rosette:rosette-api-annotations >------------ +[INFO] Building rosette-api-annotations 1.20.0-SNAPSHOT [2/8] +[INFO] --------------------------------[ jar ]--------------------------------- +[INFO] +[INFO] --- maven-dependency-plugin:2.10:tree (default-cli) @ rosette-api-annotations --- +[INFO] com.basistech.rosette:rosette-api-annotations:jar:1.20.0-SNAPSHOT +[INFO] +- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.6:provided +[INFO] +- com.fasterxml.jackson.core:jackson-databind:jar:2.9.6:provided +[INFO] | \- com.fasterxml.jackson.core:jackson-core:jar:2.9.6:provided +[INFO] +- com.squareup:javapoet:jar:1.9.0:provided +[INFO] \- org.projectlombok:lombok:jar:1.16.18:provided +[INFO] +[INFO] --------------< com.basistech.rosette:rosette-api-model >--------------- +[INFO] Building rosette-api-model 1.20.0-SNAPSHOT [3/8] +[INFO] --------------------------------[ jar ]--------------------------------- +[INFO] ------------------------------------------------------------------------ +[INFO] Reactor Summary for rosette-api-java-binding 1.20.0-SNAPSHOT: +[INFO] +[INFO] rosette-api-java-binding ........................... SUCCESS [ 0.481 s] +[INFO] rosette-api-annotations ............................ SUCCESS [ 0.027 s] +[INFO] rosette-api-model .................................. FAILURE [ 0.023 s] +[INFO] rosette-api-json ................................... SKIPPED +[INFO] rosette-api-common ................................. SKIPPED +[INFO] rosette-api ........................................ SKIPPED +[INFO] rosette-api-examples ............................... SKIPPED +[INFO] rosette-api-release ................................ SKIPPED +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD FAILURE +[INFO] ------------------------------------------------------------------------ +[INFO] Total time: 1.132 s +[INFO] Finished at: 2021-12-17T15:10:02-06:00 +[INFO] ------------------------------------------------------------------------ +[ERROR] Failed to execute goal on project rosette-api-model: Could not resolve dependencies for project com.basistech.rosette:rosette-api-model:jar:1.20.0-SNAPSHOT: Failure to find com.basistech.rosette:rosette-api-annotations:jar:1.20.0-SNAPSHOT in http://nexus.basistech.net/nexus/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of Nexus has elapsed or updates are forced -> [Help 1] +[ERROR] +[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. +[ERROR] Re-run Maven using the -X switch to enable full debug logging. +[ERROR] +[ERROR] For more information about the errors and possible solutions, please read the following articles: +[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException +[ERROR] +[ERROR] After correcting the problems, you can resume the build with the command +[ERROR] mvn -rf :rosette-api-model diff --git a/examples/pom.xml b/examples/pom.xml index b758a5652..5c2817735 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.1-SNAPSHOT + 1.20.0-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index cc27b4db5..b528573e1 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.1-SNAPSHOT + 1.20.0-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index d0b90caf1..7afac4e2a 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.1-SNAPSHOT + 1.20.0-SNAPSHOT rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 872025ac2..61634ba49 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.20.1-SNAPSHOT + 1.20.0-SNAPSHOT open-source-parent com.basistech @@ -54,7 +54,7 @@ 2.4 3.10.2 - https://s01.oss.sonatype.org + https://s01.oss.sonatype.org 1.5 2.7.2 diff --git a/release/pom.xml b/release/pom.xml index 932598407..c2cd7113c 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.1-SNAPSHOT + 1.20.0-SNAPSHOT com.basistech.rosette rosette-api-release From 5a61866466737f811adea7bd60c86a6e45b675b0 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Fri, 17 Dec 2021 16:14:32 -0500 Subject: [PATCH 058/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.20.0 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 1911a7092..959e06477 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0-SNAPSHOT + 1.20.0 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 89c44529c..8b2981a24 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0-SNAPSHOT + 1.20.0 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index b2f55dcda..45df2e9d1 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0-SNAPSHOT + 1.20.0 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 5c2817735..bed296fff 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0-SNAPSHOT + 1.20.0 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index b528573e1..72e5b3656 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0-SNAPSHOT + 1.20.0 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 7afac4e2a..14db3a960 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0-SNAPSHOT + 1.20.0 rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 61634ba49..193e1c6d0 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.20.0-SNAPSHOT + 1.20.0 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.19.1 + rosette-api-java-binding-1.20.0 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index c2cd7113c..65e6d3c0b 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0-SNAPSHOT + 1.20.0 com.basistech.rosette rosette-api-release From 432d0900dc09d2277afe21381f00df22dcb9c4f6 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Fri, 17 Dec 2021 16:14:34 -0500 Subject: [PATCH 059/415] [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 959e06477..e44b9546f 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0 + 1.20.1-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 8b2981a24..875287a17 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0 + 1.20.1-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 45df2e9d1..6c36ab05f 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0 + 1.20.1-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index bed296fff..b758a5652 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0 + 1.20.1-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 72e5b3656..cc27b4db5 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0 + 1.20.1-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 14db3a960..d0b90caf1 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0 + 1.20.1-SNAPSHOT rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 193e1c6d0..1be2b9c52 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.20.0 + 1.20.1-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.20.0 + rosette-api-java-binding-1.19.1 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 65e6d3c0b..932598407 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0 + 1.20.1-SNAPSHOT com.basistech.rosette rosette-api-release From cd07ffbae7ea861f57726ff95a5143e8908e0db2 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Fri, 17 Dec 2021 16:29:57 -0500 Subject: [PATCH 060/415] [maven-release-plugin] rollback the release of rosette-api-java-binding-1.20.0 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 2 +- release/pom.xml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index e44b9546f..1911a7092 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.1-SNAPSHOT + 1.20.0-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 875287a17..89c44529c 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.1-SNAPSHOT + 1.20.0-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 6c36ab05f..b2f55dcda 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.1-SNAPSHOT + 1.20.0-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index b758a5652..5c2817735 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.1-SNAPSHOT + 1.20.0-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index cc27b4db5..b528573e1 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.1-SNAPSHOT + 1.20.0-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index d0b90caf1..7afac4e2a 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.1-SNAPSHOT + 1.20.0-SNAPSHOT rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 1be2b9c52..61634ba49 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.20.1-SNAPSHOT + 1.20.0-SNAPSHOT open-source-parent com.basistech diff --git a/release/pom.xml b/release/pom.xml index 932598407..c2cd7113c 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.1-SNAPSHOT + 1.20.0-SNAPSHOT com.basistech.rosette rosette-api-release From cef346ab97ae8609a3c5ae0e250336fe11c16632 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Fri, 17 Dec 2021 16:58:22 -0600 Subject: [PATCH 061/415] NO-JIRA: Move url reference to open source parent. The 2.x stream does not use a property so we have to update in the parent. --- pom.xml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 61634ba49..9bcf92373 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ open-source-parent com.basistech - 2.0.2 + 2.0.3 pom @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.19.1 + HEAD This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. @@ -53,8 +53,6 @@ 3.0.0-M1 2.4 3.10.2 - - https://s01.oss.sonatype.org 1.5 2.7.2 From b1a85afac1ea4d26a79b4a770986ac6534f0d04c Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Sat, 18 Dec 2021 10:53:14 -0500 Subject: [PATCH 062/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.20.0 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 1911a7092..959e06477 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0-SNAPSHOT + 1.20.0 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 89c44529c..8b2981a24 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0-SNAPSHOT + 1.20.0 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index b2f55dcda..45df2e9d1 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0-SNAPSHOT + 1.20.0 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 5c2817735..bed296fff 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0-SNAPSHOT + 1.20.0 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index b528573e1..72e5b3656 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0-SNAPSHOT + 1.20.0 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 7afac4e2a..14db3a960 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0-SNAPSHOT + 1.20.0 rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 9bcf92373..877df94a0 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.20.0-SNAPSHOT + 1.20.0 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - HEAD + rosette-api-java-binding-1.20.0 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index c2cd7113c..65e6d3c0b 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0-SNAPSHOT + 1.20.0 com.basistech.rosette rosette-api-release From 03014e486d6c4b092467a70b6a20eb50d26be0e0 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Sat, 18 Dec 2021 10:53:16 -0500 Subject: [PATCH 063/415] [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 959e06477..e44b9546f 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0 + 1.20.1-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 8b2981a24..875287a17 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0 + 1.20.1-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 45df2e9d1..6c36ab05f 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0 + 1.20.1-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index bed296fff..b758a5652 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0 + 1.20.1-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 72e5b3656..cc27b4db5 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0 + 1.20.1-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 14db3a960..d0b90caf1 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0 + 1.20.1-SNAPSHOT rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 877df94a0..16b77409d 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.20.0 + 1.20.1-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.20.0 + HEAD This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 65e6d3c0b..932598407 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.0 + 1.20.1-SNAPSHOT com.basistech.rosette rosette-api-release From 1bfefda6cb1aadc6eed48b30a75d295b7ed60b8e Mon Sep 17 00:00:00 2001 From: seth-basistech Date: Wed, 2 Feb 2022 12:02:40 -0600 Subject: [PATCH 064/415] Delete dep.txt --- dep.txt | 65 --------------------------------------------------------- 1 file changed, 65 deletions(-) delete mode 100644 dep.txt diff --git a/dep.txt b/dep.txt deleted file mode 100644 index 6380f43c1..000000000 --- a/dep.txt +++ /dev/null @@ -1,65 +0,0 @@ -[INFO] Scanning for projects... -[INFO] Inspecting build with total of 8 modules... -[INFO] Installing Nexus Staging features: -[INFO] ... total of 8 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin -[INFO] ------------------------------------------------------------------------ -[INFO] Reactor Build Order: -[INFO] -[INFO] rosette-api-java-binding [pom] -[INFO] rosette-api-annotations [jar] -[INFO] rosette-api-model [jar] -[INFO] rosette-api-json [jar] -[INFO] rosette-api-common [jar] -[INFO] rosette-api [jar] -[INFO] rosette-api-examples [jar] -[INFO] rosette-api-release [pom] -[INFO] -[INFO] -----------< com.basistech.rosette:rosette-api-java-binding >----------- -[INFO] Building rosette-api-java-binding 1.20.0-SNAPSHOT [1/8] -[INFO] --------------------------------[ pom ]--------------------------------- -[INFO] -[INFO] --- maven-dependency-plugin:2.10:tree (default-cli) @ rosette-api-java-binding --- -[INFO] com.basistech.rosette:rosette-api-java-binding:pom:1.20.0-SNAPSHOT -[INFO] -[INFO] -----------< com.basistech.rosette:rosette-api-annotations >------------ -[INFO] Building rosette-api-annotations 1.20.0-SNAPSHOT [2/8] -[INFO] --------------------------------[ jar ]--------------------------------- -[INFO] -[INFO] --- maven-dependency-plugin:2.10:tree (default-cli) @ rosette-api-annotations --- -[INFO] com.basistech.rosette:rosette-api-annotations:jar:1.20.0-SNAPSHOT -[INFO] +- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.6:provided -[INFO] +- com.fasterxml.jackson.core:jackson-databind:jar:2.9.6:provided -[INFO] | \- com.fasterxml.jackson.core:jackson-core:jar:2.9.6:provided -[INFO] +- com.squareup:javapoet:jar:1.9.0:provided -[INFO] \- org.projectlombok:lombok:jar:1.16.18:provided -[INFO] -[INFO] --------------< com.basistech.rosette:rosette-api-model >--------------- -[INFO] Building rosette-api-model 1.20.0-SNAPSHOT [3/8] -[INFO] --------------------------------[ jar ]--------------------------------- -[INFO] ------------------------------------------------------------------------ -[INFO] Reactor Summary for rosette-api-java-binding 1.20.0-SNAPSHOT: -[INFO] -[INFO] rosette-api-java-binding ........................... SUCCESS [ 0.481 s] -[INFO] rosette-api-annotations ............................ SUCCESS [ 0.027 s] -[INFO] rosette-api-model .................................. FAILURE [ 0.023 s] -[INFO] rosette-api-json ................................... SKIPPED -[INFO] rosette-api-common ................................. SKIPPED -[INFO] rosette-api ........................................ SKIPPED -[INFO] rosette-api-examples ............................... SKIPPED -[INFO] rosette-api-release ................................ SKIPPED -[INFO] ------------------------------------------------------------------------ -[INFO] BUILD FAILURE -[INFO] ------------------------------------------------------------------------ -[INFO] Total time: 1.132 s -[INFO] Finished at: 2021-12-17T15:10:02-06:00 -[INFO] ------------------------------------------------------------------------ -[ERROR] Failed to execute goal on project rosette-api-model: Could not resolve dependencies for project com.basistech.rosette:rosette-api-model:jar:1.20.0-SNAPSHOT: Failure to find com.basistech.rosette:rosette-api-annotations:jar:1.20.0-SNAPSHOT in http://nexus.basistech.net/nexus/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of Nexus has elapsed or updates are forced -> [Help 1] -[ERROR] -[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. -[ERROR] Re-run Maven using the -X switch to enable full debug logging. -[ERROR] -[ERROR] For more information about the errors and possible solutions, please read the following articles: -[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException -[ERROR] -[ERROR] After correcting the problems, you can resume the build with the command -[ERROR] mvn -rf :rosette-api-model From 8d93034251f45b1dba731344ae0724f590dbd358 Mon Sep 17 00:00:00 2001 From: Julien Cherry <6952800+juliencherry@users.noreply.github.com> Date: Mon, 7 Mar 2022 19:05:49 -0500 Subject: [PATCH 065/415] ETROG-3513: Add DNN as new morphology model type --- .../java/com/basistech/rosette/apimodel/MorphologyModelType.java | 1 + 1 file changed, 1 insertion(+) diff --git a/model/src/main/java/com/basistech/rosette/apimodel/MorphologyModelType.java b/model/src/main/java/com/basistech/rosette/apimodel/MorphologyModelType.java index 49f99e702..feeae3d73 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/MorphologyModelType.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/MorphologyModelType.java @@ -21,6 +21,7 @@ */ public enum MorphologyModelType { DEFAULT, + DNN, PERCEPTRON, /**/; } From 6d3088394d090bc9a88ef0f79d21c08d5ea81eea Mon Sep 17 00:00:00 2001 From: Julien Cherry <6952800+juliencherry@users.noreply.github.com> Date: Tue, 8 Mar 2022 12:06:35 -0500 Subject: [PATCH 066/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.20.100 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index e44b9546f..e736db397 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.1-SNAPSHOT + 1.20.100 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 875287a17..126fae172 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.1-SNAPSHOT + 1.20.100 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 6c36ab05f..3507a4394 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.1-SNAPSHOT + 1.20.100 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index b758a5652..211dd3a30 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.1-SNAPSHOT + 1.20.100 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index cc27b4db5..d34b5adb2 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.1-SNAPSHOT + 1.20.100 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index d0b90caf1..efff900e9 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.1-SNAPSHOT + 1.20.100 rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 16b77409d..6b77514e4 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.20.1-SNAPSHOT + 1.20.100 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - HEAD + rosette-api-java-binding-1.20.100 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 932598407..d6d1698eb 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.1-SNAPSHOT + 1.20.100 com.basistech.rosette rosette-api-release From 425060f2a67b6551e059fe444d4147258f6d0d29 Mon Sep 17 00:00:00 2001 From: Julien Cherry <6952800+juliencherry@users.noreply.github.com> Date: Tue, 8 Mar 2022 12:07:46 -0500 Subject: [PATCH 067/415] [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index e736db397..3370b58cb 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.100 + 1.20.101-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 126fae172..28a9c636e 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.100 + 1.20.101-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 3507a4394..48a1e6449 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.100 + 1.20.101-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 211dd3a30..3a76e49c4 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.100 + 1.20.101-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index d34b5adb2..e93616bef 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.100 + 1.20.101-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index efff900e9..f52e6d0e2 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.100 + 1.20.101-SNAPSHOT rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 6b77514e4..b4ade66f4 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.20.100 + 1.20.101-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.20.100 + HEAD This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index d6d1698eb..14ecfa4c7 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.100 + 1.20.101-SNAPSHOT com.basistech.rosette rosette-api-release From 51f48e4337d3985999dc755ec9c20755ab8807e4 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Mon, 28 Mar 2022 17:23:16 -0400 Subject: [PATCH 068/415] Preparing release. Version set to 1.21.0-SNAPSHOT --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 2 +- release/pom.xml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 3370b58cb..94432f9fe 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.101-SNAPSHOT + 1.21.0-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 28a9c636e..79516333d 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.101-SNAPSHOT + 1.21.0-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 48a1e6449..814e5b5eb 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.101-SNAPSHOT + 1.21.0-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 3a76e49c4..2446c05d4 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.101-SNAPSHOT + 1.21.0-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index e93616bef..bb91e86e7 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.101-SNAPSHOT + 1.21.0-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index f52e6d0e2..fd9efd38a 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.101-SNAPSHOT + 1.21.0-SNAPSHOT rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index b4ade66f4..d5d2449cf 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.20.101-SNAPSHOT + 1.21.0-SNAPSHOT open-source-parent com.basistech diff --git a/release/pom.xml b/release/pom.xml index 14ecfa4c7..e5db4342e 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.20.101-SNAPSHOT + 1.21.0-SNAPSHOT com.basistech.rosette rosette-api-release From 4cbc3cef0f7e26cdd194467ce462e9cfcf2046b9 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Mon, 28 Mar 2022 17:27:18 -0400 Subject: [PATCH 069/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.21.0 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 94432f9fe..3f250fb7a 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.0-SNAPSHOT + 1.21.0 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 79516333d..c131b755a 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.0-SNAPSHOT + 1.21.0 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 814e5b5eb..f72f777e5 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.0-SNAPSHOT + 1.21.0 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 2446c05d4..8909e4c57 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.0-SNAPSHOT + 1.21.0 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index bb91e86e7..dea91f32e 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.0-SNAPSHOT + 1.21.0 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index fd9efd38a..5c06ed513 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.0-SNAPSHOT + 1.21.0 rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index d5d2449cf..5b78e0c5c 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.21.0-SNAPSHOT + 1.21.0 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - HEAD + rosette-api-java-binding-1.21.0 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index e5db4342e..c4cb68cd9 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.0-SNAPSHOT + 1.21.0 com.basistech.rosette rosette-api-release From 493c2e42daea017404c215abf5d109805620c772 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Mon, 28 Mar 2022 17:27:21 -0400 Subject: [PATCH 070/415] [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 3f250fb7a..53fa9dd3f 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.0 + 1.21.1-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index c131b755a..7c414b324 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.0 + 1.21.1-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index f72f777e5..38464861c 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.0 + 1.21.1-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 8909e4c57..7da2e3367 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.0 + 1.21.1-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index dea91f32e..e85ea2e7e 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.0 + 1.21.1-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 5c06ed513..0acdc9307 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.0 + 1.21.1-SNAPSHOT rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 5b78e0c5c..a9541aee0 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.21.0 + 1.21.1-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.21.0 + HEAD This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index c4cb68cd9..1751904eb 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.0 + 1.21.1-SNAPSHOT com.basistech.rosette rosette-api-release From f008104e48b84937da0a6b2efe7827bae5f881c0 Mon Sep 17 00:00:00 2001 From: Katsuya Tomioka Date: Fri, 6 May 2022 10:15:28 -0400 Subject: [PATCH 071/415] RCB-603: add OSGi itests --- osgi-itests/bnd.bnd | 8 + osgi-itests/it.bndrun | 18 ++ osgi-itests/pom.xml | 171 ++++++++++++++++++ .../rosette/osgi/it/RosetteApiOsgiTest.java | 30 +++ pom.xml | 1 + 5 files changed, 228 insertions(+) create mode 100644 osgi-itests/bnd.bnd create mode 100644 osgi-itests/it.bndrun create mode 100644 osgi-itests/pom.xml create mode 100644 osgi-itests/src/main/java/com/basistech/rosette/osgi/it/RosetteApiOsgiTest.java diff --git a/osgi-itests/bnd.bnd b/osgi-itests/bnd.bnd new file mode 100644 index 000000000..64026a5aa --- /dev/null +++ b/osgi-itests/bnd.bnd @@ -0,0 +1,8 @@ +Export-Package: ${p}.it + +Test-Cases: \ + ${classes;CONCRETE;ANNOTATED;org.junit.Test} + +p = com.basistech.rosette.osgi + + diff --git a/osgi-itests/it.bndrun b/osgi-itests/it.bndrun new file mode 100644 index 000000000..72a5d4ce8 --- /dev/null +++ b/osgi-itests/it.bndrun @@ -0,0 +1,18 @@ +-standalone: target/index.xml +# -runtrace: true +-runfw: org.apache.felix.framework;version=5 +-runee: JavaSE-1.8 + +-runsystempackages: \ + sun.misc,org.slf4j + +-resolve.effective: resolve, active + + +-runrequires: \ + osgi.identity;filter:='(osgi.identity=rosette-api-osgi-itests)',\ + osgi.identity;filter:='(osgi.identity=slf4j.api)',\ + osgi.identity;filter:='(osgi.identity=slf4j.simple)',\ + osgi.identity;filter:='(osgi.identity=osgi.enroute.hamcrest.wrapper)',\ + osgi.identity;filter:='(osgi.identity=osgi.enroute.junit.wrapper)' + diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml new file mode 100644 index 000000000..ae469ec10 --- /dev/null +++ b/osgi-itests/pom.xml @@ -0,0 +1,171 @@ + + + 4.0.0 + rosette-api-osgi-itests + + com.basistech.rosette + rosette-api-java-binding + 1.21.1-SNAPSHOT + + + target/test-bundles + + + + com.basistech.rosette + rosette-api + 1.21.1-SNAPSHOT + + + com.basistech + common-api + 37.0.1 + + + org.apache.felix + org.apache.felix.framework + 6.0.3 + runtime + + + org.apache.felix + org.apache.felix.configadmin + 1.8.10 + compile + + + + + org.slf4j + slf4j-api + + + org.slf4j + slf4j-simple + + + + org.osgi + osgi.enroute.junit.wrapper + 4.12.0 + + + org.osgi + osgi.enroute.hamcrest.wrapper + 1.3.0 + + + + org.osgi + org.osgi.core + 6.0.0 + + + + + + + maven-dependency-plugin + + + pre-integration-test + copy-it-dependencies + + copy-dependencies + + + ${bundle-repo} + osgi.cmpn + + + + + + + biz.aQute.bnd + bnd-maven-plugin + + + + + org.apache.maven.plugins + maven-jar-plugin + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + ${basedir} + + + ${bundle-repo} + + + + + + biz.aQute.bnd + bnd-indexer-maven-plugin + 3.5.0 + + ${bundle-repo} + true + + + + index-repo + pre-integration-test + + local-index + + + + + + + + biz.aQute.bnd + bnd-testing-maven-plugin + 3.5.0 + + false + + it.bndrun + + true + + + + integration-test + it-bnd-testing + + testing + + + + + + + diff --git a/osgi-itests/src/main/java/com/basistech/rosette/osgi/it/RosetteApiOsgiTest.java b/osgi-itests/src/main/java/com/basistech/rosette/osgi/it/RosetteApiOsgiTest.java new file mode 100644 index 000000000..7dbe5e417 --- /dev/null +++ b/osgi-itests/src/main/java/com/basistech/rosette/osgi/it/RosetteApiOsgiTest.java @@ -0,0 +1,30 @@ +/* + * Copyright 2022 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.basistech.rosette.osgi.it; + +import com.basistech.rosette.api.HttpRosetteAPI; +import org.junit.Test; + +import static org.junit.Assert.assertNotNull; + +public class RosetteApiOsgiTest { + @Test + public void smokeTest() { + HttpRosetteAPI api = new HttpRosetteAPI.Builder().build(); + assertNotNull(api); + } +} diff --git a/pom.xml b/pom.xml index a9541aee0..e484dafd1 100644 --- a/pom.xml +++ b/pom.xml @@ -62,6 +62,7 @@ json common api + osgi-itests examples release From e0982eafd77f600d8c9e40f3f4624b4dc2ee5db5 Mon Sep 17 00:00:00 2001 From: Katsuya Tomioka Date: Fri, 6 May 2022 10:17:33 -0400 Subject: [PATCH 072/415] RCB-603: fix http components for OSGi --- api/pom.xml | 10 ++++++++++ pom.xml | 1 + 2 files changed, 11 insertions(+) diff --git a/api/pom.xml b/api/pom.xml index 7c414b324..460f298f0 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -56,6 +56,16 @@ httpclient ${http-components-version} + + org.apache.httpcomponents + httpclient-osgi + ${http-components-version} + + + org.apache.httpcomponents + httpcore-osgi + ${http-components-core-version} + org.apache.httpcomponents httpmime diff --git a/pom.xml b/pom.xml index e484dafd1..25b0b7d90 100644 --- a/pom.xml +++ b/pom.xml @@ -44,6 +44,7 @@ 3.2.0 3.0.0 4.5.13 + 4.4.15 3.0.0 3.7.0 + + com.basistech common-api @@ -33,24 +37,7 @@ 1.8.10 compile - + org.slf4j @@ -61,6 +48,7 @@ slf4j-simple + org.osgi osgi.enroute.junit.wrapper @@ -71,18 +59,6 @@ osgi.enroute.hamcrest.wrapper 1.3.0 - - - org.osgi - org.osgi.core - 6.0.0 - @@ -108,17 +84,12 @@ biz.aQute.bnd bnd-maven-plugin - - org.apache.maven.plugins maven-jar-plugin ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - ${basedir} - ${bundle-repo} From fc98b867fba9fe0f9da6bbdf93d5e41c7267d8c4 Mon Sep 17 00:00:00 2001 From: Katsuya Tomioka Date: Fri, 6 May 2022 13:32:13 -0400 Subject: [PATCH 074/415] RCB-603: comments --- osgi-itests/pom.xml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 86d1b39f4..49a7d15da 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -17,14 +17,18 @@ 1.21.1-SNAPSHOT - - - + + + + + com.basistech common-api 37.0.1 + + org.apache.felix org.apache.felix.framework From f02e800b1b2c652c7c83b4228885201052f754d3 Mon Sep 17 00:00:00 2001 From: Mauricio Godoy Date: Fri, 6 May 2022 16:02:40 -0300 Subject: [PATCH 075/415] Fix dependencies --- annotations/pom.xml | 2 +- api/pom.xml | 5 +++++ model/pom.xml | 7 +++++-- pom.xml | 13 +++++++------ 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 53fa9dd3f..5b1d10815 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -44,7 +44,7 @@ org.projectlombok lombok - 1.16.18 + 1.18.20 provided diff --git a/api/pom.xml b/api/pom.xml index 460f298f0..af554069d 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -102,6 +102,11 @@ commons-io test + diff --git a/model/pom.xml b/model/pom.xml index 0acdc9307..927e95f26 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -47,7 +47,7 @@ org.projectlombok lombok - 1.16.18 + 1.18.20 provided @@ -88,7 +88,7 @@ org.projectlombok lombok-maven-plugin - 1.16.18.1 + 1.18.20.0 generate-sources @@ -100,6 +100,9 @@ false src/main/java + + ${project.build.directory}/delombok + skip diff --git a/pom.xml b/pom.xml index 25b0b7d90..9ac89fdda 100644 --- a/pom.xml +++ b/pom.xml @@ -41,7 +41,7 @@ - 3.2.0 + 6.2.0 3.0.0 4.5.13 4.4.15 @@ -51,7 +51,7 @@ exclusions to fail. And javadoc does not like the generated annotations source in the models sub-module. And none of these versions work with JDK 1.7. Hence the exclusion in Travis. --> - 3.0.0-M1 + 3.2.0 2.4 3.10.2 1.5 @@ -101,7 +101,7 @@ - false + @@ -109,9 +109,9 @@ maven-compiler-plugin ${maven-compiler-plugin.version} - 1.7 - 1.7 - 1.7 + 17 + 11 + 11 @@ -141,6 +141,7 @@ + target/generated-sources/delombok **/target/generated-sources/annotations/com/basistech/rosette/apimodel/** From ef672e4370c6940c96f00416002ff9d65a036a08 Mon Sep 17 00:00:00 2001 From: Yaison Date: Wed, 11 May 2022 16:03:35 -0400 Subject: [PATCH 076/415] Upgrading mock server and removing jax binding. --- api/pom.xml | 5 ----- pom.xml | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/api/pom.xml b/api/pom.xml index af554069d..460f298f0 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -102,11 +102,6 @@ commons-io test - diff --git a/pom.xml b/pom.xml index 9ac89fdda..ba352e1f0 100644 --- a/pom.xml +++ b/pom.xml @@ -53,7 +53,7 @@ JDK 1.7. Hence the exclusion in Travis. --> 3.2.0 2.4 - 3.10.2 + 4.1.0 1.5 2.7.2 From 8032ca2cc272ea04d428337fc9ffb17a214ecb20 Mon Sep 17 00:00:00 2001 From: Katsuya Tomioka Date: Thu, 12 May 2022 15:03:39 -0400 Subject: [PATCH 077/415] WS-2464: fix OSGi bundles; Update bnd plugins --- bnd.bnd | 1 + osgi-itests/it.bndrun | 4 ++-- osgi-itests/pom.xml | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 bnd.bnd diff --git a/bnd.bnd b/bnd.bnd new file mode 100644 index 000000000..2b568028e --- /dev/null +++ b/bnd.bnd @@ -0,0 +1 @@ +-noimportjava: true diff --git a/osgi-itests/it.bndrun b/osgi-itests/it.bndrun index 72a5d4ce8..166e072e0 100644 --- a/osgi-itests/it.bndrun +++ b/osgi-itests/it.bndrun @@ -1,7 +1,7 @@ -standalone: target/index.xml # -runtrace: true --runfw: org.apache.felix.framework;version=5 --runee: JavaSE-1.8 +-runfw: org.apache.felix.framework;version=7 +-runee: JavaSE-11 -runsystempackages: \ sun.misc,org.slf4j diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 86d1b39f4..2f93e9e12 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -28,7 +28,7 @@ org.apache.felix org.apache.felix.framework - 6.0.3 + 7.0.3 runtime @@ -99,7 +99,7 @@ biz.aQute.bnd bnd-indexer-maven-plugin - 3.5.0 + ${bnd-maven-plugin.version} ${bundle-repo} true @@ -119,7 +119,7 @@ biz.aQute.bnd bnd-testing-maven-plugin - 3.5.0 + ${bnd-maven-plugin.version} false From 4b0da4474f9e55f6bee02261aad34d0ac6e87f57 Mon Sep 17 00:00:00 2001 From: Yaison <> Date: Tue, 24 May 2022 23:30:54 -0400 Subject: [PATCH 078/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.21.1 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 5b1d10815..e22d9d53d 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.1-SNAPSHOT + 1.21.1 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 460f298f0..db8b1edde 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.1-SNAPSHOT + 1.21.1 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 38464861c..a4d47624e 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.1-SNAPSHOT + 1.21.1 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 7da2e3367..e09924ac6 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.1-SNAPSHOT + 1.21.1 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index e85ea2e7e..faff3bef9 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.1-SNAPSHOT + 1.21.1 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 927e95f26..c507d108f 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.1-SNAPSHOT + 1.21.1 rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 2f93e9e12..4a71a6295 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.1-SNAPSHOT + 1.21.1 target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.21.1-SNAPSHOT + 1.21.1 diff --git a/pom.xml b/pom.xml index ba352e1f0..524fa34b4 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.21.1-SNAPSHOT + 1.21.1 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - HEAD + rosette-api-java-binding-1.21.1 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 1751904eb..74c775447 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.1-SNAPSHOT + 1.21.1 com.basistech.rosette rosette-api-release From f1f4452beddb1791fb857de323a990fda9345d8c Mon Sep 17 00:00:00 2001 From: Yaison <> Date: Tue, 24 May 2022 23:30:57 -0400 Subject: [PATCH 079/415] [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index e22d9d53d..77a0287a7 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.1 + 1.21.2-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index db8b1edde..97ff1a4c5 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.1 + 1.21.2-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index a4d47624e..e1a2e050a 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.1 + 1.21.2-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index e09924ac6..e5cbe656a 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.1 + 1.21.2-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index faff3bef9..d77834dcd 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.1 + 1.21.2-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index c507d108f..764eec438 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.1 + 1.21.2-SNAPSHOT rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 4a71a6295..7ff4d1b5c 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.1 + 1.21.2-SNAPSHOT target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.21.1 + 1.21.2-SNAPSHOT diff --git a/pom.xml b/pom.xml index 524fa34b4..d8a7fa581 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.21.1 + 1.21.2-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.21.1 + HEAD This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 74c775447..a4da78783 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.1 + 1.21.2-SNAPSHOT com.basistech.rosette rosette-api-release From 66743f7bf442869e559407f4744c7586c5a1eb2d Mon Sep 17 00:00:00 2001 From: Yaison <> Date: Wed, 25 May 2022 15:56:24 -0400 Subject: [PATCH 080/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.21.100 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 77a0287a7..a556ac215 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.2-SNAPSHOT + 1.21.100 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 97ff1a4c5..36da99683 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.2-SNAPSHOT + 1.21.100 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index e1a2e050a..dfddbdd41 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.2-SNAPSHOT + 1.21.100 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index e5cbe656a..c18fca972 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.2-SNAPSHOT + 1.21.100 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index d77834dcd..5abd2254a 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.2-SNAPSHOT + 1.21.100 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 764eec438..2d2020765 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.2-SNAPSHOT + 1.21.100 rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 7ff4d1b5c..9daf43bcf 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.2-SNAPSHOT + 1.21.100 target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.21.2-SNAPSHOT + 1.21.100 diff --git a/pom.xml b/pom.xml index d8a7fa581..b5f6a934b 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.21.2-SNAPSHOT + 1.21.100 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - HEAD + rosette-api-java-binding-1.21.100 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index a4da78783..f915d190e 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.2-SNAPSHOT + 1.21.100 com.basistech.rosette rosette-api-release From d1e8ab401a25e332970d33803f3b8e7c43f14b60 Mon Sep 17 00:00:00 2001 From: Yaison <> Date: Wed, 25 May 2022 15:56:27 -0400 Subject: [PATCH 081/415] [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index a556ac215..5b4ea26ee 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.100 + 1.21.101-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 36da99683..75f1626ab 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.100 + 1.21.101-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index dfddbdd41..2072cf1cb 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.100 + 1.21.101-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index c18fca972..7e2893418 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.100 + 1.21.101-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 5abd2254a..1c44c85c7 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.100 + 1.21.101-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 2d2020765..d3b07756a 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.100 + 1.21.101-SNAPSHOT rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 9daf43bcf..4f7a236c0 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.100 + 1.21.101-SNAPSHOT target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.21.100 + 1.21.101-SNAPSHOT diff --git a/pom.xml b/pom.xml index b5f6a934b..5d6c56efb 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.21.100 + 1.21.101-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.21.100 + HEAD This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index f915d190e..332e67c3b 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.100 + 1.21.101-SNAPSHOT com.basistech.rosette rosette-api-release From 88e720d6b809788860e5edfd1b37d3ddc1255ff6 Mon Sep 17 00:00:00 2001 From: yalcantara Date: Thu, 26 May 2022 00:45:29 +0000 Subject: [PATCH 082/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.21.101 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 5b4ea26ee..cbb0d5e2f 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.101-SNAPSHOT + 1.21.101 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 75f1626ab..4267b4ea5 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.101-SNAPSHOT + 1.21.101 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 2072cf1cb..3ca066595 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.101-SNAPSHOT + 1.21.101 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 7e2893418..da2950745 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.101-SNAPSHOT + 1.21.101 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 1c44c85c7..bd1c8c282 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.101-SNAPSHOT + 1.21.101 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index d3b07756a..68b2b7d4f 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.101-SNAPSHOT + 1.21.101 rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 4f7a236c0..bd321718e 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.101-SNAPSHOT + 1.21.101 target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.21.101-SNAPSHOT + 1.21.101 diff --git a/pom.xml b/pom.xml index 5d6c56efb..2911fb2fd 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.21.101-SNAPSHOT + 1.21.101 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - HEAD + rosette-api-java-binding-1.21.101 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 332e67c3b..c865745ad 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.101-SNAPSHOT + 1.21.101 com.basistech.rosette rosette-api-release From 35b8b2c24f6ab4018eabe32c579e04062bbeaf0b Mon Sep 17 00:00:00 2001 From: yalcantara Date: Thu, 26 May 2022 00:45:31 +0000 Subject: [PATCH 083/415] [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index cbb0d5e2f..a859dd836 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.101 + 1.21.102-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 4267b4ea5..9f9a0ea59 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.101 + 1.21.102-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 3ca066595..f94a37b96 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.101 + 1.21.102-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index da2950745..c99ad4625 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.101 + 1.21.102-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index bd1c8c282..75210fdd6 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.101 + 1.21.102-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 68b2b7d4f..0ab9efae1 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.101 + 1.21.102-SNAPSHOT rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index bd321718e..19fdbdff8 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.101 + 1.21.102-SNAPSHOT target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.21.101 + 1.21.102-SNAPSHOT diff --git a/pom.xml b/pom.xml index 2911fb2fd..eb11e5379 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.21.101 + 1.21.102-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.21.101 + HEAD This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index c865745ad..8b2f9331f 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.101 + 1.21.102-SNAPSHOT com.basistech.rosette rosette-api-release From 1e852936362be8a27d482b980b0ecd9a029f053b Mon Sep 17 00:00:00 2001 From: yalcantara Date: Thu, 26 May 2022 14:10:32 +0000 Subject: [PATCH 084/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.21.102 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index a859dd836..a099c4cc9 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.102-SNAPSHOT + 1.21.102 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 9f9a0ea59..dd7d9f93c 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.102-SNAPSHOT + 1.21.102 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index f94a37b96..e70b9b86b 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.102-SNAPSHOT + 1.21.102 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index c99ad4625..fb4a4d676 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.102-SNAPSHOT + 1.21.102 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 75210fdd6..dca36118e 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.102-SNAPSHOT + 1.21.102 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 0ab9efae1..c932dead5 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.102-SNAPSHOT + 1.21.102 rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 19fdbdff8..2a0d54a91 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.102-SNAPSHOT + 1.21.102 target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.21.102-SNAPSHOT + 1.21.102 diff --git a/pom.xml b/pom.xml index eb11e5379..ed2a5942f 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.21.102-SNAPSHOT + 1.21.102 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - HEAD + rosette-api-java-binding-1.21.102 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 8b2f9331f..a3cee2d3f 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.102-SNAPSHOT + 1.21.102 com.basistech.rosette rosette-api-release From f7ce170316b9a9c124884b1478e1316370b5ee67 Mon Sep 17 00:00:00 2001 From: yalcantara Date: Thu, 26 May 2022 14:10:34 +0000 Subject: [PATCH 085/415] [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index a099c4cc9..1812cd66a 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.102 + 1.21.103-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index dd7d9f93c..49e221c97 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.102 + 1.21.103-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index e70b9b86b..f9f81a6f2 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.102 + 1.21.103-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index fb4a4d676..d89ae6601 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.102 + 1.21.103-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index dca36118e..4eda58f23 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.102 + 1.21.103-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index c932dead5..ab7e983df 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.102 + 1.21.103-SNAPSHOT rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 2a0d54a91..6cc47e5fb 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.102 + 1.21.103-SNAPSHOT target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.21.102 + 1.21.103-SNAPSHOT diff --git a/pom.xml b/pom.xml index ed2a5942f..a6aab8732 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.21.102 + 1.21.103-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.21.102 + HEAD This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index a3cee2d3f..71422dc66 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.102 + 1.21.103-SNAPSHOT com.basistech.rosette rosette-api-release From 51e6d396d1640f583fd19e7d217e1968f17f18f0 Mon Sep 17 00:00:00 2001 From: Mauricio Godoy Date: Thu, 26 May 2022 14:58:46 +0000 Subject: [PATCH 086/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.21.103 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 1812cd66a..1cb1d4735 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.103-SNAPSHOT + 1.21.103 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 49e221c97..50a3cc3a2 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.103-SNAPSHOT + 1.21.103 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index f9f81a6f2..7bf935565 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.103-SNAPSHOT + 1.21.103 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index d89ae6601..48194f0f8 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.103-SNAPSHOT + 1.21.103 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 4eda58f23..dded129a2 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.103-SNAPSHOT + 1.21.103 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index ab7e983df..2998f4df3 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.103-SNAPSHOT + 1.21.103 rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 6cc47e5fb..c1374950d 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.103-SNAPSHOT + 1.21.103 target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.21.103-SNAPSHOT + 1.21.103 diff --git a/pom.xml b/pom.xml index a6aab8732..53c51590d 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.21.103-SNAPSHOT + 1.21.103 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - HEAD + rosette-api-java-binding-1.21.103 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 71422dc66..52bb1c1a0 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.103-SNAPSHOT + 1.21.103 com.basistech.rosette rosette-api-release From bdb2c20c77ebf4b6bdca82b07a9110b8636fa020 Mon Sep 17 00:00:00 2001 From: Mauricio Godoy Date: Thu, 26 May 2022 14:58:48 +0000 Subject: [PATCH 087/415] [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 1cb1d4735..3e12e0627 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.103 + 1.21.104-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 50a3cc3a2..6f32bdf34 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.103 + 1.21.104-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 7bf935565..278660182 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.103 + 1.21.104-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 48194f0f8..0a89a8c59 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.103 + 1.21.104-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index dded129a2..941785603 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.103 + 1.21.104-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 2998f4df3..dd9ed203a 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.103 + 1.21.104-SNAPSHOT rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index c1374950d..4c4ec15c1 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.103 + 1.21.104-SNAPSHOT target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.21.103 + 1.21.104-SNAPSHOT diff --git a/pom.xml b/pom.xml index 53c51590d..2af67d78b 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.21.103 + 1.21.104-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.21.103 + HEAD This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 52bb1c1a0..7a8620ab8 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.103 + 1.21.104-SNAPSHOT com.basistech.rosette rosette-api-release From f168be5e14c24e4ce77f0e2d0312c9925ca6e69e Mon Sep 17 00:00:00 2001 From: Mauricio Godoy Date: Thu, 26 May 2022 17:29:46 +0000 Subject: [PATCH 088/415] WS-2464 update nexus-maven-staging-plugin --- pom.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2af67d78b..2ab74b38e 100644 --- a/pom.xml +++ b/pom.xml @@ -53,7 +53,8 @@ JDK 1.7. Hence the exclusion in Travis. --> 3.2.0 2.4 - 4.1.0 + 4.1.0 + 1.6.13 1.5 2.7.2 From b51d28d7c26e78ae4e1d21009c7a3927aa91c089 Mon Sep 17 00:00:00 2001 From: Mauricio Godoy Date: Thu, 26 May 2022 17:33:36 +0000 Subject: [PATCH 089/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.21.104 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 3e12e0627..3473845bf 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.104-SNAPSHOT + 1.21.104 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 6f32bdf34..10608f05b 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.104-SNAPSHOT + 1.21.104 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 278660182..7c499cb04 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.104-SNAPSHOT + 1.21.104 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 0a89a8c59..3c36610b3 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.104-SNAPSHOT + 1.21.104 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 941785603..9f0bf2299 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.104-SNAPSHOT + 1.21.104 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index dd9ed203a..9a7bc85e6 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.104-SNAPSHOT + 1.21.104 rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 4c4ec15c1..a70949031 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.104-SNAPSHOT + 1.21.104 target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.21.104-SNAPSHOT + 1.21.104 diff --git a/pom.xml b/pom.xml index 2ab74b38e..c70768f4d 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.21.104-SNAPSHOT + 1.21.104 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - HEAD + rosette-api-java-binding-1.21.104 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 7a8620ab8..bdc6049da 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.104-SNAPSHOT + 1.21.104 com.basistech.rosette rosette-api-release From 0c5bd1b11aa446d8806838ff7d32f08c768c46ef Mon Sep 17 00:00:00 2001 From: Mauricio Godoy Date: Thu, 26 May 2022 17:33:37 +0000 Subject: [PATCH 090/415] [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 3473845bf..18ed73e84 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.104 + 1.21.105-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 10608f05b..5697c3c0d 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.104 + 1.21.105-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 7c499cb04..b50d01c8d 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.104 + 1.21.105-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 3c36610b3..ccb1c6e6b 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.104 + 1.21.105-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 9f0bf2299..74c3d3e08 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.104 + 1.21.105-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 9a7bc85e6..0a9453349 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.104 + 1.21.105-SNAPSHOT rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index a70949031..1684c0765 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.104 + 1.21.105-SNAPSHOT target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.21.104 + 1.21.105-SNAPSHOT diff --git a/pom.xml b/pom.xml index c70768f4d..19456edfa 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.21.104 + 1.21.105-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.21.104 + HEAD This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index bdc6049da..1dc056cf9 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.104 + 1.21.105-SNAPSHOT com.basistech.rosette rosette-api-release From 9c43d0b043351d6461c246a2ded5ed5e19096a2a Mon Sep 17 00:00:00 2001 From: yalcantara Date: Thu, 26 May 2022 19:24:28 +0000 Subject: [PATCH 091/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.21.105 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 18ed73e84..d9b566d3e 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.105-SNAPSHOT + 1.21.105 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 5697c3c0d..e0e7397a1 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.105-SNAPSHOT + 1.21.105 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index b50d01c8d..5667e001f 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.105-SNAPSHOT + 1.21.105 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index ccb1c6e6b..6ea77defe 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.105-SNAPSHOT + 1.21.105 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 74c3d3e08..3dc9d576c 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.105-SNAPSHOT + 1.21.105 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 0a9453349..e428e9665 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.105-SNAPSHOT + 1.21.105 rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 1684c0765..bf0a55d30 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.105-SNAPSHOT + 1.21.105 target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.21.105-SNAPSHOT + 1.21.105 diff --git a/pom.xml b/pom.xml index 19456edfa..6d321ac6d 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.21.105-SNAPSHOT + 1.21.105 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - HEAD + rosette-api-java-binding-1.21.105 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 1dc056cf9..89559fde7 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.105-SNAPSHOT + 1.21.105 com.basistech.rosette rosette-api-release From e414eb6b408142fbb36d1aba7c7ab55185464c12 Mon Sep 17 00:00:00 2001 From: yalcantara Date: Thu, 26 May 2022 19:24:30 +0000 Subject: [PATCH 092/415] [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index d9b566d3e..2cfccc017 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.105 + 1.21.106-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index e0e7397a1..09e4a7b92 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.105 + 1.21.106-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 5667e001f..37bc79ab1 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.105 + 1.21.106-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 6ea77defe..12653d8fb 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.105 + 1.21.106-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 3dc9d576c..a1e91f8d8 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.105 + 1.21.106-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index e428e9665..e3bccb7b5 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.105 + 1.21.106-SNAPSHOT rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index bf0a55d30..c0eae19af 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.105 + 1.21.106-SNAPSHOT target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.21.105 + 1.21.106-SNAPSHOT diff --git a/pom.xml b/pom.xml index 6d321ac6d..cd5e2dc49 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.21.105 + 1.21.106-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.21.105 + HEAD This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 89559fde7..3ac7ba1b6 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.105 + 1.21.106-SNAPSHOT com.basistech.rosette rosette-api-release From 83a2578ed05989656b5c1cb405b1e6696b39c825 Mon Sep 17 00:00:00 2001 From: Yaison <> Date: Tue, 14 Jun 2022 13:01:07 -0400 Subject: [PATCH 093/415] WS-2464: removing this folder since isn't used any longer. --- examples/docker/Dockerfile | 28 ------- examples/docker/README.md | 12 --- examples/docker/main/pom.xml | 150 ----------------------------------- examples/docker/run_java.sh | 125 ----------------------------- 4 files changed, 315 deletions(-) delete mode 100644 examples/docker/Dockerfile delete mode 100644 examples/docker/README.md delete mode 100644 examples/docker/main/pom.xml delete mode 100644 examples/docker/run_java.sh diff --git a/examples/docker/Dockerfile b/examples/docker/Dockerfile deleted file mode 100644 index 8bf7855be..000000000 --- a/examples/docker/Dockerfile +++ /dev/null @@ -1,28 +0,0 @@ -FROM maven:3.3.3-jdk-8 -MAINTAINER Fiona Hasanaj -ENV TZ=America/New_York - -# install necessary software -RUN apt-get -yqq update \ - && apt-get install -y --force-yes --no-install-recommends\ - curl \ - ca-certificates \ - git \ - jq \ - iputils-ping \ - vim - - -# copy over the necessary files -RUN mkdir /java -COPY run_java.sh /java/run_java.sh -RUN chmod 755 /java/run_java.sh - -# set working directory -WORKDIR java - -# specify docker volume -VOLUME ["/source"] - -# allow interactive bash inside docker container -CMD ./run_java.sh $API_KEY $FILENAME $ALT_URL diff --git a/examples/docker/README.md b/examples/docker/README.md deleted file mode 100644 index 796bdbcbe..000000000 --- a/examples/docker/README.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -# Docker Image for Java Examples ---- -### Summary -To simplify the running of the Java examples, the Dockerfile will build an image and install the rosette-api library from the *published source*. - -### Basic Usage -Build the docker image, e.g. `docker build --rm -t basistech/java:1.1 .` - -Run an example as `docker run --rm -e API_KEY=api-key -v "path-to-java-dir:/source" basistech/java:1.1` - -To test against a specific source file, add `-e FILENAME=filename` before the `-v`, to test against an alternate url, add `-e ALT_URL=alternate_url`. diff --git a/examples/docker/main/pom.xml b/examples/docker/main/pom.xml deleted file mode 100644 index ed6b512c9..000000000 --- a/examples/docker/main/pom.xml +++ /dev/null @@ -1,150 +0,0 @@ - - - - 4.0.0 - com.basistech.rosette - rosette-api-java-binding - 0.9.102-SNAPSHOT - - open-source-parent - com.basistech - 0.1.2 - - - pom - 2014 - http://rosette-api.github.io/java - - scm:git:git@github.com:rosette-api/java.git - scm:git:git@github.com:rosette-api/java.git - HEAD - - - This is the Java binding for the Rosette API. The classes in - here help Java applications to communicate with the Rosette API. - - - - site - scm:git:git@github.com:rosette-api/java.git - - - - examples - - - - - com.basistech - common-api - 35.4.0 - - - - - - - com.basistech - bbh-maven-plugin - 1.0.1 - - - osgi-version - validate - - osgi-version - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.10.3 - - - aggregate - - aggregate - - site - - - plain - - jar - - package - - - - - org.apache.maven.plugins - maven-source-plugin - 2.4 - - - attach-sources - verify - - jar-no-fork - - - - - - - - - org.apache.felix - maven-bundle-plugin - - - true - - - ${osgi-version} - - - - - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.10.3 - - - non-aggregate - - javadoc - - - - aggregate - - aggregate - - - - - - - diff --git a/examples/docker/run_java.sh b/examples/docker/run_java.sh deleted file mode 100644 index 569f7e824..000000000 --- a/examples/docker/run_java.sh +++ /dev/null @@ -1,125 +0,0 @@ -#!/bin/bash - -retcode=0 -ping_url="https://api.rosette.com/rest/v1" -errors=( "Exception" "processingFailure" "badRequest" "AttributeError" "ImportError" ) - -#------------------ Functions ---------------------------------------------------- - -function usage() { echo "Usage: $0 API_KEY VERSION [ALT_URL] [FILENAME]" 1>&2; exit 1; } - -#Checks if Rosette API key is valid -function checkAPI { - match=$(curl "${ping_url}/ping" -H "X-RosetteAPI-Key: ${API_KEY}" | grep -o "forbidden") - if [ ! -z $match ]; then - echo -e "\nInvalid Rosette API Key" - exit 1 - fi -} - -function cleanURL() { - # strip the trailing slash off of the alt_url if necessary - if [ ! -z "${ALT_URL}" ]; then - case ${ALT_URL} in - */) ALT_URL=${ALT_URL::-1} - echo "Slash detected" - ;; - esac - ping_url=${ALT_URL} - fi -} - -function validateURL() { - match=$(curl "${ping_url}/ping" -H "X-RosetteAPI-Key: ${API_KEY}" | grep -o "Rosette API") - if [ "${match}" = "" ]; then - echo -e "\n${ping_url} server not responding\n" - exit 1 - fi -} - -function runExample() { - echo -e "\n---------- ${1} start -------------\n" - if [ ! -z ${ALT_URL} ]; then - result="$(mvn exec:java -B -Dexec.mainClass=com.basistech.rosette.examples.${1} -Drosette.api.key=${API_KEY} -Drosette.api.altUrl=${ALT_URL} 2>&1 )" - else - result="$(mvn exec:java -B -Dexec.mainClass=com.basistech.rosette.examples.${1} -Drosette.api.key=${API_KEY} 2&>1 )" - fi - if [[ $result == *"Exception"* ]]; then - retcode=1 - fi - echo "${result}" - echo -e "\n---------- ${1} end -------------\n" - for err in "${errors[@]}"; do - if [[ ${result} == *"${err}"* ]]; then - retcode=1 - fi - done -} - -# Updates the given pom files to use the publish version -function assignVersion() { - if [ -z ${VERSION} ]; then - echo "VERSION must be specified" - usage - fi - sed -i "s|\(\).*SNAPSHOT\(\)|\1${VERSION}\2|" ${1} -} -#------------------ Functions End ------------------------------------------------ - - -#Gets API_KEY, FILENAME, ALT_URL, GIT_USERNAME and VERSION if present -while getopts ":API_KEY:FILENAME:ALT_URL:VERSION" arg; do - case "${arg}" in - API_KEY) - API_KEY=${OPTARG} - usage - ;; - ALT_URL) - ALT_URL=${OPTARG} - usage - ;; - FILENAME) - FILENAME=${OPTARG} - usage - ;; - VERSION) - VERSION=${OPTARG} - usage - ;; - esac -done - -cleanURL - -validateURL - -#Copy the mounted content in /source to current WORKDIR -cp -r -n /source/examples . -cp /source/examples/docker/main/pom.xml . - -assignVersion pom.xml -assignVersion examples/pom.xml - -#Run the examples - -if [ ! -z ${API_KEY} ]; then - checkAPI - mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V -pl examples -pl examples - cd /java/examples - if [ ! -z ${FILENAME} ]; then - runExample ${FILENAME} - else - for file in /java/examples/src/main/java/com/basistech/rosette/examples/*.java; do - filename=$(basename "$file") - filename="${filename%.*}" - if [ "${filename}" = "ExampleBase" -o "${filename}" = "HttpClientSingleton" ]; then - continue - fi - runExample ${filename} - done - fi -else - usage -fi - -exit ${retcode} From a303b304bca437912c495dcd14936f5fec48b512 Mon Sep 17 00:00:00 2001 From: Yaison <> Date: Wed, 15 Jun 2022 15:23:49 -0400 Subject: [PATCH 094/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.21.109 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 2cfccc017..2c609126c 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.106-SNAPSHOT + 1.21.109 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 09e4a7b92..df69acef4 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.106-SNAPSHOT + 1.21.109 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 37bc79ab1..90a16ce48 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.106-SNAPSHOT + 1.21.109 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 12653d8fb..5b905d381 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.106-SNAPSHOT + 1.21.109 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index a1e91f8d8..392be9960 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.106-SNAPSHOT + 1.21.109 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index e3bccb7b5..ce326e448 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.106-SNAPSHOT + 1.21.109 rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 3892a22b1..ad90a0e4b 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.106-SNAPSHOT + 1.21.109 target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.21.106-SNAPSHOT + 1.21.109 diff --git a/pom.xml b/pom.xml index cd5e2dc49..296dc5e72 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.21.106-SNAPSHOT + 1.21.109 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - HEAD + rosette-api-java-binding-1.21.109 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 3ac7ba1b6..5c4912caa 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.106-SNAPSHOT + 1.21.109 com.basistech.rosette rosette-api-release From aad51b45ea30c394c630d908926d1d98a83f4ac8 Mon Sep 17 00:00:00 2001 From: Yaison <> Date: Wed, 15 Jun 2022 15:23:56 -0400 Subject: [PATCH 095/415] [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 2c609126c..a89178375 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.109 + 1.21.110-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index df69acef4..a2980fd2a 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.109 + 1.21.110-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 90a16ce48..1000e6c3e 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.109 + 1.21.110-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 5b905d381..3660ab908 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.109 + 1.21.110-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 392be9960..4fa536902 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.109 + 1.21.110-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index ce326e448..b3813b63f 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.109 + 1.21.110-SNAPSHOT rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index ad90a0e4b..45a6dde01 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.109 + 1.21.110-SNAPSHOT target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.21.109 + 1.21.110-SNAPSHOT diff --git a/pom.xml b/pom.xml index 296dc5e72..4fa03e02b 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.21.109 + 1.21.110-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.21.109 + HEAD This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 5c4912caa..06999a337 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.109 + 1.21.110-SNAPSHOT com.basistech.rosette rosette-api-release From f3a7ad299889ed1db7947712886edf190cd7680f Mon Sep 17 00:00:00 2001 From: Yaison <> Date: Wed, 15 Jun 2022 18:53:57 -0400 Subject: [PATCH 096/415] NO-JIRA: updating internal release commands and removing the Docker section. --- DEVELOPER.md | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/DEVELOPER.md b/DEVELOPER.md index 422862e57..4dd463632 100644 --- a/DEVELOPER.md +++ b/DEVELOPER.md @@ -6,25 +6,10 @@ To be updated.. #### Internal Releasing -To perform an internal release, use `-Drelease-profile=internal-release` in `release:perform`. - - -#### Old Stuff -[Docker](examples/docker) bits for running examples. Maybe just remove? - -A duplicate copy of the examples docker notes is below... - -Docker files can be found [here](https://github.com/rosette-api/java/tree/master/examples/docker) - -To simplify the running of the Java examples, the Dockerfile will build an image and install the rosette-api library from the *published source*. - -Build the docker image, e.g. `docker build --rm -t basistech/java:1.1 .` - -Run an example as `docker run --rm -e API_KEY=api-key -v "path-to-java-dir:/source" basistech/java:1.1` - -To test against a specific source file, add `-e FILENAME=filename` before the `-v`. -To test against an alternate url, add `-e ALT_URL=alternate_url`. - -#### TODOs -... +To perform an internal release, execute the following commands: +``` +$ mvn release:clean +$ mvn release:prepare +$ mvn release:perform -Drelease-profile=internal-release +``` From e3279c565ad39fd2356bbde7d043f25f22467905 Mon Sep 17 00:00:00 2001 From: Yaison <> Date: Fri, 17 Jun 2022 15:59:21 -0400 Subject: [PATCH 097/415] WS-2464: adding equals functionality to Response & upgrading some libraries. --- model/pom.xml | 2 +- .../src/main/java/com/basistech/rosette/apimodel/Response.java | 2 ++ .../java/com/basistech/rosette/apimodel/SupportedLanguage.java | 2 ++ .../com/basistech/rosette/apimodel/SupportedLanguagePair.java | 2 ++ pom.xml | 2 +- 5 files changed, 8 insertions(+), 2 deletions(-) diff --git a/model/pom.xml b/model/pom.xml index b3813b63f..e635567eb 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -47,7 +47,7 @@ org.projectlombok lombok - 1.18.20 + 1.18.22 provided diff --git a/model/src/main/java/com/basistech/rosette/apimodel/Response.java b/model/src/main/java/com/basistech/rosette/apimodel/Response.java index 1569795a7..073dec5bc 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/Response.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/Response.java @@ -16,6 +16,7 @@ package com.basistech.rosette.apimodel; +import lombok.EqualsAndHashCode; import lombok.Getter; import java.util.HashMap; @@ -26,6 +27,7 @@ * In this version, they have nothing in common. */ @Getter +@EqualsAndHashCode public abstract class Response { /** * @return extended information diff --git a/model/src/main/java/com/basistech/rosette/apimodel/SupportedLanguage.java b/model/src/main/java/com/basistech/rosette/apimodel/SupportedLanguage.java index bc7e2c1c5..a8a934bee 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/SupportedLanguage.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/SupportedLanguage.java @@ -24,12 +24,14 @@ import lombok.Setter; import lombok.Value; import lombok.experimental.NonFinal; +import lombok.extern.jackson.Jacksonized; /** * Supported language/script */ @Value @Builder +@Jacksonized @JacksonMixin public class SupportedLanguage { /** diff --git a/model/src/main/java/com/basistech/rosette/apimodel/SupportedLanguagePair.java b/model/src/main/java/com/basistech/rosette/apimodel/SupportedLanguagePair.java index 6d83b6a6d..ce8bdb7e3 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/SupportedLanguagePair.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/SupportedLanguagePair.java @@ -23,12 +23,14 @@ import lombok.Setter; import lombok.Value; import lombok.experimental.NonFinal; +import lombok.extern.jackson.Jacksonized; /** * Supported language/script/scheme pairs */ @Value @Builder +@Jacksonized @JacksonMixin public class SupportedLanguagePair { /** diff --git a/pom.xml b/pom.xml index 4fa03e02b..c24e6b3a9 100644 --- a/pom.xml +++ b/pom.xml @@ -51,7 +51,7 @@ exclusions to fail. And javadoc does not like the generated annotations source in the models sub-module. And none of these versions work with JDK 1.7. Hence the exclusion in Travis. --> - 3.2.0 + 3.4.0 2.4 4.1.0 1.6.13 From 4c2bc131b3ad2972be0bcdde064687a8d97a7bd1 Mon Sep 17 00:00:00 2001 From: Yaison <> Date: Fri, 17 Jun 2022 16:01:31 -0400 Subject: [PATCH 098/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.21.110 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index a89178375..eeb5a8f6c 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.110-SNAPSHOT + 1.21.110 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index a2980fd2a..a4cfda301 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.110-SNAPSHOT + 1.21.110 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 1000e6c3e..1a4d70887 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.110-SNAPSHOT + 1.21.110 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 3660ab908..4fe9dac09 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.110-SNAPSHOT + 1.21.110 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 4fa536902..d89b86e54 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.110-SNAPSHOT + 1.21.110 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index e635567eb..5eb251be5 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.110-SNAPSHOT + 1.21.110 rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 45a6dde01..530bb707c 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.110-SNAPSHOT + 1.21.110 target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.21.110-SNAPSHOT + 1.21.110 diff --git a/pom.xml b/pom.xml index c24e6b3a9..d453908c1 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.21.110-SNAPSHOT + 1.21.110 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - HEAD + rosette-api-java-binding-1.21.110 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 06999a337..bf2a0f681 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.110-SNAPSHOT + 1.21.110 com.basistech.rosette rosette-api-release From 90f18dc4eed6c2306a8e78f04ab4c4bd1f18d155 Mon Sep 17 00:00:00 2001 From: Yaison <> Date: Fri, 17 Jun 2022 16:01:34 -0400 Subject: [PATCH 099/415] [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index eeb5a8f6c..1e7b2f01e 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.110 + 1.21.111-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index a4cfda301..cf97fe82b 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.110 + 1.21.111-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 1a4d70887..3069506ea 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.110 + 1.21.111-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 4fe9dac09..a1f6f7de0 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.110 + 1.21.111-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index d89b86e54..b84b05459 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.110 + 1.21.111-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 5eb251be5..bc4e4cdc4 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.110 + 1.21.111-SNAPSHOT rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 530bb707c..591ea6ca0 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.110 + 1.21.111-SNAPSHOT target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.21.110 + 1.21.111-SNAPSHOT diff --git a/pom.xml b/pom.xml index d453908c1..ec4c266ed 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.21.110 + 1.21.111-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.21.110 + HEAD This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index bf2a0f681..4b265161d 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.110 + 1.21.111-SNAPSHOT com.basistech.rosette rosette-api-release From 06ab75f4c20c28fc996a86eea25105fc96666d9a Mon Sep 17 00:00:00 2001 From: seth-basistech Date: Wed, 17 Aug 2022 17:25:39 -0500 Subject: [PATCH 100/415] Fix broken URL --- .../java/com/basistech/rosette/examples/CategoriesExample.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/src/main/java/com/basistech/rosette/examples/CategoriesExample.java b/examples/src/main/java/com/basistech/rosette/examples/CategoriesExample.java index 18bea4825..45b50b01e 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/CategoriesExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/CategoriesExample.java @@ -39,7 +39,7 @@ public static void main(String[] args) { } private void run() throws IOException { - String categoriesUrlData = "https://onlocationvacations.com/2018/02/06/downton-abbey-exhibition-extended-april-2-nyc/"; + String categoriesUrlData = "https://www.rosette.com/about/"; HttpRosetteAPI rosetteApi = new HttpRosetteAPI.Builder() .key(getApiKeyFromSystemProperty()) .url(getAltUrlFromSystemProperty()) From a4c0d59be9268dd335f494415ba0045e5e5a9730 Mon Sep 17 00:00:00 2001 From: Amit Seker Date: Wed, 14 Sep 2022 21:00:35 +0300 Subject: [PATCH 101/415] TEJ-1824: Set the next release version. --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- .../java/com/basistech/rosette/apimodel/EntitiesOptions.java | 5 +++++ osgi-itests/pom.xml | 4 ++-- pom.xml | 2 +- release/pom.xml | 2 +- 10 files changed, 15 insertions(+), 10 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 1e7b2f01e..3eaec56f7 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.111-SNAPSHOT + 1.21.200-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index cf97fe82b..cc6338406 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.111-SNAPSHOT + 1.21.200-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 3069506ea..9e95025e3 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.111-SNAPSHOT + 1.21.200-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index a1f6f7de0..4d371fbbd 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.111-SNAPSHOT + 1.21.200-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index b84b05459..8dba775d5 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.111-SNAPSHOT + 1.21.200-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index bc4e4cdc4..fd82db2ef 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.111-SNAPSHOT + 1.21.200-SNAPSHOT rosette-api-model rosette-api-model diff --git a/model/src/main/java/com/basistech/rosette/apimodel/EntitiesOptions.java b/model/src/main/java/com/basistech/rosette/apimodel/EntitiesOptions.java index b22ac34bf..b4e75d623 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/EntitiesOptions.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/EntitiesOptions.java @@ -53,6 +53,11 @@ public class EntitiesOptions extends Options { */ private final Boolean linkEntities; + /** + * @return the linkMentionMode mode. + */ + private final String linkMentionMode; + /** * @return the modelType to use. */ diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 591ea6ca0..5185bd284 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.111-SNAPSHOT + 1.21.200-SNAPSHOT target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.21.111-SNAPSHOT + 1.21.200-SNAPSHOT diff --git a/pom.xml b/pom.xml index ec4c266ed..9961694c6 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.21.111-SNAPSHOT + 1.21.200-SNAPSHOT open-source-parent com.basistech diff --git a/release/pom.xml b/release/pom.xml index 4b265161d..d64954001 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.111-SNAPSHOT + 1.21.200-SNAPSHOT com.basistech.rosette rosette-api-release From 2fd97e4444a834cd27c8edff48f06c87d371f7e5 Mon Sep 17 00:00:00 2001 From: Amit Seker Date: Wed, 14 Sep 2022 21:31:38 +0300 Subject: [PATCH 102/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.21.200 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 3eaec56f7..7ff0e9f4a 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.200-SNAPSHOT + 1.21.200 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index cc6338406..50c07e737 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.200-SNAPSHOT + 1.21.200 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 9e95025e3..4daf78079 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.200-SNAPSHOT + 1.21.200 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 4d371fbbd..2278cb34f 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.200-SNAPSHOT + 1.21.200 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 8dba775d5..befdd06ee 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.200-SNAPSHOT + 1.21.200 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index fd82db2ef..f89b350d4 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.200-SNAPSHOT + 1.21.200 rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 5185bd284..8b15027a8 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.200-SNAPSHOT + 1.21.200 target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.21.200-SNAPSHOT + 1.21.200 diff --git a/pom.xml b/pom.xml index 9961694c6..cc472d3da 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.21.200-SNAPSHOT + 1.21.200 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - HEAD + rosette-api-java-binding-1.21.200 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index d64954001..e535069c6 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.200-SNAPSHOT + 1.21.200 com.basistech.rosette rosette-api-release From 724b64cbd9a881f754bbd2bfd7e623e9afe8fbc3 Mon Sep 17 00:00:00 2001 From: Amit Seker Date: Wed, 14 Sep 2022 21:31:43 +0300 Subject: [PATCH 103/415] [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 7ff0e9f4a..a0fabfe34 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.200 + 1.21.201-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 50c07e737..0cd326c56 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.200 + 1.21.201-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 4daf78079..5db561b91 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.200 + 1.21.201-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 2278cb34f..38d6cdfdc 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.200 + 1.21.201-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index befdd06ee..119862974 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.200 + 1.21.201-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index f89b350d4..66d6ff495 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.200 + 1.21.201-SNAPSHOT rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 8b15027a8..dd2e8eb2f 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.200 + 1.21.201-SNAPSHOT target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.21.200 + 1.21.201-SNAPSHOT diff --git a/pom.xml b/pom.xml index cc472d3da..aa19ad8b0 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.21.200 + 1.21.201-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.21.200 + HEAD This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index e535069c6..c614d1714 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.200 + 1.21.201-SNAPSHOT com.basistech.rosette rosette-api-release From 9decfe1af40366b000b7006ae7dde2e698a92b57 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Wed, 28 Sep 2022 18:16:27 -0400 Subject: [PATCH 104/415] Preparing release. Version set to 1.23.0-SNAPSHOT --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 2 +- release/pom.xml | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index a0fabfe34..fc7885f26 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.201-SNAPSHOT + 1.23.0-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 0cd326c56..ec11e2cba 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.201-SNAPSHOT + 1.23.0-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 5db561b91..bc226979f 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.201-SNAPSHOT + 1.23.0-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 38d6cdfdc..0eb8fcca6 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.201-SNAPSHOT + 1.23.0-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 119862974..4c1d86471 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.201-SNAPSHOT + 1.23.0-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 66d6ff495..1731a485f 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.201-SNAPSHOT + 1.23.0-SNAPSHOT rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index dd2e8eb2f..76b047ef7 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.201-SNAPSHOT + 1.23.0-SNAPSHOT target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.21.201-SNAPSHOT + 1.23.0-SNAPSHOT diff --git a/pom.xml b/pom.xml index aa19ad8b0..f841bfd62 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.21.201-SNAPSHOT + 1.23.0-SNAPSHOT open-source-parent com.basistech diff --git a/release/pom.xml b/release/pom.xml index c614d1714..4c890600e 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.21.201-SNAPSHOT + 1.23.0-SNAPSHOT com.basistech.rosette rosette-api-release From 9eb3e0c457c48ca83491ff7f5981daab5db6ef7b Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Wed, 28 Sep 2022 18:20:25 -0400 Subject: [PATCH 105/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.23.0 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index fc7885f26..6c52ee732 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.0-SNAPSHOT + 1.23.0 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index ec11e2cba..07ff89565 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.0-SNAPSHOT + 1.23.0 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index bc226979f..860298a38 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.0-SNAPSHOT + 1.23.0 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 0eb8fcca6..9957da82b 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.0-SNAPSHOT + 1.23.0 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 4c1d86471..41927fa19 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.0-SNAPSHOT + 1.23.0 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 1731a485f..f5cdef528 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.0-SNAPSHOT + 1.23.0 rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 76b047ef7..aaef3402a 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.0-SNAPSHOT + 1.23.0 target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.23.0-SNAPSHOT + 1.23.0 diff --git a/pom.xml b/pom.xml index f841bfd62..d0e6de38f 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.23.0-SNAPSHOT + 1.23.0 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - HEAD + rosette-api-java-binding-1.23.0 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 4c890600e..3976f17aa 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.0-SNAPSHOT + 1.23.0 com.basistech.rosette rosette-api-release From 1dc9ed0e12e31e7679f96184195d4a874a27f34a Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Wed, 28 Sep 2022 18:20:27 -0400 Subject: [PATCH 106/415] [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 6c52ee732..5a62ea2cc 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.0 + 1.23.1-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 07ff89565..deac20bbd 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.0 + 1.23.1-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 860298a38..4ce9ff360 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.0 + 1.23.1-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 9957da82b..99aabe886 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.0 + 1.23.1-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 41927fa19..e7daa040d 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.0 + 1.23.1-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index f5cdef528..fc02563bc 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.0 + 1.23.1-SNAPSHOT rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index aaef3402a..869c63105 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.0 + 1.23.1-SNAPSHOT target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.23.0 + 1.23.1-SNAPSHOT diff --git a/pom.xml b/pom.xml index d0e6de38f..7a6c7e8ee 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.23.0 + 1.23.1-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.23.0 + HEAD This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 3976f17aa..7e3c70d5b 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.0 + 1.23.1-SNAPSHOT com.basistech.rosette rosette-api-release From c71d2285b8d55b27ed5c33552b8298be9c2eab1e Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Wed, 28 Sep 2022 18:24:56 -0400 Subject: [PATCH 107/415] [maven-release-plugin] rollback the release of rosette-api-java-binding-1.23.0 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 2 +- release/pom.xml | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 5a62ea2cc..fc7885f26 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.1-SNAPSHOT + 1.23.0-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index deac20bbd..ec11e2cba 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.1-SNAPSHOT + 1.23.0-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 4ce9ff360..bc226979f 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.1-SNAPSHOT + 1.23.0-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 99aabe886..0eb8fcca6 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.1-SNAPSHOT + 1.23.0-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index e7daa040d..4c1d86471 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.1-SNAPSHOT + 1.23.0-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index fc02563bc..1731a485f 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.1-SNAPSHOT + 1.23.0-SNAPSHOT rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 869c63105..76b047ef7 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.1-SNAPSHOT + 1.23.0-SNAPSHOT target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.23.1-SNAPSHOT + 1.23.0-SNAPSHOT diff --git a/pom.xml b/pom.xml index 7a6c7e8ee..f841bfd62 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.23.1-SNAPSHOT + 1.23.0-SNAPSHOT open-source-parent com.basistech diff --git a/release/pom.xml b/release/pom.xml index 7e3c70d5b..4c890600e 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.1-SNAPSHOT + 1.23.0-SNAPSHOT com.basistech.rosette rosette-api-release From 2332ab34183263dab7672d50467885f3e30de640 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Thu, 29 Sep 2022 12:26:45 -0500 Subject: [PATCH 108/415] WS-2537: Fix Javadoc generation. Remove Travis file. A few upgrades. --- .travis.yml | 11 ----------- model/pom.xml | 25 +++++++++++++++++++++---- pom.xml | 52 +++++++++++++++++++++------------------------------ 3 files changed, 42 insertions(+), 46 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 044d8e67b..000000000 --- a/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -arch: amd64 -os: linux -dist: trusty -language: java -script: mvn clean verify -jdk: -- oraclejdk8 -- openjdk8 -notifications: - slack: - secure: WZMfOBd4zX7SOjeIzCpXGu2vCXwrBQBK3mXkPfn8VaAhwQkAiL7VnonDS19YVMfSm0eG5S9uZKT1wSzZFKvTmw7KEeDkD1rLfdqjbmIzT9W0iwG31mY+Q8gKBN1Dg9dSrCtwC3LkhXhvv4UjzVZ+FnJlrMzEVT+QUrHcQHSqt+uM5Mxz83pj+ZM8eqviODVxSzTwWD4Lqromvq7nplUO45MOrAIhY0Jau0sst2ysAiQXayqSXI33YC2xUJkPcNdypLGOsZ0bWIs68yXfxTMgDVB1+acRw9AFPDMapHUiiueqkJgZ/Itn643iAG4wftGza4OMnTPHpe3hQGp5kM4cqcqvuVmz29wQUWjpOUCqX4e6AoQfV+9jAC81tzbEX89HyyKUf/tAgxe/BefjduSSwT+hlV0WPXOdp4YIyA9YykAPdWlAceYJPipG9sJOWEKekfxojIiRpH2Ha/aV3T0ZgaHlWeoxIwDYgMZeIZxTvRoOwK3SxQzP5cPqh3yj0brJ9d1Z090Vo8qX1/tRt0OXT966Z/yC4MEurhJDNPBbSuBTQpqH+ayhObLnIxXpinPQSEA0fF5votVgZU20ZQDW8SOLPLyP+ZJ5qfUxbvhkLEk7GlO0rlD5xhXjG288u5vEwsWKYXDQ2TVdJdBXIflLxvPhIk8fo/JClnosTlbc9eg= diff --git a/model/pom.xml b/model/pom.xml index 1731a485f..c87ec66fb 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -1,6 +1,6 @@ - 3.4.0 - 2.4 - 4.1.0 - 1.6.13 + 3.2.0 + 3.10.1 + 3.4.1 + 3.2.1 + 4.1.0 + 1.6.13 1.5 2.7.2 @@ -129,25 +125,6 @@ - - org.apache.maven.plugins - maven-javadoc-plugin - ${maven-javadoc-plugin.version} - - - attach-javadocs - - jar - - - - - target/generated-sources/delombok - - **/target/generated-sources/annotations/com/basistech/rosette/apimodel/** - - - org.apache.maven.plugins maven-source-plugin @@ -198,6 +175,19 @@ + + org.apache.maven.plugins + maven-javadoc-plugin + ${maven-javadoc-plugin.version} + + + attach-javadocs + + jar + + + + biz.aQute.bnd bnd-maven-plugin From 44c5bd80398e30064d6f5f3620ee8e64803f38b6 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Thu, 29 Sep 2022 17:26:51 -0500 Subject: [PATCH 109/415] WS-2537: Sonar cleanup. --- annotations/pom.xml | 4 +- api/pom.xml | 16 +++--- .../basistech/rosette/api/HttpRosetteAPI.java | 54 ++++++++++++------- .../com/basistech/rosette/api/BasicTest.java | 9 ++-- .../api/common/AbstractRosetteAPI.java | 17 ++++-- .../examples/AddressSimilarityExample.java | 13 +++-- .../rosette/examples/CategoriesExample.java | 10 ++-- .../rosette/examples/EntitiesExample.java | 6 ++- .../rosette/examples/EventsExample.java | 6 ++- .../rosette/examples/LanguageExample.java | 10 ++-- .../examples/LanguageMultilingualExample.java | 6 ++- .../examples/MorphologyCompleteExample.java | 6 ++- .../MorphologyCompoundComponentsExample.java | 6 ++- .../MorphologyHanReadingsExample.java | 6 ++- .../examples/MorphologyLemmasExample.java | 6 ++- .../MorphologyPartsOfSpeechExample.java | 6 ++- .../examples/NameDeduplicationExample.java | 6 ++- .../examples/NameSimilarityExample.java | 6 ++- .../examples/NameTranslationExample.java | 6 ++- .../examples/RelationshipsExample.java | 6 ++- .../examples/SemanticVectorsExample.java | 6 ++- .../rosette/examples/SentencesExample.java | 6 ++- .../rosette/examples/SentimentExample.java | 6 ++- .../rosette/examples/SimilarTermsExample.java | 6 ++- .../examples/SyntaxDependenciesExample.java | 6 ++- .../rosette/examples/TokensExample.java | 6 ++- .../rosette/examples/TopicsExample.java | 6 ++- .../examples/TransliterationExample.java | 6 ++- .../apimodel/jackson/AddressMixin.java | 4 +- .../AddressSimilarityRequestMixin.java | 4 +- .../apimodel/jackson/AdmRequestMixin.java | 4 +- .../apimodel/jackson/ApiModelMixinModule.java | 22 +++++--- .../jackson/ConfigurationRequestMixin.java | 18 ++++++- .../jackson/DocumentRequestMixin.java | 4 +- .../apimodel/jackson/FieldedAddressMixin.java | 4 +- .../NameDeduplicationRequestMixin.java | 4 +- .../jackson/NameSimilarityRequestMixin.java | 4 +- .../jackson/NameTranslationRequestMixin.java | 4 +- .../jackson/UnfieldedAddressMixin.java | 4 +- model/pom.xml | 8 +-- .../rosette/apimodel/AccuracyMode.java | 10 +--- .../basistech/rosette/apimodel/Address.java | 39 +++++++------- .../rosette/apimodel/EntitiesOptions.java | 27 +++++----- .../basistech/rosette/apimodel/Entity.java | 31 ++++++----- .../rosette/apimodel/LanguageOptions.java | 35 ++++++------ .../com/basistech/rosette/apimodel/Name.java | 10 ++-- .../apimodel/NameDeduplicationRequest.java | 15 +++--- .../apimodel/NameSimilarityRequest.java | 13 +++-- pom.xml | 18 ++++--- 49 files changed, 325 insertions(+), 210 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index fc7885f26..484a41df1 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -38,13 +38,13 @@ com.squareup javapoet - 1.9.0 + ${java-poet.version} provided org.projectlombok lombok - 1.18.20 + ${lombok.version} provided diff --git a/api/pom.xml b/api/pom.xml index ec11e2cba..228417893 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -54,22 +54,22 @@ org.apache.httpcomponents httpclient - ${http-components-version} + ${http-components.version} org.apache.httpcomponents httpclient-osgi - ${http-components-version} + ${http-components.version} org.apache.httpcomponents httpcore-osgi - ${http-components-core-version} + ${http-components-core.version} org.apache.httpcomponents httpmime - ${http-components-version} + ${http-components.version} org.slf4j @@ -82,19 +82,19 @@ org.mock-server mockserver-client-java - ${mockserver-version} + ${mockserver.version} test org.mock-server mockserver-core - ${mockserver-version} + ${mockserver.version} test org.mock-server mockserver-netty - ${mockserver-version} + ${mockserver.version} test @@ -140,7 +140,7 @@ org.mock-server mockserver-maven-plugin - ${mockserver-version} + ${mockserver.version} ${mockServerClient.port} WARN diff --git a/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java b/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java index d68bb306e..00ec34159 100644 --- a/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java +++ b/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -73,6 +73,7 @@ import java.util.Properties; import java.util.Set; import java.util.concurrent.Future; +import java.util.regex.Pattern; import java.util.zip.GZIPInputStream; import static java.net.HttpURLConnection.HTTP_OK; @@ -85,8 +86,11 @@ public class HttpRosetteAPI extends AbstractRosetteAPI { public static final String DEFAULT_URL_BASE = "https://api.rosette.com/rest/v1"; public static final String SERVICE_NAME = "RosetteAPI"; public static final String BINDING_VERSION = getVersion(); - public static final String USER_AGENT_STR = SERVICE_NAME + "-Java/" + BINDING_VERSION + "/" + System.getProperty("java.version"); + public static final String USER_AGENT_STR = SERVICE_NAME + "-Java/" + BINDING_VERSION + "/" + + System.getProperty("java.version"); private static final Logger LOG = LoggerFactory.getLogger(HttpRosetteAPI.class); + private static final String IO_EXCEPTION_MESSAGE = "IO Exception communicating with the Rosette API"; + private static final Pattern TRAILING_SLASHES = Pattern.compile("/+$"); private String urlBase = DEFAULT_URL_BASE; private int failureRetries = 1; private ObjectMapper mapper; @@ -116,7 +120,7 @@ private HttpRosetteAPI() { HttpRosetteAPI(String key, String urlToCall, Integer failureRetries, CloseableHttpClient httpClient, List
additionalHeaders, Integer connectionConcurrency, boolean onlyAcceptKnownFields) throws HttpRosetteAPIException { - urlBase = urlToCall == null ? urlBase : urlToCall.trim().replaceAll("/+$", ""); + urlBase = urlToCall == null ? urlBase : TRAILING_SLASHES.matcher(urlToCall.trim()).replaceAll(""); if (failureRetries != null && failureRetries >= 1) { this.failureRetries = failureRetries; } @@ -241,7 +245,8 @@ public PingResponse ping() throws IOException, HttpRosetteAPIException { @Override public SupportedLanguagesResponse getSupportedLanguages(String endpoint) throws HttpRosetteAPIException { if (DOC_ENDPOINTS.contains(endpoint) || NAME_DEDUPLICATION_SERVICE_PATH.equals(endpoint)) { - return sendGetRequest(urlBase + endpoint + SUPPORTED_LANGUAGES_SUBPATH, SupportedLanguagesResponse.class); + return sendGetRequest(urlBase + endpoint + SUPPORTED_LANGUAGES_SUBPATH, + SupportedLanguagesResponse.class); } else { return null; } @@ -258,7 +263,8 @@ public SupportedLanguagesResponse getSupportedLanguages(String endpoint) throws @Override public SupportedLanguagePairsResponse getSupportedLanguagePairs(String endpoint) throws HttpRosetteAPIException { if (NAMES_ENDPOINTS.contains(endpoint) && !NAME_DEDUPLICATION_SERVICE_PATH.equals(endpoint)) { - return sendGetRequest(urlBase + endpoint + SUPPORTED_LANGUAGES_SUBPATH, SupportedLanguagePairsResponse.class); + return sendGetRequest(urlBase + endpoint + SUPPORTED_LANGUAGES_SUBPATH, + SupportedLanguagePairsResponse.class); } else { return null; } @@ -276,11 +282,12 @@ public SupportedLanguagePairsResponse getSupportedLanguagePairs(String endpoint) * @throws RosetteRuntimeException for other errors, such as communications problems with HTTP. */ @Override - public ResponseType perform(String endpoint, RequestType request, Class responseClass) throws HttpRosetteAPIException { + public ResponseType perform(String endpoint, + RequestType request, Class responseClass) throws HttpRosetteAPIException { try { return sendPostRequest(request, urlBase + endpoint, responseClass); } catch (IOException e) { - throw new RosetteRuntimeException("IO Exception communicating with the Rosette API", e); + throw new RosetteRuntimeException(IO_EXCEPTION_MESSAGE, e); } catch (URISyntaxException e) { throw new RosetteRuntimeException("Invalid URI", e); } @@ -296,11 +303,12 @@ public ResponseType * @throws RosetteRuntimeException for other errors, such as communications problems with HTTP. */ @Override - public AnnotatedText perform(String endpoint, RequestType request) throws HttpRosetteAPIException { + public AnnotatedText perform(String endpoint, RequestType request) + throws HttpRosetteAPIException { try { return sendPostRequest(request, urlBase + endpoint, AnnotatedText.class); } catch (IOException e) { - throw new RosetteRuntimeException("IO Exception communicating with the Rosette API", e); + throw new RosetteRuntimeException(IO_EXCEPTION_MESSAGE, e); } catch (URISyntaxException e) { throw new RosetteRuntimeException("Invalid URI", e); } @@ -310,7 +318,9 @@ public AnnotatedText perform(String endpoint, Requ * This method always throws UnsupportedOperationException. */ @Override - public Future performAsync(String endpoint, RequestType request, Class responseClass) throws HttpRosetteAPIException { + public Future + performAsync(String endpoint, RequestType request, Class responseClass) + throws HttpRosetteAPIException { throw new UnsupportedOperationException("Asynchronous operations are not yet supported"); } @@ -335,7 +345,7 @@ private T sendGetRequest(String urlStr, Class clazz) thr responseHeadersToExtendedInformation(resp, httpResponse); return resp; } catch (IOException e) { - throw new RosetteRuntimeException("IO Exception communicating with the Rosette API", e); + throw new RosetteRuntimeException(IO_EXCEPTION_MESSAGE, e); } } @@ -349,7 +359,8 @@ private T sendGetRequest(String urlStr, Class clazz) thr * @return Response * @throws IOException */ - private T sendPostRequest(Object request, String urlStr, Class clazz) throws IOException, URISyntaxException { + private T sendPostRequest(Object request, String urlStr, Class clazz) + throws IOException, URISyntaxException { ObjectWriter writer = mapper.writer().without(JsonGenerator.Feature.AUTO_CLOSE_TARGET); boolean notPlainText = false; if (request instanceof DocumentRequest) { @@ -391,7 +402,7 @@ private T sendPostRequest(Object request, String urlStr, Class clazz) thr T resp = getResponse(response, clazz); Header ridHeader = response.getFirstHeader("X-RosetteAPI-DocumentRequest-Id"); if (ridHeader != null && ridHeader.getValue() != null) { - LOG.debug("DocumentRequest ID " + ridHeader.getValue()); + LOG.debug("DocumentRequest ID {}", ridHeader.getValue()); } if (resp instanceof Response) { responseHeadersToExtendedInformation((Response)resp, response); @@ -418,7 +429,8 @@ private void responseHeadersToExtendedInformation(T resp, H if (resp.getExtendedInformation().get(header.getName()) instanceof Set) { currentSetValue = (Set) resp.getExtendedInformation().get(header.getName()); } else { - currentSetValue = new HashSet<>(Collections.singletonList(resp.getExtendedInformation().get(header.getName()))); + currentSetValue = new HashSet<>(Collections.singletonList(resp + .getExtendedInformation().get(header.getName()))); } currentSetValue.add(header.getValue()); resp.addExtendedInformation(header.getName(), currentSetValue); @@ -459,7 +471,8 @@ public boolean isStreaming() { }); } - private void setupMultipartRequest(final Request request, final ObjectWriter finalWriter, HttpPost post) throws IOException { + private void setupMultipartRequest(final Request request, final ObjectWriter finalWriter, HttpPost post) + throws IOException { MultipartEntityBuilder builder = MultipartEntityBuilder.create(); builder.setMimeSubtype("mixed"); builder.setMode(HttpMultipartMode.STRICT); @@ -533,7 +546,8 @@ private String headerValueOrNull(Header header) { * @return Response * @throws IOException */ - private T getResponse(HttpResponse httpResponse, Class clazz) throws IOException, HttpRosetteAPIException { + private T getResponse(HttpResponse httpResponse, Class clazz) + throws IOException, HttpRosetteAPIException { int status = httpResponse.getStatusLine().getStatusCode(); String encoding = headerValueOrNull(httpResponse.getFirstHeader(HttpHeaders.CONTENT_ENCODING)); @@ -548,15 +562,16 @@ private T getResponse(HttpResponse httpResponse, Class cla if ("application/json".equals(responseContentType)) { ErrorResponse errorResponse = mapper.readValue(inputStream, ErrorResponse.class); if (ridHeader != null) { - LOG.debug("DocumentRequest ID " + ridHeader); + LOG.debug("DocumentRequest ID {}", ridHeader); } if (ecHeader != null) { errorResponse.setCode(ecHeader); } if (429 == status) { String concurrencyMessage = "You have exceeded your plan's limit on concurrent calls. " - + "This could be caused by multiple processes or threads making Rosette API calls in parallel, " - + "or if your httpClient is configured with higher concurrency than your plan allows."; + + "This could be caused by multiple processes or threads making Rosette API calls " + + "in parallel, or if your httpClient is configured with higher concurrency " + + "than your plan allows."; if (emHeader == null) { emHeader = concurrencyMessage; } else { @@ -677,6 +692,7 @@ public Builder additionalHeader(String name, String value) { * Only process the response from server if all fields are recognized. If set and a new * field is returned in the response, exception will be thrown. * + * @param onlyAcceptKnownFields whether to accept known fields. * @return this. */ public Builder onlyAcceptKnownFields(boolean onlyAcceptKnownFields) { diff --git a/api/src/test/java/com/basistech/rosette/api/BasicTest.java b/api/src/test/java/com/basistech/rosette/api/BasicTest.java index 49b8534f3..54c235097 100644 --- a/api/src/test/java/com/basistech/rosette/api/BasicTest.java +++ b/api/src/test/java/com/basistech/rosette/api/BasicTest.java @@ -118,7 +118,7 @@ public void testMultipleConnections() throws IOException, InterruptedException { Date d2 = new Date(); - assert d2.getTime() - d1.getTime() > delayTime * numConnections * 1000; // at least as long as the delay in the request + assertTrue(d2.getTime() - d1.getTime() > delayTime * numConnections * 1000); // at least as long as the delay in the request api = new HttpRosetteAPI.Builder().connectionConcurrency(numConnections) .url(String.format("http://localhost:%d/rest/v1", serverPort)) @@ -137,8 +137,8 @@ public void testMultipleConnections() throws IOException, InterruptedException { d2 = new Date(); - assert d2.getTime() - d1.getTime() < delayTime * numConnections * 1000; // less than (numConnections) serial requests - assert d2.getTime() - d1.getTime() > delayTime * 1000; // but at least as long as one + assertTrue(d2.getTime() - d1.getTime() < delayTime * numConnections * 1000); // less than (numConnections) serial requests + assertTrue(d2.getTime() - d1.getTime() > delayTime * 1000); // but at least as long as one } @Test @@ -159,7 +159,8 @@ public void testHeaders() throws Exception { .url(String.format("http://localhost:%d/rest/v1", serverPort)) .additionalHeader("X-Foo", "Bar") .build(); - api.ping(); + var resp = api.ping(); + assertEquals("5", resp.getExtendedInformation().get("X-RosetteAPI-Concurrency")); } @Test diff --git a/common/src/main/java/com/basistech/rosette/api/common/AbstractRosetteAPI.java b/common/src/main/java/com/basistech/rosette/api/common/AbstractRosetteAPI.java index ebf102355..64caa3b80 100644 --- a/common/src/main/java/com/basistech/rosette/api/common/AbstractRosetteAPI.java +++ b/common/src/main/java/com/basistech/rosette/api/common/AbstractRosetteAPI.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -89,6 +89,7 @@ public abstract class AbstractRosetteAPI implements AutoCloseable { /** * Gets the set of language and script codes supported by the specified Rosette API endpoint. * + * @param endpoint Rosette API endpoint. * @return SupportedLanguagesResponse * @throws CommonRosetteAPIException for an error. */ @@ -102,7 +103,8 @@ public abstract class AbstractRosetteAPI implements AutoCloseable { * @return SupportedLanguagePairsResponse * @throws CommonRosetteAPIException for an error returned from the Rosette API. */ - public abstract SupportedLanguagePairsResponse getSupportedLanguagePairs(String endpoint) throws CommonRosetteAPIException; + public abstract SupportedLanguagePairsResponse getSupportedLanguagePairs(String endpoint) + throws CommonRosetteAPIException; /** * Perform a request to an endpoint of the Rosette API. @@ -114,7 +116,9 @@ public abstract class AbstractRosetteAPI implements AutoCloseable { * @return the response. * @throws CommonRosetteAPIException for an error. */ - public abstract ResponseType perform(String endpoint, RequestType request, Class responseClass) throws CommonRosetteAPIException; + public abstract ResponseType + perform(String endpoint, RequestType request, Class responseClass) + throws CommonRosetteAPIException; /** * Perform a request to an endpoint of the Rosette API. @@ -124,7 +128,8 @@ public abstract class AbstractRosetteAPI implements AutoCloseable { * @return the response, {@link com.basistech.rosette.dm.AnnotatedText}. * @throws CommonRosetteAPIException for an error. */ - public abstract AnnotatedText perform(String endpoint, RequestType request) throws CommonRosetteAPIException; + public abstract AnnotatedText perform(String endpoint, RequestType request) + throws CommonRosetteAPIException; /** * Start an asynchronous request to an endpoint of the Rosette API. @@ -136,5 +141,7 @@ public abstract class AbstractRosetteAPI implements AutoCloseable { * @return a {@link Future} for the response. * @throws CommonRosetteAPIException for an error. */ - public abstract Future performAsync(String endpoint, RequestType request, Class responseClass) throws CommonRosetteAPIException; + public abstract Future + performAsync(String endpoint, RequestType request, Class responseClass) + throws CommonRosetteAPIException; } diff --git a/examples/src/main/java/com/basistech/rosette/examples/AddressSimilarityExample.java b/examples/src/main/java/com/basistech/rosette/examples/AddressSimilarityExample.java index d7e3ab4a9..3dcc64ae0 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/AddressSimilarityExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/AddressSimilarityExample.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 Basis Technology Corp. + * Copyright 2019-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,6 +24,8 @@ import com.basistech.rosette.apimodel.FieldedAddress; import com.basistech.rosette.apimodel.UnfieldedAddress; +import static com.basistech.rosette.api.common.AbstractRosetteAPI.ADDRESS_SIMILARITY_SERVICE_PATH; + /** * Example which demonstrates address similarity */ @@ -60,8 +62,13 @@ private void run() throws IOException { .build(); //The api object creates an http client, but to provide your own: //api.httpClient(CloseableHttpClient) - AddressSimilarityRequest request = AddressSimilarityRequest.builder().address1(address1).address2(address2).build(); - AddressSimilarityResponse response = rosetteApi.perform(HttpRosetteAPI.ADDRESS_SIMILARITY_SERVICE_PATH, request, AddressSimilarityResponse.class); + AddressSimilarityRequest request = AddressSimilarityRequest.builder() + .address1(address1) + .address2(address2) + .build(); + AddressSimilarityResponse response = rosetteApi + .perform(ADDRESS_SIMILARITY_SERVICE_PATH, request, AddressSimilarityResponse.class); + System.out.println(responseToJson(response)); } } diff --git a/examples/src/main/java/com/basistech/rosette/examples/CategoriesExample.java b/examples/src/main/java/com/basistech/rosette/examples/CategoriesExample.java index 45b50b01e..10167696e 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/CategoriesExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/CategoriesExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,6 +22,8 @@ import java.io.IOException; +import static com.basistech.rosette.api.common.AbstractRosetteAPI.CATEGORIES_SERVICE_PATH; + /** * Example which demonstrates the category api. * @@ -46,8 +48,10 @@ private void run() throws IOException { .build(); //The api object creates an http client, but to provide your own: //api.httpClient(CloseableHttpClient) - DocumentRequest request = DocumentRequest.builder().contentUri(categoriesUrlData).build(); - CategoriesResponse response = rosetteApi.perform(HttpRosetteAPI.CATEGORIES_SERVICE_PATH, request, CategoriesResponse.class); + DocumentRequest request = DocumentRequest.builder() + .contentUri(categoriesUrlData) + .build(); + CategoriesResponse response = rosetteApi.perform(CATEGORIES_SERVICE_PATH, request, CategoriesResponse.class); System.out.println(responseToJson(response)); } } diff --git a/examples/src/main/java/com/basistech/rosette/examples/EntitiesExample.java b/examples/src/main/java/com/basistech/rosette/examples/EntitiesExample.java index 249354b31..47b77609f 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/EntitiesExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/EntitiesExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,6 +22,8 @@ import java.io.IOException; +import static com.basistech.rosette.api.common.AbstractRosetteAPI.ENTITIES_SERVICE_PATH; + /** * Example which demonstrates the entity extraction api. */ @@ -43,7 +45,7 @@ private void run() throws IOException { DocumentRequest request = DocumentRequest.builder() .content(entitiesTextData) .build(); - EntitiesResponse response = rosetteApi.perform(HttpRosetteAPI.ENTITIES_SERVICE_PATH, request, EntitiesResponse.class); + EntitiesResponse response = rosetteApi.perform(ENTITIES_SERVICE_PATH, request, EntitiesResponse.class); System.out.println(responseToJson(response)); } } diff --git a/examples/src/main/java/com/basistech/rosette/examples/EventsExample.java b/examples/src/main/java/com/basistech/rosette/examples/EventsExample.java index e5f90a20a..6287ccc67 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/EventsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/EventsExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2021 Basis Technology Corp. +* Copyright 2021-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,6 +21,8 @@ import com.basistech.rosette.apimodel.EventsResponse; import com.basistech.util.LanguageCode; +import static com.basistech.rosette.api.common.AbstractRosetteAPI.EVENTS_SERVICE_PATH; + /** * Example which demonstrates the events API. */ @@ -44,7 +46,7 @@ private void run() throws Exception { .language(LanguageCode.ENGLISH) .content(topicsData) .build(); - EventsResponse resp = rosetteApi.perform(HttpRosetteAPI.EVENTS_SERVICE_PATH, request, EventsResponse.class); + EventsResponse resp = rosetteApi.perform(EVENTS_SERVICE_PATH, request, EventsResponse.class); System.out.println(responseToJson(resp)); } } diff --git a/examples/src/main/java/com/basistech/rosette/examples/LanguageExample.java b/examples/src/main/java/com/basistech/rosette/examples/LanguageExample.java index 4a5ecb81c..2d776dd05 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/LanguageExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/LanguageExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,6 +22,8 @@ import java.io.IOException; +import static com.basistech.rosette.api.common.AbstractRosetteAPI.LANGUAGE_SERVICE_PATH; + /** * Example which demonstrates the language detection api. */ @@ -44,8 +46,10 @@ private void run() throws IOException { .build(); //The api object creates an http client, but to provide your own: //api.httpClient(CloseableHttpClient) - DocumentRequest request = DocumentRequest.builder().content(languageData).build(); - LanguageResponse response = rosetteApi.perform(HttpRosetteAPI.LANGUAGE_SERVICE_PATH, request, LanguageResponse.class); + DocumentRequest request = DocumentRequest.builder() + .content(languageData) + .build(); + LanguageResponse response = rosetteApi.perform(LANGUAGE_SERVICE_PATH, request, LanguageResponse.class); System.out.println(responseToJson(response)); } } diff --git a/examples/src/main/java/com/basistech/rosette/examples/LanguageMultilingualExample.java b/examples/src/main/java/com/basistech/rosette/examples/LanguageMultilingualExample.java index 7d52dc763..facf9805e 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/LanguageMultilingualExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/LanguageMultilingualExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2014 Basis Technology Corp. +* Copyright 2014-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,6 +22,8 @@ import java.io.IOException; +import static com.basistech.rosette.api.common.AbstractRosetteAPI.LANGUAGE_SERVICE_PATH; + /** * Example which demonstrates the language detection api with the multilingual option. */ @@ -51,7 +53,7 @@ private void run() throws IOException { .content(languageMultilingualData) .options(options) .build(); - LanguageResponse response = rosetteApi.perform(HttpRosetteAPI.LANGUAGE_SERVICE_PATH, request, LanguageResponse.class); + LanguageResponse response = rosetteApi.perform(LANGUAGE_SERVICE_PATH, request, LanguageResponse.class); System.out.println(responseToJson(response)); } } diff --git a/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompleteExample.java b/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompleteExample.java index ab6e7cbe2..aee79c867 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompleteExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompleteExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,6 +23,8 @@ import java.io.IOException; +import static com.basistech.rosette.api.common.AbstractRosetteAPI.MORPHOLOGY_SERVICE_PATH; + /** * Example which demonstrates the complete morphology api. */ @@ -46,7 +48,7 @@ private void run() throws IOException { DocumentRequest request = DocumentRequest.builder().content(morphologyCompleteData).build(); //The api object creates an http client, but to provide your own: //api.httpClient(CloseableHttpClient) - MorphologyResponse response = rosetteApi.perform(HttpRosetteAPI.MORPHOLOGY_SERVICE_PATH + "/" + MorphologicalFeature.COMPLETE, request, MorphologyResponse.class); + MorphologyResponse response = rosetteApi.perform(MORPHOLOGY_SERVICE_PATH + "/" + MorphologicalFeature.COMPLETE, request, MorphologyResponse.class); System.out.println(responseToJson(response)); } } diff --git a/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompoundComponentsExample.java b/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompoundComponentsExample.java index 7dfaac954..141e4fe33 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompoundComponentsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompoundComponentsExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,6 +24,8 @@ import java.io.IOException; +import static com.basistech.rosette.api.common.AbstractRosetteAPI.MORPHOLOGY_SERVICE_PATH; + /** * Example which demonstrates the decompounding api. */ @@ -48,7 +50,7 @@ private void run() throws IOException { DocumentRequest request = DocumentRequest.builder().content(morphologyCompoundComponentsData) .language(LanguageCode.GERMAN) // example of specifying the language. .build(); - MorphologyResponse response = rosetteApi.perform(HttpRosetteAPI.MORPHOLOGY_SERVICE_PATH + "/" + MorphologicalFeature.COMPOUND_COMPONENTS, + MorphologyResponse response = rosetteApi.perform(MORPHOLOGY_SERVICE_PATH + "/" + MorphologicalFeature.COMPOUND_COMPONENTS, request, MorphologyResponse.class); System.out.println(responseToJson(response)); diff --git a/examples/src/main/java/com/basistech/rosette/examples/MorphologyHanReadingsExample.java b/examples/src/main/java/com/basistech/rosette/examples/MorphologyHanReadingsExample.java index 772335a3b..3784a9502 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/MorphologyHanReadingsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/MorphologyHanReadingsExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,6 +23,8 @@ import java.io.IOException; +import static com.basistech.rosette.api.common.AbstractRosetteAPI.MORPHOLOGY_SERVICE_PATH; + /** * Example which demonstrates the han readings api. */ @@ -44,7 +46,7 @@ private void run() throws IOException { .build(); DocumentRequest request = DocumentRequest.builder().content(morphologyHanReadingsData) .build(); - MorphologyResponse response = rosetteApi.perform(HttpRosetteAPI.MORPHOLOGY_SERVICE_PATH + "/" + MorphologicalFeature.HAN_READINGS, + MorphologyResponse response = rosetteApi.perform(MORPHOLOGY_SERVICE_PATH + "/" + MorphologicalFeature.HAN_READINGS, request, MorphologyResponse.class); System.out.println(responseToJson(response)); } diff --git a/examples/src/main/java/com/basistech/rosette/examples/MorphologyLemmasExample.java b/examples/src/main/java/com/basistech/rosette/examples/MorphologyLemmasExample.java index 48ce41b64..f01d81b84 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/MorphologyLemmasExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/MorphologyLemmasExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,6 +23,8 @@ import java.io.IOException; +import static com.basistech.rosette.api.common.AbstractRosetteAPI.MORPHOLOGY_SERVICE_PATH; + /** * Example which demonstrates the lemmas api. */ @@ -44,7 +46,7 @@ private void run() throws IOException { .build(); DocumentRequest request = DocumentRequest.builder().content(morphologyLemmasData) .build(); - MorphologyResponse response = rosetteApi.perform(HttpRosetteAPI.MORPHOLOGY_SERVICE_PATH + "/" + MorphologicalFeature.LEMMAS, + MorphologyResponse response = rosetteApi.perform(MORPHOLOGY_SERVICE_PATH + "/" + MorphologicalFeature.LEMMAS, request, MorphologyResponse.class); System.out.println(responseToJson(response)); } diff --git a/examples/src/main/java/com/basistech/rosette/examples/MorphologyPartsOfSpeechExample.java b/examples/src/main/java/com/basistech/rosette/examples/MorphologyPartsOfSpeechExample.java index 978ff499d..4bd578fe9 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/MorphologyPartsOfSpeechExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/MorphologyPartsOfSpeechExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,6 +23,8 @@ import java.io.IOException; +import static com.basistech.rosette.api.common.AbstractRosetteAPI.MORPHOLOGY_SERVICE_PATH; + /** * Example which demonstrates the part-of-speech api. */ @@ -45,7 +47,7 @@ private void run() throws IOException { .build(); DocumentRequest request = DocumentRequest.builder().content(morphologyPartsOfSpeechData) .build(); - MorphologyResponse response = rosetteApi.perform(HttpRosetteAPI.MORPHOLOGY_SERVICE_PATH + "/" + MorphologicalFeature.PARTS_OF_SPEECH, + MorphologyResponse response = rosetteApi.perform(MORPHOLOGY_SERVICE_PATH + "/" + MorphologicalFeature.PARTS_OF_SPEECH, request, MorphologyResponse.class); System.out.println(responseToJson(response)); } diff --git a/examples/src/main/java/com/basistech/rosette/examples/NameDeduplicationExample.java b/examples/src/main/java/com/basistech/rosette/examples/NameDeduplicationExample.java index 96de487e1..51828f98a 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/NameDeduplicationExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/NameDeduplicationExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,6 +25,8 @@ import java.util.Arrays; import java.util.List; +import static com.basistech.rosette.api.common.AbstractRosetteAPI.NAME_DEDUPLICATION_SERVICE_PATH; + /** * Example which demonstrates name deduplication. */ @@ -55,7 +57,7 @@ private void run() throws IOException { //The api object creates an http client, but to provide your own: //api.httpClient(CloseableHttpClient) NameDeduplicationRequest request = NameDeduplicationRequest.builder().names(names).threshold(threshold).build(); - NameDeduplicationResponse response = rosetteApi.perform(HttpRosetteAPI.NAME_DEDUPLICATION_SERVICE_PATH, request, + NameDeduplicationResponse response = rosetteApi.perform(NAME_DEDUPLICATION_SERVICE_PATH, request, NameDeduplicationResponse.class); System.out.println(responseToJson(response)); } diff --git a/examples/src/main/java/com/basistech/rosette/examples/NameSimilarityExample.java b/examples/src/main/java/com/basistech/rosette/examples/NameSimilarityExample.java index a260ec6f3..fbb9cebaa 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/NameSimilarityExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/NameSimilarityExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,6 +24,8 @@ import java.io.IOException; +import static com.basistech.rosette.api.common.AbstractRosetteAPI.NAME_SIMILARITY_SERVICE_PATH; + /** * Example which demonstrates name similarity. */ @@ -53,7 +55,7 @@ private void run() throws IOException { //The api object creates an http client, but to provide your own: //api.httpClient(CloseableHttpClient) NameSimilarityRequest request = NameSimilarityRequest.builder().name1(name1).name2(name2).build(); - NameSimilarityResponse response = rosetteApi.perform(HttpRosetteAPI.NAME_SIMILARITY_SERVICE_PATH, request, NameSimilarityResponse.class); + NameSimilarityResponse response = rosetteApi.perform(NAME_SIMILARITY_SERVICE_PATH, request, NameSimilarityResponse.class); System.out.println(responseToJson(response)); } } diff --git a/examples/src/main/java/com/basistech/rosette/examples/NameTranslationExample.java b/examples/src/main/java/com/basistech/rosette/examples/NameTranslationExample.java index d8b8e7b3b..bb78344d8 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/NameTranslationExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/NameTranslationExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,6 +22,8 @@ import java.io.IOException; +import static com.basistech.rosette.api.common.AbstractRosetteAPI.NAME_TRANSLATION_SERVICE_PATH; + /** * Example which demonstrates the name translation api. */ @@ -48,7 +50,7 @@ private void run() throws IOException { .build(); //The api object creates an http client, but to provide your own: //api.httpClient(CloseableHttpClient) - NameTranslationResponse response = rosetteApi.perform(HttpRosetteAPI.NAME_TRANSLATION_SERVICE_PATH, request, NameTranslationResponse.class); + NameTranslationResponse response = rosetteApi.perform(NAME_TRANSLATION_SERVICE_PATH, request, NameTranslationResponse.class); System.out.println(responseToJson(response)); } } diff --git a/examples/src/main/java/com/basistech/rosette/examples/RelationshipsExample.java b/examples/src/main/java/com/basistech/rosette/examples/RelationshipsExample.java index 7e468a6d1..18dfdff07 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/RelationshipsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/RelationshipsExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,6 +22,8 @@ import java.io.IOException; +import static com.basistech.rosette.api.common.AbstractRosetteAPI.RELATIONSHIPS_SERVICE_PATH; + /** * Example which demonstrates the relationships extraction api. */ @@ -45,7 +47,7 @@ private void run() throws IOException { //The api object creates an http client, but to provide your own: //api.httpClient(CloseableHttpClient) DocumentRequest request = DocumentRequest.builder().content(relationshipsTextData).build(); - RelationshipsResponse response = rosetteApi.perform(HttpRosetteAPI.RELATIONSHIPS_SERVICE_PATH, request, RelationshipsResponse.class); + RelationshipsResponse response = rosetteApi.perform(RELATIONSHIPS_SERVICE_PATH, request, RelationshipsResponse.class); System.out.println(responseToJson(response)); } } diff --git a/examples/src/main/java/com/basistech/rosette/examples/SemanticVectorsExample.java b/examples/src/main/java/com/basistech/rosette/examples/SemanticVectorsExample.java index f1cdef1e6..b1039dcb9 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/SemanticVectorsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/SemanticVectorsExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2019 Basis Technology Corp. +* Copyright 2019-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,6 +22,8 @@ import java.io.IOException; +import static com.basistech.rosette.api.common.AbstractRosetteAPI.SEMANTIC_VECTORS_SERVICE_PATH; + /** * Example which demonstrates semantic-vectors. */ @@ -48,7 +50,7 @@ private void run() throws IOException { DocumentRequest request = DocumentRequest.builder() .content(semanticVectorsData) .build(); - SemanticVectorsResponse response = rosetteApi.perform(HttpRosetteAPI.SEMANTIC_VECTORS_SERVICE_PATH, request, SemanticVectorsResponse.class); + SemanticVectorsResponse response = rosetteApi.perform(SEMANTIC_VECTORS_SERVICE_PATH, request, SemanticVectorsResponse.class); System.out.println(responseToJson(response)); } } diff --git a/examples/src/main/java/com/basistech/rosette/examples/SentencesExample.java b/examples/src/main/java/com/basistech/rosette/examples/SentencesExample.java index bd7403bbf..6de67a056 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/SentencesExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/SentencesExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,6 +21,8 @@ import java.io.IOException; +import static com.basistech.rosette.api.common.AbstractRosetteAPI.SENTENCES_SERVICE_PATH; + /** * Example which demonstrates the sentence detection api. */ @@ -45,7 +47,7 @@ private void run() throws IOException { //api.httpClient(CloseableHttpClient) // When no options, use . DocumentRequest request = DocumentRequest.builder().content(sentencesData).build(); - SentencesResponse response = rosetteApi.perform(HttpRosetteAPI.SENTENCES_SERVICE_PATH, request, SentencesResponse.class); + SentencesResponse response = rosetteApi.perform(SENTENCES_SERVICE_PATH, request, SentencesResponse.class); System.out.println(responseToJson(response)); } } diff --git a/examples/src/main/java/com/basistech/rosette/examples/SentimentExample.java b/examples/src/main/java/com/basistech/rosette/examples/SentimentExample.java index 2344f99e3..334e41013 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/SentimentExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/SentimentExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,6 +27,8 @@ import java.nio.file.Files; import java.nio.file.Path; +import static com.basistech.rosette.api.common.AbstractRosetteAPI.SENTIMENT_SERVICE_PATH; + /** * Example which demonstrates the sentiment api. */ @@ -52,7 +54,7 @@ private void run() throws IOException { //api.httpClient(CloseableHttpClient) // When no options, use . DocumentRequest request = DocumentRequest.builder().content(inputStream, "text/html").build(); - SentimentResponse response = rosetteApi.perform(HttpRosetteAPI.SENTIMENT_SERVICE_PATH, request, SentimentResponse.class); + SentimentResponse response = rosetteApi.perform(SENTIMENT_SERVICE_PATH, request, SentimentResponse.class); System.out.println(responseToJson(response)); } diff --git a/examples/src/main/java/com/basistech/rosette/examples/SimilarTermsExample.java b/examples/src/main/java/com/basistech/rosette/examples/SimilarTermsExample.java index d50983d98..9b0a893a2 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/SimilarTermsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/SimilarTermsExample.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 Basis Technology Corp. + * Copyright 2019-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,6 +25,8 @@ import java.io.IOException; +import static com.basistech.rosette.api.common.AbstractRosetteAPI.SIMILAR_TERMS_SERVICE_PATH; + /** * Example which demonstrates the similar terms api */ @@ -54,7 +56,7 @@ private void run() throws IOException { .resultLanguages(Lists.newArrayList(LanguageCode.SPANISH, LanguageCode.GERMAN, LanguageCode.JAPANESE)) .build()) .build(); - SimilarTermsResponse response = rosetteApi.perform(HttpRosetteAPI.SIMILAR_TERMS_SERVICE_PATH, request, SimilarTermsResponse.class); + SimilarTermsResponse response = rosetteApi.perform(SIMILAR_TERMS_SERVICE_PATH, request, SimilarTermsResponse.class); System.out.println(responseToJson(response)); } } diff --git a/examples/src/main/java/com/basistech/rosette/examples/SyntaxDependenciesExample.java b/examples/src/main/java/com/basistech/rosette/examples/SyntaxDependenciesExample.java index 0e7f0c2d3..fbfbc50ff 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/SyntaxDependenciesExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/SyntaxDependenciesExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,6 +21,8 @@ import java.io.IOException; +import static com.basistech.rosette.api.common.AbstractRosetteAPI.SYNTAX_DEPENDENCIES_SERVICE_PATH; + /** * Example which demonstrates the syntax dependencies endpoint of the Rosette api. */ @@ -43,7 +45,7 @@ private void run() throws IOException { //The api object creates an http client, but to provide your own: //api.httpClient(CloseableHttpClient) DocumentRequest request = DocumentRequest.builder().content(syntaxDependenciesData).build(); - SyntaxDependenciesResponse response = rosetteApi.perform(HttpRosetteAPI.SYNTAX_DEPENDENCIES_SERVICE_PATH, request, SyntaxDependenciesResponse.class); + SyntaxDependenciesResponse response = rosetteApi.perform(SYNTAX_DEPENDENCIES_SERVICE_PATH, request, SyntaxDependenciesResponse.class); System.out.println(responseToJson(response)); } } diff --git a/examples/src/main/java/com/basistech/rosette/examples/TokensExample.java b/examples/src/main/java/com/basistech/rosette/examples/TokensExample.java index c649d7a53..0c1adae49 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/TokensExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/TokensExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,6 +21,8 @@ import java.io.IOException; +import static com.basistech.rosette.api.common.AbstractRosetteAPI.TOKENS_SERVICE_PATH; + /** * Example which demonstrates the tokens api. */ @@ -45,7 +47,7 @@ private void run() throws IOException { //api.httpClient(CloseableHttpClient) // When no options, use . DocumentRequest request = DocumentRequest.builder().content(tokensData).build(); - TokensResponse response = rosetteApi.perform(HttpRosetteAPI.TOKENS_SERVICE_PATH, request, TokensResponse.class); + TokensResponse response = rosetteApi.perform(TOKENS_SERVICE_PATH, request, TokensResponse.class); System.out.println(responseToJson(response)); } } diff --git a/examples/src/main/java/com/basistech/rosette/examples/TopicsExample.java b/examples/src/main/java/com/basistech/rosette/examples/TopicsExample.java index 7296e96e8..c268d9360 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/TopicsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/TopicsExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,6 +21,8 @@ import com.basistech.rosette.apimodel.TopicsResponse; import com.basistech.util.LanguageCode; +import static com.basistech.rosette.api.common.AbstractRosetteAPI.TOPICS_SERVICE_PATH; + /** * Example which demonstrates the topics API. */ @@ -44,7 +46,7 @@ private void run() throws Exception { .language(LanguageCode.ENGLISH) .content(topicsData) .build(); - TopicsResponse resp = rosetteApi.perform(HttpRosetteAPI.TOPICS_SERVICE_PATH, request, TopicsResponse.class); + TopicsResponse resp = rosetteApi.perform(TOPICS_SERVICE_PATH, request, TopicsResponse.class); System.out.println(responseToJson(resp)); } } diff --git a/examples/src/main/java/com/basistech/rosette/examples/TransliterationExample.java b/examples/src/main/java/com/basistech/rosette/examples/TransliterationExample.java index 428fc474d..d2bc48ca9 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/TransliterationExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/TransliterationExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,6 +23,8 @@ import java.io.IOException; +import static com.basistech.rosette.api.common.AbstractRosetteAPI.TRANSLITERATION_SERVICE_PATH; + /** * Example which demonstrates the transliteration API. */ @@ -49,7 +51,7 @@ private void run() throws IOException { .content(transliterationData) .language(LanguageCode.ARABIC) .build(); - TransliterationResponse response = rosetteApi.perform(HttpRosetteAPI.TRANSLITERATION_SERVICE_PATH, request, TransliterationResponse.class); + TransliterationResponse response = rosetteApi.perform(TRANSLITERATION_SERVICE_PATH, request, TransliterationResponse.class); System.out.println(responseToJson(response)); } } diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/AddressMixin.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/AddressMixin.java index 9fbf02075..e68db9b27 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/AddressMixin.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/AddressMixin.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 Basis Technology Corp. + * Copyright 2019-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -58,6 +58,6 @@ protected AddressMixin() { } @JsonPOJOBuilder(withPrefix = "") - abstract class AddressBuilderMixin { + abstract static class AddressBuilderMixin { } } diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/AddressSimilarityRequestMixin.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/AddressSimilarityRequestMixin.java index 743d78908..bbb13da69 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/AddressSimilarityRequestMixin.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/AddressSimilarityRequestMixin.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 Basis Technology Corp. + * Copyright 2019-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,6 +41,6 @@ protected AddressSimilarityRequestMixin( } @JsonPOJOBuilder(withPrefix = "") - abstract class AddressSimilarityRequestBuilderMixin { + abstract static class AddressSimilarityRequestBuilderMixin { } } diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/AdmRequestMixin.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/AdmRequestMixin.java index 8ebbd1d1a..81ca3989b 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/AdmRequestMixin.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/AdmRequestMixin.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,6 +43,6 @@ protected AdmRequestMixin( } @JsonPOJOBuilder(withPrefix = "") - abstract class AdmRequestBuilderMixin { + abstract static class AdmRequestBuilderMixin { } } diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/ApiModelMixinModule.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/ApiModelMixinModule.java index 76931c0cc..9778b1510 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/ApiModelMixinModule.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/ApiModelMixinModule.java @@ -45,6 +45,7 @@ public ApiModelMixinModule() { super(); } + @Override public void setupModule(Module.SetupContext context) { super.setupModule(context); @@ -52,26 +53,33 @@ public void setupModule(Module.SetupContext context) { MixinUtil.addMixins(context); context.setMixInAnnotations(DocumentRequest.class, DocumentRequestMixin.class); - context.setMixInAnnotations(DocumentRequest.DocumentRequestBuilder.class, DocumentRequestMixin.DocumentRequestBuilderMixin.class); + context.setMixInAnnotations(DocumentRequest.DocumentRequestBuilder.class, + DocumentRequestMixin.DocumentRequestBuilderMixin.class); context.setMixInAnnotations(AdmRequest.class, AdmRequestMixin.class); context.setMixInAnnotations(AdmRequest.AdmRequestBuilder.class, AdmRequestMixin.AdmRequestBuilderMixin.class); context.setMixInAnnotations(Name.class, NameMixin.class); context.setMixInAnnotations(Name.NameBuilder.class, NameMixin.NameBuilderMixin.class); context.setMixInAnnotations(NameSimilarityRequest.class, NameSimilarityRequestMixin.class); - context.setMixInAnnotations(NameSimilarityRequest.NameSimilarityRequestBuilder.class, NameSimilarityRequestMixin.NameSimilarityRequestBuilderMixin.class); + context.setMixInAnnotations(NameSimilarityRequest.NameSimilarityRequestBuilder.class, + NameSimilarityRequestMixin.NameSimilarityRequestBuilderMixin.class); context.setMixInAnnotations(NameTranslationRequest.class, NameTranslationRequestMixin.class); - context.setMixInAnnotations(NameTranslationRequest.NameTranslationRequestBuilder.class, NameTranslationRequestMixin.NameTranslationRequestBuilderMixin.class); + context.setMixInAnnotations(NameTranslationRequest.NameTranslationRequestBuilder.class, + NameTranslationRequestMixin.NameTranslationRequestBuilderMixin.class); context.setMixInAnnotations(NameDeduplicationRequest.class, NameDeduplicationRequestMixin.class); - context.setMixInAnnotations(NameDeduplicationRequest.NameDeduplicationRequestBuilder.class, NameDeduplicationRequestMixin.NameDeduplicationRequestBuilderMixin.class); + context.setMixInAnnotations(NameDeduplicationRequest.NameDeduplicationRequestBuilder.class, + NameDeduplicationRequestMixin.NameDeduplicationRequestBuilderMixin.class); context.setMixInAnnotations(Address.class, AddressMixin.class); context.setMixInAnnotations(Address.AddressBuilder.class, AddressMixin.AddressBuilderMixin.class); context.setMixInAnnotations(FieldedAddress.class, FieldedAddressMixin.class); - context.setMixInAnnotations(FieldedAddress.FieldedAddressBuilder.class, FieldedAddressMixin.FieldedAddressBuilderMixin.class); + context.setMixInAnnotations(FieldedAddress.FieldedAddressBuilder.class, + FieldedAddressMixin.FieldedAddressBuilderMixin.class); context.setMixInAnnotations(UnfieldedAddress.class, UnfieldedAddressMixin.class); - context.setMixInAnnotations(UnfieldedAddress.UnfieldedAddressBuilder.class, UnfieldedAddressMixin.UnfieldedAddressBuilderMixin.class); + context.setMixInAnnotations(UnfieldedAddress.UnfieldedAddressBuilder.class, + UnfieldedAddressMixin.UnfieldedAddressBuilderMixin.class); context.setMixInAnnotations(AddressSimilarityRequest.class, AddressSimilarityRequestMixin.class); - context.setMixInAnnotations(AddressSimilarityRequest.AddressSimilarityRequestBuilder.class, AddressSimilarityRequestMixin.AddressSimilarityRequestBuilderMixin.class); + context.setMixInAnnotations(AddressSimilarityRequest.AddressSimilarityRequestBuilder.class, + AddressSimilarityRequestMixin.AddressSimilarityRequestBuilderMixin.class); context.setMixInAnnotations(ConfigurationRequest.class, ConfigurationRequestMixin.class); context.setMixInAnnotations(ConfigurationRequest.ConfigurationRequestBuilder.class, ConfigurationRequestMixin.ConfigurationRequestBuilderMixin.class); diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/ConfigurationRequestMixin.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/ConfigurationRequestMixin.java index 683447876..909475938 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/ConfigurationRequestMixin.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/ConfigurationRequestMixin.java @@ -1,3 +1,19 @@ +/* + * Copyright 2017-2022 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.basistech.rosette.apimodel.jackson; import com.basistech.rosette.apimodel.Configuration; @@ -21,6 +37,6 @@ protected ConfigurationRequestMixin( } @JsonPOJOBuilder(withPrefix = "") - abstract class ConfigurationRequestBuilderMixin { + abstract static class ConfigurationRequestBuilderMixin { } } diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/DocumentRequestMixin.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/DocumentRequestMixin.java index b02541510..8cd33d90c 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/DocumentRequestMixin.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/DocumentRequestMixin.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -54,7 +54,7 @@ protected DocumentRequestMixin( } @JsonPOJOBuilder(withPrefix = "") - abstract class DocumentRequestBuilderMixin { + abstract static class DocumentRequestBuilderMixin { } @JsonIgnore diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/FieldedAddressMixin.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/FieldedAddressMixin.java index fed88957f..97fbc8d94 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/FieldedAddressMixin.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/FieldedAddressMixin.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Basis Technology Corp. + * Copyright 2020-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -49,6 +49,6 @@ protected FieldedAddressMixin(@JsonProperty("house") String house, } @JsonPOJOBuilder(withPrefix = "") - abstract class FieldedAddressBuilderMixin { + abstract static class FieldedAddressBuilderMixin { } } diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/NameDeduplicationRequestMixin.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/NameDeduplicationRequestMixin.java index 2afe774e3..3eac87621 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/NameDeduplicationRequestMixin.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/NameDeduplicationRequestMixin.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,6 +41,6 @@ protected NameDeduplicationRequestMixin( } @JsonPOJOBuilder(withPrefix = "") - abstract class NameDeduplicationRequestBuilderMixin { + abstract static class NameDeduplicationRequestBuilderMixin { } } diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/NameSimilarityRequestMixin.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/NameSimilarityRequestMixin.java index c778fd206..104a4488e 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/NameSimilarityRequestMixin.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/NameSimilarityRequestMixin.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,6 +43,6 @@ protected NameSimilarityRequestMixin( } @JsonPOJOBuilder(withPrefix = "") - abstract class NameSimilarityRequestBuilderMixin { + abstract static class NameSimilarityRequestBuilderMixin { } } diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/NameTranslationRequestMixin.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/NameTranslationRequestMixin.java index 034341d66..e244a298f 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/NameTranslationRequestMixin.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/NameTranslationRequestMixin.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,6 +47,6 @@ protected NameTranslationRequestMixin( } @JsonPOJOBuilder(withPrefix = "") - abstract class NameTranslationRequestBuilderMixin { + abstract static class NameTranslationRequestBuilderMixin { } } diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/UnfieldedAddressMixin.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/UnfieldedAddressMixin.java index 5e12de139..98f97f450 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/UnfieldedAddressMixin.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/UnfieldedAddressMixin.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Basis Technology Corp. + * Copyright 2020-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,6 +33,6 @@ protected UnfieldedAddressMixin(@JsonProperty("address") String address) { } @JsonPOJOBuilder(withPrefix = "") - abstract class UnfieldedAddressBuilderMixin { + abstract static class UnfieldedAddressBuilderMixin { } } diff --git a/model/pom.xml b/model/pom.xml index c87ec66fb..43e740229 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -41,7 +41,7 @@ javax.validation validation-api - 2.0.0.Final + ${javax-validation-api.version} com.basistech @@ -50,13 +50,13 @@ org.projectlombok lombok - 1.18.22 + ${lombok.version} provided com.squareup javapoet - 1.9.0 + ${java-poet.version} provided @@ -91,7 +91,7 @@ org.projectlombok lombok-maven-plugin - 1.18.20.0 + ${lombok-maven-plugin.version} generate-sources diff --git a/model/src/main/java/com/basistech/rosette/apimodel/AccuracyMode.java b/model/src/main/java/com/basistech/rosette/apimodel/AccuracyMode.java index dff2ee83d..926ab4bbc 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/AccuracyMode.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/AccuracyMode.java @@ -25,7 +25,7 @@ public enum AccuracyMode { PRECISION("precision"), RECALL("recall"); - private String label; + private final String label; /** * constructor for {@code AccuracyMode} which sets a label for reference @@ -42,14 +42,6 @@ public String getLabel() { return label; } - /** - * set the label - * @param label the label - */ - public void setLabel(String label) { - this.label = label; - } - /** * checks if value is a valid {@code AccuracyMode} enum * @param value input value diff --git a/model/src/main/java/com/basistech/rosette/apimodel/Address.java b/model/src/main/java/com/basistech/rosette/apimodel/Address.java index 27941b23a..9043824db 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/Address.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/Address.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 Basis Technology Corp. + * Copyright 2019-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ import lombok.Value; /** + * @deprecated * Class that represents an address */ @Value @@ -30,92 +31,92 @@ public class Address implements IAddress { /** * @return the address house */ - private final String house; + String house; /** * @return the address house number */ - private final String houseNumber; + String houseNumber; /** * @return the address road */ - private final String road; + String road; /** * @return the address unit */ - private final String unit; + String unit; /** * @return the address level */ - private final String level; + String level; /** * @return the address staircase */ - private final String staircase; + String staircase; /** * @return the address entrance */ - private final String entrance; + String entrance; /** * @return the address suburb */ - private final String suburb; + String suburb; /** * @return the address city district */ - private final String cityDistrict; + String cityDistrict; /** * @return the address city */ - private final String city; + String city; /** * @return the address island */ - private final String island; + String island; /** * @return the address state district */ - private final String stateDistrict; + String stateDistrict; /** * @return the address state */ - private final String state; + String state; /** * @return the address country region */ - private final String countryRegion; + String countryRegion; /** * @return the address country */ - private final String country; + String country; /** * @return the address world region */ - private final String worldRegion; + String worldRegion; /** * @return the address postal code */ - private final String postCode; + String postCode; /** * @return the address P.O. Box */ - private final String poBox; + String poBox; @Override public boolean fielded() { diff --git a/model/src/main/java/com/basistech/rosette/apimodel/EntitiesOptions.java b/model/src/main/java/com/basistech/rosette/apimodel/EntitiesOptions.java index b4e75d623..96e9ddf80 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/EntitiesOptions.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/EntitiesOptions.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2019 Basis Technology Corp. +* Copyright 2017-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,62 +41,63 @@ public class EntitiesOptions extends Options { /** * @return the calculateConfidence flag. */ - private final Boolean calculateConfidence; + Boolean calculateConfidence; /** * @return the calculateSalience flag. */ - private final Boolean calculateSalience; + Boolean calculateSalience; /** * @return the linkEntities flag. */ - private final Boolean linkEntities; + Boolean linkEntities; /** * @return the linkMentionMode mode. */ - private final String linkMentionMode; + String linkMentionMode; /** * @return the modelType to use. */ - private final String modelType; + String modelType; /** * @deprecated use includeDBpediaTypes instead. * @return the includeDBpediaType flag. */ - private final Boolean includeDBpediaType; + @Deprecated(since = "1.14.0", forRemoval = true) + Boolean includeDBpediaType; /** * @since 1.14.0 (19.08) * @return the includeDBpediaType flag. */ - private final Boolean includeDBpediaTypes; + Boolean includeDBpediaTypes; /** * @return the includePermID flag. */ - private final Boolean includePermID; + Boolean includePermID; /** * @return the RTS workspace id. */ - private final String rtsDecoder; + String rtsDecoder; /** * @return case sensitivity of model to use. Can be one of caseSensitive, caseInsensitive or automatic. */ - private final String caseSensitivity; + String caseSensitivity; /** * @return the enableStructuredRegion flag. */ - private final Boolean enableStructuredRegion; + Boolean enableStructuredRegion; /** * @return the structuredRegionProcessingType flag. Can be one of none, nerModel, nameClassifier */ - private final String structuredRegionProcessingType; + String structuredRegionProcessingType; } diff --git a/model/src/main/java/com/basistech/rosette/apimodel/Entity.java b/model/src/main/java/com/basistech/rosette/apimodel/Entity.java index 86d8e041f..8ca3655e6 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/Entity.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/Entity.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2019 Basis Technology Corp. +* Copyright 2017-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ import lombok.Builder; import lombok.Value; +import javax.validation.Valid; import java.util.List; /** @@ -33,69 +34,71 @@ public class Entity { /** * @return the entity type */ - private final String type; + String type; /** * @return the entity mention text */ - private final String mention; + String mention; /** * @return the normalized entity mention text */ - private final String normalized; + String normalized; /** * @return the entity mention count */ - private final Integer count; + Integer count; /** * @return the list of offsets for all mentions */ - private final List mentionOffsets; + @Valid + List mentionOffsets; /** * @return the ID of this entity. If this entity was linked to a knowledge base, * the resulting string will begin with 'Q'. If it was not linked to a knowledge base, * it will begin with a 'T'. 'T' identifiers represent intra-document co-references. */ - private final String entityId; + String entityId; /** * @return the confidence score for the entity (0.0-1.0) */ - private final Double confidence; + Double confidence; /** * @return the confidence score for linking the entity to the knowledge base (0.0-1.0) */ - private final Double linkingConfidence; + Double linkingConfidence; /** * @return the salience score for the entity (0.0|1.0) */ - private final Double salience; + Double salience; /** * @return the sentiment information. */ - private final Label sentiment; + Label sentiment; /** * @deprecated use dbpediaTypes instead. * @return the DBpediaType */ - private final String dbpediaType; + @Deprecated(since = "1.14.0", forRemoval = true) + String dbpediaType; /** * @since 1.14.0 (19.08) * @return the DBpediaTypes */ - private final List dbpediaTypes; + List dbpediaTypes; /** * @return the PermID */ - private final String permId; + String permId; } diff --git a/model/src/main/java/com/basistech/rosette/apimodel/LanguageOptions.java b/model/src/main/java/com/basistech/rosette/apimodel/LanguageOptions.java index 0e9aa70da..dd1a8e05e 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/LanguageOptions.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/LanguageOptions.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,6 +22,7 @@ import lombok.Builder; import lombok.Value; +import javax.validation.Valid; import javax.validation.constraints.DecimalMax; import javax.validation.constraints.DecimalMin; import javax.validation.constraints.Min; @@ -38,38 +39,41 @@ public class LanguageOptions extends Options { /** * @return whether to detect language regions */ - private final Boolean multilingual; + Boolean multilingual; /** * @return minimum number of valid characters */ @Min(1) - private final Integer minValidChars; + Integer minValidChars; /** - * @return the most frequent n-grams to consider in detection, smaller depth results in faster operation but lower detection accuracy + * @return the most frequent n-grams to consider in detection, smaller depth results in faster operation but + * lower detection accuracy */ @Min(1) - private final Integer profileDepth; + Integer profileDepth; /** - * @return number of n-gram distance ambiguity threshold (0.0-100.0), input profile distances closer to each other than this threshold are deemed ambiguous + * @return number of n-gram distance ambiguity threshold (0.0-100.0), input profile distances closer to each + * other than this threshold are deemed ambiguous */ @DecimalMin("0.0") @DecimalMax("100.0") - private final Double ambiguityThreshold; + Double ambiguityThreshold; /** - * @return number of n-gram distance invalidity threshold (0.0-100.0), input profile distance exceeding this threshold will be deemed invalid + * @return number of n-gram distance invalidity threshold (0.0-100.0), input profile distance exceeding this + * threshold will be deemed invalid */ @DecimalMin("0.0") @DecimalMax("100.0") - private final Double invalidityThreshold; + Double invalidityThreshold; /** * @return language hint */ - private final LanguageCode languageHint; + LanguageCode languageHint; /** * @return the language hint weight (1.0-99.0) used to help resolve ambiguous results. @@ -78,12 +82,12 @@ public class LanguageOptions extends Options { */ @DecimalMin("1.0") @DecimalMax("99.0") - private final Double languageHintWeight; + Double languageHintWeight; /** * @return the encoding hint used to help resolve ambiguous results */ - private final EncodingCode encodingHint; + EncodingCode encodingHint; /** * @return the encoding hint weight (1.0-100.0) used to help resolve ambiguous results. @@ -92,16 +96,17 @@ public class LanguageOptions extends Options { */ @DecimalMin("1.0") @DecimalMax("100.0") - private final Double encodingHintWeight; + Double encodingHintWeight; /** * @return languageWeightAdjustments the set of language weight adjustments */ - private final Set languageWeightAdjustments; + @Valid + Set languageWeightAdjustments; /** * @return whether to distinguish between North Korean and South Korean */ - private final Boolean koreanDialects; + Boolean koreanDialects; } diff --git a/model/src/main/java/com/basistech/rosette/apimodel/Name.java b/model/src/main/java/com/basistech/rosette/apimodel/Name.java index 37c58934a..c9bfcb388 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/Name.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/Name.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,22 +34,22 @@ public class Name { * @return text of the name */ @NotNull - private final String text; + String text; /** * @return entity type of the name */ - private final String entityType; + String entityType; /** * @return script of the name, {@link ISO15924} */ - private final ISO15924 script; + ISO15924 script; /** * @return language of the name, {@link LanguageCode} */ - private final LanguageCode language; + LanguageCode language; /** * Default constructor for lombok diff --git a/model/src/main/java/com/basistech/rosette/apimodel/NameDeduplicationRequest.java b/model/src/main/java/com/basistech/rosette/apimodel/NameDeduplicationRequest.java index 1cbb0c60d..89b68f1e9 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/NameDeduplicationRequest.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/NameDeduplicationRequest.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,7 +19,9 @@ import lombok.Builder; import lombok.Value; +import javax.validation.Valid; import javax.validation.constraints.NotNull; +import java.util.ArrayList; import java.util.List; /** @@ -28,25 +30,26 @@ * This class carries the list of names to dedupe as well as the score threshold. */ @Value -public final class NameDeduplicationRequest extends Request { +public class NameDeduplicationRequest extends Request { /** * @return the list of names */ @NotNull - private final List names; + @Valid + List names; /** * @return the threshold */ - private final Double threshold; + Double threshold; - @Builder // workaround for inheritance https://github.com/rzwitserloot/lombok/issues/853 + @Builder // workaround for inheritance https://github.com/projectlombok/lombok/issues/853 public NameDeduplicationRequest(String profileId, List names, Double threshold) { super(profileId); - this.names = names; + this.names = new ArrayList<>(names); this.threshold = threshold; } } diff --git a/model/src/main/java/com/basistech/rosette/apimodel/NameSimilarityRequest.java b/model/src/main/java/com/basistech/rosette/apimodel/NameSimilarityRequest.java index 527aa9ac2..1e54abc24 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/NameSimilarityRequest.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/NameSimilarityRequest.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,6 +21,7 @@ import lombok.Builder; import lombok.Value; +import javax.validation.Valid; import javax.validation.constraints.NotNull; /** @@ -29,24 +30,26 @@ * This class carries the two names to compare. */ @Value -public final class NameSimilarityRequest extends Request { +public class NameSimilarityRequest extends Request { /** * @return first name */ @NotNull - private Name name1; + @Valid + Name name1; /** * @return second name */ @NotNull - private Name name2; + @Valid + Name name2; /** * @return parameters to use */ - private Map parameters; + Map parameters; @Builder // workaround for inheritance https://github.com/rzwitserloot/lombok/issues/853 public NameSimilarityRequest(String profileId, diff --git a/pom.xml b/pom.xml index b0bb954f4..f176fc6ee 100644 --- a/pom.xml +++ b/pom.xml @@ -41,18 +41,23 @@ + 1.0.1 6.2.0 + 2.7.2 3.3.0 - 4.5.13 - 4.4.15 + 4.5.13 + 4.4.15 + 1.13.0 + 2.0.0.Final + 1.18.24 + 1.18.20.0 3.2.0 3.10.1 3.4.1 3.2.1 - 4.1.0 + 4.1.0 1.6.13 - 1.5 - 2.7.2 + 1.5 annotations @@ -98,7 +103,6 @@ - @@ -114,7 +118,7 @@ com.basistech bbh-maven-plugin - 1.0.1 + ${bbh-maven-plugin.version} osgi-version From 1291bfa1484ebb8422062204f0476100de01fa7e Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Thu, 29 Sep 2022 17:39:41 -0500 Subject: [PATCH 110/415] WS-2537: Few more Sonar issues. --- .../com/basistech/rosette/annotations/JacksonMixin.java | 4 ++-- .../test/java/com/basistech/rosette/api/BasicTest.java | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/annotations/src/main/java/com/basistech/rosette/annotations/JacksonMixin.java b/annotations/src/main/java/com/basistech/rosette/annotations/JacksonMixin.java index c52b96a3d..375c96b61 100644 --- a/annotations/src/main/java/com/basistech/rosette/annotations/JacksonMixin.java +++ b/annotations/src/main/java/com/basistech/rosette/annotations/JacksonMixin.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,4 +24,4 @@ @Retention(RetentionPolicy.SOURCE) @Target(ElementType.TYPE) public @interface JacksonMixin { -} \ No newline at end of file +} diff --git a/api/src/test/java/com/basistech/rosette/api/BasicTest.java b/api/src/test/java/com/basistech/rosette/api/BasicTest.java index 54c235097..9762f24b3 100644 --- a/api/src/test/java/com/basistech/rosette/api/BasicTest.java +++ b/api/src/test/java/com/basistech/rosette/api/BasicTest.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -64,11 +64,12 @@ public class BasicTest extends AbstractTest { private MockServerClient mockServer; private HttpRosetteAPI api; - private static int getFreePort() { + public BasicTest() throws IOException { + } + + private static int getFreePort() throws IOException { try (ServerSocket socket = new ServerSocket(0)) { serverPort = socket.getLocalPort(); - } catch (IOException e) { - fail("Failed to allocate a port"); } assertNotEquals(0, serverPort); return serverPort; From 7493e97fe9f047b1eabcbca1b9a32a902d8f7937 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Thu, 29 Sep 2022 17:42:14 -0500 Subject: [PATCH 111/415] WS-2537: Maven property for common api. --- osgi-itests/pom.xml | 2 +- pom.xml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 76b047ef7..6eab5c275 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -25,7 +25,7 @@ com.basistech common-api - 37.0.1 + ${bt-common-api.version} diff --git a/pom.xml b/pom.xml index f176fc6ee..262688211 100644 --- a/pom.xml +++ b/pom.xml @@ -44,6 +44,7 @@ 1.0.1 6.2.0 2.7.2 + 37.0.1 3.3.0 4.5.13 4.4.15 @@ -74,7 +75,7 @@ com.basistech common-api - 37.0.0 + ${bt-common-api.version} com.basistech From 810bab65ecea0dba35db785a84d1865bc3895120 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Fri, 30 Sep 2022 14:18:04 -0400 Subject: [PATCH 112/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.23.0 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 484a41df1..9a534ec42 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.0-SNAPSHOT + 1.23.0 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 228417893..b2b4b7e67 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.0-SNAPSHOT + 1.23.0 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index bc226979f..860298a38 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.0-SNAPSHOT + 1.23.0 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 0eb8fcca6..9957da82b 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.0-SNAPSHOT + 1.23.0 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 4c1d86471..41927fa19 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.0-SNAPSHOT + 1.23.0 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 43e740229..8119fc74d 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.0-SNAPSHOT + 1.23.0 rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 6eab5c275..e057d51ae 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.0-SNAPSHOT + 1.23.0 target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.23.0-SNAPSHOT + 1.23.0 diff --git a/pom.xml b/pom.xml index 262688211..78d45e796 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.23.0-SNAPSHOT + 1.23.0 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - HEAD + rosette-api-java-binding-1.23.0 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 4c890600e..3976f17aa 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.0-SNAPSHOT + 1.23.0 com.basistech.rosette rosette-api-release From 5b3e2f9e11a1679ffccfc76c81c27e4980fbcbed Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Fri, 30 Sep 2022 14:18:06 -0400 Subject: [PATCH 113/415] [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 9a534ec42..1a9b0222e 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.0 + 1.23.1-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index b2b4b7e67..789bfa790 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.0 + 1.23.1-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 860298a38..4ce9ff360 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.0 + 1.23.1-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 9957da82b..99aabe886 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.0 + 1.23.1-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 41927fa19..e7daa040d 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.0 + 1.23.1-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 8119fc74d..52c342837 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.0 + 1.23.1-SNAPSHOT rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index e057d51ae..ad2b20fd0 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.0 + 1.23.1-SNAPSHOT target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.23.0 + 1.23.1-SNAPSHOT diff --git a/pom.xml b/pom.xml index 78d45e796..16ef1440e 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.23.0 + 1.23.1-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.23.0 + HEAD This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 3976f17aa..7e3c70d5b 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.0 + 1.23.1-SNAPSHOT com.basistech.rosette rosette-api-release From 55f861f9f7d2d4e509e31ab72cf18f64417ed1cb Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Thu, 6 Oct 2022 17:50:06 -0500 Subject: [PATCH 114/415] NO-JIRA: Start migration to new parent pom. --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 16ef1440e..01c1cb646 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ open-source-parent com.basistech - 2.0.3 + 11.0.0 pom From 32e506f12dc00fc486fb25f4ac33e49bddc66f85 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Mon, 24 Oct 2022 16:49:37 -0500 Subject: [PATCH 115/415] NO-JIRA: Upgraded as far as possible until new ADM release. Still pending is fixing the resource exhaustion in RosetteAPITest. --- api/pom.xml | 88 ++++++++++++++++++- .../basistech/rosette/api/AbstractTest.java | 22 +++-- .../com/basistech/rosette/api/BasicTest.java | 30 +++---- .../rosette/api/DevRosetteAPITest.java | 6 +- .../rosette/api/InvalidErrorTest.java | 11 ++- .../basistech/rosette/api/RosetteAPITest.java | 29 ++++-- json/pom.xml | 4 +- osgi-itests/pom.xml | 8 +- pom.xml | 14 ++- 9 files changed, 165 insertions(+), 47 deletions(-) diff --git a/api/pom.xml b/api/pom.xml index 789bfa790..b50034b0b 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -1,6 +1,6 @@ + + commons-codec + commons-codec + ${commons-codec.version} + org.apache.httpcomponents httpclient ${http-components.version} + + + commons-codec + commons-codec + + org.apache.httpcomponents httpclient-osgi ${http-components.version} + + + org.apache.httpcomponents + httpclient + + + org.apache.httpcomponents + httpmime + + + commons-codec + commons-codec + + org.apache.httpcomponents @@ -70,6 +97,12 @@ org.apache.httpcomponents httpmime ${http-components.version} + + + org.apache.httpcomponents + httpclient + + org.slf4j @@ -78,6 +111,7 @@ junit junit + org.mock-server @@ -90,10 +124,60 @@ mockserver-core ${mockserver.version} test + + + com.google.code.findbugs + jsr305 + + + commons-beanutils + commons-beanutils + + + org.apache.httpcomponents + httpclient + + + org.apache.commons + commons-lang3 + + + commons-codec + commons-codec + + + commons-logging + commons-logging + + + jakarta.xml.bind + jakarta.xml.bind-api + + + + + + jakarta.xml.bind + jakarta.xml.bind-api + 4.0.0 + test + + + com.google.code.findbugs + jsr305 + ${findbugs-jsr305.version} + test + + + commons-beanutils + commons-beanutils + ${commons-beanutils.version} + test + org.mock-server - mockserver-netty + mockserver-junit-rule ${mockserver.version} test diff --git a/api/src/test/java/com/basistech/rosette/api/AbstractTest.java b/api/src/test/java/com/basistech/rosette/api/AbstractTest.java index 632272adb..affb1f34b 100644 --- a/api/src/test/java/com/basistech/rosette/api/AbstractTest.java +++ b/api/src/test/java/com/basistech/rosette/api/AbstractTest.java @@ -1,5 +1,5 @@ /* -* Copyright 2014 Basis Technology Corp. +* Copyright 2014-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,15 +19,18 @@ import com.basistech.rosette.apimodel.jackson.ApiModelMixinModule; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; -import com.google.common.base.Charsets; import com.google.common.io.Resources; import org.junit.Assert; import org.junit.BeforeClass; import java.io.ByteArrayOutputStream; import java.io.IOException; +import java.net.URISyntaxException; import java.net.URL; import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; import java.util.zip.GZIPOutputStream; public abstract class AbstractTest extends Assert { @@ -37,9 +40,9 @@ public abstract class AbstractTest extends Assert { protected static ObjectMapper mapper; @BeforeClass - public static void before() throws IOException { + public static void before() throws IOException, URISyntaxException { URL url = Resources.getResource("MockServerClientPort.property"); - String clientPort = Resources.toString(url, Charsets.UTF_8); + String clientPort = Resources.toString(url, StandardCharsets.UTF_8); serverPort = Integer.parseInt(clientPort); mapper = ApiModelMixinModule.setupObjectMapper(new ObjectMapper()); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); @@ -53,5 +56,14 @@ protected static byte[] gzip(String text) throws IOException { return baos.toByteArray(); } - +/* + private static int getMockServerPort() throws IOException, URISyntaxException { + String filename = "MockServerClientPort.property"; + URL u = Thread.currentThread().getContextClassLoader().getResource(filename); + assertNotNull(u); + Path p = Paths.get(u.toURI()); + String port = Files.readAllLines(p, StandardCharsets.UTF_8).get(0); + return Integer.parseInt(port); + } +*/ } diff --git a/api/src/test/java/com/basistech/rosette/api/BasicTest.java b/api/src/test/java/com/basistech/rosette/api/BasicTest.java index 9762f24b3..eec06b928 100644 --- a/api/src/test/java/com/basistech/rosette/api/BasicTest.java +++ b/api/src/test/java/com/basistech/rosette/api/BasicTest.java @@ -32,10 +32,9 @@ import org.apache.commons.io.IOUtils; import org.apache.http.HttpHeaders; -import org.junit.Before; import org.junit.Rule; import org.junit.Test; -import org.mockserver.client.server.MockServerClient; +import org.mockserver.client.MockServerClient; import org.mockserver.junit.MockServerRule; import org.mockserver.model.Delay; import org.mockserver.model.HttpRequest; @@ -60,7 +59,7 @@ public class BasicTest extends AbstractTest { @Rule - public MockServerRule mockServerRule = new MockServerRule(this, getFreePort()); + public MockServerRule mockServerRule = new MockServerRule(this, false, getFreePort()); private MockServerClient mockServer; private HttpRosetteAPI api; @@ -75,19 +74,13 @@ private static int getFreePort() throws IOException { return serverPort; } - @Before - public void setup() { - mockServer.reset(); - // for version check call - } - // an indirect way to show that connection pooling works // with concurrent connections = 1, the time to complete requests becomes serial // so: run several requests in threads, assert that they're executed serially // then set concurrent connections = 5, // run several requests again, showing they're executed in parallel @Test - public void testMultipleConnections() throws IOException, InterruptedException { + public void testMultipleConnections() throws InterruptedException { int delayTime = 3; int numConnections = 5; @@ -141,7 +134,6 @@ public void testMultipleConnections() throws IOException, InterruptedException { assertTrue(d2.getTime() - d1.getTime() < delayTime * numConnections * 1000); // less than (numConnections) serial requests assertTrue(d2.getTime() - d1.getTime() > delayTime * 1000); // but at least as long as one } - @Test public void testHeaders() throws Exception { mockServer.when(HttpRequest.request() @@ -168,13 +160,14 @@ public void testHeaders() throws Exception { public void testAdm() throws Exception { try (InputStream reqIns = getClass().getResourceAsStream("/adm-req.json"); InputStream respIns = getClass().getResourceAsStream("/adm-resp.json")) { + assertNotNull(respIns); mockServer.when(HttpRequest.request() .withMethod("POST") .withPath("/rest/v1/entities")) .respond(HttpResponse.response() .withStatusCode(200) .withHeader("Content-Type", "application/json") - .withBody(IOUtils.toString(respIns, "UTF-8"))); + .withBody(IOUtils.toString(respIns, StandardCharsets.UTF_8))); api = new HttpRosetteAPI.Builder() .key("foo-key") .url(String.format("http://localhost:%d/rest/v1", serverPort)) @@ -210,10 +203,10 @@ public void testExtendedInfo() throws Exception { assertTrue(foos.contains("Bar2")); } - private class ApiPinger extends Thread { + private static class ApiPinger extends Thread { HttpRosetteAPI api1; - ApiPinger(HttpRosetteAPI api) throws IOException { + ApiPinger(HttpRosetteAPI api) { this.api1 = api; } @@ -230,13 +223,14 @@ public void run() { @Test public void testLanguageSupport() throws Exception { try (InputStream respIns = getClass().getResourceAsStream("/supported-languages.json")) { + assertNotNull(respIns); mockServer.when(HttpRequest.request() .withMethod("GET") .withPath("/rest/v1/entities/supported-languages")) .respond(HttpResponse.response() .withStatusCode(200) .withHeader("Content-Type", "application/json") - .withBody(IOUtils.toString(respIns, "UTF-8"))); + .withBody(IOUtils.toString(respIns, StandardCharsets.UTF_8))); api = new HttpRosetteAPI.Builder() .key("foo-key") .url(String.format("http://localhost:%d/rest/v1", serverPort)) @@ -259,13 +253,14 @@ public void testLanguageSupport() throws Exception { @Test public void testNameSimilarityLanguageSupport() throws Exception { try (InputStream respIns = getClass().getResourceAsStream("/name-similarity-supported-languages.json")) { + assertNotNull(respIns); mockServer.when(HttpRequest.request() .withMethod("GET") .withPath("/rest/v1/name-similarity/supported-languages")) .respond(HttpResponse.response() .withStatusCode(200) .withHeader("Content-Type", "application/json") - .withBody(IOUtils.toString(respIns, "UTF-8"))); + .withBody(IOUtils.toString(respIns, StandardCharsets.UTF_8))); api = new HttpRosetteAPI.Builder() .key("foo-key") .url(String.format("http://localhost:%d/rest/v1", serverPort)) @@ -289,13 +284,14 @@ public void testNameSimilarityLanguageSupport() throws Exception { @Test public void testNameTranslationLanguageSupport() throws Exception { try (InputStream respIns = getClass().getResourceAsStream("/name-translation-supported-languages.json")) { + assertNotNull(respIns); mockServer.when(HttpRequest.request() .withMethod("GET") .withPath("/rest/v1/name-translation/supported-languages")) .respond(HttpResponse.response() .withStatusCode(200) .withHeader("Content-Type", "application/json") - .withBody(IOUtils.toString(respIns, "UTF-8"))); + .withBody(IOUtils.toString(respIns, StandardCharsets.UTF_8))); api = new HttpRosetteAPI.Builder() .key("foo-key") .url(String.format("http://localhost:%d/rest/v1", serverPort)) diff --git a/api/src/test/java/com/basistech/rosette/api/DevRosetteAPITest.java b/api/src/test/java/com/basistech/rosette/api/DevRosetteAPITest.java index ee9ad2a5a..687f3f0f7 100644 --- a/api/src/test/java/com/basistech/rosette/api/DevRosetteAPITest.java +++ b/api/src/test/java/com/basistech/rosette/api/DevRosetteAPITest.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,12 +23,12 @@ import com.basistech.rosette.apimodel.TokensResponse; import com.basistech.util.LanguageCode; import com.basistech.util.PartOfSpeechTagSet; -import com.google.common.base.Charsets; import org.junit.After; import org.junit.Before; import org.junit.Test; import java.io.IOException; +import java.nio.charset.StandardCharsets; import static org.junit.Assert.assertEquals; @@ -58,7 +58,7 @@ public void multipart() throws Exception { // this assumes that the server has the mock version of the components. Request morphologyRequest = DocumentRequest.builder().language(LanguageCode.ENGLISH) .options(MorphologyOptions.builder().partOfSpeechTagSet(PartOfSpeechTagSet.upt16).build()) - .content("This is the cereal shot from 1 gun .".getBytes(Charsets.UTF_8), "text/plain;charset=utf-8") + .content("This is the cereal shot from 1 gun .".getBytes(StandardCharsets.UTF_8), "text/plain;charset=utf-8") .build(); TokensResponse response = api.perform(AbstractRosetteAPI.TOKENS_SERVICE_PATH, morphologyRequest, TokensResponse.class); assertEquals(9, response.getTokens().size()); diff --git a/api/src/test/java/com/basistech/rosette/api/InvalidErrorTest.java b/api/src/test/java/com/basistech/rosette/api/InvalidErrorTest.java index 3c57bcd75..f9c2431fd 100644 --- a/api/src/test/java/com/basistech/rosette/api/InvalidErrorTest.java +++ b/api/src/test/java/com/basistech/rosette/api/InvalidErrorTest.java @@ -21,12 +21,15 @@ import com.basistech.rosette.apimodel.LanguageResponse; import org.apache.http.HttpHeaders; import org.junit.Test; -import org.mockserver.client.server.MockServerClient; +import org.mockserver.client.MockServerClient; import org.mockserver.model.HttpRequest; import org.mockserver.model.HttpResponse; import java.nio.charset.StandardCharsets; +import static java.net.HttpURLConnection.HTTP_NOT_FOUND; +import static java.net.HttpURLConnection.HTTP_OK; + public class InvalidErrorTest extends AbstractTest { @@ -38,20 +41,21 @@ public void notJsonError() throws Exception { .respond(HttpResponse.response() .withBody("Invalid path; '//'") .withHeader("X-RosetteAPI-Concurrency", "5") - .withStatusCode(404)); + .withStatusCode(HTTP_NOT_FOUND)); mockServer.when(HttpRequest.request() .withMethod("GET") .withPath("/rest/v1/ping") .withHeader(HttpHeaders.USER_AGENT, HttpRosetteAPI.USER_AGENT_STR)) .respond(HttpResponse.response() .withBody("{\"message\":\"Rosette API at your service\",\"time\":1461788498633}", StandardCharsets.UTF_8) - .withStatusCode(200) + .withStatusCode(HTTP_OK) .withHeader("X-RosetteAPI-Concurrency", "5")); String mockServiceUrl = "http://localhost:" + Integer.toString(serverPort) + "/rest//v1"; boolean exceptional = false; try { HttpRosetteAPI api = new HttpRosetteAPI.Builder().key("my-key-123").url(mockServiceUrl).build(); api.perform(AbstractRosetteAPI.LANGUAGE_SERVICE_PATH, DocumentRequest.builder().content("sample text").build(), LanguageResponse.class); + api.close(); } catch (HttpRosetteAPIException e) { exceptional = true; assertEquals("invalidErrorResponse", e.getErrorResponse().getCode()); @@ -59,5 +63,6 @@ public void notJsonError() throws Exception { assertNotNull(e.getErrorResponse().getMessage()); } assertTrue(exceptional); + mockServer.close(); } } diff --git a/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java b/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java index 94705ec37..278bd7f3b 100644 --- a/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java +++ b/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java @@ -1,5 +1,5 @@ /* -* Copyright 2014-2019 Basis Technology Corp. +* Copyright 2014-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,11 +42,12 @@ import org.apache.commons.io.FileUtils; import org.apache.commons.io.IOUtils; import org.apache.http.HttpHeaders; +import org.junit.After; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; -import org.mockserver.client.server.MockServerClient; +import org.mockserver.client.MockServerClient; import org.mockserver.model.HttpRequest; import org.mockserver.model.HttpResponse; @@ -61,13 +62,16 @@ import java.util.ArrayList; import java.util.Collection; +import static java.net.HttpURLConnection.HTTP_OK; + @RunWith(Parameterized.class) +@org.junit.Ignore public class RosetteAPITest extends AbstractTest { + private final String mockServiceUrl = "http://localhost:" + serverPort + "/rest/v1"; private final String testFilename; private HttpRosetteAPI api; private String responseStr; private MockServerClient mockServer; - private String mockServiceUrl = "http://localhost:" + Integer.toString(serverPort) + "/rest/v1"; public RosetteAPITest(String filename) { @@ -92,15 +96,17 @@ public static Collection data() throws IOException { @Before public void setUp() throws Exception { String statusFilename = testFilename.replace(".json", ".status"); + try (InputStream bodyStream = new FileInputStream("src/test/mock-data/response/" + testFilename)) { - responseStr = IOUtils.toString(bodyStream, "UTF-8"); - int statusCode = 200; + responseStr = IOUtils.toString(bodyStream, StandardCharsets.UTF_8); + int statusCode = HTTP_OK; File statusFile = new File("src/test/mock-data/response", statusFilename); if (statusFile.exists()) { - String statusStr = FileUtils.readFileToString(statusFile, "UTF-8").trim(); + String statusStr = FileUtils.readFileToString(statusFile, StandardCharsets.UTF_8).trim(); statusCode = Integer.parseInt(statusStr); } + mockServer = new MockServerClient("localhost", serverPort); mockServer.reset(); mockServer.when(HttpRequest.request() @@ -109,7 +115,7 @@ public void setUp() throws Exception { .withHeader(HttpHeaders.USER_AGENT, HttpRosetteAPI.USER_AGENT_STR)) .respond(HttpResponse.response() .withBody("{\"message\":\"Rosette API at your service\",\"time\":1461788498633}", StandardCharsets.UTF_8) - .withStatusCode(200) + .withStatusCode(HTTP_OK) .withHeader("X-RosetteAPI-Concurrency", "5")); if (responseStr.length() > 200) { // test gzip if response is somewhat big mockServer.when(HttpRequest.request().withPath("^(?!/info).+")) @@ -129,7 +135,7 @@ public void setUp() throws Exception { mockServer.when(HttpRequest.request() .withPath("/info")) .respond(HttpResponse.response() - .withStatusCode(200) + .withStatusCode(HTTP_OK) .withHeader("Content-Type", "application/json") .withHeader("X-RosetteAPI-Concurrency", "5") .withBody(INFO_REPONSE, StandardCharsets.UTF_8)); @@ -141,6 +147,13 @@ public void setUp() throws Exception { } } + // This class should be re-factored after upgrading to JUnit 5. Probably making individual tests parameterized, + // instead of the entire class. This @After method was added to avoid resource exhaustion. + @After + public void closeMockServer() { + mockServer.close(); + } + @Test public void testMatchName() throws IOException { if (!(testFilename.endsWith("-name-similarity.json"))) { diff --git a/json/pom.xml b/json/pom.xml index e7daa040d..997d9a574 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -1,6 +1,6 @@ + ${reflections.version} test diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index ad2b20fd0..89b3445ea 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -32,13 +32,13 @@ org.apache.felix org.apache.felix.framework - 7.0.3 + ${felix-framework.version} runtime org.apache.felix org.apache.felix.configadmin - 1.8.10 + ${felix-configadmin.version} compile @@ -56,12 +56,12 @@ org.osgi osgi.enroute.junit.wrapper - 4.12.0 + ${osgi-enroute-junit-wrapper.version} org.osgi osgi.enroute.hamcrest.wrapper - 1.3.0 + ${osgi-enroute-hamcrest-wrapper.version} diff --git a/pom.xml b/pom.xml index 01c1cb646..3687e4bce 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ open-source-parent com.basistech - 11.0.0 + 7.0.1 pom @@ -43,9 +43,14 @@ 1.0.1 6.2.0 - 2.7.2 + 2.7.3 37.0.1 3.3.0 + 1.9.4 + 1.15 + 7.0.5 + 1.9.24 + 3.0.2 4.5.13 4.4.15 1.13.0 @@ -56,8 +61,11 @@ 3.10.1 3.4.1 3.2.1 - 4.1.0 + 5.14.0 1.6.13 + 4.12.0 + 1.3.0 + 0.10.2 1.5 From 7e94bef3c6b1d38adcfbed6ef80d0f472014c20e Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Wed, 26 Oct 2022 17:10:09 -0500 Subject: [PATCH 116/415] WS-2609: Upgrade to JUnit 5. Mostly complete. --- api/pom.xml | 18 +++++- .../basistech/rosette/api/AbstractTest.java | 34 +++++------ .../com/basistech/rosette/api/BasicTest.java | 45 +++++++------- .../rosette/api/DevRosetteAPITest.java | 21 +++---- .../rosette/api/InvalidErrorTest.java | 24 +++++--- .../basistech/rosette/api/RosetteAPITest.java | 20 +++---- json/pom.xml | 12 +++- .../basistech/rosette/apimodel/EnumTest.java | 12 ++-- .../basistech/rosette/apimodel/ModelTest.java | 60 ++++++++----------- .../rosette/apimodel/NonNullTest.java | 42 +++++-------- .../apimodel/PolymorphicRequestTest.java | 46 +++++++------- pom.xml | 3 + 12 files changed, 176 insertions(+), 161 deletions(-) diff --git a/api/pom.xml b/api/pom.xml index b50034b0b..b954fb8e4 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -109,9 +109,16 @@ slf4j-api - junit - junit - + org.junit.jupiter + junit-jupiter-api + ${junit.version} + test + + + org.junit.jupiter + junit-jupiter-params + ${junit.version} + test org.mock-server @@ -181,6 +188,11 @@ ${mockserver.version} test + + org.mock-server + mockserver-junit-jupiter-no-dependencies + ${mockserver.version} + commons-io commons-io diff --git a/api/src/test/java/com/basistech/rosette/api/AbstractTest.java b/api/src/test/java/com/basistech/rosette/api/AbstractTest.java index affb1f34b..03c5a4473 100644 --- a/api/src/test/java/com/basistech/rosette/api/AbstractTest.java +++ b/api/src/test/java/com/basistech/rosette/api/AbstractTest.java @@ -20,27 +20,26 @@ import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.io.Resources; -import org.junit.Assert; -import org.junit.BeforeClass; +import org.junit.jupiter.api.BeforeAll; import java.io.ByteArrayOutputStream; import java.io.IOException; -import java.net.URISyntaxException; +import java.net.ServerSocket; import java.net.URL; import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; import java.util.zip.GZIPOutputStream; -public abstract class AbstractTest extends Assert { +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.fail; + +public abstract class AbstractTest { public static final String INFO_REPONSE = "{ \"buildNumber\": \"6bafb29d\", \"buildTime\": \"2015.10.08_10:19:26\", \"name\": " + "\"RosetteAPI\", \"version\": \"0.7.0\", \"versionChecked\": true }"; protected static int serverPort; protected static ObjectMapper mapper; - @BeforeClass - public static void before() throws IOException, URISyntaxException { + @BeforeAll + public static void before() throws IOException { URL url = Resources.getResource("MockServerClientPort.property"); String clientPort = Resources.toString(url, StandardCharsets.UTF_8); serverPort = Integer.parseInt(clientPort); @@ -56,14 +55,13 @@ protected static byte[] gzip(String text) throws IOException { return baos.toByteArray(); } -/* - private static int getMockServerPort() throws IOException, URISyntaxException { - String filename = "MockServerClientPort.property"; - URL u = Thread.currentThread().getContextClassLoader().getResource(filename); - assertNotNull(u); - Path p = Paths.get(u.toURI()); - String port = Files.readAllLines(p, StandardCharsets.UTF_8).get(0); - return Integer.parseInt(port); + static int getFreePort() { + try (ServerSocket socket = new ServerSocket(0)) { + serverPort = socket.getLocalPort(); + } catch (IOException e) { + fail("Caught IOException while trying to locate a free port."); + } + assertNotEquals(0, serverPort); + return serverPort; } -*/ } diff --git a/api/src/test/java/com/basistech/rosette/api/BasicTest.java b/api/src/test/java/com/basistech/rosette/api/BasicTest.java index eec06b928..ff48b5fc2 100644 --- a/api/src/test/java/com/basistech/rosette/api/BasicTest.java +++ b/api/src/test/java/com/basistech/rosette/api/BasicTest.java @@ -32,17 +32,17 @@ import org.apache.commons.io.IOUtils; import org.apache.http.HttpHeaders; -import org.junit.Rule; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockserver.client.MockServerClient; -import org.mockserver.junit.MockServerRule; +import org.mockserver.junit.jupiter.MockServerExtension; import org.mockserver.model.Delay; import org.mockserver.model.HttpRequest; import org.mockserver.model.HttpResponse; import java.io.IOException; import java.io.InputStream; -import java.net.ServerSocket; import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Date; @@ -55,23 +55,18 @@ import static com.basistech.rosette.api.common.AbstractRosetteAPI.NAME_SIMILARITY_SERVICE_PATH; import static com.basistech.rosette.api.common.AbstractRosetteAPI.NAME_TRANSLATION_SERVICE_PATH; import static java.util.concurrent.TimeUnit.SECONDS; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class BasicTest extends AbstractTest { - - @Rule - public MockServerRule mockServerRule = new MockServerRule(this, false, getFreePort()); +@ExtendWith(MockServerExtension.class) +public class BasicTest { private MockServerClient mockServer; private HttpRosetteAPI api; - public BasicTest() throws IOException { - } - - private static int getFreePort() throws IOException { - try (ServerSocket socket = new ServerSocket(0)) { - serverPort = socket.getLocalPort(); - } - assertNotEquals(0, serverPort); - return serverPort; + @BeforeEach + public void setup(MockServerClient mockServer) { + this.mockServer = mockServer; } // an indirect way to show that connection pooling works @@ -96,7 +91,7 @@ public void testMultipleConnections() throws InterruptedException { // "before" case - send off (numConnections) requests, expect them to run serially api = new HttpRosetteAPI.Builder().connectionConcurrency(1) - .url(String.format("http://localhost:%d/rest/v1", serverPort)).build(); + .url(String.format("http://localhost:%d/rest/v1", mockServer.getPort())).build(); Date d1 = new Date(); @@ -115,7 +110,7 @@ public void testMultipleConnections() throws InterruptedException { assertTrue(d2.getTime() - d1.getTime() > delayTime * numConnections * 1000); // at least as long as the delay in the request api = new HttpRosetteAPI.Builder().connectionConcurrency(numConnections) - .url(String.format("http://localhost:%d/rest/v1", serverPort)) + .url(String.format("http://localhost:%d/rest/v1", mockServer.getPort())) .build(); d1 = new Date(); @@ -149,7 +144,7 @@ public void testHeaders() throws Exception { api = new HttpRosetteAPI.Builder() .key("foo-key") - .url(String.format("http://localhost:%d/rest/v1", serverPort)) + .url(String.format("http://localhost:%d/rest/v1", mockServer.getPort())) .additionalHeader("X-Foo", "Bar") .build(); var resp = api.ping(); @@ -170,7 +165,7 @@ public void testAdm() throws Exception { .withBody(IOUtils.toString(respIns, StandardCharsets.UTF_8))); api = new HttpRosetteAPI.Builder() .key("foo-key") - .url(String.format("http://localhost:%d/rest/v1", serverPort)) + .url(String.format("http://localhost:%d/rest/v1", mockServer.getPort())) .build(); AnnotatedText testData = ApiModelMixinModule.setupObjectMapper( new ObjectMapper()).readValue(reqIns, AnnotatedText.class); @@ -194,7 +189,7 @@ public void testExtendedInfo() throws Exception { .withBody("{\"message\":\"Rosette API at your service\",\"time\":1461788498633}", StandardCharsets.UTF_8)); api = new HttpRosetteAPI.Builder() .key("foo-key") - .url(String.format("http://localhost:%d/rest/v1", serverPort)) + .url(String.format("http://localhost:%d/rest/v1", mockServer.getPort())) .build(); Response resp = api.ping(); assertEquals("Bar", resp.getExtendedInformation().get("X-Foo")); @@ -233,7 +228,7 @@ public void testLanguageSupport() throws Exception { .withBody(IOUtils.toString(respIns, StandardCharsets.UTF_8))); api = new HttpRosetteAPI.Builder() .key("foo-key") - .url(String.format("http://localhost:%d/rest/v1", serverPort)) + .url(String.format("http://localhost:%d/rest/v1", mockServer.getPort())) .build(); SupportedLanguagesResponse resp = api.getSupportedLanguages(ENTITIES_SERVICE_PATH); assertEquals(2, resp.getSupportedLanguages().size()); @@ -263,7 +258,7 @@ public void testNameSimilarityLanguageSupport() throws Exception { .withBody(IOUtils.toString(respIns, StandardCharsets.UTF_8))); api = new HttpRosetteAPI.Builder() .key("foo-key") - .url(String.format("http://localhost:%d/rest/v1", serverPort)) + .url(String.format("http://localhost:%d/rest/v1", mockServer.getPort())) .build(); SupportedLanguagePairsResponse resp = api.getSupportedLanguagePairs(NAME_SIMILARITY_SERVICE_PATH); @@ -294,7 +289,7 @@ public void testNameTranslationLanguageSupport() throws Exception { .withBody(IOUtils.toString(respIns, StandardCharsets.UTF_8))); api = new HttpRosetteAPI.Builder() .key("foo-key") - .url(String.format("http://localhost:%d/rest/v1", serverPort)) + .url(String.format("http://localhost:%d/rest/v1", mockServer.getPort())) .build(); SupportedLanguagePairsResponse resp = api.getSupportedLanguagePairs(NAME_TRANSLATION_SERVICE_PATH); diff --git a/api/src/test/java/com/basistech/rosette/api/DevRosetteAPITest.java b/api/src/test/java/com/basistech/rosette/api/DevRosetteAPITest.java index 687f3f0f7..e8fd88c2e 100644 --- a/api/src/test/java/com/basistech/rosette/api/DevRosetteAPITest.java +++ b/api/src/test/java/com/basistech/rosette/api/DevRosetteAPITest.java @@ -23,19 +23,20 @@ import com.basistech.rosette.apimodel.TokensResponse; import com.basistech.util.LanguageCode; import com.basistech.util.PartOfSpeechTagSet; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.io.IOException; import java.nio.charset.StandardCharsets; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; /** * Test that is usually ignored, used to debug against a live service. */ -@org.junit.Ignore +@Disabled public class DevRosetteAPITest { // edit the right URL into place private static final String URL = "http://localhost:8181/rest/v1"; @@ -43,18 +44,18 @@ public class DevRosetteAPITest { private HttpRosetteAPI api; - @Before - public void before() throws Exception { + @BeforeEach + public void before() { api = new HttpRosetteAPI.Builder().key(KEY).url(URL).build(); } - @After + @AfterEach public void after() throws IOException { api.close(); } @Test - public void multipart() throws Exception { + public void multipart() { // this assumes that the server has the mock version of the components. Request morphologyRequest = DocumentRequest.builder().language(LanguageCode.ENGLISH) .options(MorphologyOptions.builder().partOfSpeechTagSet(PartOfSpeechTagSet.upt16).build()) @@ -66,7 +67,7 @@ public void multipart() throws Exception { } @Test - public void simple() throws Exception { + public void simple() { // this assumes that the server has the mock version of the components. Request morphologyRequest = DocumentRequest.builder().language(LanguageCode.ENGLISH) .options(MorphologyOptions.builder().partOfSpeechTagSet(PartOfSpeechTagSet.upt16).build()) diff --git a/api/src/test/java/com/basistech/rosette/api/InvalidErrorTest.java b/api/src/test/java/com/basistech/rosette/api/InvalidErrorTest.java index f9c2431fd..6a49e680a 100644 --- a/api/src/test/java/com/basistech/rosette/api/InvalidErrorTest.java +++ b/api/src/test/java/com/basistech/rosette/api/InvalidErrorTest.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,8 +20,11 @@ import com.basistech.rosette.apimodel.DocumentRequest; import com.basistech.rosette.apimodel.LanguageResponse; import org.apache.http.HttpHeaders; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockserver.client.MockServerClient; +import org.mockserver.junit.jupiter.MockServerExtension; import org.mockserver.model.HttpRequest; import org.mockserver.model.HttpResponse; @@ -29,15 +32,22 @@ import static java.net.HttpURLConnection.HTTP_NOT_FOUND; import static java.net.HttpURLConnection.HTTP_OK; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; +@ExtendWith(MockServerExtension.class) +public class InvalidErrorTest { + private MockServerClient mockServer; -public class InvalidErrorTest extends AbstractTest { + @BeforeEach + public void setup(MockServerClient mockServer) { + this.mockServer = mockServer; + } @Test public void notJsonError() throws Exception { - MockServerClient mockServer = new MockServerClient("localhost", serverPort); - mockServer.reset() - .when(HttpRequest.request().withPath(".*/{2,}.*")) + mockServer.when(HttpRequest.request().withPath(".*/{2,}.*")) .respond(HttpResponse.response() .withBody("Invalid path; '//'") .withHeader("X-RosetteAPI-Concurrency", "5") @@ -50,7 +60,7 @@ public void notJsonError() throws Exception { .withBody("{\"message\":\"Rosette API at your service\",\"time\":1461788498633}", StandardCharsets.UTF_8) .withStatusCode(HTTP_OK) .withHeader("X-RosetteAPI-Concurrency", "5")); - String mockServiceUrl = "http://localhost:" + Integer.toString(serverPort) + "/rest//v1"; + String mockServiceUrl = "http://localhost:" + mockServer.getPort() + "/rest//v1"; boolean exceptional = false; try { HttpRosetteAPI api = new HttpRosetteAPI.Builder().key("my-key-123").url(mockServiceUrl).build(); diff --git a/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java b/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java index 278bd7f3b..0102fff30 100644 --- a/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java +++ b/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java @@ -42,10 +42,10 @@ import org.apache.commons.io.FileUtils; import org.apache.commons.io.IOUtils; import org.apache.http.HttpHeaders; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import org.junit.runners.Parameterized; import org.mockserver.client.MockServerClient; import org.mockserver.model.HttpRequest; @@ -63,9 +63,11 @@ import java.util.Collection; import static java.net.HttpURLConnection.HTTP_OK; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.fail; -@RunWith(Parameterized.class) -@org.junit.Ignore +@Disabled public class RosetteAPITest extends AbstractTest { private final String mockServiceUrl = "http://localhost:" + serverPort + "/rest/v1"; private final String testFilename; @@ -93,7 +95,7 @@ public static Collection data() throws IOException { } - @Before + @BeforeEach public void setUp() throws Exception { String statusFilename = testFilename.replace(".json", ".status"); @@ -147,9 +149,7 @@ public void setUp() throws Exception { } } - // This class should be re-factored after upgrading to JUnit 5. Probably making individual tests parameterized, - // instead of the entire class. This @After method was added to avoid resource exhaustion. - @After + @AfterEach public void closeMockServer() { mockServer.close(); } diff --git a/json/pom.xml b/json/pom.xml index 997d9a574..5de457679 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -48,8 +48,16 @@ adm-json - junit - junit + org.junit.jupiter + junit-jupiter-api + ${junit.version} + test + + + org.junit.jupiter + junit-jupiter-params + ${junit.version} + test org.reflections diff --git a/json/src/test/java/com/basistech/rosette/apimodel/EnumTest.java b/json/src/test/java/com/basistech/rosette/apimodel/EnumTest.java index 9d7b8dba3..d0e56b410 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/EnumTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/EnumTest.java @@ -16,18 +16,20 @@ package com.basistech.rosette.apimodel; import com.fasterxml.jackson.core.type.TypeReference; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; import com.fasterxml.jackson.databind.ObjectMapper; import com.basistech.rosette.apimodel.jackson.ApiModelMixinModule; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; -public class EnumTest extends Assert { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +public class EnumTest { private ObjectMapper mapper; - @Before + @BeforeEach public void init() { mapper = ApiModelMixinModule.setupObjectMapper(new ObjectMapper()); } diff --git a/json/src/test/java/com/basistech/rosette/apimodel/ModelTest.java b/json/src/test/java/com/basistech/rosette/apimodel/ModelTest.java index 5d78e39b6..de2c01fda 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/ModelTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/ModelTest.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,10 +21,10 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectWriter; import com.google.common.collect.Lists; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; import org.reflections.Reflections; import org.reflections.scanners.SubTypesScanner; @@ -36,41 +36,33 @@ import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Set; +import java.util.stream.Stream; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.fail; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.fail; -@RunWith(Parameterized.class) public class ModelTest { - - private boolean inputStreams; private ObjectMapper mapper; - public ModelTest(Boolean inputStreams) { - this.inputStreams = inputStreams; + private static Stream packageTestParameters() { + return Stream.of( + Arguments.of(true), + Arguments.of(false) + ); } - - @Parameterized.Parameters(name = "inputStreamContent: {0}") - public static Collection data() { - return Arrays.asList(new Object[] {Boolean.FALSE}, new Object[] {Boolean.TRUE}); - } - - - @Before + @BeforeEach public void init() { mapper = ApiModelMixinModule.setupObjectMapper(new ObjectMapper()); } - @Test - public void packageTest() throws ClassNotFoundException, IllegalAccessException, InvocationTargetException, - InstantiationException, IOException { + @ParameterizedTest(name = "inputStreamContent: {0}") + @MethodSource("packageTestParameters") + public void packageTest(boolean inputStreams) throws ClassNotFoundException, IOException { Reflections reflections = new Reflections(this.getClass().getPackage().getName(), new SubTypesScanner(false)); Set> allClasses = reflections.getSubTypesOf(Object.class); @@ -124,7 +116,7 @@ public void packageTest() throws ClassNotFoundException, IllegalAccessException, if (className.endsWith("ConstantsResponse")) { inputStreams = false; // special case due to Object in there. } - o1 = createObject(ctor); + o1 = createObject(ctor, inputStreams); } finally { inputStreams = oldInputStreams; } @@ -158,7 +150,7 @@ public void packageTest() throws ClassNotFoundException, IllegalAccessException, } - private Object createObject(Constructor ctor) { + private Object createObject(Constructor ctor, boolean inputStreams) { Object o; int argSize = ctor.getParameterTypes().length; Class[] parameterTypes = ctor.getParameterTypes(); @@ -166,7 +158,7 @@ private Object createObject(Constructor ctor) { for (int i = 0; i < argSize; i++) { try { - args[i] = createObjectForType(parameterTypes[i], ctor.getGenericParameterTypes()[i]); + args[i] = createObjectForType(parameterTypes[i], ctor.getGenericParameterTypes()[i], inputStreams); } catch (Throwable e) { e.printStackTrace(); fail(String.format("Unable to create object %s %d %s %s", ctor, i, parameterTypes[i], ctor.getGenericParameterTypes()[i])); @@ -187,8 +179,8 @@ private Object createObject(Constructor ctor) { } //CHECKSTYLE:OFF - private Object createObjectForType(Class type, Type genericParameterType) throws IllegalAccessException, - InstantiationException, InvocationTargetException { + private Object createObjectForType(Class type, Type genericParameterType, boolean inputStreams) + throws IllegalAccessException, InstantiationException, InvocationTargetException { Object o = null; Class firstComponentType = type.isArray() ? type.getComponentType() : type; String typeName = firstComponentType.getSimpleName(); @@ -256,7 +248,7 @@ private Object createObjectForType(Class type, Type genericParameterType) thr case "Collection": case "List": { if (parameterArgClass != null) { - Object o1 = createObjectForType(parameterArgClass, null); + Object o1 = createObjectForType(parameterArgClass, null, inputStreams); List list = new ArrayList<>(); list.add(o1); o = list; @@ -274,7 +266,7 @@ private Object createObjectForType(Class type, Type genericParameterType) thr break; case "Set": { if (parameterArgClass != null) { - Object o1 = createObjectForType(parameterArgClass, null); + Object o1 = createObjectForType(parameterArgClass, null, inputStreams); Set set = new HashSet<>(); set.add(o1); o = set; @@ -300,10 +292,10 @@ private Object createObjectForType(Class type, Type genericParameterType) thr default: if (parameterArgClass != null) { Constructor[] ctors = parameterArgClass.getDeclaredConstructors(); - o = createObject(ctors[0]); + o = createObject(ctors[0], inputStreams); } else { Constructor[] ctors = firstComponentType.getDeclaredConstructors(); - o = createObject(ctors[0]); + o = createObject(ctors[0], inputStreams); } } return o; diff --git a/json/src/test/java/com/basistech/rosette/apimodel/NonNullTest.java b/json/src/test/java/com/basistech/rosette/apimodel/NonNullTest.java index bc397b0b4..d161fe5e5 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/NonNullTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/NonNullTest.java @@ -1,5 +1,5 @@ /* -* Copyright 2014 Basis Technology Corp. +* Copyright 2014-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,59 +18,49 @@ import java.io.File; import java.io.IOException; -import java.net.URISyntaxException; import java.nio.charset.StandardCharsets; import java.nio.file.DirectoryStream; import java.nio.file.Files; import java.nio.file.Path; -import java.util.ArrayList; -import java.util.Collection; +import java.util.stream.Stream; import org.apache.commons.io.FileUtils; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; import com.basistech.rosette.apimodel.jackson.ApiModelMixinModule; import com.fasterxml.jackson.databind.ObjectMapper; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; -@RunWith(Parameterized.class) -public class NonNullTest extends Assert { +import static org.junit.jupiter.api.Assertions.assertFalse; - private final String className; - private final File testFile; +public class NonNullTest { private ObjectMapper mapper; - public NonNullTest(String className, File testFile) { - this.className = className; - this.testFile = testFile; - } - // All test resource filename has .json pattern. They contain null requestId and timers fields. - @Parameterized.Parameters(name = "{0}") - public static Collection data() throws URISyntaxException, IOException { + private static Stream testNonNullParameters() throws IOException { File dir = new File("src/test/data"); - Collection params = new ArrayList<>(); + Stream.Builder streamBuilder = Stream.builder(); try (DirectoryStream paths = Files.newDirectoryStream(dir.toPath())) { for (Path file : paths) { if (file.toString().endsWith(".json")) { String className = file.getFileName().toString().replace(".json", ""); - params.add(new Object[]{NonNullTest.class.getPackage().getName() + "." + className, file.toFile()}); + streamBuilder.add(Arguments.of(NonNullTest.class.getPackage().getName() + "." + className, file.toFile())); } } } - return params; + return streamBuilder.build(); } - @Before + @BeforeEach public void init() { mapper = ApiModelMixinModule.setupObjectMapper(new ObjectMapper()); } - @Test - public void testNonNull() throws IOException, ClassNotFoundException { + @ParameterizedTest(name = "{0}; {1}") + @MethodSource("testNonNullParameters") + public void testNonNull(String className, File testFile) throws IOException, ClassNotFoundException { Class c = Class.forName(className); String s = FileUtils.readFileToString(testFile, StandardCharsets.UTF_8); String s2 = mapper.writeValueAsString(mapper.readValue(s, c)); diff --git a/json/src/test/java/com/basistech/rosette/apimodel/PolymorphicRequestTest.java b/json/src/test/java/com/basistech/rosette/apimodel/PolymorphicRequestTest.java index a49070375..0e500ffa9 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/PolymorphicRequestTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/PolymorphicRequestTest.java @@ -1,5 +1,5 @@ /* -* Copyright 2014 Basis Technology Corp. +* Copyright 2014-2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,14 +18,19 @@ import com.basistech.rosette.apimodel.jackson.ApiModelMixinModule; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; -public class PolymorphicRequestTest extends Assert { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +public class PolymorphicRequestTest { + private static final String DOC_REQUEST = DocumentRequest.class.getName(); private ObjectMapper mapper; - @Before + @BeforeEach public void init() { mapper = ApiModelMixinModule.setupObjectMapper(new ObjectMapper()); } @@ -35,63 +40,62 @@ public void testRequestTypes() throws Exception { String json = "{\"content\": \"what is my type\", \"language\": \"eng\", \"options\": {\"calculateConfidence\": true}}"; Request request = mapper.readValue(json, new TypeReference>() { }); - assertTrue(request instanceof DocumentRequest); + assertEquals(DOC_REQUEST, request.getClass().getName()); json = "{\"content\": \"what is my type\", \"language\": \"eng\", \"options\": {\"includeDBpediaType\": true, \"calculateConfidence\": true}}"; request = mapper.readValue(json, new TypeReference>() { }); - assertTrue(request instanceof DocumentRequest); + assertEquals(DOC_REQUEST, request.getClass().getName()); assertNull(((DocumentRequest) request).getOptions().getIncludePermID()); json = "{\"content\": \"what is my type\", \"language\": \"eng\", \"options\": {\"includeDBpediaType\": true, \"calculateConfidence\": true, \"includePermID\": true}}"; request = mapper.readValue(json, new TypeReference>() { }); - assertTrue(request instanceof DocumentRequest); + assertEquals(DOC_REQUEST, request.getClass().getName()); assertTrue(((DocumentRequest) request).getOptions().getIncludePermID()); json = "{\"content\": \"what is my type\", \"language\": \"eng\", \"options\": {\"includeDBpediaType\": true, \"calculateConfidence\": true, \"includePermID\": false}}"; request = mapper.readValue(json, new TypeReference>() { }); - assertTrue(request instanceof DocumentRequest); + assertEquals(DOC_REQUEST, request.getClass().getName()); assertFalse(((DocumentRequest) request).getOptions().getIncludePermID()); json = "{\"content\": \"what is my type\", \"language\": \"eng\", \"options\": {\"enableStructuredRegion\": true}}"; request = mapper.readValue(json, new TypeReference>() { }); - assertTrue(request instanceof DocumentRequest); + assertEquals(DOC_REQUEST, request.getClass().getName()); assertTrue(((DocumentRequest) request).getOptions().getEnableStructuredRegion()); json = "{\"content\": \"what is my type\", \"language\": \"eng\", \"options\": {\"enableStructuredRegion\": false}}"; request = mapper.readValue(json, new TypeReference>() { }); - assertTrue(request instanceof DocumentRequest); + assertEquals(DOC_REQUEST, request.getClass().getName()); assertFalse(((DocumentRequest) request).getOptions().getEnableStructuredRegion()); json = "{\"name1\": {\"text\": \"Joe\"}, \"name2\": {\"text\": \"Geo\"}}"; request = mapper.readValue(json, NameSimilarityRequest.class); - assertTrue(request instanceof NameSimilarityRequest); + assertEquals(NameSimilarityRequest.class.getName(), request.getClass().getName()); json = "{\"name\": \"Joe\", \"targetLanguage\": \"ara\"}"; request = mapper.readValue(json, NameTranslationRequest.class); - assertTrue(request instanceof NameTranslationRequest); + assertEquals(NameTranslationRequest.class.getName(), request.getClass().getName()); json = "{\"names\": [{\"text\": \"Joe\"}, {\"text\": \"Smith\"}], \"threshold\": 0.8}"; request = mapper.readValue(json, NameDeduplicationRequest.class); - assertTrue(request instanceof NameDeduplicationRequest); + assertEquals(NameDeduplicationRequest.class.getName(), request.getClass().getName()); json = "{\"names\": [\"Joe\", \"Smith\"], \"threshold\": 0.8}"; request = mapper.readValue(json, NameDeduplicationRequest.class); - assertTrue(request instanceof NameDeduplicationRequest); + assertEquals(NameDeduplicationRequest.class.getName(), request.getClass().getName()); json = "{\"language\": \"xxx\", \"configuration\": {\"entities\": { \"LOCATION\": [\"Boston\", \"Mos Eisley\"] } } }"; request = mapper.readValue(json, new TypeReference>() { }); - assertTrue(request instanceof ConfigurationRequest); + assertEquals(ConfigurationRequest.class.getName(), request.getClass().getName()); } @Test public void eventsRequests() throws Exception { String json = "{\"content\": \"what is my type\", \"language\": \"eng\", \"options\": {\"workspaceId\": \"ws1\"}}"; Request request = mapper.readValue(json, new TypeReference>() { }); - assertTrue(request instanceof DocumentRequest); + assertEquals(DOC_REQUEST, request.getClass().getName()); + json = "{\"content\": \"what is my type\", \"language\": \"eng\", \"options\": {\"plan\": {\"eng\": [\"abc123\"]}}}"; request = mapper.readValue(json, new TypeReference>() { }); - assertTrue(request instanceof DocumentRequest); - - + assertEquals(DOC_REQUEST, request.getClass().getName()); } } diff --git a/pom.xml b/pom.xml index 3687e4bce..79576e12c 100644 --- a/pom.xml +++ b/pom.xml @@ -41,10 +41,12 @@ + 1.0.1 6.2.0 2.7.3 37.0.1 + 0.8.8 3.3.0 1.9.4 1.15 @@ -55,6 +57,7 @@ 4.4.15 1.13.0 2.0.0.Final + 5.9.1 1.18.24 1.18.20.0 3.2.0 From 93181c63654bde2db3af9026a48211633091eec7 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Wed, 26 Oct 2022 18:28:18 -0500 Subject: [PATCH 117/415] WS-2609: Get one test refactored and working. --- .../basistech/rosette/api/RosetteAPITest.java | 242 ++++++++++-------- 1 file changed, 130 insertions(+), 112 deletions(-) diff --git a/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java b/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java index 0102fff30..77e1642ff 100644 --- a/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java +++ b/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java @@ -38,146 +38,173 @@ import com.basistech.rosette.apimodel.Request; import com.basistech.rosette.apimodel.SentimentResponse; import com.basistech.rosette.apimodel.SyntaxDependenciesResponse; +import com.basistech.rosette.apimodel.jackson.ApiModelMixinModule; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException; import org.apache.commons.io.FileUtils; import org.apache.commons.io.IOUtils; import org.apache.http.HttpHeaders; -import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -import org.junit.runners.Parameterized; +import org.junit.jupiter.api.extension.ExtendWith; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; import org.mockserver.client.MockServerClient; +import org.mockserver.junit.jupiter.MockServerExtension; import org.mockserver.model.HttpRequest; import org.mockserver.model.HttpResponse; +import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; -import java.io.InputStream; import java.nio.charset.StandardCharsets; import java.nio.file.DirectoryStream; import java.nio.file.Files; import java.nio.file.Path; -import java.util.ArrayList; -import java.util.Collection; +import java.util.stream.Stream; +import java.util.zip.GZIPOutputStream; import static java.net.HttpURLConnection.HTTP_OK; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.fail; -@Disabled -public class RosetteAPITest extends AbstractTest { - private final String mockServiceUrl = "http://localhost:" + serverPort + "/rest/v1"; - private final String testFilename; +@ExtendWith(MockServerExtension.class) +public class RosetteAPITest { + private static final String INFO_RESPONSE = "{ \"buildNumber\": \"6bafb29d\", \"buildTime\": " + + "\"2015.10.08_10:19:26\", \"name\": \"RosetteAPI\", \"version\": \"0.7.0\", \"versionChecked\": true }"; private HttpRosetteAPI api; - private String responseStr; private MockServerClient mockServer; + private ObjectMapper mapper; + @BeforeEach + public void setUp(MockServerClient mockServer) { + this.mockServer = mockServer; + + mapper = ApiModelMixinModule.setupObjectMapper(new ObjectMapper()); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + + mockServer.when(HttpRequest.request() + .withMethod("GET") + .withPath("/rest/v1/ping") + .withHeader(HttpHeaders.USER_AGENT, HttpRosetteAPI.USER_AGENT_STR)) + .respond(HttpResponse.response() + .withBody("{\"message\":\"Rosette API at your service\",\"time\":1461788498633}", StandardCharsets.UTF_8) + .withStatusCode(HTTP_OK) + .withHeader("X-RosetteAPI-Concurrency", "5")); - public RosetteAPITest(String filename) { - testFilename = filename; + mockServer.when(HttpRequest.request() + .withPath("/info")) + .respond(HttpResponse.response() + .withStatusCode(HTTP_OK) + .withHeader("Content-Type", "application/json") + .withHeader("X-RosetteAPI-Concurrency", "5") + .withBody(INFO_RESPONSE, StandardCharsets.UTF_8)); + + api = new HttpRosetteAPI.Builder() + .key("my-key-123") + .url(String.format("http://localhost:%d/rest/v1", mockServer.getPort())) + .build(); } - @Parameterized.Parameters - public static Collection data() throws IOException { - File dir = new File("src/test/mock-data/response"); - Collection params = new ArrayList<>(); - try (DirectoryStream paths = Files.newDirectoryStream(dir.toPath())) { - for (Path file : paths) { - if (file.toString().endsWith(".json")) { - params.add(new Object[]{file.getFileName().toString()}); - } - } + private static byte[] gzip(String text) throws IOException { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + try (GZIPOutputStream out = new GZIPOutputStream(baos)) { + out.write(text.getBytes(StandardCharsets.UTF_8)); } - return params; + return baos.toByteArray(); } + private T readValue(Class clazz, String testFilename) throws IOException { + File input = new File("src/test/mock-data/request", testFilename); + return mapper.readValue(input, clazz); + } - @BeforeEach - public void setUp() throws Exception { - String statusFilename = testFilename.replace(".json", ".status"); - - try (InputStream bodyStream = new FileInputStream("src/test/mock-data/response/" + testFilename)) { - responseStr = IOUtils.toString(bodyStream, StandardCharsets.UTF_8); - int statusCode = HTTP_OK; + private void verifyException(HttpRosetteAPIException e, String responseStr) throws IOException { + ErrorResponse goldResponse = mapper.readValue(responseStr, ErrorResponse.class); + assertEquals(goldResponse.getCode(), e.getErrorResponse().getCode()); + } - File statusFile = new File("src/test/mock-data/response", statusFilename); - if (statusFile.exists()) { - String statusStr = FileUtils.readFileToString(statusFile, StandardCharsets.UTF_8).trim(); - statusCode = Integer.parseInt(statusStr); - } + private void setStatusCodeResponse(String responseStr, int statusCode) throws IOException { + if (responseStr.length() > 200) { // test gzip if response is somewhat big + mockServer.when(HttpRequest.request().withPath("^(?!/info).+")) + .respond(HttpResponse.response() + .withHeader("Content-Type", "application/json") + .withHeader("Content-Encoding", "gzip") + .withHeader("X-RosetteAPI-Concurrency", "5") + .withStatusCode(statusCode).withBody(gzip(responseStr))); - mockServer = new MockServerClient("localhost", serverPort); - mockServer.reset(); - mockServer.when(HttpRequest.request() - .withMethod("GET") - .withPath("/rest/v1/ping") - .withHeader(HttpHeaders.USER_AGENT, HttpRosetteAPI.USER_AGENT_STR)) + } else { + mockServer.when(HttpRequest.request().withPath("^(?!/info).+")) .respond(HttpResponse.response() - .withBody("{\"message\":\"Rosette API at your service\",\"time\":1461788498633}", StandardCharsets.UTF_8) - .withStatusCode(HTTP_OK) - .withHeader("X-RosetteAPI-Concurrency", "5")); - if (responseStr.length() > 200) { // test gzip if response is somewhat big - mockServer.when(HttpRequest.request().withPath("^(?!/info).+")) - .respond(HttpResponse.response() - .withHeader("Content-Type", "application/json") - .withHeader("Content-Encoding", "gzip") - .withHeader("X-RosetteAPI-Concurrency", "5") - .withStatusCode(statusCode).withBody(gzip(responseStr))); - - } else { - mockServer.when(HttpRequest.request().withPath("^(?!/info).+")) - .respond(HttpResponse.response() - .withHeader("Content-Type", "application/json") - .withHeader("X-RosetteAPI-Concurrency", "5") - .withStatusCode(statusCode).withBody(responseStr, StandardCharsets.UTF_8)); + .withHeader("Content-Type", "application/json") + .withHeader("X-RosetteAPI-Concurrency", "5") + .withStatusCode(statusCode).withBody(responseStr, StandardCharsets.UTF_8)); + } + + } + + // Construct the parameters for our tests. We look inside the mock-data/response directory + // and gather any matching files. We read in the response string and response status code. + // These two values are combined with the name of the file with the request data. The request + // data is read in later, from a different directory, when executing the test. + private static Stream getTestFiles(String endsWith) throws IOException { + File responseDir = new File("src/test/mock-data/response"); + Stream.Builder streamBuilder = Stream.builder(); + try (DirectoryStream paths = Files.newDirectoryStream(responseDir.toPath())) { + for (Path p : paths) { + if (p.toString().endsWith(endsWith)) { + var responseBodyStream = new FileInputStream(p.toFile()); + var responseStr = IOUtils.toString(responseBodyStream, StandardCharsets.UTF_8); + responseBodyStream.close(); + + int statusCode = HTTP_OK; + var statusFilename = p.toString().replace(".json", ".status"); + File statusFile = new File(statusFilename); + if (statusFile.exists()) { + var statusStr = FileUtils.readFileToString(statusFile, StandardCharsets.UTF_8).trim(); + statusCode = Integer.parseInt(statusStr); + } + + streamBuilder.add(Arguments.of(p.getFileName().toString(), responseStr, statusCode)); + } } - mockServer.when(HttpRequest.request() - .withPath("/info")) - .respond(HttpResponse.response() - .withStatusCode(HTTP_OK) - .withHeader("Content-Type", "application/json") - .withHeader("X-RosetteAPI-Concurrency", "5") - .withBody(INFO_REPONSE, StandardCharsets.UTF_8)); - - api = new HttpRosetteAPI.Builder() - .key("my-key-123") - .url(mockServiceUrl) - .build(); } + return streamBuilder.build(); } - @AfterEach - public void closeMockServer() { - mockServer.close(); + private static Stream testMatchNameParameters() throws IOException { + return getTestFiles("-name-similarity.json"); } - @Test - public void testMatchName() throws IOException { - if (!(testFilename.endsWith("-name-similarity.json"))) { - return; - } - NameSimilarityRequest request = readValueNameMatcher(); + @ParameterizedTest(name = "testFilename: {0}; statusCode: {2}") + @MethodSource("testMatchNameParameters") + public void testMatchName(String testFilename, String responseStr, int statusCode) throws IOException { + setStatusCodeResponse(responseStr, statusCode); + NameSimilarityRequest request = readValueNameMatcher(testFilename); try { NameSimilarityResponse response = api.perform(AbstractRosetteAPI.NAME_SIMILARITY_SERVICE_PATH, request, NameSimilarityResponse.class); - verifyNameMatcher(response); + verifyNameMatcher(response, responseStr); } catch (HttpRosetteAPIException e) { - verifyException(e); + verifyException(e, responseStr); } } - private void verifyNameMatcher(NameSimilarityResponse response) throws IOException { + private void verifyNameMatcher(NameSimilarityResponse response, String responseStr) throws IOException { NameSimilarityResponse goldResponse = mapper.readValue(responseStr, NameSimilarityResponse.class); assertEquals(goldResponse.getScore(), response.getScore(), 0.0); } - private NameSimilarityRequest readValueNameMatcher() throws IOException { + private NameSimilarityRequest readValueNameMatcher(String testFilename) throws IOException { File input = new File("src/test/mock-data/request", testFilename); return mapper.readValue(input, NameSimilarityRequest.class); } + /* @Test public void testMatchAddress() throws IOException { if (!(testFilename.endsWith("-address-similarity.json"))) { @@ -236,7 +263,7 @@ public void testGetLanguageDoc() throws IOException { if (!(testFilename.endsWith("-language.json") && testFilename.contains("-doc-"))) { return; } - DocumentRequest request = readValue(DocumentRequest.class); + DocumentRequest request = readValue(DocumentRequest.class, testFilename); try { LanguageResponse response = api.perform(AbstractRosetteAPI.LANGUAGE_SERVICE_PATH, request, LanguageResponse.class); verifyLanguage(response); @@ -250,7 +277,7 @@ public void testGetLanguageURL() throws IOException { if (!(testFilename.endsWith("-language.json") && testFilename.contains("-url-"))) { return; } - DocumentRequest request = readValue(DocumentRequest.class); + DocumentRequest request = readValue(DocumentRequest.class, testFilename); try { LanguageResponse response = api.perform(AbstractRosetteAPI.LANGUAGE_SERVICE_PATH, request, LanguageResponse.class); verifyLanguage(response); @@ -283,7 +310,7 @@ public void testGetMorphologyURL() throws IOException { if (!(testFilename.endsWith("-morphology_complete.json") && testFilename.contains("-url-"))) { return; } - DocumentRequest request = readValue(DocumentRequest.class); + DocumentRequest request = readValue(DocumentRequest.class, testFilename); try { MorphologyResponse response = api.perform(AbstractRosetteAPI.MORPHOLOGY_SERVICE_PATH + "/" + MorphologicalFeature.COMPLETE, request, MorphologyResponse.class); verifyMorphology(response); @@ -297,7 +324,7 @@ public void testGetEntityDoc() throws IOException { if (!(testFilename.endsWith("-entities.json") && testFilename.contains("-doc-"))) { return; } - DocumentRequest request = readValue(DocumentRequest.class); + DocumentRequest request = readValue(DocumentRequest.class, testFilename); try { EntitiesResponse response = api.perform(AbstractRosetteAPI.ENTITIES_SERVICE_PATH, request, EntitiesResponse.class); verifyEntity(response); @@ -311,7 +338,7 @@ public void testGetEntityLinked() throws IOException { if (!(testFilename.endsWith("-entities_linked.json"))) { return; } - DocumentRequest request = readValue(DocumentRequest.class); + DocumentRequest request = readValue(DocumentRequest.class, testFilename); try { EntitiesResponse response = api.perform(AbstractRosetteAPI.ENTITIES_SERVICE_PATH, request, EntitiesResponse.class); verifyEntity(response); @@ -324,7 +351,7 @@ public void testGetEntityLinked() throws IOException { @Test public void testGetEntityPermId() throws IOException { if (testFilename.endsWith("-entities_permid.json")) { - DocumentRequest request = readValue(DocumentRequest.class); + DocumentRequest request = readValue(DocumentRequest.class, testFilename); try { EntitiesResponse response = api.perform(AbstractRosetteAPI.ENTITIES_SERVICE_PATH, request, EntitiesResponse.class); verifyEntity(response); @@ -337,7 +364,7 @@ public void testGetEntityPermId() throws IOException { @Test public void testIgnoredUnknownField() throws IOException { if ("unknown-field-entities.json".equals(testFilename)) { - DocumentRequest request = readValue(DocumentRequest.class); + DocumentRequest request = readValue(DocumentRequest.class, testFilename); try { EntitiesResponse response = api.perform(AbstractRosetteAPI.ENTITIES_SERVICE_PATH, request, EntitiesResponse.class); verifyEntity(response); @@ -350,7 +377,7 @@ public void testIgnoredUnknownField() throws IOException { @Test public void testNonIgnoredUnknownField() throws IOException { if ("unknown-field-entities.json".equals(testFilename)) { - DocumentRequest request = readValue(DocumentRequest.class); + DocumentRequest request = readValue(DocumentRequest.class, testFilename); HttpRosetteAPI tmpApi = new HttpRosetteAPI.Builder() .key("my-key-123") .url(mockServiceUrl) @@ -377,7 +404,7 @@ public void testGetEntityURL() throws IOException { if (!(testFilename.endsWith("-entities.json") && testFilename.contains("-url-"))) { return; } - DocumentRequest request = readValue(DocumentRequest.class); + DocumentRequest request = readValue(DocumentRequest.class, testFilename); try { EntitiesResponse response = api.perform(AbstractRosetteAPI.ENTITIES_SERVICE_PATH, request, EntitiesResponse.class); verifyEntity(response); @@ -391,7 +418,7 @@ public void testGetCategories() throws IOException { if (!(testFilename.endsWith("-categories.json") && testFilename.contains("-doc-"))) { return; } - DocumentRequest request = readValue(DocumentRequest.class); + DocumentRequest request = readValue(DocumentRequest.class, testFilename); try { CategoriesResponse response = api.perform(AbstractRosetteAPI.CATEGORIES_SERVICE_PATH, request, CategoriesResponse.class); verifyCategory(response); @@ -411,7 +438,7 @@ public void testGetCategoriesURL() throws IOException { if (!(testFilename.endsWith("-categories.json") && testFilename.contains("-url-"))) { return; } - DocumentRequest request = readValue(DocumentRequest.class); + DocumentRequest request = readValue(DocumentRequest.class, testFilename); try { CategoriesResponse response = api.perform(AbstractRosetteAPI.CATEGORIES_SERVICE_PATH, request, CategoriesResponse.class); verifyCategory(response); @@ -425,7 +452,7 @@ public void testGetSyntaxDependencies() throws IOException { if (!(testFilename.endsWith("-syntax_dependencies.json") && testFilename.contains("-doc-"))) { return; } - DocumentRequest request = readValue(DocumentRequest.class); + DocumentRequest request = readValue(DocumentRequest.class, testFilename); try { SyntaxDependenciesResponse response = api.perform(AbstractRosetteAPI.SYNTAX_DEPENDENCIES_SERVICE_PATH, request, SyntaxDependenciesResponse.class); verifySyntaxDependency(response); @@ -444,7 +471,7 @@ public void testGetSyntaxDependenciesURL() throws IOException { if (!(testFilename.endsWith("-syntax_dependencies.json") && testFilename.contains("-url-"))) { return; } - DocumentRequest request = readValue(DocumentRequest.class); + DocumentRequest request = readValue(DocumentRequest.class, testFilename); try { SyntaxDependenciesResponse response = api.perform(AbstractRosetteAPI.SYNTAX_DEPENDENCIES_SERVICE_PATH, request, SyntaxDependenciesResponse.class); verifySyntaxDependency(response); @@ -458,7 +485,7 @@ public void testGetSimilarTerms() throws IOException { if (!(testFilename.endsWith("-similar_terms.json"))) { return; } - DocumentRequest request = readValue(DocumentRequest.class); + DocumentRequest request = readValue(DocumentRequest.class, testFilename); try { SimilarTermsResponse response = api.perform(AbstractRosetteAPI.SIMILAR_TERMS_SERVICE_PATH, request, SimilarTermsResponse.class); verifySimilarTerms(response); @@ -478,7 +505,7 @@ public void testGetRelationships() throws IOException { if (!(testFilename.endsWith("-relationships.json") && testFilename.contains("-doc-"))) { return; } - DocumentRequest request = readValue(DocumentRequest.class); + DocumentRequest request = readValue(DocumentRequest.class, testFilename); try { RelationshipsResponse response = api.perform(AbstractRosetteAPI.RELATIONSHIPS_SERVICE_PATH, request, RelationshipsResponse.class); verifyRelationships(response); @@ -497,7 +524,7 @@ public void testGetRelationshipsURL() throws IOException { if (!(testFilename.endsWith("-relationships.json") && testFilename.contains("-url-"))) { return; } - DocumentRequest request = readValue(DocumentRequest.class); + DocumentRequest request = readValue(DocumentRequest.class, testFilename); try { RelationshipsResponse response = api.perform(AbstractRosetteAPI.RELATIONSHIPS_SERVICE_PATH, request, RelationshipsResponse.class); verifyRelationships(response); @@ -511,7 +538,7 @@ public void testGetSentiment() throws IOException { if (!(testFilename.endsWith("-sentiment.json") && testFilename.contains("-doc-"))) { return; } - DocumentRequest request = readValue(DocumentRequest.class); + DocumentRequest request = readValue(DocumentRequest.class, testFilename); try { SentimentResponse response = api.perform(AbstractRosetteAPI.SENTENCES_SERVICE_PATH, request, SentimentResponse.class); verifySentiment(response); @@ -532,7 +559,7 @@ public void testGetSentimentURL() throws IOException { if (!(testFilename.endsWith("-sentiment.json") && testFilename.contains("-url-"))) { return; } - DocumentRequest request = readValue(DocumentRequest.class); + DocumentRequest request = readValue(DocumentRequest.class, testFilename); try { SentimentResponse response = api.perform(AbstractRosetteAPI.SENTENCES_SERVICE_PATH, request, SentimentResponse.class); verifySentiment(response); @@ -541,16 +568,6 @@ public void testGetSentimentURL() throws IOException { } } - private T readValue(Class clazz) throws IOException { - File input = new File("src/test/mock-data/request", testFilename); - return mapper.readValue(input, clazz); - } - - private void verifyException(HttpRosetteAPIException e) throws IOException { - ErrorResponse goldResponse = mapper.readValue(responseStr, ErrorResponse.class); - assertEquals(goldResponse.getCode(), e.getErrorResponse().getCode()); - } - @Test public void testNameDeduplication() throws IOException { if (!(testFilename.endsWith("-name-deduplication.json"))) { @@ -575,4 +592,5 @@ private NameDeduplicationRequest readValueNameDeduplication() throws IOException File input = new File("src/test/mock-data/request", testFilename); return mapper.readValue(input, NameDeduplicationRequest.class); } + */ } From 84a19bcbfbba8ae30fba52cdf3c9c5d97a7fe8d6 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Thu, 27 Oct 2022 10:39:53 -0500 Subject: [PATCH 118/415] WS-2609: Initial cut of an additional Jenkinsfile. --- CI.Jenkinsfile | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 CI.Jenkinsfile diff --git a/CI.Jenkinsfile b/CI.Jenkinsfile new file mode 100644 index 000000000..e6af2bd4b --- /dev/null +++ b/CI.Jenkinsfile @@ -0,0 +1,35 @@ +node ("docker-light") { + def sourceDir = pwd() + try { + stage("Clean up") { + step([$class: 'WsCleanup']) + } + stage("Checkout Code") { + checkout scm + } + stage("Maven Build") { + echo "${env.ALT_URL}" + def useUrl = ("${env.ALT_URL}" == "null") ? "${env.BINDING_TEST_URL}" : "${env.ALT_URL}" + withEnv(["API_KEY=${env.ROSETTE_API_KEY}", "ALT_URL=${useUrl}"]) { + sh "docker run --rm \ + --pull always \ + --env API_KEY=${API_KEY} \ + --env ALT_URL=${ALT_URL} \ + --volume ${sourceDir}:/source maven/eclipse-temurin-17-focal \ + bash -c \"pushd /source; mvn -B clean install\"" + } + } + slack(true) + } catch (e) { + currentBuild.result = "FAILED" + slack(false) + throw e + } +} + +def slack(boolean success) { + def color = success ? "#00FF00" : "#FF0000" + def status = success ? "SUCCESSFUL" : "FAILED" + def message = status + ": Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})" + slackSend(color: color, channel: "#p-n-c_jenkins", message: message) +} From a51cd2fc30816bf2e784745f8731ec16a23cccc5 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Thu, 27 Oct 2022 11:30:03 -0500 Subject: [PATCH 119/415] WS-2609: Fix Docker label. Try without environment variables. --- CI.Jenkinsfile | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/CI.Jenkinsfile b/CI.Jenkinsfile index e6af2bd4b..67d1a9214 100644 --- a/CI.Jenkinsfile +++ b/CI.Jenkinsfile @@ -8,15 +8,22 @@ node ("docker-light") { checkout scm } stage("Maven Build") { - echo "${env.ALT_URL}" - def useUrl = ("${env.ALT_URL}" == "null") ? "${env.BINDING_TEST_URL}" : "${env.ALT_URL}" - withEnv(["API_KEY=${env.ROSETTE_API_KEY}", "ALT_URL=${useUrl}"]) { +// echo "${env.ALT_URL}" +// def useUrl = ("${env.ALT_URL}" == "null") ? "${env.BINDING_TEST_URL}" : "${env.ALT_URL}" +// withEnv(["API_KEY=${env.ROSETTE_API_KEY}", "ALT_URL=${useUrl}"]) { +// sh "docker run --rm \ +// --pull always \ +// --env API_KEY=${API_KEY} \ +// --env ALT_URL=${ALT_URL} \ +// --volume ${sourceDir}:/source maven:eclipse-temurin-17-focal \ +// bash -c \"pushd /source; mvn -B clean install\"" +// } + withEnv([]) { sh "docker run --rm \ --pull always \ - --env API_KEY=${API_KEY} \ - --env ALT_URL=${ALT_URL} \ - --volume ${sourceDir}:/source maven/eclipse-temurin-17-focal \ - bash -c \"pushd /source; mvn -B clean install\"" + --volume ${sourceDir}:/source maven:eclipse-temurin-17-focal \ + bash -c \"pushd /source && \ + mvn -B clean install\"" } } slack(true) From df96a8a05ffad05b9051fc3d3720b07f231ed0c1 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Thu, 27 Oct 2022 11:32:57 -0500 Subject: [PATCH 120/415] WS-2609: Really fix Docker label. I hope. --- CI.Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CI.Jenkinsfile b/CI.Jenkinsfile index 67d1a9214..3afd82321 100644 --- a/CI.Jenkinsfile +++ b/CI.Jenkinsfile @@ -15,13 +15,13 @@ node ("docker-light") { // --pull always \ // --env API_KEY=${API_KEY} \ // --env ALT_URL=${ALT_URL} \ -// --volume ${sourceDir}:/source maven:eclipse-temurin-17-focal \ +// --volume ${sourceDir}:/source maven:3.8-eclipse-temurin-17-focal \ // bash -c \"pushd /source; mvn -B clean install\"" // } withEnv([]) { sh "docker run --rm \ --pull always \ - --volume ${sourceDir}:/source maven:eclipse-temurin-17-focal \ + --volume ${sourceDir}:/source maven:3.8-eclipse-temurin-17-focal \ bash -c \"pushd /source && \ mvn -B clean install\"" } From f8862971e9af08701660015ff6a055c838a14df3 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Thu, 27 Oct 2022 12:36:00 -0500 Subject: [PATCH 121/415] WS-2609: Use JDK image, Basis Maven and push to Sonar. --- CI.Jenkinsfile | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/CI.Jenkinsfile b/CI.Jenkinsfile index 3afd82321..95613c15e 100644 --- a/CI.Jenkinsfile +++ b/CI.Jenkinsfile @@ -8,22 +8,17 @@ node ("docker-light") { checkout scm } stage("Maven Build") { -// echo "${env.ALT_URL}" -// def useUrl = ("${env.ALT_URL}" == "null") ? "${env.BINDING_TEST_URL}" : "${env.ALT_URL}" -// withEnv(["API_KEY=${env.ROSETTE_API_KEY}", "ALT_URL=${useUrl}"]) { -// sh "docker run --rm \ -// --pull always \ -// --env API_KEY=${API_KEY} \ -// --env ALT_URL=${ALT_URL} \ -// --volume ${sourceDir}:/source maven:3.8-eclipse-temurin-17-focal \ -// bash -c \"pushd /source; mvn -B clean install\"" -// } - withEnv([]) { + withSonarQubeEnv { sh "docker run --rm \ --pull always \ - --volume ${sourceDir}:/source maven:3.8-eclipse-temurin-17-focal \ + --volume ${sourceDir}:/source \ + --volume /opt/maven-basis:/opt/maven-basis + eclipse-temurin:17-jdk-focal \ bash -c \"pushd /source && \ - mvn -B clean install\"" + /opt/maven-basis/bin/mvn --batch-mode clean install && \ + /opt/maven-basis/bin/mvn sonar:sonar \ + -Dsonar.login=${env.SONAR_AUTH_TOKEN} \ + -Dsonar.host.url=${env.SONAR_HOST_URL}\"" } } slack(true) From 60544efeb3318efe9577886678fc04710ea7c905 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Thu, 27 Oct 2022 12:37:38 -0500 Subject: [PATCH 122/415] WS-2609: Typo. --- CI.Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CI.Jenkinsfile b/CI.Jenkinsfile index 95613c15e..5f3be451a 100644 --- a/CI.Jenkinsfile +++ b/CI.Jenkinsfile @@ -12,7 +12,7 @@ node ("docker-light") { sh "docker run --rm \ --pull always \ --volume ${sourceDir}:/source \ - --volume /opt/maven-basis:/opt/maven-basis + --volume /opt/maven-basis:/opt/maven-basis \ eclipse-temurin:17-jdk-focal \ bash -c \"pushd /source && \ /opt/maven-basis/bin/mvn --batch-mode clean install && \ From 43bc166b9d253bb32d2d0202cc0469ef480b308a Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Thu, 27 Oct 2022 12:44:35 -0500 Subject: [PATCH 123/415] WS-2609: volume mount git? --- CI.Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/CI.Jenkinsfile b/CI.Jenkinsfile index 5f3be451a..9f62b1136 100644 --- a/CI.Jenkinsfile +++ b/CI.Jenkinsfile @@ -13,6 +13,7 @@ node ("docker-light") { --pull always \ --volume ${sourceDir}:/source \ --volume /opt/maven-basis:/opt/maven-basis \ + --volume /bin/git:/bin/git \ eclipse-temurin:17-jdk-focal \ bash -c \"pushd /source && \ /opt/maven-basis/bin/mvn --batch-mode clean install && \ From 6ed0e1dedf9fa89d2d2219376b368aa21f5a2bd9 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Thu, 27 Oct 2022 13:29:11 -0500 Subject: [PATCH 124/415] WS-2609: Install git. Use batch mode for sonar. --- CI.Jenkinsfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CI.Jenkinsfile b/CI.Jenkinsfile index 9f62b1136..2df457214 100644 --- a/CI.Jenkinsfile +++ b/CI.Jenkinsfile @@ -13,11 +13,12 @@ node ("docker-light") { --pull always \ --volume ${sourceDir}:/source \ --volume /opt/maven-basis:/opt/maven-basis \ - --volume /bin/git:/bin/git \ eclipse-temurin:17-jdk-focal \ - bash -c \"pushd /source && \ + bash -c \"apt-get update && \ + apt-get install -y git && \ + pushd /source && \ /opt/maven-basis/bin/mvn --batch-mode clean install && \ - /opt/maven-basis/bin/mvn sonar:sonar \ + /opt/maven-basis/bin/mvn --batch-mode sonar:sonar \ -Dsonar.login=${env.SONAR_AUTH_TOKEN} \ -Dsonar.host.url=${env.SONAR_HOST_URL}\"" } From 873a7a15df44170d74b5898f45c841ba3181da82 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Thu, 27 Oct 2022 13:34:49 -0500 Subject: [PATCH 125/415] WS-2609: Throw out unnecessary MockServer bits. --- api/pom.xml | 75 ------------------- .../basistech/rosette/api/AbstractTest.java | 67 ----------------- .../resources/MockServerClientPort.property | 1 - 3 files changed, 143 deletions(-) delete mode 100644 api/src/test/java/com/basistech/rosette/api/AbstractTest.java delete mode 100644 api/src/test/resources/MockServerClientPort.property diff --git a/api/pom.xml b/api/pom.xml index b954fb8e4..d1ade10a5 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -214,57 +214,9 @@ - - org.codehaus.mojo - build-helper-maven-plugin - ${build-helper-maven-plugin.version} - - - reserve-network-port - - reserve-network-port - - initialize - - - mockServerClient.port - - - - - - - org.mock-server - mockserver-maven-plugin - ${mockserver.version} - - ${mockServerClient.port} - WARN - ${skip-mockserver} - - - - process-test-classes - process-test-classes - - runForked - - - - verify - verify - - stopForked - - - - org.apache.maven.plugins maven-surefire-plugin - - -Xmx1024m - @@ -277,13 +229,6 @@ - - src/test/resources - - **/*.property - - true - src/test/resources @@ -295,24 +240,4 @@ - - - skip-mockserver-tests - - true - - - - - - maven-surefire-plugin - - true - - - - - - - diff --git a/api/src/test/java/com/basistech/rosette/api/AbstractTest.java b/api/src/test/java/com/basistech/rosette/api/AbstractTest.java deleted file mode 100644 index 03c5a4473..000000000 --- a/api/src/test/java/com/basistech/rosette/api/AbstractTest.java +++ /dev/null @@ -1,67 +0,0 @@ -/* -* Copyright 2014-2022 Basis Technology Corp. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package com.basistech.rosette.api; - -import com.basistech.rosette.apimodel.jackson.ApiModelMixinModule; -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.google.common.io.Resources; -import org.junit.jupiter.api.BeforeAll; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.net.ServerSocket; -import java.net.URL; -import java.nio.charset.StandardCharsets; -import java.util.zip.GZIPOutputStream; - -import static org.junit.jupiter.api.Assertions.assertNotEquals; -import static org.junit.jupiter.api.Assertions.fail; - -public abstract class AbstractTest { - public static final String INFO_REPONSE = "{ \"buildNumber\": \"6bafb29d\", \"buildTime\": \"2015.10.08_10:19:26\", \"name\": " - + "\"RosetteAPI\", \"version\": \"0.7.0\", \"versionChecked\": true }"; - protected static int serverPort; - protected static ObjectMapper mapper; - - @BeforeAll - public static void before() throws IOException { - URL url = Resources.getResource("MockServerClientPort.property"); - String clientPort = Resources.toString(url, StandardCharsets.UTF_8); - serverPort = Integer.parseInt(clientPort); - mapper = ApiModelMixinModule.setupObjectMapper(new ObjectMapper()); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - } - - protected static byte[] gzip(String text) throws IOException { - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - try (GZIPOutputStream out = new GZIPOutputStream(baos)) { - out.write(text.getBytes(StandardCharsets.UTF_8)); - } - return baos.toByteArray(); - } - - static int getFreePort() { - try (ServerSocket socket = new ServerSocket(0)) { - serverPort = socket.getLocalPort(); - } catch (IOException e) { - fail("Caught IOException while trying to locate a free port."); - } - assertNotEquals(0, serverPort); - return serverPort; - } -} diff --git a/api/src/test/resources/MockServerClientPort.property b/api/src/test/resources/MockServerClientPort.property deleted file mode 100644 index 23c244d70..000000000 --- a/api/src/test/resources/MockServerClientPort.property +++ /dev/null @@ -1 +0,0 @@ -${mockServerClient.port} \ No newline at end of file From a24479d3b351611b89b1e3db68256109308e75c9 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Thu, 27 Oct 2022 14:13:44 -0500 Subject: [PATCH 126/415] WS-2609: Try to get coverage data and branch info for Sonar. --- CI.Jenkinsfile | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/CI.Jenkinsfile b/CI.Jenkinsfile index 2df457214..bfc5a0f7e 100644 --- a/CI.Jenkinsfile +++ b/CI.Jenkinsfile @@ -10,17 +10,21 @@ node ("docker-light") { stage("Maven Build") { withSonarQubeEnv { sh "docker run --rm \ - --pull always \ - --volume ${sourceDir}:/source \ - --volume /opt/maven-basis:/opt/maven-basis \ - eclipse-temurin:17-jdk-focal \ - bash -c \"apt-get update && \ - apt-get install -y git && \ - pushd /source && \ - /opt/maven-basis/bin/mvn --batch-mode clean install && \ - /opt/maven-basis/bin/mvn --batch-mode sonar:sonar \ - -Dsonar.login=${env.SONAR_AUTH_TOKEN} \ - -Dsonar.host.url=${env.SONAR_HOST_URL}\"" + --pull always \ + --volume ${sourceDir}:/source \ + --volume /opt/maven-basis:/opt/maven-basis \ + eclipse-temurin:17-jdk-focal \ + bash -c \"apt-get update && \ + apt-get install -y git && \ + pushd /source && \ + /opt/maven-basis/bin/mvn --batch-mode clean install && \ + /opt/maven-basis/bin/mvn --batch-mode sonar:sonar \ + -Dsonar.login=${env.SONAR_AUTH_TOKEN} \ + -Dsonar.host.url=${env.SONAR_HOST_URL} \ + -Dsonar.coverage.jacoco.xmlReportPaths=./api/target/site/jacoco/jacoco.xml,./json/target/site/jacoco/jacoco.xml \ + -Dsonar.pullrequest.key=${env.CHANGE_ID} \ + -Dsonar.pullrequest.base=${env.CHANGE_TARGET} \ + -Dsonar.pullrequest.branch=${env.CHANGE_BRANCH}\"" } } slack(true) From 24071488388fe2d427a8ceda4093898a905da437 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Thu, 27 Oct 2022 16:07:51 -0500 Subject: [PATCH 127/415] WS-2609: Code smells. More JaCoCo wrestling for Sonar. --- CI.Jenkinsfile | 1 - .../com/basistech/rosette/api/BasicTest.java | 16 +++++++-------- .../rosette/api/DevRosetteAPITest.java | 6 +++--- .../rosette/api/InvalidErrorTest.java | 4 ++-- .../basistech/rosette/api/RosetteAPITest.java | 4 ++-- .../basistech/rosette/apimodel/EnumTest.java | 4 ++-- .../basistech/rosette/apimodel/ModelTest.java | 4 ++-- .../rosette/apimodel/NonNullTest.java | 4 ++-- .../apimodel/PolymorphicRequestTest.java | 6 +++--- pom.xml | 20 +++++++++++++++++++ 10 files changed, 44 insertions(+), 25 deletions(-) diff --git a/CI.Jenkinsfile b/CI.Jenkinsfile index bfc5a0f7e..ce211a990 100644 --- a/CI.Jenkinsfile +++ b/CI.Jenkinsfile @@ -21,7 +21,6 @@ node ("docker-light") { /opt/maven-basis/bin/mvn --batch-mode sonar:sonar \ -Dsonar.login=${env.SONAR_AUTH_TOKEN} \ -Dsonar.host.url=${env.SONAR_HOST_URL} \ - -Dsonar.coverage.jacoco.xmlReportPaths=./api/target/site/jacoco/jacoco.xml,./json/target/site/jacoco/jacoco.xml \ -Dsonar.pullrequest.key=${env.CHANGE_ID} \ -Dsonar.pullrequest.base=${env.CHANGE_TARGET} \ -Dsonar.pullrequest.branch=${env.CHANGE_BRANCH}\"" diff --git a/api/src/test/java/com/basistech/rosette/api/BasicTest.java b/api/src/test/java/com/basistech/rosette/api/BasicTest.java index ff48b5fc2..332621e5c 100644 --- a/api/src/test/java/com/basistech/rosette/api/BasicTest.java +++ b/api/src/test/java/com/basistech/rosette/api/BasicTest.java @@ -60,7 +60,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue; @ExtendWith(MockServerExtension.class) -public class BasicTest { +class BasicTest { private MockServerClient mockServer; private HttpRosetteAPI api; @@ -75,7 +75,7 @@ public void setup(MockServerClient mockServer) { // then set concurrent connections = 5, // run several requests again, showing they're executed in parallel @Test - public void testMultipleConnections() throws InterruptedException { + void testMultipleConnections() throws InterruptedException { int delayTime = 3; int numConnections = 5; @@ -130,7 +130,7 @@ public void testMultipleConnections() throws InterruptedException { assertTrue(d2.getTime() - d1.getTime() > delayTime * 1000); // but at least as long as one } @Test - public void testHeaders() throws Exception { + void testHeaders() throws Exception { mockServer.when(HttpRequest.request() .withMethod("GET") .withPath("/rest/v1/ping") @@ -152,7 +152,7 @@ public void testHeaders() throws Exception { } @Test - public void testAdm() throws Exception { + void testAdm() throws Exception { try (InputStream reqIns = getClass().getResourceAsStream("/adm-req.json"); InputStream respIns = getClass().getResourceAsStream("/adm-resp.json")) { assertNotNull(respIns); @@ -176,7 +176,7 @@ public void testAdm() throws Exception { } @Test - public void testExtendedInfo() throws Exception { + void testExtendedInfo() throws Exception { mockServer.when(HttpRequest.request() .withMethod("GET") .withPath("/rest/v1/ping")) @@ -216,7 +216,7 @@ public void run() { } @Test - public void testLanguageSupport() throws Exception { + void testLanguageSupport() throws Exception { try (InputStream respIns = getClass().getResourceAsStream("/supported-languages.json")) { assertNotNull(respIns); mockServer.when(HttpRequest.request() @@ -246,7 +246,7 @@ public void testLanguageSupport() throws Exception { } @Test - public void testNameSimilarityLanguageSupport() throws Exception { + void testNameSimilarityLanguageSupport() throws Exception { try (InputStream respIns = getClass().getResourceAsStream("/name-similarity-supported-languages.json")) { assertNotNull(respIns); mockServer.when(HttpRequest.request() @@ -277,7 +277,7 @@ public void testNameSimilarityLanguageSupport() throws Exception { } @Test - public void testNameTranslationLanguageSupport() throws Exception { + void testNameTranslationLanguageSupport() throws Exception { try (InputStream respIns = getClass().getResourceAsStream("/name-translation-supported-languages.json")) { assertNotNull(respIns); mockServer.when(HttpRequest.request() diff --git a/api/src/test/java/com/basistech/rosette/api/DevRosetteAPITest.java b/api/src/test/java/com/basistech/rosette/api/DevRosetteAPITest.java index e8fd88c2e..85013e77d 100644 --- a/api/src/test/java/com/basistech/rosette/api/DevRosetteAPITest.java +++ b/api/src/test/java/com/basistech/rosette/api/DevRosetteAPITest.java @@ -37,7 +37,7 @@ * Test that is usually ignored, used to debug against a live service. */ @Disabled -public class DevRosetteAPITest { +class DevRosetteAPITest { // edit the right URL into place private static final String URL = "http://localhost:8181/rest/v1"; private static final String KEY = null; @@ -55,7 +55,7 @@ public void after() throws IOException { } @Test - public void multipart() { + void multipart() { // this assumes that the server has the mock version of the components. Request morphologyRequest = DocumentRequest.builder().language(LanguageCode.ENGLISH) .options(MorphologyOptions.builder().partOfSpeechTagSet(PartOfSpeechTagSet.upt16).build()) @@ -67,7 +67,7 @@ public void multipart() { } @Test - public void simple() { + void simple() { // this assumes that the server has the mock version of the components. Request morphologyRequest = DocumentRequest.builder().language(LanguageCode.ENGLISH) .options(MorphologyOptions.builder().partOfSpeechTagSet(PartOfSpeechTagSet.upt16).build()) diff --git a/api/src/test/java/com/basistech/rosette/api/InvalidErrorTest.java b/api/src/test/java/com/basistech/rosette/api/InvalidErrorTest.java index 6a49e680a..7d68ca4a0 100644 --- a/api/src/test/java/com/basistech/rosette/api/InvalidErrorTest.java +++ b/api/src/test/java/com/basistech/rosette/api/InvalidErrorTest.java @@ -37,7 +37,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue; @ExtendWith(MockServerExtension.class) -public class InvalidErrorTest { +class InvalidErrorTest { private MockServerClient mockServer; @BeforeEach @@ -46,7 +46,7 @@ public void setup(MockServerClient mockServer) { } @Test - public void notJsonError() throws Exception { + void notJsonError() throws Exception { mockServer.when(HttpRequest.request().withPath(".*/{2,}.*")) .respond(HttpResponse.response() .withBody("Invalid path; '//'") diff --git a/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java b/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java index 77e1642ff..556c362d7 100644 --- a/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java +++ b/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java @@ -74,7 +74,7 @@ import static org.junit.jupiter.api.Assertions.fail; @ExtendWith(MockServerExtension.class) -public class RosetteAPITest { +class RosetteAPITest { private static final String INFO_RESPONSE = "{ \"buildNumber\": \"6bafb29d\", \"buildTime\": " + "\"2015.10.08_10:19:26\", \"name\": \"RosetteAPI\", \"version\": \"0.7.0\", \"versionChecked\": true }"; private HttpRosetteAPI api; @@ -183,7 +183,7 @@ private static Stream testMatchNameParameters() throws IOException { @ParameterizedTest(name = "testFilename: {0}; statusCode: {2}") @MethodSource("testMatchNameParameters") - public void testMatchName(String testFilename, String responseStr, int statusCode) throws IOException { + void testMatchName(String testFilename, String responseStr, int statusCode) throws IOException { setStatusCodeResponse(responseStr, statusCode); NameSimilarityRequest request = readValueNameMatcher(testFilename); try { diff --git a/json/src/test/java/com/basistech/rosette/apimodel/EnumTest.java b/json/src/test/java/com/basistech/rosette/apimodel/EnumTest.java index d0e56b410..61e8edb83 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/EnumTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/EnumTest.java @@ -26,7 +26,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; -public class EnumTest { +class EnumTest { private ObjectMapper mapper; @BeforeEach @@ -35,7 +35,7 @@ public void init() { } @Test - public void testCaseInsensitivity() throws Exception { + void testCaseInsensitivity() throws Exception { String json = "{\"content\": \"foo\", \"options\": {\"modelType\": \"dEfAuLT\"}}"; Request request = mapper.readValue(json, new TypeReference>() { }); assertTrue(request instanceof DocumentRequest); diff --git a/json/src/test/java/com/basistech/rosette/apimodel/ModelTest.java b/json/src/test/java/com/basistech/rosette/apimodel/ModelTest.java index de2c01fda..ebd7318b7 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/ModelTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/ModelTest.java @@ -45,7 +45,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.fail; -public class ModelTest { +class ModelTest { private ObjectMapper mapper; private static Stream packageTestParameters() { @@ -62,7 +62,7 @@ public void init() { @ParameterizedTest(name = "inputStreamContent: {0}") @MethodSource("packageTestParameters") - public void packageTest(boolean inputStreams) throws ClassNotFoundException, IOException { + void packageTest(boolean inputStreams) throws ClassNotFoundException, IOException { Reflections reflections = new Reflections(this.getClass().getPackage().getName(), new SubTypesScanner(false)); Set> allClasses = reflections.getSubTypesOf(Object.class); diff --git a/json/src/test/java/com/basistech/rosette/apimodel/NonNullTest.java b/json/src/test/java/com/basistech/rosette/apimodel/NonNullTest.java index d161fe5e5..9eef3ee60 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/NonNullTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/NonNullTest.java @@ -35,7 +35,7 @@ import static org.junit.jupiter.api.Assertions.assertFalse; -public class NonNullTest { +class NonNullTest { private ObjectMapper mapper; // All test resource filename has .json pattern. They contain null requestId and timers fields. @@ -60,7 +60,7 @@ public void init() { @ParameterizedTest(name = "{0}; {1}") @MethodSource("testNonNullParameters") - public void testNonNull(String className, File testFile) throws IOException, ClassNotFoundException { + void testNonNull(String className, File testFile) throws IOException, ClassNotFoundException { Class c = Class.forName(className); String s = FileUtils.readFileToString(testFile, StandardCharsets.UTF_8); String s2 = mapper.writeValueAsString(mapper.readValue(s, c)); diff --git a/json/src/test/java/com/basistech/rosette/apimodel/PolymorphicRequestTest.java b/json/src/test/java/com/basistech/rosette/apimodel/PolymorphicRequestTest.java index 0e500ffa9..dc5da3710 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/PolymorphicRequestTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/PolymorphicRequestTest.java @@ -26,7 +26,7 @@ import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertTrue; -public class PolymorphicRequestTest { +class PolymorphicRequestTest { private static final String DOC_REQUEST = DocumentRequest.class.getName(); private ObjectMapper mapper; @@ -36,7 +36,7 @@ public void init() { } @Test - public void testRequestTypes() throws Exception { + void testRequestTypes() throws Exception { String json = "{\"content\": \"what is my type\", \"language\": \"eng\", \"options\": {\"calculateConfidence\": true}}"; Request request = mapper.readValue(json, new TypeReference>() { }); @@ -89,7 +89,7 @@ public void testRequestTypes() throws Exception { } @Test - public void eventsRequests() throws Exception { + void eventsRequests() throws Exception { String json = "{\"content\": \"what is my type\", \"language\": \"eng\", \"options\": {\"workspaceId\": \"ws1\"}}"; Request request = mapper.readValue(json, new TypeReference>() { }); assertEquals(DOC_REQUEST, request.getClass().getName()); diff --git a/pom.xml b/pom.xml index 79576e12c..52be0b5f7 100644 --- a/pom.xml +++ b/pom.xml @@ -216,6 +216,26 @@ + + org.jacoco + jacoco-maven-plugin + ${jacoco-maven-plugin.version} + + + prepare-agent + + prepare-agent + + + + prepare-report + post-integration-test + + report-aggregate + + + + From cbe98b08ead390e8575ce2db0496096915dcbc7b Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Thu, 27 Oct 2022 16:20:26 -0500 Subject: [PATCH 128/415] WS-2609: Report aggregation does not appear necessary. --- pom.xml | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/pom.xml b/pom.xml index 52be0b5f7..79576e12c 100644 --- a/pom.xml +++ b/pom.xml @@ -216,26 +216,6 @@ - - org.jacoco - jacoco-maven-plugin - ${jacoco-maven-plugin.version} - - - prepare-agent - - prepare-agent - - - - prepare-report - post-integration-test - - report-aggregate - - - - From f2640f9704e6ba5f963db8c7da8f4c9d71771d10 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Thu, 27 Oct 2022 16:31:20 -0500 Subject: [PATCH 129/415] WS-2609: Only one Mockserver dependency required. --- api/pom.xml | 72 ++--------------------------------------------------- 1 file changed, 2 insertions(+), 70 deletions(-) diff --git a/api/pom.xml b/api/pom.xml index d1ade10a5..6a5d3b82f 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -51,8 +51,7 @@ com.fasterxml.jackson.core jackson-databind - + commons-codec commons-codec @@ -120,78 +119,11 @@ ${junit.version} test - - org.mock-server - mockserver-client-java - ${mockserver.version} - test - - - org.mock-server - mockserver-core - ${mockserver.version} - test - - - com.google.code.findbugs - jsr305 - - - commons-beanutils - commons-beanutils - - - org.apache.httpcomponents - httpclient - - - org.apache.commons - commons-lang3 - - - commons-codec - commons-codec - - - commons-logging - commons-logging - - - jakarta.xml.bind - jakarta.xml.bind-api - - - - - - jakarta.xml.bind - jakarta.xml.bind-api - 4.0.0 - test - - - com.google.code.findbugs - jsr305 - ${findbugs-jsr305.version} - test - - - commons-beanutils - commons-beanutils - ${commons-beanutils.version} - test - - - - org.mock-server - mockserver-junit-rule - ${mockserver.version} - test - org.mock-server mockserver-junit-jupiter-no-dependencies ${mockserver.version} + test commons-io From f84a0685cbc98ba627bd544f2e71793ad486dcdc Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Thu, 27 Oct 2022 17:34:48 -0500 Subject: [PATCH 130/415] WS-2609: Enable a few more tests. --- .../basistech/rosette/api/RosetteAPITest.java | 164 +++++++++++------- 1 file changed, 98 insertions(+), 66 deletions(-) diff --git a/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java b/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java index 556c362d7..3f8897b40 100644 --- a/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java +++ b/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java @@ -25,6 +25,7 @@ import com.basistech.rosette.apimodel.EntitiesOptions; import com.basistech.rosette.apimodel.EntitiesResponse; import com.basistech.rosette.apimodel.ErrorResponse; +import com.basistech.rosette.apimodel.LanguageDetectionResult; import com.basistech.rosette.apimodel.LanguageResponse; import com.basistech.rosette.apimodel.MorphologyResponse; import com.basistech.rosette.apimodel.NameDeduplicationRequest; @@ -45,9 +46,9 @@ import org.apache.commons.io.FileUtils; import org.apache.commons.io.IOUtils; import org.apache.http.HttpHeaders; +import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; @@ -81,23 +82,25 @@ class RosetteAPITest { private MockServerClient mockServer; private ObjectMapper mapper; + + @BeforeEach public void setUp(MockServerClient mockServer) { - this.mockServer = mockServer; - mapper = ApiModelMixinModule.setupObjectMapper(new ObjectMapper()); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - mockServer.when(HttpRequest.request() + this.mockServer = mockServer; + this.mockServer.when(HttpRequest.request() .withMethod("GET") .withPath("/rest/v1/ping") .withHeader(HttpHeaders.USER_AGENT, HttpRosetteAPI.USER_AGENT_STR)) .respond(HttpResponse.response() - .withBody("{\"message\":\"Rosette API at your service\",\"time\":1461788498633}", StandardCharsets.UTF_8) + .withBody("{\"message\":\"Rosette API at your service\",\"time\":1461788498633}", + StandardCharsets.UTF_8) .withStatusCode(HTTP_OK) .withHeader("X-RosetteAPI-Concurrency", "5")); - mockServer.when(HttpRequest.request() + this.mockServer.when(HttpRequest.request() .withPath("/info")) .respond(HttpResponse.response() .withStatusCode(HTTP_OK) @@ -111,6 +114,11 @@ public void setUp(MockServerClient mockServer) { .build(); } + @AfterEach + public void reset() { + mockServer.reset(); + } + private static byte[] gzip(String text) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); try (GZIPOutputStream out = new GZIPOutputStream(baos)) { @@ -187,7 +195,8 @@ void testMatchName(String testFilename, String responseStr, int statusCode) thro setStatusCodeResponse(responseStr, statusCode); NameSimilarityRequest request = readValueNameMatcher(testFilename); try { - NameSimilarityResponse response = api.perform(AbstractRosetteAPI.NAME_SIMILARITY_SERVICE_PATH, request, NameSimilarityResponse.class); + NameSimilarityResponse response = api.perform(AbstractRosetteAPI.NAME_SIMILARITY_SERVICE_PATH, request, + NameSimilarityResponse.class); verifyNameMatcher(response, responseStr); } catch (HttpRosetteAPIException e) { verifyException(e, responseStr); @@ -204,122 +213,145 @@ private NameSimilarityRequest readValueNameMatcher(String testFilename) throws I return mapper.readValue(input, NameSimilarityRequest.class); } - /* - @Test - public void testMatchAddress() throws IOException { - if (!(testFilename.endsWith("-address-similarity.json"))) { - return; - } - AddressSimilarityRequest request = readValueAddressMatcher(); + private static Stream testMatchAddressParameters() throws IOException { + return getTestFiles("-address-similarity.json"); + } + + @ParameterizedTest(name = "testFilename: {0}; statusCode: {2}") + @MethodSource("testMatchAddressParameters") + void testMatchAddress(String testFilename, String responseStr, int statusCode) throws IOException { + setStatusCodeResponse(responseStr, statusCode); + AddressSimilarityRequest request = readValueAddressMatcher(testFilename); try { - AddressSimilarityResponse response = api.perform(AbstractRosetteAPI.ADDRESS_SIMILARITY_SERVICE_PATH, request, AddressSimilarityResponse.class); - verifyAddressMatcher(response); + AddressSimilarityResponse response = api.perform(AbstractRosetteAPI.ADDRESS_SIMILARITY_SERVICE_PATH, + request, AddressSimilarityResponse.class); + verifyAddressMatcher(response, responseStr); } catch (HttpRosetteAPIException e) { - verifyException(e); + verifyException(e, responseStr); } } - private void verifyAddressMatcher(AddressSimilarityResponse response) throws IOException { + private void verifyAddressMatcher(AddressSimilarityResponse response, String responseStr) throws IOException { AddressSimilarityResponse goldResponse = mapper.readValue(responseStr, AddressSimilarityResponse.class); assertEquals(goldResponse.getScore(), response.getScore(), 0.0); } - private AddressSimilarityRequest readValueAddressMatcher() throws IOException { + private AddressSimilarityRequest readValueAddressMatcher(String testFilename) throws IOException { File input = new File("src/test/mock-data/request", testFilename); return mapper.readValue(input, AddressSimilarityRequest.class); } - @Test - public void testTranslateName() throws IOException { - if (!(testFilename.endsWith("-translated-name.json"))) { - return; - } - NameTranslationRequest request = readValueNameTranslation(); + private static Stream testTranslateNameParameters() throws IOException { + return getTestFiles("-name-translation.json"); + } + + @ParameterizedTest(name = "testFilename: {0}; statusCode: {2}") + @MethodSource("testTranslateNameParameters") + void testTranslateName(String testFilename, String responseStr, int statusCode) throws IOException { + setStatusCodeResponse(responseStr, statusCode); + NameTranslationRequest request = readValueNameTranslation(testFilename); try { - NameTranslationResponse response = api.perform(AbstractRosetteAPI.NAME_TRANSLATION_SERVICE_PATH, request, NameTranslationResponse.class); - verifyNameTranslation(response); + NameTranslationResponse response = api.perform(AbstractRosetteAPI.NAME_TRANSLATION_SERVICE_PATH, request, + NameTranslationResponse.class); + verifyNameTranslation(response, responseStr); } catch (HttpRosetteAPIException e) { - verifyException(e); + verifyException(e, responseStr); } } - private void verifyNameTranslation(NameTranslationResponse response) throws IOException { + private void verifyNameTranslation(NameTranslationResponse response, String responseStr) throws IOException { NameTranslationResponse goldResponse = mapper.readValue(responseStr, NameTranslationResponse.class); assertEquals(goldResponse.getTranslation(), response.getTranslation()); } - private NameTranslationRequest readValueNameTranslation() throws IOException { + private NameTranslationRequest readValueNameTranslation(String testFilename) throws IOException { File input = new File("src/test/mock-data/request", testFilename); return mapper.readValue(input, NameTranslationRequest.class); } - private void verifyLanguage(LanguageResponse response) throws IOException { + private void verifyLanguage(LanguageResponse response, String responseStr) throws IOException { LanguageResponse goldResponse = mapper.readValue(responseStr, LanguageResponse.class); assertEquals(goldResponse.getLanguageDetections().size(), response.getLanguageDetections().size()); } - @Test - public void testGetLanguageDoc() throws IOException { - if (!(testFilename.endsWith("-language.json") && testFilename.contains("-doc-"))) { - return; - } + private static Stream testGetLanguageDocParameters() throws IOException { + return getTestFiles("-doc-language.json"); + } + + @ParameterizedTest(name = "testFilename: {0}; statusCode: {2}") + @MethodSource("testGetLanguageDocParameters") + void testGetLanguageDoc(String testFilename, String responseStr, int statusCode) throws IOException { + setStatusCodeResponse(responseStr, statusCode); DocumentRequest request = readValue(DocumentRequest.class, testFilename); try { - LanguageResponse response = api.perform(AbstractRosetteAPI.LANGUAGE_SERVICE_PATH, request, LanguageResponse.class); - verifyLanguage(response); + LanguageResponse response = api.perform(AbstractRosetteAPI.LANGUAGE_SERVICE_PATH, request, + LanguageResponse.class); + verifyLanguage(response, responseStr); } catch (HttpRosetteAPIException e) { - verifyException(e); + verifyException(e, responseStr); } } - @Test - public void testGetLanguageURL() throws IOException { - if (!(testFilename.endsWith("-language.json") && testFilename.contains("-url-"))) { - return; - } + private static Stream testGetLanguageURLParameters() throws IOException { + return getTestFiles("-url-language.json"); + } + + @ParameterizedTest(name = "testFilename: {0}; statusCode: {2}") + @MethodSource("testGetLanguageURLParameters") + void testGetLanguageURL(String testFilename, String responseStr, int statusCode) throws IOException { + setStatusCodeResponse(responseStr, statusCode); DocumentRequest request = readValue(DocumentRequest.class, testFilename); try { - LanguageResponse response = api.perform(AbstractRosetteAPI.LANGUAGE_SERVICE_PATH, request, LanguageResponse.class); - verifyLanguage(response); + LanguageResponse response = api.perform(AbstractRosetteAPI.LANGUAGE_SERVICE_PATH, request, + LanguageResponse.class); + verifyLanguage(response, responseStr); } catch (HttpRosetteAPIException e) { - verifyException(e); + verifyException(e, responseStr); } } - @Test - public void testGetMorphologyDoc() throws IOException { - if (!(testFilename.endsWith("-morphology_complete.json") && testFilename.contains("-doc-"))) { - return; - } - DocumentRequest request = readValue(DocumentRequest.class); + private static Stream testGetMorphologyDocParameters() throws IOException { + return getTestFiles("-doc-morphology_complete.json"); + } + + @ParameterizedTest(name = "testFilename: {0}; statusCode: {2}") + @MethodSource("testGetMorphologyDocParameters") + void testGetMorphologyDoc(String testFilename, String responseStr, int statusCode) throws IOException { + setStatusCodeResponse(responseStr, statusCode); + DocumentRequest request = readValue(DocumentRequest.class, testFilename); try { - MorphologyResponse response = api.perform(AbstractRosetteAPI.MORPHOLOGY_SERVICE_PATH + "/" + MorphologicalFeature.COMPLETE, request, MorphologyResponse.class); - verifyMorphology(response); + MorphologyResponse response = api.perform(AbstractRosetteAPI.MORPHOLOGY_SERVICE_PATH + "/" + + MorphologicalFeature.COMPLETE, request, MorphologyResponse.class); + verifyMorphology(response, responseStr); } catch (HttpRosetteAPIException e) { - verifyException(e); + verifyException(e, responseStr); } } - private void verifyMorphology(MorphologyResponse response) throws IOException { + private void verifyMorphology(MorphologyResponse response, String responseStr) throws IOException { MorphologyResponse goldResponse = mapper.readValue(responseStr, MorphologyResponse.class); assertEquals(response.getPosTags().size(), goldResponse.getPosTags().size()); } - @Test - public void testGetMorphologyURL() throws IOException { - if (!(testFilename.endsWith("-morphology_complete.json") && testFilename.contains("-url-"))) { - return; - } + private static Stream testGetMorphologyURLParameters() throws IOException { + return getTestFiles("-url-morphology_complete.json"); + } + + @ParameterizedTest(name = "testFilename: {0}; statusCode: {2}") + @MethodSource("testGetMorphologyURLParameters") + void testGetMorphologyURL(String testFilename, String responseStr, int statusCode) throws IOException { + setStatusCodeResponse(responseStr, statusCode); DocumentRequest request = readValue(DocumentRequest.class, testFilename); try { - MorphologyResponse response = api.perform(AbstractRosetteAPI.MORPHOLOGY_SERVICE_PATH + "/" + MorphologicalFeature.COMPLETE, request, MorphologyResponse.class); - verifyMorphology(response); + MorphologyResponse response = api.perform(AbstractRosetteAPI.MORPHOLOGY_SERVICE_PATH + "/" + + MorphologicalFeature.COMPLETE, request, MorphologyResponse.class); + verifyMorphology(response, responseStr); } catch (HttpRosetteAPIException e) { - verifyException(e); + verifyException(e, responseStr); } } - @Test +/* @Test public void testGetEntityDoc() throws IOException { if (!(testFilename.endsWith("-entities.json") && testFilename.contains("-doc-"))) { return; From 2be41c23da959c1dc23e65ef8f84f14b8e81bba9 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Fri, 28 Oct 2022 13:08:44 -0500 Subject: [PATCH 131/415] WS-2609: Add Checkstyle and PMD. Finish rewriting tests. Address Checkstyle, PMD and Sonar issues. --- .../rosette/annotations/JacksonMixin.java | 2 +- .../annotations/JacksonMixinProcessor.java | 10 +- .../basistech/rosette/api/HttpRosetteAPI.java | 3 +- .../com/basistech/rosette/api/BasicTest.java | 2 +- .../rosette/api/DevRosetteAPITest.java | 2 +- .../rosette/api/InvalidErrorTest.java | 2 +- .../basistech/rosette/api/RosetteAPITest.java | 341 ++++++++++-------- .../request/eng-doc-relationships.json | 6 + .../request/eng-doc-syntax_dependencies.json | 4 + .../response/eng-doc-relationships.json | 33 ++ .../response/eng-doc-relationships.status | 1 + .../response/eng-doc-syntax_dependencies.json | 132 +++++++ .../eng-doc-syntax_dependencies.status | 1 + .../api/common/AbstractRosetteAPI.java | 2 +- .../examples/AddressSimilarityExample.java | 2 +- .../rosette/examples/CategoriesExample.java | 2 +- .../rosette/examples/EntitiesExample.java | 2 +- .../rosette/examples/EventsExample.java | 2 +- .../rosette/examples/LanguageExample.java | 2 +- .../examples/LanguageMultilingualExample.java | 2 +- .../examples/MorphologyCompleteExample.java | 2 +- .../MorphologyCompoundComponentsExample.java | 2 +- .../MorphologyHanReadingsExample.java | 2 +- .../examples/MorphologyLemmasExample.java | 2 +- .../MorphologyPartsOfSpeechExample.java | 2 +- .../examples/NameDeduplicationExample.java | 2 +- .../examples/NameSimilarityExample.java | 2 +- .../examples/NameTranslationExample.java | 2 +- .../examples/RelationshipsExample.java | 2 +- .../examples/SemanticVectorsExample.java | 2 +- .../rosette/examples/SentencesExample.java | 2 +- .../rosette/examples/SentimentExample.java | 2 +- .../rosette/examples/SimilarTermsExample.java | 2 +- .../examples/SyntaxDependenciesExample.java | 2 +- .../rosette/examples/TokensExample.java | 2 +- .../rosette/examples/TopicsExample.java | 2 +- .../examples/TransliterationExample.java | 2 +- .../apimodel/jackson/AddressMixin.java | 2 +- .../AddressSimilarityRequestMixin.java | 4 +- .../apimodel/jackson/AdmRequestMixin.java | 2 +- .../jackson/ConfigurationRequestMixin.java | 2 +- .../jackson/DocumentRequestMixin.java | 2 +- .../apimodel/jackson/FieldedAddressMixin.java | 2 +- .../NameDeduplicationRequestMixin.java | 2 +- .../jackson/NameSimilarityRequestMixin.java | 2 +- .../jackson/NameTranslationRequestMixin.java | 2 +- .../jackson/UnfieldedAddressMixin.java | 2 +- .../basistech/rosette/apimodel/ModelTest.java | 3 +- .../rosette/apimodel/NonNullTest.java | 3 +- .../apimodel/PolymorphicRequestTest.java | 2 +- .../basistech/rosette/apimodel/Address.java | 2 +- .../apimodel/CommonRosetteAPIException.java | 2 +- .../rosette/apimodel/EntitiesOptions.java | 2 +- .../basistech/rosette/apimodel/Entity.java | 2 +- .../rosette/apimodel/LanguageOptions.java | 2 +- .../com/basistech/rosette/apimodel/Name.java | 2 +- .../apimodel/NameDeduplicationRequest.java | 2 +- .../apimodel/NameSimilarityRequest.java | 2 +- .../rosette/apimodel/UnfieldedAddress.java | 12 +- pom.xml | 8 + 60 files changed, 435 insertions(+), 218 deletions(-) create mode 100644 api/src/test/mock-data/request/eng-doc-relationships.json create mode 100644 api/src/test/mock-data/request/eng-doc-syntax_dependencies.json create mode 100644 api/src/test/mock-data/response/eng-doc-relationships.json create mode 100644 api/src/test/mock-data/response/eng-doc-relationships.status create mode 100644 api/src/test/mock-data/response/eng-doc-syntax_dependencies.json create mode 100644 api/src/test/mock-data/response/eng-doc-syntax_dependencies.status diff --git a/annotations/src/main/java/com/basistech/rosette/annotations/JacksonMixin.java b/annotations/src/main/java/com/basistech/rosette/annotations/JacksonMixin.java index 375c96b61..a6638d2e6 100644 --- a/annotations/src/main/java/com/basistech/rosette/annotations/JacksonMixin.java +++ b/annotations/src/main/java/com/basistech/rosette/annotations/JacksonMixin.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2022 Basis Technology Corp. +* Copyright 2017 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/annotations/src/main/java/com/basistech/rosette/annotations/JacksonMixinProcessor.java b/annotations/src/main/java/com/basistech/rosette/annotations/JacksonMixinProcessor.java index aaf10e684..68e67f558 100644 --- a/annotations/src/main/java/com/basistech/rosette/annotations/JacksonMixinProcessor.java +++ b/annotations/src/main/java/com/basistech/rosette/annotations/JacksonMixinProcessor.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -48,6 +48,7 @@ public class JacksonMixinProcessor extends AbstractProcessor { private static final String PACKAGE_NAME = "com.basistech.rosette.apimodel.jackson"; + private static final String VALUE = "value"; private ProcessingEnvironment processingEnvironment; @@ -58,6 +59,7 @@ public synchronized void init(ProcessingEnvironment processingEnvironment) { } @Override + @SuppressWarnings("java:S3516") // From the Javadoc: "A processor may always return the same boolean value..." public boolean process(Set annotations, RoundEnvironment roundEnvironment) { if (roundEnvironment.getElementsAnnotatedWith(JacksonMixin.class).isEmpty()) { return true; @@ -76,14 +78,14 @@ public boolean process(Set annotations, RoundEnvironment .classBuilder(typeElement.getSimpleName().toString() + "Mixin") .addModifiers(Modifier.PUBLIC, Modifier.ABSTRACT) .addAnnotation(AnnotationSpec.builder(JsonTypeName.class) - .addMember("value", "$S", typeElement.getSimpleName()) + .addMember(VALUE, "$S", typeElement.getSimpleName()) .build()) .addAnnotation(AnnotationSpec.builder(JsonDeserialize.class) .addMember("builder", CodeBlock.builder() .add(elementQualifiedName + "." + elementSimpleName + "Builder.class").build()) .build()) .addAnnotation(AnnotationSpec.builder(JsonInclude.class) - .addMember("value", CodeBlock.builder() + .addMember(VALUE, CodeBlock.builder() .add("JsonInclude.Include.NON_NULL").build()) .build()) .addType(TypeSpec @@ -119,7 +121,7 @@ public boolean process(Set annotations, RoundEnvironment .classBuilder("MixinUtil") .addModifiers(Modifier.PUBLIC, Modifier.FINAL) .addAnnotation(AnnotationSpec.builder(SuppressWarnings.class) - .addMember("value", "$S", "PMD") + .addMember(VALUE, "$S", "PMD") .build()) .addMethod(methodSpecBuilder.build()); try { diff --git a/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java b/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java index 00ec34159..5299fabd7 100644 --- a/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java +++ b/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2022 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -177,6 +177,7 @@ private static byte[] getBytes(InputStream is) throws IOException { } } + @SuppressWarnings("java:HttpClient_must_be_closed") // This library requires keeping the connection open. private void initClient(String key, List
additionalHeaders) { HttpClientBuilder builder = HttpClients.custom(); PoolingHttpClientConnectionManager cm = new PoolingHttpClientConnectionManager(); diff --git a/api/src/test/java/com/basistech/rosette/api/BasicTest.java b/api/src/test/java/com/basistech/rosette/api/BasicTest.java index 332621e5c..da775e76f 100644 --- a/api/src/test/java/com/basistech/rosette/api/BasicTest.java +++ b/api/src/test/java/com/basistech/rosette/api/BasicTest.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2022 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/api/src/test/java/com/basistech/rosette/api/DevRosetteAPITest.java b/api/src/test/java/com/basistech/rosette/api/DevRosetteAPITest.java index 85013e77d..16c6cb5ca 100644 --- a/api/src/test/java/com/basistech/rosette/api/DevRosetteAPITest.java +++ b/api/src/test/java/com/basistech/rosette/api/DevRosetteAPITest.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2022 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/api/src/test/java/com/basistech/rosette/api/InvalidErrorTest.java b/api/src/test/java/com/basistech/rosette/api/InvalidErrorTest.java index 7d68ca4a0..42b2f425a 100644 --- a/api/src/test/java/com/basistech/rosette/api/InvalidErrorTest.java +++ b/api/src/test/java/com/basistech/rosette/api/InvalidErrorTest.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2022 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java b/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java index 3f8897b40..859c02806 100644 --- a/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java +++ b/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java @@ -1,5 +1,5 @@ /* -* Copyright 2014-2022 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,7 +25,6 @@ import com.basistech.rosette.apimodel.EntitiesOptions; import com.basistech.rosette.apimodel.EntitiesResponse; import com.basistech.rosette.apimodel.ErrorResponse; -import com.basistech.rosette.apimodel.LanguageDetectionResult; import com.basistech.rosette.apimodel.LanguageResponse; import com.basistech.rosette.apimodel.MorphologyResponse; import com.basistech.rosette.apimodel.NameDeduplicationRequest; @@ -47,7 +46,6 @@ import org.apache.commons.io.IOUtils; import org.apache.http.HttpHeaders; import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; @@ -75,6 +73,7 @@ import static org.junit.jupiter.api.Assertions.fail; @ExtendWith(MockServerExtension.class) +@SuppressWarnings("PMD.UnusedPrivateMethod") // Parameterized Tests class RosetteAPITest { private static final String INFO_RESPONSE = "{ \"buildNumber\": \"6bafb29d\", \"buildTime\": " + "\"2015.10.08_10:19:26\", \"name\": \"RosetteAPI\", \"version\": \"0.7.0\", \"versionChecked\": true }"; @@ -351,278 +350,306 @@ void testGetMorphologyURL(String testFilename, String responseStr, int statusCod } } -/* @Test - public void testGetEntityDoc() throws IOException { - if (!(testFilename.endsWith("-entities.json") && testFilename.contains("-doc-"))) { - return; - } + private static Stream testGetEntityDocParameters() throws IOException { + return getTestFiles("-doc-entities.json"); + } + + @ParameterizedTest(name = "testFilename: {0}; statusCode: {2}") + @MethodSource("testGetEntityDocParameters") + void testGetEntityDoc(String testFilename, String responseStr, int statusCode) throws IOException { + setStatusCodeResponse(responseStr, statusCode); DocumentRequest request = readValue(DocumentRequest.class, testFilename); try { - EntitiesResponse response = api.perform(AbstractRosetteAPI.ENTITIES_SERVICE_PATH, request, EntitiesResponse.class); - verifyEntity(response); + EntitiesResponse response = api.perform(AbstractRosetteAPI.ENTITIES_SERVICE_PATH, request, + EntitiesResponse.class); + verifyEntity(response, responseStr); } catch (HttpRosetteAPIException e) { - verifyException(e); + verifyException(e, responseStr); } } - @Test - public void testGetEntityLinked() throws IOException { - if (!(testFilename.endsWith("-entities_linked.json"))) { - return; - } + private static Stream testGetEntityLinkedParameters() throws IOException { + return getTestFiles("-entities_linked.json"); + } + + @ParameterizedTest(name = "testFilename: {0}; statusCode: {2}") + @MethodSource("testGetEntityLinkedParameters") + void testGetEntityLinked(String testFilename, String responseStr, int statusCode) throws IOException { + setStatusCodeResponse(responseStr, statusCode); DocumentRequest request = readValue(DocumentRequest.class, testFilename); try { - EntitiesResponse response = api.perform(AbstractRosetteAPI.ENTITIES_SERVICE_PATH, request, EntitiesResponse.class); - verifyEntity(response); + EntitiesResponse response = api.perform(AbstractRosetteAPI.ENTITIES_SERVICE_PATH, request, + EntitiesResponse.class); + verifyEntity(response, responseStr); } catch (HttpRosetteAPIException e) { - verifyException(e); + verifyException(e, responseStr); } } - @Test - public void testGetEntityPermId() throws IOException { + private static Stream testGetEntityPermIdParameters() throws IOException { + return getTestFiles("-entities_permid.json"); + } + + @ParameterizedTest(name = "testFilename: {0}; statusCode: {2}") + @MethodSource("testGetEntityPermIdParameters") + void testGetEntityPermId(String testFilename, String responseStr, int statusCode) throws IOException { + setStatusCodeResponse(responseStr, statusCode); if (testFilename.endsWith("-entities_permid.json")) { DocumentRequest request = readValue(DocumentRequest.class, testFilename); try { - EntitiesResponse response = api.perform(AbstractRosetteAPI.ENTITIES_SERVICE_PATH, request, EntitiesResponse.class); - verifyEntity(response); + EntitiesResponse response = api.perform(AbstractRosetteAPI.ENTITIES_SERVICE_PATH, request, + EntitiesResponse.class); + verifyEntity(response, responseStr); } catch (HttpRosetteAPIException e) { - verifyException(e); + verifyException(e, responseStr); } } } - @Test - public void testIgnoredUnknownField() throws IOException { - if ("unknown-field-entities.json".equals(testFilename)) { - DocumentRequest request = readValue(DocumentRequest.class, testFilename); - try { - EntitiesResponse response = api.perform(AbstractRosetteAPI.ENTITIES_SERVICE_PATH, request, EntitiesResponse.class); - verifyEntity(response); - } catch (HttpRosetteAPIException e) { - verifyException(e); - } + private static Stream testIgnoredUnknownFieldParameters() throws IOException { + return getTestFiles("unknown-field-entities.json"); + } + + @ParameterizedTest(name = "testFilename: {0}; statusCode: {2}") + @MethodSource("testIgnoredUnknownFieldParameters") + void testIgnoredUnknownField(String testFilename, String responseStr, int statusCode) throws IOException { + setStatusCodeResponse(responseStr, statusCode); + DocumentRequest request = readValue(DocumentRequest.class, testFilename); + try { + EntitiesResponse response = api.perform(AbstractRosetteAPI.ENTITIES_SERVICE_PATH, request, + EntitiesResponse.class); + verifyEntity(response, responseStr); + } catch (HttpRosetteAPIException e) { + verifyException(e, responseStr); } } - @Test - public void testNonIgnoredUnknownField() throws IOException { - if ("unknown-field-entities.json".equals(testFilename)) { - DocumentRequest request = readValue(DocumentRequest.class, testFilename); - HttpRosetteAPI tmpApi = new HttpRosetteAPI.Builder() - .key("my-key-123") - .url(mockServiceUrl) - .onlyAcceptKnownFields(true) - .build(); - try { - tmpApi.perform(AbstractRosetteAPI.ENTITIES_SERVICE_PATH, request, EntitiesResponse.class); - } catch (RosetteRuntimeException e) { - if (e.getCause() instanceof UnrecognizedPropertyException) { - return; - } + private static Stream testNonIgnoredUnknownFieldParameters() throws IOException { + return getTestFiles("unknown-field-entities.json"); + } + + @ParameterizedTest(name = "testFilename: {0}; statusCode: {2}") + @MethodSource("testNonIgnoredUnknownFieldParameters") + void testNonIgnoredUnknownField(String testFilename, String responseStr, int statusCode) throws IOException { + setStatusCodeResponse(responseStr, statusCode); + DocumentRequest request = readValue(DocumentRequest.class, testFilename); + + try (HttpRosetteAPI tmpApi = new HttpRosetteAPI.Builder() + .key("my-key-123") + .url(String.format("http://localhost:%d/rest/v1", mockServer.getPort())) + .onlyAcceptKnownFields(true) + .build()) { + tmpApi.perform(AbstractRosetteAPI.ENTITIES_SERVICE_PATH, request, EntitiesResponse.class); + } catch (RosetteRuntimeException e) { + if (e.getCause() instanceof UnrecognizedPropertyException) { + return; } - fail("Unknown field is ignored when it shouldn't be "); } + fail("Unknown field is ignored when it shouldn't be "); } - private void verifyEntity(EntitiesResponse response) throws IOException { + private void verifyEntity(EntitiesResponse response, String responseStr) throws IOException { EntitiesResponse goldResponse = mapper.readValue(responseStr, EntitiesResponse.class); assertEquals(goldResponse.getEntities(), response.getEntities()); } - @Test - public void testGetEntityURL() throws IOException { - if (!(testFilename.endsWith("-entities.json") && testFilename.contains("-url-"))) { - return; - } + private static Stream testGetEntityURLParameters() throws IOException { + return getTestFiles("-url-entities.json"); + } + + @ParameterizedTest(name = "testFilename: {0}; statusCode: {2}") + @MethodSource("testGetEntityURLParameters") + void testGetEntityURL(String testFilename, String responseStr, int statusCode) throws IOException { + setStatusCodeResponse(responseStr, statusCode); DocumentRequest request = readValue(DocumentRequest.class, testFilename); try { - EntitiesResponse response = api.perform(AbstractRosetteAPI.ENTITIES_SERVICE_PATH, request, EntitiesResponse.class); - verifyEntity(response); + EntitiesResponse response = api.perform(AbstractRosetteAPI.ENTITIES_SERVICE_PATH, request, + EntitiesResponse.class); + verifyEntity(response, responseStr); } catch (HttpRosetteAPIException e) { - verifyException(e); + verifyException(e, responseStr); } } - @Test - public void testGetCategories() throws IOException { - if (!(testFilename.endsWith("-categories.json") && testFilename.contains("-doc-"))) { - return; - } + private static Stream testGetCategoriesDocParameters() throws IOException { + return getTestFiles("-doc-categories.json"); + } + + @ParameterizedTest(name = "testFilename: {0}; statusCode: {2}") + @MethodSource("testGetCategoriesDocParameters") + void testGetCategoriesDoc(String testFilename, String responseStr, int statusCode) throws IOException { + setStatusCodeResponse(responseStr, statusCode); DocumentRequest request = readValue(DocumentRequest.class, testFilename); try { - CategoriesResponse response = api.perform(AbstractRosetteAPI.CATEGORIES_SERVICE_PATH, request, CategoriesResponse.class); - verifyCategory(response); + CategoriesResponse response = api.perform(AbstractRosetteAPI.CATEGORIES_SERVICE_PATH, request, + CategoriesResponse.class); + verifyCategory(response, responseStr); } catch (HttpRosetteAPIException e) { - verifyException(e); + verifyException(e, responseStr); } } - - private void verifyCategory(CategoriesResponse response) throws IOException { + private void verifyCategory(CategoriesResponse response, String responseStr) throws IOException { CategoriesResponse goldResponse = mapper.readValue(responseStr, CategoriesResponse.class); assertEquals(response.getCategories().size(), goldResponse.getCategories().size()); } - @Test - public void testGetCategoriesURL() throws IOException { - if (!(testFilename.endsWith("-categories.json") && testFilename.contains("-url-"))) { - return; - } + private static Stream testGetCategoriesURLParameters() throws IOException { + return getTestFiles("-url-categories.json"); + } + + @ParameterizedTest(name = "testFilename: {0}; statusCode: {2}") + @MethodSource("testGetCategoriesURLParameters") + void testGetCategoriesURL(String testFilename, String responseStr, int statusCode) throws IOException { + setStatusCodeResponse(responseStr, statusCode); DocumentRequest request = readValue(DocumentRequest.class, testFilename); try { - CategoriesResponse response = api.perform(AbstractRosetteAPI.CATEGORIES_SERVICE_PATH, request, CategoriesResponse.class); - verifyCategory(response); + CategoriesResponse response = api.perform(AbstractRosetteAPI.CATEGORIES_SERVICE_PATH, request, + CategoriesResponse.class); + verifyCategory(response, responseStr); } catch (HttpRosetteAPIException e) { - verifyException(e); + verifyException(e, responseStr); } } - @Test - public void testGetSyntaxDependencies() throws IOException { - if (!(testFilename.endsWith("-syntax_dependencies.json") && testFilename.contains("-doc-"))) { - return; - } + private static Stream testGetSyntaxDependenciesDocParameters() throws IOException { + return getTestFiles("-doc-syntax_dependencies.json"); + } + + @ParameterizedTest(name = "testFilename: {0}; statusCode: {2}") + @MethodSource("testGetSyntaxDependenciesDocParameters") + void testGetSyntaxDependenciesDoc(String testFilename, String responseStr, int statusCode) throws IOException { + setStatusCodeResponse(responseStr, statusCode); DocumentRequest request = readValue(DocumentRequest.class, testFilename); try { - SyntaxDependenciesResponse response = api.perform(AbstractRosetteAPI.SYNTAX_DEPENDENCIES_SERVICE_PATH, request, SyntaxDependenciesResponse.class); - verifySyntaxDependency(response); + SyntaxDependenciesResponse response = api.perform(AbstractRosetteAPI.SYNTAX_DEPENDENCIES_SERVICE_PATH, + request, SyntaxDependenciesResponse.class); + verifySyntaxDependency(response, responseStr); } catch (HttpRosetteAPIException e) { - verifyException(e); + verifyException(e, responseStr); } } - private void verifySyntaxDependency(SyntaxDependenciesResponse response) throws IOException { + private void verifySyntaxDependency(SyntaxDependenciesResponse response, String responseStr) throws IOException { SyntaxDependenciesResponse goldResponse = mapper.readValue(responseStr, SyntaxDependenciesResponse.class); assertEquals(response.getSentences().size(), goldResponse.getSentences().size()); } - @Test - public void testGetSyntaxDependenciesURL() throws IOException { - if (!(testFilename.endsWith("-syntax_dependencies.json") && testFilename.contains("-url-"))) { - return; - } - DocumentRequest request = readValue(DocumentRequest.class, testFilename); - try { - SyntaxDependenciesResponse response = api.perform(AbstractRosetteAPI.SYNTAX_DEPENDENCIES_SERVICE_PATH, request, SyntaxDependenciesResponse.class); - verifySyntaxDependency(response); - } catch (HttpRosetteAPIException e) { - verifyException(e); - } + private static Stream testGetSimilarTermsParameters() throws IOException { + return getTestFiles("-similar_terms.json"); } - @Test - public void testGetSimilarTerms() throws IOException { - if (!(testFilename.endsWith("-similar_terms.json"))) { - return; - } + @ParameterizedTest(name = "testFilename: {0}; statusCode: {2}") + @MethodSource("testGetSimilarTermsParameters") + void testGetSimilarTerms(String testFilename, String responseStr, int statusCode) throws IOException { + setStatusCodeResponse(responseStr, statusCode); DocumentRequest request = readValue(DocumentRequest.class, testFilename); try { - SimilarTermsResponse response = api.perform(AbstractRosetteAPI.SIMILAR_TERMS_SERVICE_PATH, request, SimilarTermsResponse.class); - verifySimilarTerms(response); + SimilarTermsResponse response = api.perform(AbstractRosetteAPI.SIMILAR_TERMS_SERVICE_PATH, request, + SimilarTermsResponse.class); + verifySimilarTerms(response, responseStr); } catch (HttpRosetteAPIException e) { - verifyException(e); + verifyException(e, responseStr); } } - private void verifySimilarTerms(SimilarTermsResponse response) throws IOException { + private void verifySimilarTerms(SimilarTermsResponse response, String responseStr) throws IOException { SimilarTermsResponse goldResponse = mapper.readValue(responseStr, SimilarTermsResponse.class); assertEquals(response.getSimilarTerms().size(), goldResponse.getSimilarTerms().size()); } - // THERE ARE NO REL FILENAMES! - @Test - public void testGetRelationships() throws IOException { - if (!(testFilename.endsWith("-relationships.json") && testFilename.contains("-doc-"))) { - return; - } + private static Stream testGetRelationshipsDocParameters() throws IOException { + return getTestFiles("-doc-relationships.json"); + } + + @ParameterizedTest(name = "testFilename: {0}; statusCode: {2}") + @MethodSource("testGetRelationshipsDocParameters") + void testGetRelationshipsDoc(String testFilename, String responseStr, int statusCode) throws IOException { + setStatusCodeResponse(responseStr, statusCode); DocumentRequest request = readValue(DocumentRequest.class, testFilename); try { - RelationshipsResponse response = api.perform(AbstractRosetteAPI.RELATIONSHIPS_SERVICE_PATH, request, RelationshipsResponse.class); - verifyRelationships(response); + RelationshipsResponse response = api.perform(AbstractRosetteAPI.RELATIONSHIPS_SERVICE_PATH, request, + RelationshipsResponse.class); + verifyRelationships(response, responseStr); } catch (HttpRosetteAPIException e) { - verifyException(e); + verifyException(e, responseStr); } } - private void verifyRelationships(RelationshipsResponse response) throws IOException { + private void verifyRelationships(RelationshipsResponse response, String responseStr) throws IOException { RelationshipsResponse goldResponse = mapper.readValue(responseStr, RelationshipsResponse.class); assertEquals(response.getRelationships().size(), goldResponse.getRelationships().size()); } - @Test - public void testGetRelationshipsURL() throws IOException { - if (!(testFilename.endsWith("-relationships.json") && testFilename.contains("-url-"))) { - return; - } - DocumentRequest request = readValue(DocumentRequest.class, testFilename); - try { - RelationshipsResponse response = api.perform(AbstractRosetteAPI.RELATIONSHIPS_SERVICE_PATH, request, RelationshipsResponse.class); - verifyRelationships(response); - } catch (HttpRosetteAPIException e) { - verifyException(e); - } + private static Stream testGetSentimentDocParameters() throws IOException { + return getTestFiles("-doc-sentiment.json"); } - @Test - public void testGetSentiment() throws IOException { - if (!(testFilename.endsWith("-sentiment.json") && testFilename.contains("-doc-"))) { - return; - } + @ParameterizedTest(name = "testFilename: {0}; statusCode: {2}") + @MethodSource("testGetSentimentDocParameters") + void testGetSentimentDoc(String testFilename, String responseStr, int statusCode) throws IOException { + setStatusCodeResponse(responseStr, statusCode); DocumentRequest request = readValue(DocumentRequest.class, testFilename); try { - SentimentResponse response = api.perform(AbstractRosetteAPI.SENTENCES_SERVICE_PATH, request, SentimentResponse.class); - verifySentiment(response); + SentimentResponse response = api.perform(AbstractRosetteAPI.SENTENCES_SERVICE_PATH, request, + SentimentResponse.class); + verifySentiment(response, responseStr); } catch (HttpRosetteAPIException e) { - verifyException(e); + verifyException(e, responseStr); } } - private void verifySentiment(SentimentResponse response) throws IOException { + private void verifySentiment(SentimentResponse response, String responseStr) throws IOException { SentimentResponse goldResponse = mapper.readValue(responseStr, SentimentResponse.class); // this is minimal. assertNotNull(response.getEntities()); assertEquals(response.getEntities().size(), goldResponse.getEntities().size()); } - @Test - public void testGetSentimentURL() throws IOException { - if (!(testFilename.endsWith("-sentiment.json") && testFilename.contains("-url-"))) { - return; - } + private static Stream testGetSentimentURLParameters() throws IOException { + return getTestFiles("-url-sentiment.json"); + } + + @ParameterizedTest(name = "testFilename: {0}; statusCode: {2}") + @MethodSource("testGetSentimentURLParameters") + void testGetSentimentURL(String testFilename, String responseStr, int statusCode) throws IOException { + setStatusCodeResponse(responseStr, statusCode); DocumentRequest request = readValue(DocumentRequest.class, testFilename); try { - SentimentResponse response = api.perform(AbstractRosetteAPI.SENTENCES_SERVICE_PATH, request, SentimentResponse.class); - verifySentiment(response); + SentimentResponse response = api.perform(AbstractRosetteAPI.SENTENCES_SERVICE_PATH, request, + SentimentResponse.class); + verifySentiment(response, responseStr); } catch (HttpRosetteAPIException e) { - verifyException(e); + verifyException(e, responseStr); } } - @Test - public void testNameDeduplication() throws IOException { - if (!(testFilename.endsWith("-name-deduplication.json"))) { - return; - } - NameDeduplicationRequest request = readValueNameDeduplication(); + private static Stream testNameDeduplicationParameters() throws IOException { + return getTestFiles("-name-deduplication.json"); + } + + @ParameterizedTest(name = "testFilename: {0}; statusCode: {2}") + @MethodSource("testNameDeduplicationParameters") + void testNameDeduplication(String testFilename, String responseStr, int statusCode) throws IOException { + setStatusCodeResponse(responseStr, statusCode); + NameDeduplicationRequest request = readValueNameDeduplication(testFilename); try { NameDeduplicationResponse response = api.perform(AbstractRosetteAPI.NAME_DEDUPLICATION_SERVICE_PATH, request, NameDeduplicationResponse.class); - verifyNameDeduplication(response); + verifyNameDeduplication(response, responseStr); } catch (HttpRosetteAPIException e) { - verifyException(e); + verifyException(e, responseStr); } } - private void verifyNameDeduplication(NameDeduplicationResponse response) throws IOException { + private void verifyNameDeduplication(NameDeduplicationResponse response, String responseStr) throws IOException { NameDeduplicationResponse goldResponse = mapper.readValue(responseStr, NameDeduplicationResponse.class); assertEquals(goldResponse.getResults(), response.getResults()); } - private NameDeduplicationRequest readValueNameDeduplication() throws IOException { + private NameDeduplicationRequest readValueNameDeduplication(String testFilename) throws IOException { File input = new File("src/test/mock-data/request", testFilename); return mapper.readValue(input, NameDeduplicationRequest.class); } - */ } diff --git a/api/src/test/mock-data/request/eng-doc-relationships.json b/api/src/test/mock-data/request/eng-doc-relationships.json new file mode 100644 index 000000000..a27da8854 --- /dev/null +++ b/api/src/test/mock-data/request/eng-doc-relationships.json @@ -0,0 +1,6 @@ +{ + "content": "FLIR Systems is headquartered in Oregon and produces thermal imaging, night vision, and infrared cameras and sensor systems. According to the SEC’s order instituting a settled administrative proceeding, FLIR entered into a multi-million dollar contract to provide thermal binoculars to the Saudi government in November 2008. Timms and Ramahi were the primary sales employees responsible for the contract, and also were involved in negotiations to sell FLIR’s security cameras to the same government officials. At the time, Timms was the head of FLIR’s Middle East office in Dubai.", + "language": "eng" +} + + diff --git a/api/src/test/mock-data/request/eng-doc-syntax_dependencies.json b/api/src/test/mock-data/request/eng-doc-syntax_dependencies.json new file mode 100644 index 000000000..0a9683328 --- /dev/null +++ b/api/src/test/mock-data/request/eng-doc-syntax_dependencies.json @@ -0,0 +1,4 @@ +{ + "content": "Yoshinori Ohsumi, a Japanese cell biologist, was awarded the Nobel Prize in Physiology or Medicine on Monday.", + "language": "eng" +} \ No newline at end of file diff --git a/api/src/test/mock-data/response/eng-doc-relationships.json b/api/src/test/mock-data/response/eng-doc-relationships.json new file mode 100644 index 000000000..51ac462e7 --- /dev/null +++ b/api/src/test/mock-data/response/eng-doc-relationships.json @@ -0,0 +1,33 @@ +{ + "relationships": [ + { + "predicate": "Organization Headquarters", + "predicateId": "ORG-HEADQUARTERS", + "arg1": "FLIR Systems", + "arg1Id": "Q5426537", + "arg2": "Oregon", + "arg2Id": "Q824" + }, + { + "predicate": "Citizen of", + "predicateId": "CIT-OF", + "arg1": "Timms", + "arg1Id": "T5", + "arg2": "Dubai", + "arg2Id": "Q612", + "confidence": 0.89470345 + }, + { + "predicate": "Person Employee or Member of", + "predicateId": "PER-EMPLOYEE-MEMBER-OF", + "arg1": "Timms", + "arg2": "FLIR" + }, + { + "predicate": "Organization top employees", + "predicateId": "ORG-TOP-EMPLOYEES", + "arg1": "FLIR", + "arg2": "Timms" + } + ] +} diff --git a/api/src/test/mock-data/response/eng-doc-relationships.status b/api/src/test/mock-data/response/eng-doc-relationships.status new file mode 100644 index 000000000..ae4ee13c0 --- /dev/null +++ b/api/src/test/mock-data/response/eng-doc-relationships.status @@ -0,0 +1 @@ +200 \ No newline at end of file diff --git a/api/src/test/mock-data/response/eng-doc-syntax_dependencies.json b/api/src/test/mock-data/response/eng-doc-syntax_dependencies.json new file mode 100644 index 000000000..e05e78965 --- /dev/null +++ b/api/src/test/mock-data/response/eng-doc-syntax_dependencies.json @@ -0,0 +1,132 @@ +{ + "sentences": [ + { + "startTokenIndex": 0, + "endTokenIndex": 19, + "dependencies": [ + { + "dependencyType": "name", + "governorTokenIndex": 1, + "dependentTokenIndex": 0 + }, + { + "dependencyType": "nsubjpass", + "governorTokenIndex": 9, + "dependentTokenIndex": 1 + }, + { + "dependencyType": "punct", + "governorTokenIndex": 1, + "dependentTokenIndex": 2 + }, + { + "dependencyType": "det", + "governorTokenIndex": 6, + "dependentTokenIndex": 3 + }, + { + "dependencyType": "amod", + "governorTokenIndex": 6, + "dependentTokenIndex": 4 + }, + { + "dependencyType": "compound", + "governorTokenIndex": 6, + "dependentTokenIndex": 5 + }, + { + "dependencyType": "appos", + "governorTokenIndex": 1, + "dependentTokenIndex": 6 + }, + { + "dependencyType": "punct", + "governorTokenIndex": 1, + "dependentTokenIndex": 7 + }, + { + "dependencyType": "auxpass", + "governorTokenIndex": 9, + "dependentTokenIndex": 8 + }, + { + "dependencyType": "root", + "governorTokenIndex": -1, + "dependentTokenIndex": 9 + }, + { + "dependencyType": "det", + "governorTokenIndex": 12, + "dependentTokenIndex": 10 + }, + { + "dependencyType": "compound", + "governorTokenIndex": 12, + "dependentTokenIndex": 11 + }, + { + "dependencyType": "dobj", + "governorTokenIndex": 9, + "dependentTokenIndex": 12 + }, + { + "dependencyType": "case", + "governorTokenIndex": 14, + "dependentTokenIndex": 13 + }, + { + "dependencyType": "nmod", + "governorTokenIndex": 12, + "dependentTokenIndex": 14 + }, + { + "dependencyType": "cc", + "governorTokenIndex": 14, + "dependentTokenIndex": 15 + }, + { + "dependencyType": "conj", + "governorTokenIndex": 14, + "dependentTokenIndex": 16 + }, + { + "dependencyType": "case", + "governorTokenIndex": 18, + "dependentTokenIndex": 17 + }, + { + "dependencyType": "nmod", + "governorTokenIndex": 9, + "dependentTokenIndex": 18 + }, + { + "dependencyType": "punct", + "governorTokenIndex": 9, + "dependentTokenIndex": 19 + } + ] + } + ], + "tokens": [ + "Yoshinori", + "Ohsumi", + ",", + "a", + "Japanese", + "cell", + "biologist", + ",", + "was", + "awarded", + "the", + "Nobel", + "Prize", + "in", + "Physiology", + "or", + "Medicine", + "on", + "Monday", + "." + ] +} diff --git a/api/src/test/mock-data/response/eng-doc-syntax_dependencies.status b/api/src/test/mock-data/response/eng-doc-syntax_dependencies.status new file mode 100644 index 000000000..ae4ee13c0 --- /dev/null +++ b/api/src/test/mock-data/response/eng-doc-syntax_dependencies.status @@ -0,0 +1 @@ +200 \ No newline at end of file diff --git a/common/src/main/java/com/basistech/rosette/api/common/AbstractRosetteAPI.java b/common/src/main/java/com/basistech/rosette/api/common/AbstractRosetteAPI.java index 64caa3b80..21966736d 100644 --- a/common/src/main/java/com/basistech/rosette/api/common/AbstractRosetteAPI.java +++ b/common/src/main/java/com/basistech/rosette/api/common/AbstractRosetteAPI.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2022 Basis Technology Corp. +* Copyright 2017 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/AddressSimilarityExample.java b/examples/src/main/java/com/basistech/rosette/examples/AddressSimilarityExample.java index 3dcc64ae0..90113194e 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/AddressSimilarityExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/AddressSimilarityExample.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2022 Basis Technology Corp. + * Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/CategoriesExample.java b/examples/src/main/java/com/basistech/rosette/examples/CategoriesExample.java index 10167696e..e8d088808 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/CategoriesExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/CategoriesExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2022 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/EntitiesExample.java b/examples/src/main/java/com/basistech/rosette/examples/EntitiesExample.java index 47b77609f..4888ed0ae 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/EntitiesExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/EntitiesExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2022 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/EventsExample.java b/examples/src/main/java/com/basistech/rosette/examples/EventsExample.java index 6287ccc67..6d05dac81 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/EventsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/EventsExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2021-2022 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/LanguageExample.java b/examples/src/main/java/com/basistech/rosette/examples/LanguageExample.java index 2d776dd05..985fa3e5a 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/LanguageExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/LanguageExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2022 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/LanguageMultilingualExample.java b/examples/src/main/java/com/basistech/rosette/examples/LanguageMultilingualExample.java index facf9805e..51fbb6e5b 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/LanguageMultilingualExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/LanguageMultilingualExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2014-2022 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompleteExample.java b/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompleteExample.java index aee79c867..87939e6fe 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompleteExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompleteExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2022 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompoundComponentsExample.java b/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompoundComponentsExample.java index 141e4fe33..8eb1d8b62 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompoundComponentsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompoundComponentsExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2022 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/MorphologyHanReadingsExample.java b/examples/src/main/java/com/basistech/rosette/examples/MorphologyHanReadingsExample.java index 3784a9502..60bc04a2a 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/MorphologyHanReadingsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/MorphologyHanReadingsExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2022 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/MorphologyLemmasExample.java b/examples/src/main/java/com/basistech/rosette/examples/MorphologyLemmasExample.java index f01d81b84..8dc75784f 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/MorphologyLemmasExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/MorphologyLemmasExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2022 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/MorphologyPartsOfSpeechExample.java b/examples/src/main/java/com/basistech/rosette/examples/MorphologyPartsOfSpeechExample.java index 4bd578fe9..477f9921f 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/MorphologyPartsOfSpeechExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/MorphologyPartsOfSpeechExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2022 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/NameDeduplicationExample.java b/examples/src/main/java/com/basistech/rosette/examples/NameDeduplicationExample.java index 51828f98a..4a872ceab 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/NameDeduplicationExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/NameDeduplicationExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2022 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/NameSimilarityExample.java b/examples/src/main/java/com/basistech/rosette/examples/NameSimilarityExample.java index fbb9cebaa..0718fc348 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/NameSimilarityExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/NameSimilarityExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2022 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/NameTranslationExample.java b/examples/src/main/java/com/basistech/rosette/examples/NameTranslationExample.java index bb78344d8..cf6d9014a 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/NameTranslationExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/NameTranslationExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2022 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/RelationshipsExample.java b/examples/src/main/java/com/basistech/rosette/examples/RelationshipsExample.java index 18dfdff07..0e2031b66 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/RelationshipsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/RelationshipsExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2022 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/SemanticVectorsExample.java b/examples/src/main/java/com/basistech/rosette/examples/SemanticVectorsExample.java index b1039dcb9..b635bd3ca 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/SemanticVectorsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/SemanticVectorsExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2019-2022 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/SentencesExample.java b/examples/src/main/java/com/basistech/rosette/examples/SentencesExample.java index 6de67a056..76c29f49d 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/SentencesExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/SentencesExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2022 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/SentimentExample.java b/examples/src/main/java/com/basistech/rosette/examples/SentimentExample.java index 334e41013..7e7688c04 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/SentimentExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/SentimentExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2022 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/SimilarTermsExample.java b/examples/src/main/java/com/basistech/rosette/examples/SimilarTermsExample.java index 9b0a893a2..a0bf6ab28 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/SimilarTermsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/SimilarTermsExample.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2022 Basis Technology Corp. + * Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/SyntaxDependenciesExample.java b/examples/src/main/java/com/basistech/rosette/examples/SyntaxDependenciesExample.java index fbfbc50ff..12e49b5ce 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/SyntaxDependenciesExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/SyntaxDependenciesExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2022 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/TokensExample.java b/examples/src/main/java/com/basistech/rosette/examples/TokensExample.java index 0c1adae49..cd421daa8 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/TokensExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/TokensExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2022 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/TopicsExample.java b/examples/src/main/java/com/basistech/rosette/examples/TopicsExample.java index c268d9360..d8dd35730 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/TopicsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/TopicsExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2022 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/TransliterationExample.java b/examples/src/main/java/com/basistech/rosette/examples/TransliterationExample.java index d2bc48ca9..2db569266 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/TransliterationExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/TransliterationExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2022 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/AddressMixin.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/AddressMixin.java index e68db9b27..c1e21f2fa 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/AddressMixin.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/AddressMixin.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2022 Basis Technology Corp. + * Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/AddressSimilarityRequestMixin.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/AddressSimilarityRequestMixin.java index bbb13da69..bb391655f 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/AddressSimilarityRequestMixin.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/AddressSimilarityRequestMixin.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2022 Basis Technology Corp. + * Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,7 +36,7 @@ protected AddressSimilarityRequestMixin( @JsonProperty("address1") IAddress address1, @JsonProperty("address2") IAddress address2, @JsonProperty("parameters") Map parameters - ) { + ) { // } diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/AdmRequestMixin.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/AdmRequestMixin.java index 81ca3989b..cb39a3600 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/AdmRequestMixin.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/AdmRequestMixin.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2022 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/ConfigurationRequestMixin.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/ConfigurationRequestMixin.java index 909475938..09400fec8 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/ConfigurationRequestMixin.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/ConfigurationRequestMixin.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2022 Basis Technology Corp. + * Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/DocumentRequestMixin.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/DocumentRequestMixin.java index 8cd33d90c..2cc5fd17b 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/DocumentRequestMixin.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/DocumentRequestMixin.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2022 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/FieldedAddressMixin.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/FieldedAddressMixin.java index 97fbc8d94..a288b7918 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/FieldedAddressMixin.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/FieldedAddressMixin.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2022 Basis Technology Corp. + * Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/NameDeduplicationRequestMixin.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/NameDeduplicationRequestMixin.java index 3eac87621..0a07ca1f6 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/NameDeduplicationRequestMixin.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/NameDeduplicationRequestMixin.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2022 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/NameSimilarityRequestMixin.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/NameSimilarityRequestMixin.java index 104a4488e..7dac7d791 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/NameSimilarityRequestMixin.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/NameSimilarityRequestMixin.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2022 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/NameTranslationRequestMixin.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/NameTranslationRequestMixin.java index e244a298f..b36da04cc 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/NameTranslationRequestMixin.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/NameTranslationRequestMixin.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2022 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/UnfieldedAddressMixin.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/UnfieldedAddressMixin.java index 98f97f450..2a2bd6223 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/UnfieldedAddressMixin.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/UnfieldedAddressMixin.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2022 Basis Technology Corp. + * Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/json/src/test/java/com/basistech/rosette/apimodel/ModelTest.java b/json/src/test/java/com/basistech/rosette/apimodel/ModelTest.java index ebd7318b7..40911c120 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/ModelTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/ModelTest.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2022 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,6 +45,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.fail; +@SuppressWarnings("PMD.UnusedPrivateMethod") // Parameterized Tests class ModelTest { private ObjectMapper mapper; diff --git a/json/src/test/java/com/basistech/rosette/apimodel/NonNullTest.java b/json/src/test/java/com/basistech/rosette/apimodel/NonNullTest.java index 9eef3ee60..fc9b793fa 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/NonNullTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/NonNullTest.java @@ -1,5 +1,5 @@ /* -* Copyright 2014-2022 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,6 +35,7 @@ import static org.junit.jupiter.api.Assertions.assertFalse; +@SuppressWarnings("PMD.UnusedPrivateMethod") // Parameterized Tests class NonNullTest { private ObjectMapper mapper; diff --git a/json/src/test/java/com/basistech/rosette/apimodel/PolymorphicRequestTest.java b/json/src/test/java/com/basistech/rosette/apimodel/PolymorphicRequestTest.java index dc5da3710..1b9fc03e3 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/PolymorphicRequestTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/PolymorphicRequestTest.java @@ -1,5 +1,5 @@ /* -* Copyright 2014-2022 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/model/src/main/java/com/basistech/rosette/apimodel/Address.java b/model/src/main/java/com/basistech/rosette/apimodel/Address.java index 9043824db..501a89554 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/Address.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/Address.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2022 Basis Technology Corp. + * Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/model/src/main/java/com/basistech/rosette/apimodel/CommonRosetteAPIException.java b/model/src/main/java/com/basistech/rosette/apimodel/CommonRosetteAPIException.java index ec4506411..2cf9dfd90 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/CommonRosetteAPIException.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/CommonRosetteAPIException.java @@ -21,7 +21,7 @@ * Exception from the Rosette API inherit from this exception. */ public class CommonRosetteAPIException extends RosetteRuntimeException { - private final ErrorResponse errorResponse; + private final transient ErrorResponse errorResponse; public CommonRosetteAPIException(ErrorResponse errorResponse) { this.errorResponse = errorResponse; diff --git a/model/src/main/java/com/basistech/rosette/apimodel/EntitiesOptions.java b/model/src/main/java/com/basistech/rosette/apimodel/EntitiesOptions.java index 96e9ddf80..11422d2f9 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/EntitiesOptions.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/EntitiesOptions.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2022 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/model/src/main/java/com/basistech/rosette/apimodel/Entity.java b/model/src/main/java/com/basistech/rosette/apimodel/Entity.java index 8ca3655e6..33d74de26 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/Entity.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/Entity.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2022 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/model/src/main/java/com/basistech/rosette/apimodel/LanguageOptions.java b/model/src/main/java/com/basistech/rosette/apimodel/LanguageOptions.java index dd1a8e05e..5007c3674 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/LanguageOptions.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/LanguageOptions.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2022 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/model/src/main/java/com/basistech/rosette/apimodel/Name.java b/model/src/main/java/com/basistech/rosette/apimodel/Name.java index c9bfcb388..1df293b5b 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/Name.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/Name.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2022 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/model/src/main/java/com/basistech/rosette/apimodel/NameDeduplicationRequest.java b/model/src/main/java/com/basistech/rosette/apimodel/NameDeduplicationRequest.java index 89b68f1e9..8856913f3 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/NameDeduplicationRequest.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/NameDeduplicationRequest.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2022 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/model/src/main/java/com/basistech/rosette/apimodel/NameSimilarityRequest.java b/model/src/main/java/com/basistech/rosette/apimodel/NameSimilarityRequest.java index 1e54abc24..866463f50 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/NameSimilarityRequest.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/NameSimilarityRequest.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2022 Basis Technology Corp. +* Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/model/src/main/java/com/basistech/rosette/apimodel/UnfieldedAddress.java b/model/src/main/java/com/basistech/rosette/apimodel/UnfieldedAddress.java index aa055710d..e2be3e2bd 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/UnfieldedAddress.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/UnfieldedAddress.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 Basis Technology Corp. + * Copyright 2022 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,14 +26,14 @@ public class UnfieldedAddress implements IAddress { /** * return the address */ - public final String address; + String address; + + public UnfieldedAddress(String address) { + this.address = address; + } @Override public boolean fielded() { return false; } - - public UnfieldedAddress(String address) { - this.address = address; - } } diff --git a/pom.xml b/pom.xml index 79576e12c..586c20797 100644 --- a/pom.xml +++ b/pom.xml @@ -102,6 +102,14 @@ + + org.apache.maven.plugins + maven-checkstyle-plugin + + + org.apache.maven.plugins + maven-pmd-plugin + org.apache.maven.plugins maven-clean-plugin From 9e5153d7d8a89afa9284fe72782c0e4d4388e3cc Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Fri, 28 Oct 2022 13:32:36 -0500 Subject: [PATCH 132/415] WS-2609: Remove Travis badge. --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index bb65eff24..067e71300 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@ --- -[![Build Status](https://travis-ci.org/rosette-api/java.svg?branch=master)](https://travis-ci.org/rosette-api/java) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.basistech.rosette/rosette-api/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.basistech.rosette/rosette-api-java-binding) ## Rosette API From 807d9147421f27e52dd2849579121fa63f7dab0d Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Fri, 28 Oct 2022 15:45:44 -0500 Subject: [PATCH 133/415] NO-JIRA: Run sonar at the same time as other targets. This is recommended. CHANGE vars are null for a branch build. Try without. --- CI.Jenkinsfile | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/CI.Jenkinsfile b/CI.Jenkinsfile index ce211a990..6d8d45582 100644 --- a/CI.Jenkinsfile +++ b/CI.Jenkinsfile @@ -17,13 +17,9 @@ node ("docker-light") { bash -c \"apt-get update && \ apt-get install -y git && \ pushd /source && \ - /opt/maven-basis/bin/mvn --batch-mode clean install && \ - /opt/maven-basis/bin/mvn --batch-mode sonar:sonar \ + /opt/maven-basis/bin/mvn --batch-mode clean install sonar:sonar \ -Dsonar.login=${env.SONAR_AUTH_TOKEN} \ - -Dsonar.host.url=${env.SONAR_HOST_URL} \ - -Dsonar.pullrequest.key=${env.CHANGE_ID} \ - -Dsonar.pullrequest.base=${env.CHANGE_TARGET} \ - -Dsonar.pullrequest.branch=${env.CHANGE_BRANCH}\"" + -Dsonar.host.url=${env.SONAR_HOST_URL}\"" } } slack(true) From beccbf7b1a3aaba7914cefdd4be9d5e25db25934 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Fri, 28 Oct 2022 16:20:33 -0500 Subject: [PATCH 134/415] NO-JIRA: OSGI Test to use JUnit 5. Add Sonar exclusion. --- osgi-itests/pom.xml | 6 ++++++ .../com/basistech/rosette/osgi/it/RosetteApiOsgiTest.java | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 89b3445ea..48de8ae00 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -16,6 +16,12 @@ rosette-api 1.23.1-SNAPSHOT + + org.junit.jupiter + junit-jupiter-api + ${junit.version} + provided + diff --git a/osgi-itests/src/main/java/com/basistech/rosette/osgi/it/RosetteApiOsgiTest.java b/osgi-itests/src/main/java/com/basistech/rosette/osgi/it/RosetteApiOsgiTest.java index 7dbe5e417..318499f0f 100644 --- a/osgi-itests/src/main/java/com/basistech/rosette/osgi/it/RosetteApiOsgiTest.java +++ b/osgi-itests/src/main/java/com/basistech/rosette/osgi/it/RosetteApiOsgiTest.java @@ -17,10 +17,11 @@ package com.basistech.rosette.osgi.it; import com.basistech.rosette.api.HttpRosetteAPI; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNotNull; +@SuppressWarnings("java:S5960") // This is a test class. public class RosetteApiOsgiTest { @Test public void smokeTest() { From cda945e98a760c929b1a3ab21f2add65b3264cdc Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Fri, 28 Oct 2022 16:46:29 -0500 Subject: [PATCH 135/415] NO-JIRA: OSGI test is not happy with JUnit 5. --- osgi-itests/pom.xml | 6 ------ .../com/basistech/rosette/osgi/it/RosetteApiOsgiTest.java | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 48de8ae00..89b3445ea 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -16,12 +16,6 @@ rosette-api 1.23.1-SNAPSHOT - - org.junit.jupiter - junit-jupiter-api - ${junit.version} - provided - diff --git a/osgi-itests/src/main/java/com/basistech/rosette/osgi/it/RosetteApiOsgiTest.java b/osgi-itests/src/main/java/com/basistech/rosette/osgi/it/RosetteApiOsgiTest.java index 318499f0f..11ff75ac0 100644 --- a/osgi-itests/src/main/java/com/basistech/rosette/osgi/it/RosetteApiOsgiTest.java +++ b/osgi-itests/src/main/java/com/basistech/rosette/osgi/it/RosetteApiOsgiTest.java @@ -17,9 +17,9 @@ package com.basistech.rosette.osgi.it; import com.basistech.rosette.api.HttpRosetteAPI; -import org.junit.jupiter.api.Test; +import org.junit.Test; -import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.Assert.assertNotNull; @SuppressWarnings("java:S5960") // This is a test class. public class RosetteApiOsgiTest { From 62fa93b35d14d7236b35549dcbc2709e6f256451 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Fri, 28 Oct 2022 16:58:51 -0500 Subject: [PATCH 136/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.23.100 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 1a9b0222e..849d3ebb7 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.1-SNAPSHOT + 1.23.100 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 6a5d3b82f..ee99bd257 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.1-SNAPSHOT + 1.23.100 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 4ce9ff360..f65f22a63 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.1-SNAPSHOT + 1.23.100 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 99aabe886..83836cdcc 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.1-SNAPSHOT + 1.23.100 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 5de457679..7adbc97da 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.1-SNAPSHOT + 1.23.100 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 52c342837..2094beadd 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.1-SNAPSHOT + 1.23.100 rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 89b3445ea..806d03609 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.1-SNAPSHOT + 1.23.100 target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.23.1-SNAPSHOT + 1.23.100 diff --git a/pom.xml b/pom.xml index 586c20797..999c6b14c 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.23.1-SNAPSHOT + 1.23.100 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - HEAD + rosette-api-java-binding-1.23.100 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 7e3c70d5b..374ebcbd3 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.1-SNAPSHOT + 1.23.100 com.basistech.rosette rosette-api-release From 8884415b2e80504bd3017a47030cbea9b42ac3be Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Fri, 28 Oct 2022 16:59:09 -0500 Subject: [PATCH 137/415] [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 849d3ebb7..e0b92dd8d 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.100 + 1.23.101-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index ee99bd257..300563916 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.100 + 1.23.101-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index f65f22a63..566ee361d 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.100 + 1.23.101-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 83836cdcc..e8b0d4e38 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.100 + 1.23.101-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 7adbc97da..e1707d9a7 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.100 + 1.23.101-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 2094beadd..92772c675 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.100 + 1.23.101-SNAPSHOT rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 806d03609..24e0642e8 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.100 + 1.23.101-SNAPSHOT target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.23.100 + 1.23.101-SNAPSHOT diff --git a/pom.xml b/pom.xml index 999c6b14c..fc5d4f9f7 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.23.100 + 1.23.101-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.23.100 + HEAD This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 374ebcbd3..cc3e3e594 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.100 + 1.23.101-SNAPSHOT com.basistech.rosette rosette-api-release From 0f3204a3251677c02491ec3b1e72d9b4c1396cf4 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Mon, 31 Oct 2022 11:41:38 -0500 Subject: [PATCH 138/415] NO-JIRA: Suppress log-or-rethrow, exception sub-type and use-logger code smells. --- .../com/basistech/rosette/examples/AddressSimilarityExample.java | 1 + .../java/com/basistech/rosette/examples/CategoriesExample.java | 1 + .../java/com/basistech/rosette/examples/EntitiesExample.java | 1 + .../main/java/com/basistech/rosette/examples/InfoExample.java | 1 + .../java/com/basistech/rosette/examples/LanguageExample.java | 1 + .../basistech/rosette/examples/LanguageMultilingualExample.java | 1 + .../basistech/rosette/examples/MorphologyCompleteExample.java | 1 + .../rosette/examples/MorphologyCompoundComponentsExample.java | 1 + .../basistech/rosette/examples/MorphologyHanReadingsExample.java | 1 + .../com/basistech/rosette/examples/MorphologyLemmasExample.java | 1 + .../rosette/examples/MorphologyPartsOfSpeechExample.java | 1 + .../com/basistech/rosette/examples/NameDeduplicationExample.java | 1 + .../com/basistech/rosette/examples/NameSimilarityExample.java | 1 + .../com/basistech/rosette/examples/NameTranslationExample.java | 1 + .../main/java/com/basistech/rosette/examples/PingExample.java | 1 + .../com/basistech/rosette/examples/RelationshipsExample.java | 1 + .../com/basistech/rosette/examples/SemanticVectorsExample.java | 1 + .../java/com/basistech/rosette/examples/SentencesExample.java | 1 + .../java/com/basistech/rosette/examples/SentimentExample.java | 1 + .../java/com/basistech/rosette/examples/SimilarTermsExample.java | 1 + .../basistech/rosette/examples/SyntaxDependenciesExample.java | 1 + .../main/java/com/basistech/rosette/examples/TokensExample.java | 1 + 22 files changed, 22 insertions(+) diff --git a/examples/src/main/java/com/basistech/rosette/examples/AddressSimilarityExample.java b/examples/src/main/java/com/basistech/rosette/examples/AddressSimilarityExample.java index 90113194e..718a1583b 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/AddressSimilarityExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/AddressSimilarityExample.java @@ -29,6 +29,7 @@ /** * Example which demonstrates address similarity */ +@SuppressWarnings({"java:S1166", "java:S2221", "java:S106"}) public final class AddressSimilarityExample extends ExampleBase { public static void main(String[] args) { try { diff --git a/examples/src/main/java/com/basistech/rosette/examples/CategoriesExample.java b/examples/src/main/java/com/basistech/rosette/examples/CategoriesExample.java index e8d088808..75f35b668 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/CategoriesExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/CategoriesExample.java @@ -30,6 +30,7 @@ * Gets QAG categories (http://www.iab.net/QAGInitiative/overview/taxonomy) of a web page document * located at http://www.basistech.com/about */ +@SuppressWarnings({"java:S1166", "java:S2221", "java:S106"}) public final class CategoriesExample extends ExampleBase { public static void main(String[] args) { try { diff --git a/examples/src/main/java/com/basistech/rosette/examples/EntitiesExample.java b/examples/src/main/java/com/basistech/rosette/examples/EntitiesExample.java index 4888ed0ae..283d36d60 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/EntitiesExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/EntitiesExample.java @@ -27,6 +27,7 @@ /** * Example which demonstrates the entity extraction api. */ +@SuppressWarnings({"java:S1166", "java:S2221", "java:S106"}) public final class EntitiesExample extends ExampleBase { public static void main(String[] args) { try { diff --git a/examples/src/main/java/com/basistech/rosette/examples/InfoExample.java b/examples/src/main/java/com/basistech/rosette/examples/InfoExample.java index 30c3fd5db..2c6b5c6f1 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/InfoExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/InfoExample.java @@ -23,6 +23,7 @@ /** * Example which demonstrates the top level info api. */ +@SuppressWarnings({"java:S1166", "java:S2221", "java:S106"}) public final class InfoExample extends ExampleBase { public static void main(String[] args) { try { diff --git a/examples/src/main/java/com/basistech/rosette/examples/LanguageExample.java b/examples/src/main/java/com/basistech/rosette/examples/LanguageExample.java index 985fa3e5a..9690034cd 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/LanguageExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/LanguageExample.java @@ -27,6 +27,7 @@ /** * Example which demonstrates the language detection api. */ +@SuppressWarnings({"java:S1166", "java:S2221", "java:S106"}) public final class LanguageExample extends ExampleBase { public static void main(String[] args) { try { diff --git a/examples/src/main/java/com/basistech/rosette/examples/LanguageMultilingualExample.java b/examples/src/main/java/com/basistech/rosette/examples/LanguageMultilingualExample.java index 51fbb6e5b..7fbe724d3 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/LanguageMultilingualExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/LanguageMultilingualExample.java @@ -27,6 +27,7 @@ /** * Example which demonstrates the language detection api with the multilingual option. */ +@SuppressWarnings({"java:S1166", "java:S2221", "java:S106"}) public final class LanguageMultilingualExample extends ExampleBase { public static void main(String[] args) { try { diff --git a/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompleteExample.java b/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompleteExample.java index 87939e6fe..a60fea15e 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompleteExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompleteExample.java @@ -28,6 +28,7 @@ /** * Example which demonstrates the complete morphology api. */ +@SuppressWarnings({"java:S1166", "java:S2221", "java:S106"}) public final class MorphologyCompleteExample extends ExampleBase { public static void main(String[] args) { try { diff --git a/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompoundComponentsExample.java b/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompoundComponentsExample.java index 8eb1d8b62..1b0f83e57 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompoundComponentsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompoundComponentsExample.java @@ -29,6 +29,7 @@ /** * Example which demonstrates the decompounding api. */ +@SuppressWarnings({"java:S1166", "java:S2221", "java:S106"}) public final class MorphologyCompoundComponentsExample extends ExampleBase { public static void main(String[] args) { try { diff --git a/examples/src/main/java/com/basistech/rosette/examples/MorphologyHanReadingsExample.java b/examples/src/main/java/com/basistech/rosette/examples/MorphologyHanReadingsExample.java index 60bc04a2a..4e43b98ef 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/MorphologyHanReadingsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/MorphologyHanReadingsExample.java @@ -28,6 +28,7 @@ /** * Example which demonstrates the han readings api. */ +@SuppressWarnings({"java:S1166", "java:S2221", "java:S106"}) public final class MorphologyHanReadingsExample extends ExampleBase { public static void main(String[] args) { try { diff --git a/examples/src/main/java/com/basistech/rosette/examples/MorphologyLemmasExample.java b/examples/src/main/java/com/basistech/rosette/examples/MorphologyLemmasExample.java index 8dc75784f..78f87352b 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/MorphologyLemmasExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/MorphologyLemmasExample.java @@ -28,6 +28,7 @@ /** * Example which demonstrates the lemmas api. */ +@SuppressWarnings({"java:S1166", "java:S2221", "java:S106"}) public final class MorphologyLemmasExample extends ExampleBase { public static void main(String[] args) { try { diff --git a/examples/src/main/java/com/basistech/rosette/examples/MorphologyPartsOfSpeechExample.java b/examples/src/main/java/com/basistech/rosette/examples/MorphologyPartsOfSpeechExample.java index 477f9921f..36a7b40be 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/MorphologyPartsOfSpeechExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/MorphologyPartsOfSpeechExample.java @@ -28,6 +28,7 @@ /** * Example which demonstrates the part-of-speech api. */ +@SuppressWarnings({"java:S1166", "java:S2221", "java:S106"}) public final class MorphologyPartsOfSpeechExample extends ExampleBase { public static void main(String[] args) { try { diff --git a/examples/src/main/java/com/basistech/rosette/examples/NameDeduplicationExample.java b/examples/src/main/java/com/basistech/rosette/examples/NameDeduplicationExample.java index 4a872ceab..bfb1d3e4f 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/NameDeduplicationExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/NameDeduplicationExample.java @@ -30,6 +30,7 @@ /** * Example which demonstrates name deduplication. */ +@SuppressWarnings({"java:S1166", "java:S2221", "java:S106"}) public final class NameDeduplicationExample extends ExampleBase { public static void main(String[] args) { try { diff --git a/examples/src/main/java/com/basistech/rosette/examples/NameSimilarityExample.java b/examples/src/main/java/com/basistech/rosette/examples/NameSimilarityExample.java index 0718fc348..684bf53c7 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/NameSimilarityExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/NameSimilarityExample.java @@ -29,6 +29,7 @@ /** * Example which demonstrates name similarity. */ +@SuppressWarnings({"java:S1166", "java:S2221", "java:S106"}) public final class NameSimilarityExample extends ExampleBase { public static void main(String[] args) { try { diff --git a/examples/src/main/java/com/basistech/rosette/examples/NameTranslationExample.java b/examples/src/main/java/com/basistech/rosette/examples/NameTranslationExample.java index cf6d9014a..f695dfcec 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/NameTranslationExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/NameTranslationExample.java @@ -27,6 +27,7 @@ /** * Example which demonstrates the name translation api. */ +@SuppressWarnings({"java:S1166", "java:S2221", "java:S106"}) public final class NameTranslationExample extends ExampleBase { public static void main(String[] args) { try { diff --git a/examples/src/main/java/com/basistech/rosette/examples/PingExample.java b/examples/src/main/java/com/basistech/rosette/examples/PingExample.java index 1731174f9..1e357e691 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/PingExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/PingExample.java @@ -23,6 +23,7 @@ /** * Example which demonstrates the ping api. */ +@SuppressWarnings({"java:S1166", "java:S2221", "java:S106"}) public final class PingExample extends ExampleBase { public static void main(String[] args) { try { diff --git a/examples/src/main/java/com/basistech/rosette/examples/RelationshipsExample.java b/examples/src/main/java/com/basistech/rosette/examples/RelationshipsExample.java index 0e2031b66..6cd5dcdff 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/RelationshipsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/RelationshipsExample.java @@ -27,6 +27,7 @@ /** * Example which demonstrates the relationships extraction api. */ +@SuppressWarnings({"java:S1166", "java:S2221", "java:S106"}) public final class RelationshipsExample extends ExampleBase { public static void main(String[] args) { try { diff --git a/examples/src/main/java/com/basistech/rosette/examples/SemanticVectorsExample.java b/examples/src/main/java/com/basistech/rosette/examples/SemanticVectorsExample.java index b635bd3ca..85075a32e 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/SemanticVectorsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/SemanticVectorsExample.java @@ -27,6 +27,7 @@ /** * Example which demonstrates semantic-vectors. */ +@SuppressWarnings({"java:S1166", "java:S2221", "java:S106"}) public final class SemanticVectorsExample extends ExampleBase { public static void main(String[] args) { try { diff --git a/examples/src/main/java/com/basistech/rosette/examples/SentencesExample.java b/examples/src/main/java/com/basistech/rosette/examples/SentencesExample.java index 76c29f49d..b5441c00e 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/SentencesExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/SentencesExample.java @@ -26,6 +26,7 @@ /** * Example which demonstrates the sentence detection api. */ +@SuppressWarnings({"java:S1166", "java:S2221", "java:S106"}) public final class SentencesExample extends ExampleBase { public static void main(String[] args) { try { diff --git a/examples/src/main/java/com/basistech/rosette/examples/SentimentExample.java b/examples/src/main/java/com/basistech/rosette/examples/SentimentExample.java index 7e7688c04..1f7cf7770 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/SentimentExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/SentimentExample.java @@ -32,6 +32,7 @@ /** * Example which demonstrates the sentiment api. */ +@SuppressWarnings({"java:S1166", "java:S2221", "java:S106"}) public final class SentimentExample extends ExampleBase { public static void main(String[] args) { try { diff --git a/examples/src/main/java/com/basistech/rosette/examples/SimilarTermsExample.java b/examples/src/main/java/com/basistech/rosette/examples/SimilarTermsExample.java index a0bf6ab28..fa7888fd8 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/SimilarTermsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/SimilarTermsExample.java @@ -30,6 +30,7 @@ /** * Example which demonstrates the similar terms api */ +@SuppressWarnings({"java:S1166", "java:S2221", "java:S106"}) public final class SimilarTermsExample extends ExampleBase { public static void main(String[] args) { try { diff --git a/examples/src/main/java/com/basistech/rosette/examples/SyntaxDependenciesExample.java b/examples/src/main/java/com/basistech/rosette/examples/SyntaxDependenciesExample.java index 12e49b5ce..b0866ae47 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/SyntaxDependenciesExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/SyntaxDependenciesExample.java @@ -26,6 +26,7 @@ /** * Example which demonstrates the syntax dependencies endpoint of the Rosette api. */ +@SuppressWarnings({"java:S1166", "java:S2221", "java:S106"}) public final class SyntaxDependenciesExample extends ExampleBase { public static void main(String[] args) { try { diff --git a/examples/src/main/java/com/basistech/rosette/examples/TokensExample.java b/examples/src/main/java/com/basistech/rosette/examples/TokensExample.java index cd421daa8..168f4cf0f 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/TokensExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/TokensExample.java @@ -26,6 +26,7 @@ /** * Example which demonstrates the tokens api. */ +@SuppressWarnings({"java:S1166", "java:S2221", "java:S106"}) public final class TokensExample extends ExampleBase { public static void main(String[] args) { try { From cdbc8fa68089a5a29fe9bd9c7a13e55c6c6eb5f2 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Mon, 31 Oct 2022 12:27:07 -0500 Subject: [PATCH 139/415] NO-JIRA: Attempt to deal with Sonar branch options since they dont pass through to the container cleanly. --- CI.Jenkinsfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CI.Jenkinsfile b/CI.Jenkinsfile index 6d8d45582..58a026743 100644 --- a/CI.Jenkinsfile +++ b/CI.Jenkinsfile @@ -17,9 +17,12 @@ node ("docker-light") { bash -c \"apt-get update && \ apt-get install -y git && \ pushd /source && \ - /opt/maven-basis/bin/mvn --batch-mode clean install sonar:sonar \ - -Dsonar.login=${env.SONAR_AUTH_TOKEN} \ - -Dsonar.host.url=${env.SONAR_HOST_URL}\"" + MY_SONAR_OPTS=\"-Dsonar.login=${env.SONAR_AUTH_TOKEN} -Dsonar.host.url=${env.SONAR_HOST_URL}\" \ + if [[ ! -z ${env.CHANGE_BRANCH} ]]; then + MY_SONAR_OPTS+=-Dsonar.pullrequest.key=${env.CHANGE_ID} -Dsonar.pullrequest.base=${env.CHANGE_TARGET} -Dsonar.pullrequest.branch=${env.CHANGE_BRANCH} + fi \ + echo \"Sonar Options are: ${MY_SONAR_OPTS}\" \ + /opt/maven-basis/bin/mvn --batch-mode clean install sonar:sonar ${MY_SONAR_OPTS}\"" } } slack(true) From 1b809dd9e102cf92e7049ffc8b84e7e6bc44281d Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Mon, 31 Oct 2022 12:31:05 -0500 Subject: [PATCH 140/415] NO-JIRA: Line wrap. --- CI.Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CI.Jenkinsfile b/CI.Jenkinsfile index 58a026743..24b90f038 100644 --- a/CI.Jenkinsfile +++ b/CI.Jenkinsfile @@ -18,8 +18,8 @@ node ("docker-light") { apt-get install -y git && \ pushd /source && \ MY_SONAR_OPTS=\"-Dsonar.login=${env.SONAR_AUTH_TOKEN} -Dsonar.host.url=${env.SONAR_HOST_URL}\" \ - if [[ ! -z ${env.CHANGE_BRANCH} ]]; then - MY_SONAR_OPTS+=-Dsonar.pullrequest.key=${env.CHANGE_ID} -Dsonar.pullrequest.base=${env.CHANGE_TARGET} -Dsonar.pullrequest.branch=${env.CHANGE_BRANCH} + if [[ ! -z ${env.CHANGE_BRANCH} ]]; then \ + MY_SONAR_OPTS+=-Dsonar.pullrequest.key=${env.CHANGE_ID} -Dsonar.pullrequest.base=${env.CHANGE_TARGET} -Dsonar.pullrequest.branch=${env.CHANGE_BRANCH} \ fi \ echo \"Sonar Options are: ${MY_SONAR_OPTS}\" \ /opt/maven-basis/bin/mvn --batch-mode clean install sonar:sonar ${MY_SONAR_OPTS}\"" From e9d44514fd6223246f53d05c25347a4675e04d4b Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Mon, 31 Oct 2022 12:32:53 -0500 Subject: [PATCH 141/415] NO-JIRA: var reference. --- CI.Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CI.Jenkinsfile b/CI.Jenkinsfile index 24b90f038..c10b4ee99 100644 --- a/CI.Jenkinsfile +++ b/CI.Jenkinsfile @@ -17,11 +17,11 @@ node ("docker-light") { bash -c \"apt-get update && \ apt-get install -y git && \ pushd /source && \ - MY_SONAR_OPTS=\"-Dsonar.login=${env.SONAR_AUTH_TOKEN} -Dsonar.host.url=${env.SONAR_HOST_URL}\" \ + export MY_SONAR_OPTS=\"-Dsonar.login=${env.SONAR_AUTH_TOKEN} -Dsonar.host.url=${env.SONAR_HOST_URL}\" \ if [[ ! -z ${env.CHANGE_BRANCH} ]]; then \ MY_SONAR_OPTS+=-Dsonar.pullrequest.key=${env.CHANGE_ID} -Dsonar.pullrequest.base=${env.CHANGE_TARGET} -Dsonar.pullrequest.branch=${env.CHANGE_BRANCH} \ fi \ - echo \"Sonar Options are: ${MY_SONAR_OPTS}\" \ + echo \"Sonar Options are: ${env.MY_SONAR_OPTS}\" \ /opt/maven-basis/bin/mvn --batch-mode clean install sonar:sonar ${MY_SONAR_OPTS}\"" } } From 9a039e6085215002b28838ec7cdc941dac7b5587 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Mon, 31 Oct 2022 13:18:31 -0500 Subject: [PATCH 142/415] NO-JIRA: Report to Sonar correctly for both branch and PR builds. --- CI.Jenkinsfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CI.Jenkinsfile b/CI.Jenkinsfile index c10b4ee99..20583d365 100644 --- a/CI.Jenkinsfile +++ b/CI.Jenkinsfile @@ -9,6 +9,11 @@ node ("docker-light") { } stage("Maven Build") { withSonarQubeEnv { + mySonarOpts="-Dsonar.login=${env.SONAR_AUTH_TOKEN} -Dsonar.host.url=${env.SONAR_HOST_URL}" + if ("${env.CHANGE_BRANCH}") { + mySonarOpts="$mySonarOpts -Dsonar.pullrequest.key=${env.CHANGE_ID} -Dsonar.pullrequest.base=${env.CHANGE_TARGET} -Dsonar.pullrequest.branch=${env.CHANGE_BRANCH}" + } + echo("Sonar Options are: $mySonarOpts") sh "docker run --rm \ --pull always \ --volume ${sourceDir}:/source \ @@ -17,12 +22,7 @@ node ("docker-light") { bash -c \"apt-get update && \ apt-get install -y git && \ pushd /source && \ - export MY_SONAR_OPTS=\"-Dsonar.login=${env.SONAR_AUTH_TOKEN} -Dsonar.host.url=${env.SONAR_HOST_URL}\" \ - if [[ ! -z ${env.CHANGE_BRANCH} ]]; then \ - MY_SONAR_OPTS+=-Dsonar.pullrequest.key=${env.CHANGE_ID} -Dsonar.pullrequest.base=${env.CHANGE_TARGET} -Dsonar.pullrequest.branch=${env.CHANGE_BRANCH} \ - fi \ - echo \"Sonar Options are: ${env.MY_SONAR_OPTS}\" \ - /opt/maven-basis/bin/mvn --batch-mode clean install sonar:sonar ${MY_SONAR_OPTS}\"" + /opt/maven-basis/bin/mvn --batch-mode clean install sonar:sonar $mySonarOpts\"" } } slack(true) From 3cfbfeba408f958b5066e5d9cdab52b0cc73c982 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Mon, 31 Oct 2022 16:49:20 -0500 Subject: [PATCH 143/415] NO-JIRA: Add a few unit tests. --- .../rosette/examples/ExampleBase.java | 1 + .../rosette/apimodel/DocumentRequestTest.java | 67 +++++++++++++++++++ .../rosette/apimodel/EntitiesOptionsTest.java | 40 +++++++++++ .../apimodel/SentimentOptionsTest.java | 35 ++++++++++ 4 files changed, 143 insertions(+) create mode 100644 json/src/test/java/com/basistech/rosette/apimodel/DocumentRequestTest.java create mode 100644 json/src/test/java/com/basistech/rosette/apimodel/EntitiesOptionsTest.java create mode 100644 json/src/test/java/com/basistech/rosette/apimodel/SentimentOptionsTest.java diff --git a/examples/src/main/java/com/basistech/rosette/examples/ExampleBase.java b/examples/src/main/java/com/basistech/rosette/examples/ExampleBase.java index 981fb7455..781669fe1 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/ExampleBase.java +++ b/examples/src/main/java/com/basistech/rosette/examples/ExampleBase.java @@ -25,6 +25,7 @@ /** * Provides examples on how to use the {@link com.basistech.rosette.api.HttpRosetteAPI HttpRosetteAPI} */ +@SuppressWarnings("java:S106") public abstract class ExampleBase { private static final String KEY_PROP_NAME = "rosette.api.key"; private static final String URL_PROP_NAME = "rosette.api.altUrl"; diff --git a/json/src/test/java/com/basistech/rosette/apimodel/DocumentRequestTest.java b/json/src/test/java/com/basistech/rosette/apimodel/DocumentRequestTest.java new file mode 100644 index 000000000..b65d9ecb7 --- /dev/null +++ b/json/src/test/java/com/basistech/rosette/apimodel/DocumentRequestTest.java @@ -0,0 +1,67 @@ +/* + * Copyright 2022 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.basistech.rosette.apimodel; + +import org.junit.jupiter.api.Test; + +import java.io.ByteArrayInputStream; +import java.io.InputStream; +import java.nio.charset.StandardCharsets; + +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + +class DocumentRequestTest { + + @Test + void getContentString() { + String content = "expected"; + DocumentRequest request = DocumentRequest.builder() + .content(content) + .build(); + assertEquals(content, request.getContent()); + assertEquals(content, request.getRawContent()); + assertNull(request.getContentBytes()); + } + + @Test + void getContentBytes() { + String json = "{\"content\": \"My JSON content.\", \"language\": \"eng\"}"; + byte[] content = json.getBytes(StandardCharsets.UTF_8); + DocumentRequest request = DocumentRequest.builder() + .content(content, "application/json") + .build(); + + var actualRawContentInputStream = (ByteArrayInputStream) request.getRawContent(); + var actualRawContent = actualRawContentInputStream.readAllBytes(); + + assertArrayEquals(content, actualRawContent); + assertNull(request.getContent()); + } + + @Test + void getContentInputStream() { + InputStream content = new ByteArrayInputStream("expected".getBytes(StandardCharsets.UTF_8)); + DocumentRequest request = DocumentRequest.builder() + .content(content, "text/plain") + .build(); + assertEquals(content, request.getContentBytes()); + assertNull(request.getContent()); + assertEquals(content, request.getRawContent()); + } +} \ No newline at end of file diff --git a/json/src/test/java/com/basistech/rosette/apimodel/EntitiesOptionsTest.java b/json/src/test/java/com/basistech/rosette/apimodel/EntitiesOptionsTest.java new file mode 100644 index 000000000..c720c21cf --- /dev/null +++ b/json/src/test/java/com/basistech/rosette/apimodel/EntitiesOptionsTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.basistech.rosette.apimodel; + +import org.junit.jupiter.api.Test; + +import static com.basistech.rosette.apimodel.EntitiesOptions.DEFAULT; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class EntitiesOptionsTest { + + @Test + void builderDefaults() { + var entitiesOptions = DEFAULT; + assertNotNull(entitiesOptions); + + assertFalse(entitiesOptions.getCalculateConfidence()); + assertFalse(entitiesOptions.getCalculateSalience()); + assertTrue(entitiesOptions.getLinkEntities()); + assertEquals("statistical", entitiesOptions.getModelType()); + assertFalse(entitiesOptions.getEnableStructuredRegion()); + } +} \ No newline at end of file diff --git a/json/src/test/java/com/basistech/rosette/apimodel/SentimentOptionsTest.java b/json/src/test/java/com/basistech/rosette/apimodel/SentimentOptionsTest.java new file mode 100644 index 000000000..3d400d240 --- /dev/null +++ b/json/src/test/java/com/basistech/rosette/apimodel/SentimentOptionsTest.java @@ -0,0 +1,35 @@ +/* + * Copyright 2022 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.basistech.rosette.apimodel; + +import org.junit.jupiter.api.Test; + +import static com.basistech.rosette.apimodel.SentimentOptions.DEFAULT; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +class SentimentOptionsTest { + + @Test + void builderDefaults() { + var sentimentOptions = DEFAULT; + assertNotNull(sentimentOptions); + + assertFalse(sentimentOptions.getCalculateEntityConfidence()); + assertFalse(sentimentOptions.getCalculateEntitySalience()); + } +} \ No newline at end of file From 6755dee6f0fead52342b73498a731b8dc13f90f8 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Mon, 31 Oct 2022 16:58:31 -0500 Subject: [PATCH 144/415] NO-JIRA: New lines. --- .../com/basistech/rosette/apimodel/DocumentRequestTest.java | 2 +- .../com/basistech/rosette/apimodel/EntitiesOptionsTest.java | 2 +- .../com/basistech/rosette/apimodel/SentimentOptionsTest.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/json/src/test/java/com/basistech/rosette/apimodel/DocumentRequestTest.java b/json/src/test/java/com/basistech/rosette/apimodel/DocumentRequestTest.java index b65d9ecb7..017fef3bb 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/DocumentRequestTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/DocumentRequestTest.java @@ -64,4 +64,4 @@ void getContentInputStream() { assertNull(request.getContent()); assertEquals(content, request.getRawContent()); } -} \ No newline at end of file +} diff --git a/json/src/test/java/com/basistech/rosette/apimodel/EntitiesOptionsTest.java b/json/src/test/java/com/basistech/rosette/apimodel/EntitiesOptionsTest.java index c720c21cf..d480989cc 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/EntitiesOptionsTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/EntitiesOptionsTest.java @@ -37,4 +37,4 @@ void builderDefaults() { assertEquals("statistical", entitiesOptions.getModelType()); assertFalse(entitiesOptions.getEnableStructuredRegion()); } -} \ No newline at end of file +} diff --git a/json/src/test/java/com/basistech/rosette/apimodel/SentimentOptionsTest.java b/json/src/test/java/com/basistech/rosette/apimodel/SentimentOptionsTest.java index 3d400d240..159d12f18 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/SentimentOptionsTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/SentimentOptionsTest.java @@ -32,4 +32,4 @@ void builderDefaults() { assertFalse(sentimentOptions.getCalculateEntityConfidence()); assertFalse(sentimentOptions.getCalculateEntitySalience()); } -} \ No newline at end of file +} From 440507baedf685f0b45f8aaea36c3ce921061a06 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Mon, 31 Oct 2022 17:12:26 -0500 Subject: [PATCH 145/415] NO-JIRA: variable is returning null string so check that instead. --- CI.Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CI.Jenkinsfile b/CI.Jenkinsfile index 20583d365..309453e86 100644 --- a/CI.Jenkinsfile +++ b/CI.Jenkinsfile @@ -10,7 +10,7 @@ node ("docker-light") { stage("Maven Build") { withSonarQubeEnv { mySonarOpts="-Dsonar.login=${env.SONAR_AUTH_TOKEN} -Dsonar.host.url=${env.SONAR_HOST_URL}" - if ("${env.CHANGE_BRANCH}") { + if ("${env.CHANGE_BRANCH}" == "null") { mySonarOpts="$mySonarOpts -Dsonar.pullrequest.key=${env.CHANGE_ID} -Dsonar.pullrequest.base=${env.CHANGE_TARGET} -Dsonar.pullrequest.branch=${env.CHANGE_BRANCH}" } echo("Sonar Options are: $mySonarOpts") From 60e50aafe60ee6e5c8515269814615c957fa07c1 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Mon, 31 Oct 2022 17:14:11 -0500 Subject: [PATCH 146/415] NO-JIRA: Wrong equality check. --- CI.Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CI.Jenkinsfile b/CI.Jenkinsfile index 309453e86..36a152e1e 100644 --- a/CI.Jenkinsfile +++ b/CI.Jenkinsfile @@ -10,7 +10,7 @@ node ("docker-light") { stage("Maven Build") { withSonarQubeEnv { mySonarOpts="-Dsonar.login=${env.SONAR_AUTH_TOKEN} -Dsonar.host.url=${env.SONAR_HOST_URL}" - if ("${env.CHANGE_BRANCH}" == "null") { + if ("${env.CHANGE_BRANCH}" != "null") { mySonarOpts="$mySonarOpts -Dsonar.pullrequest.key=${env.CHANGE_ID} -Dsonar.pullrequest.base=${env.CHANGE_TARGET} -Dsonar.pullrequest.branch=${env.CHANGE_BRANCH}" } echo("Sonar Options are: $mySonarOpts") From 8b55667206c878aa0874227f613c3f0a8b1632b8 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Tue, 1 Nov 2022 13:38:55 -0500 Subject: [PATCH 147/415] NO-JIRA: Move new tests to correct sub-module. --- model/pom.xml | 6 ++++++ .../com/basistech/rosette/apimodel/DocumentRequestTest.java | 0 .../com/basistech/rosette/apimodel/EntitiesOptionsTest.java | 0 .../basistech/rosette/apimodel/SentimentOptionsTest.java | 0 4 files changed, 6 insertions(+) rename {json => model}/src/test/java/com/basistech/rosette/apimodel/DocumentRequestTest.java (100%) rename {json => model}/src/test/java/com/basistech/rosette/apimodel/EntitiesOptionsTest.java (100%) rename {json => model}/src/test/java/com/basistech/rosette/apimodel/SentimentOptionsTest.java (100%) diff --git a/model/pom.xml b/model/pom.xml index 92772c675..64b696f0a 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -69,6 +69,12 @@ jackson-databind provided + + org.junit.jupiter + junit-jupiter-api + ${junit.version} + test + diff --git a/json/src/test/java/com/basistech/rosette/apimodel/DocumentRequestTest.java b/model/src/test/java/com/basistech/rosette/apimodel/DocumentRequestTest.java similarity index 100% rename from json/src/test/java/com/basistech/rosette/apimodel/DocumentRequestTest.java rename to model/src/test/java/com/basistech/rosette/apimodel/DocumentRequestTest.java diff --git a/json/src/test/java/com/basistech/rosette/apimodel/EntitiesOptionsTest.java b/model/src/test/java/com/basistech/rosette/apimodel/EntitiesOptionsTest.java similarity index 100% rename from json/src/test/java/com/basistech/rosette/apimodel/EntitiesOptionsTest.java rename to model/src/test/java/com/basistech/rosette/apimodel/EntitiesOptionsTest.java diff --git a/json/src/test/java/com/basistech/rosette/apimodel/SentimentOptionsTest.java b/model/src/test/java/com/basistech/rosette/apimodel/SentimentOptionsTest.java similarity index 100% rename from json/src/test/java/com/basistech/rosette/apimodel/SentimentOptionsTest.java rename to model/src/test/java/com/basistech/rosette/apimodel/SentimentOptionsTest.java From 189f611d2e7a3d87cf83f34442ef095f2d698836 Mon Sep 17 00:00:00 2001 From: Yaison <> Date: Tue, 8 Nov 2022 19:22:39 -0400 Subject: [PATCH 148/415] WS-2589: marking genre as deprecated. --- .../apimodel/jackson/AdmRequestMixin.java | 2 +- .../jackson/DocumentRequestMixin.java | 2 +- .../rosette/apimodel/AdmRequest.java | 50 +++++++++------ .../rosette/apimodel/DocumentRequest.java | 63 ++++++++++++------- 4 files changed, 75 insertions(+), 42 deletions(-) diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/AdmRequestMixin.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/AdmRequestMixin.java index cb39a3600..6b4cc07bb 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/AdmRequestMixin.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/AdmRequestMixin.java @@ -36,7 +36,7 @@ protected AdmRequestMixin( @JsonProperty("profileId") String profileId, @JsonProperty("text") AnnotatedText text, @JsonProperty("options") Options options, - @JsonProperty("genre") String genre, + @Deprecated @JsonProperty("genre") String genre, @JsonProperty("language") LanguageCode language ) { // diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/DocumentRequestMixin.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/DocumentRequestMixin.java index 2cc5fd17b..6f3670cc4 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/DocumentRequestMixin.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/DocumentRequestMixin.java @@ -47,7 +47,7 @@ protected DocumentRequestMixin( @JsonProperty("content") Object content, @JsonProperty("contentUri") String contentUri, @JsonProperty("contentType") String contentType, - @JsonProperty("genre") String genre, + @Deprecated @JsonProperty("genre") String genre, @JsonProperty("options") Options options ) { // diff --git a/model/src/main/java/com/basistech/rosette/apimodel/AdmRequest.java b/model/src/main/java/com/basistech/rosette/apimodel/AdmRequest.java index ea2c21424..e189366b0 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/AdmRequest.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/AdmRequest.java @@ -1,18 +1,18 @@ /* -* Copyright 2017 Basis Technology Corp. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2017 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.basistech.rosette.apimodel; import com.basistech.rosette.dm.AnnotatedText; @@ -39,6 +39,7 @@ public final class AdmRequest extends Request { private final O options; /** + * @deprecated * @return genre */ private final String genre; @@ -48,12 +49,25 @@ public final class AdmRequest extends Request { */ private final LanguageCode language; + + public AdmRequest(String profileId, + AnnotatedText text, + O options, + LanguageCode language) { + super(profileId); + this.text = text; + this.options = options; + this.genre = null; + this.language = language; + } + + @Builder // workaround for inheritance https://github.com/rzwitserloot/lombok/issues/853 public AdmRequest(String profileId, - AnnotatedText text, - O options, - String genre, - LanguageCode language) { + AnnotatedText text, + O options, + @Deprecated String genre, + LanguageCode language) { super(profileId); this.text = text; this.options = options; diff --git a/model/src/main/java/com/basistech/rosette/apimodel/DocumentRequest.java b/model/src/main/java/com/basistech/rosette/apimodel/DocumentRequest.java index 5a7251b9d..3b5770385 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/DocumentRequest.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/DocumentRequest.java @@ -1,18 +1,18 @@ /* -* Copyright 2017 Basis Technology Corp. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2017 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.basistech.rosette.apimodel; @@ -44,9 +44,6 @@ * In this object the 'content' item is an {@link Object}; it contains a {@link String} * for plain text, or an {@link java.io.InputStream} for binary data. {@link DocumentRequest.DocumentRequestBuilder} * provides several alternative methods for setting this information. - * - * This class includes a 'genre' field. If no genre is specified, then the system - * applies generic processing. Valid values for genre are specified in the API documentation. */ @Value public final class DocumentRequest extends Request { @@ -71,7 +68,7 @@ public final class DocumentRequest extends Request { */ private final String contentType; - /** + /** @deprecated * @return request genre */ private final String genre; @@ -81,13 +78,29 @@ public final class DocumentRequest extends Request { */ private final O options; + + public DocumentRequest(String profileId, + LanguageCode language, + Object content, + String contentUri, + String contentType, + O options) { + super(profileId); + this.language = language; + this.content = content; + this.contentUri = contentUri; + this.contentType = contentType; + this.genre = null; + this.options = options; + } + @Builder // workaround for inheritance https://github.com/rzwitserloot/lombok/issues/853 public DocumentRequest(String profileId, LanguageCode language, Object content, String contentUri, String contentType, - String genre, + @Deprecated String genre, O options) { super(profileId); this.language = language; @@ -100,6 +113,7 @@ public DocumentRequest(String profileId, /** * get content to process if it's a String. + * * @return the content if a String, else null. */ public String getContent() { @@ -112,11 +126,12 @@ public String getContent() { /** * get the content as an array of bytes + * * @return the content as bytes */ public InputStream getContentBytes() { if (content instanceof InputStream) { - return (InputStream)content; + return (InputStream) content; } else { return null; } @@ -124,6 +139,7 @@ public InputStream getContentBytes() { /** * get content as an object + * * @return the content as object */ public Object getRawContent() { @@ -134,6 +150,7 @@ public Object getRawContent() { public static class DocumentRequestBuilder { /** * Specify the content as String. Use this for plain text. + * * @param data The data. * @return this. */ @@ -145,7 +162,8 @@ public DocumentRequestBuilder content(String data) { /** * Specify the content as bytes with a content type. Use this for * formats other than plain text. - * @param bytes The data. + * + * @param bytes The data. * @param contentType the content type. * @return this. */ @@ -158,7 +176,8 @@ public DocumentRequestBuilder content(byte[] bytes, String contentType) { /** * Specify the content as bytes with a content type. Use this for * formats other than plain text. - * @param bytes The data. + * + * @param bytes The data. * @param contentType the content type. * @return this. */ From 6ec4565d021af67b3c031ef570e92a39d55de864 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Mon, 14 Nov 2022 19:10:32 +0900 Subject: [PATCH 149/415] Add regexCurrenySplit option --- .../com/basistech/rosette/apimodel/EntitiesOptions.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/model/src/main/java/com/basistech/rosette/apimodel/EntitiesOptions.java b/model/src/main/java/com/basistech/rosette/apimodel/EntitiesOptions.java index 11422d2f9..a5ae7cf5a 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/EntitiesOptions.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/EntitiesOptions.java @@ -100,4 +100,11 @@ public class EntitiesOptions extends Options { * @return the structuredRegionProcessingType flag. Can be one of none, nerModel, nameClassifier */ String structuredRegionProcessingType; + + /** + * @return the regexCurrencySplit flag. + * If enabled, will cause MONEY regular expression entity extractions to be split into two: + * CURRENCY:AMT and CURRENCY:TYPE + */ + Boolean regexCurrencySplit; } From 131d18d01fc287f977dc0c861188ce3cc378a4c9 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Tue, 15 Nov 2022 13:10:40 -0600 Subject: [PATCH 150/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.23.101 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index e0b92dd8d..44bc440f6 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.101-SNAPSHOT + 1.23.101 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 300563916..cf86e1ad9 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.101-SNAPSHOT + 1.23.101 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 566ee361d..1b00ed89c 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.101-SNAPSHOT + 1.23.101 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index e8b0d4e38..41ea47091 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.101-SNAPSHOT + 1.23.101 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index e1707d9a7..1fc7c3b5f 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.101-SNAPSHOT + 1.23.101 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 92772c675..c66af525e 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.101-SNAPSHOT + 1.23.101 rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 24e0642e8..b11da05bd 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.101-SNAPSHOT + 1.23.101 target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.23.101-SNAPSHOT + 1.23.101 diff --git a/pom.xml b/pom.xml index fc5d4f9f7..37d3780b9 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.23.101-SNAPSHOT + 1.23.101 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - HEAD + rosette-api-java-binding-1.23.101 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index cc3e3e594..7d35c59bf 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.101-SNAPSHOT + 1.23.101 com.basistech.rosette rosette-api-release From fdf4e24ffb32d0710c0b130c5cfa2d8eb9ea9368 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Tue, 15 Nov 2022 13:10:43 -0600 Subject: [PATCH 151/415] [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 44bc440f6..f3d7b5fba 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.101 + 1.23.102-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index cf86e1ad9..e14fc2056 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.101 + 1.23.102-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 1b00ed89c..7b24580e3 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.101 + 1.23.102-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 41ea47091..3bf4b43a7 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.101 + 1.23.102-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 1fc7c3b5f..93bb524bc 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.101 + 1.23.102-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index c66af525e..e2dd3d130 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.101 + 1.23.102-SNAPSHOT rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index b11da05bd..a54cf1b3a 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.101 + 1.23.102-SNAPSHOT target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.23.101 + 1.23.102-SNAPSHOT diff --git a/pom.xml b/pom.xml index 37d3780b9..19cc4c237 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.23.101 + 1.23.102-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.23.101 + HEAD This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 7d35c59bf..909bb6f27 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.101 + 1.23.102-SNAPSHOT com.basistech.rosette rosette-api-release From e1c5f06e0ff22e6e21f97c4b02f9440eaa0de603 Mon Sep 17 00:00:00 2001 From: Yaison <> Date: Fri, 18 Nov 2022 20:14:06 -0400 Subject: [PATCH 152/415] WS-2589: moving @Deprecated from doc to field --- .../main/java/com/basistech/rosette/apimodel/AdmRequest.java | 2 +- .../java/com/basistech/rosette/apimodel/DocumentRequest.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/model/src/main/java/com/basistech/rosette/apimodel/AdmRequest.java b/model/src/main/java/com/basistech/rosette/apimodel/AdmRequest.java index e189366b0..3369a89da 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/AdmRequest.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/AdmRequest.java @@ -39,9 +39,9 @@ public final class AdmRequest extends Request { private final O options; /** - * @deprecated * @return genre */ + @Deprecated private final String genre; /** diff --git a/model/src/main/java/com/basistech/rosette/apimodel/DocumentRequest.java b/model/src/main/java/com/basistech/rosette/apimodel/DocumentRequest.java index 3b5770385..51904289a 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/DocumentRequest.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/DocumentRequest.java @@ -68,9 +68,10 @@ public final class DocumentRequest extends Request { */ private final String contentType; - /** @deprecated + /** * @return request genre */ + @Deprecated private final String genre; /** From ea98dd32aeaec49817ef940b9775c33a8b4823b6 Mon Sep 17 00:00:00 2001 From: David Corbett Date: Sat, 19 Nov 2022 14:20:36 -0500 Subject: [PATCH 153/415] COMN-287: Use parent POM 12.0.0 --- osgi-itests/pom.xml | 8 -------- pom.xml | 14 ++------------ 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index a54cf1b3a..832508627 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -20,14 +20,6 @@ - - - - com.basistech - common-api - ${bt-common-api.version} - - org.apache.felix diff --git a/pom.xml b/pom.xml index 19cc4c237..0bd46a82b 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ open-source-parent com.basistech - 7.0.1 + 12.0.0 pom @@ -41,12 +41,7 @@ - 1.0.1 - 6.2.0 - 2.7.3 - 37.0.1 - 0.8.8 3.3.0 1.9.4 1.15 @@ -60,12 +55,7 @@ 5.9.1 1.18.24 1.18.20.0 - 3.2.0 - 3.10.1 - 3.4.1 - 3.2.1 5.14.0 - 1.6.13 4.12.0 1.3.0 0.10.2 @@ -86,7 +76,7 @@ com.basistech common-api - ${bt-common-api.version} + ${bt-common-api-version} com.basistech From ef0eff39742d530d23fb6c5a52bfe27c4a63a439 Mon Sep 17 00:00:00 2001 From: Amit Seker Date: Sat, 26 Nov 2022 22:50:46 +0200 Subject: [PATCH 154/415] TEJ-1855: Remove all genre references. --- .../rosette/apimodel/jackson/AdmRequestMixin.java | 1 - .../rosette/apimodel/jackson/DocumentRequestMixin.java | 1 - .../java/com/basistech/rosette/apimodel/ModelTest.java | 1 - .../com/basistech/rosette/apimodel/AdmRequest.java | 7 ------- .../basistech/rosette/apimodel/DocumentRequest.java | 10 ---------- 5 files changed, 20 deletions(-) diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/AdmRequestMixin.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/AdmRequestMixin.java index cb39a3600..9d8cad03a 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/AdmRequestMixin.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/AdmRequestMixin.java @@ -36,7 +36,6 @@ protected AdmRequestMixin( @JsonProperty("profileId") String profileId, @JsonProperty("text") AnnotatedText text, @JsonProperty("options") Options options, - @JsonProperty("genre") String genre, @JsonProperty("language") LanguageCode language ) { // diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/DocumentRequestMixin.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/DocumentRequestMixin.java index 2cc5fd17b..971758500 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/DocumentRequestMixin.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/DocumentRequestMixin.java @@ -47,7 +47,6 @@ protected DocumentRequestMixin( @JsonProperty("content") Object content, @JsonProperty("contentUri") String contentUri, @JsonProperty("contentType") String contentType, - @JsonProperty("genre") String genre, @JsonProperty("options") Options options ) { // diff --git a/json/src/test/java/com/basistech/rosette/apimodel/ModelTest.java b/json/src/test/java/com/basistech/rosette/apimodel/ModelTest.java index 40911c120..9722c9471 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/ModelTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/ModelTest.java @@ -134,7 +134,6 @@ void packageTest(boolean inputStreams) throws ClassNotFoundException, IOExceptio o1 = DocumentRequest.builder() .profileId(r.getProfileId()) .language(r.getLanguage()) - .genre(r.getGenre()) .content(r.getContent()) .contentUri(r.getContentUri()) .options(r.getOptions()) diff --git a/model/src/main/java/com/basistech/rosette/apimodel/AdmRequest.java b/model/src/main/java/com/basistech/rosette/apimodel/AdmRequest.java index ea2c21424..a6b40bf6b 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/AdmRequest.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/AdmRequest.java @@ -38,11 +38,6 @@ public final class AdmRequest extends Request { */ private final O options; - /** - * @return genre - */ - private final String genre; - /** * @return language */ @@ -52,12 +47,10 @@ public final class AdmRequest extends Request { public AdmRequest(String profileId, AnnotatedText text, O options, - String genre, LanguageCode language) { super(profileId); this.text = text; this.options = options; - this.genre = genre; this.language = language; } } diff --git a/model/src/main/java/com/basistech/rosette/apimodel/DocumentRequest.java b/model/src/main/java/com/basistech/rosette/apimodel/DocumentRequest.java index 5a7251b9d..2a93125a9 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/DocumentRequest.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/DocumentRequest.java @@ -44,9 +44,6 @@ * In this object the 'content' item is an {@link Object}; it contains a {@link String} * for plain text, or an {@link java.io.InputStream} for binary data. {@link DocumentRequest.DocumentRequestBuilder} * provides several alternative methods for setting this information. - * - * This class includes a 'genre' field. If no genre is specified, then the system - * applies generic processing. Valid values for genre are specified in the API documentation. */ @Value public final class DocumentRequest extends Request { @@ -71,11 +68,6 @@ public final class DocumentRequest extends Request { */ private final String contentType; - /** - * @return request genre - */ - private final String genre; - /** * @return request options */ @@ -87,14 +79,12 @@ public DocumentRequest(String profileId, Object content, String contentUri, String contentType, - String genre, O options) { super(profileId); this.language = language; this.content = content; this.contentUri = contentUri; this.contentType = contentType; - this.genre = genre; this.options = options; } From b3561f44d3b68ee4eb2aec9f1a6c316a429a3af5 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Mon, 28 Nov 2022 14:43:08 -0600 Subject: [PATCH 155/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.23.102 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index f3d7b5fba..4bd92ed25 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.102-SNAPSHOT + 1.23.102 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index e14fc2056..81fe5220e 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.102-SNAPSHOT + 1.23.102 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 7b24580e3..3b3ead494 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.102-SNAPSHOT + 1.23.102 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 3bf4b43a7..a0d619d49 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.102-SNAPSHOT + 1.23.102 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 93bb524bc..161c8c9cc 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.102-SNAPSHOT + 1.23.102 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index e2dd3d130..e37e6fdeb 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.102-SNAPSHOT + 1.23.102 rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 832508627..5335bf0b1 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.102-SNAPSHOT + 1.23.102 target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.23.102-SNAPSHOT + 1.23.102 diff --git a/pom.xml b/pom.xml index 0bd46a82b..21e0dacc0 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.23.102-SNAPSHOT + 1.23.102 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - HEAD + rosette-api-java-binding-1.23.102 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 909bb6f27..5223a1989 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.102-SNAPSHOT + 1.23.102 com.basistech.rosette rosette-api-release From b7a8885221aafc40ccb83b34bf00111bd551dc38 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Mon, 28 Nov 2022 14:43:10 -0600 Subject: [PATCH 156/415] [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 4bd92ed25..322d638d1 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.102 + 1.23.103-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 81fe5220e..6a955bfbc 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.102 + 1.23.103-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 3b3ead494..25c95ff44 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.102 + 1.23.103-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index a0d619d49..36aaffc87 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.102 + 1.23.103-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 161c8c9cc..88301e6b0 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.102 + 1.23.103-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index e37e6fdeb..459fa6854 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.102 + 1.23.103-SNAPSHOT rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 5335bf0b1..6a86e3065 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.102 + 1.23.103-SNAPSHOT target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.23.102 + 1.23.103-SNAPSHOT diff --git a/pom.xml b/pom.xml index 21e0dacc0..94c12e1c8 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.23.102 + 1.23.103-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.23.102 + HEAD This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 5223a1989..f662ac4c5 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.102 + 1.23.103-SNAPSHOT com.basistech.rosette rosette-api-release From 4e2e88bf65206d53a1775c40a8fe36e4236dcba7 Mon Sep 17 00:00:00 2001 From: seth-basistech Date: Fri, 16 Dec 2022 13:01:50 -0600 Subject: [PATCH 157/415] Revert "TEJ-1855: Remove all genre references." --- .../rosette/apimodel/jackson/AdmRequestMixin.java | 1 + .../rosette/apimodel/jackson/DocumentRequestMixin.java | 1 + .../java/com/basistech/rosette/apimodel/ModelTest.java | 1 + .../com/basistech/rosette/apimodel/AdmRequest.java | 7 +++++++ .../basistech/rosette/apimodel/DocumentRequest.java | 10 ++++++++++ 5 files changed, 20 insertions(+) diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/AdmRequestMixin.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/AdmRequestMixin.java index 9d8cad03a..cb39a3600 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/AdmRequestMixin.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/AdmRequestMixin.java @@ -36,6 +36,7 @@ protected AdmRequestMixin( @JsonProperty("profileId") String profileId, @JsonProperty("text") AnnotatedText text, @JsonProperty("options") Options options, + @JsonProperty("genre") String genre, @JsonProperty("language") LanguageCode language ) { // diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/DocumentRequestMixin.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/DocumentRequestMixin.java index 971758500..2cc5fd17b 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/DocumentRequestMixin.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/DocumentRequestMixin.java @@ -47,6 +47,7 @@ protected DocumentRequestMixin( @JsonProperty("content") Object content, @JsonProperty("contentUri") String contentUri, @JsonProperty("contentType") String contentType, + @JsonProperty("genre") String genre, @JsonProperty("options") Options options ) { // diff --git a/json/src/test/java/com/basistech/rosette/apimodel/ModelTest.java b/json/src/test/java/com/basistech/rosette/apimodel/ModelTest.java index 9722c9471..40911c120 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/ModelTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/ModelTest.java @@ -134,6 +134,7 @@ void packageTest(boolean inputStreams) throws ClassNotFoundException, IOExceptio o1 = DocumentRequest.builder() .profileId(r.getProfileId()) .language(r.getLanguage()) + .genre(r.getGenre()) .content(r.getContent()) .contentUri(r.getContentUri()) .options(r.getOptions()) diff --git a/model/src/main/java/com/basistech/rosette/apimodel/AdmRequest.java b/model/src/main/java/com/basistech/rosette/apimodel/AdmRequest.java index a6b40bf6b..ea2c21424 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/AdmRequest.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/AdmRequest.java @@ -38,6 +38,11 @@ public final class AdmRequest extends Request { */ private final O options; + /** + * @return genre + */ + private final String genre; + /** * @return language */ @@ -47,10 +52,12 @@ public final class AdmRequest extends Request { public AdmRequest(String profileId, AnnotatedText text, O options, + String genre, LanguageCode language) { super(profileId); this.text = text; this.options = options; + this.genre = genre; this.language = language; } } diff --git a/model/src/main/java/com/basistech/rosette/apimodel/DocumentRequest.java b/model/src/main/java/com/basistech/rosette/apimodel/DocumentRequest.java index 2a93125a9..5a7251b9d 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/DocumentRequest.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/DocumentRequest.java @@ -44,6 +44,9 @@ * In this object the 'content' item is an {@link Object}; it contains a {@link String} * for plain text, or an {@link java.io.InputStream} for binary data. {@link DocumentRequest.DocumentRequestBuilder} * provides several alternative methods for setting this information. + * + * This class includes a 'genre' field. If no genre is specified, then the system + * applies generic processing. Valid values for genre are specified in the API documentation. */ @Value public final class DocumentRequest extends Request { @@ -68,6 +71,11 @@ public final class DocumentRequest extends Request { */ private final String contentType; + /** + * @return request genre + */ + private final String genre; + /** * @return request options */ @@ -79,12 +87,14 @@ public DocumentRequest(String profileId, Object content, String contentUri, String contentType, + String genre, O options) { super(profileId); this.language = language; this.content = content; this.contentUri = contentUri; this.contentType = contentType; + this.genre = genre; this.options = options; } From a5fa33341ea8e1f0e8319e2cb1ceff4098b09566 Mon Sep 17 00:00:00 2001 From: Yaison <> Date: Wed, 28 Dec 2022 21:08:25 -0500 Subject: [PATCH 158/415] RCB-613: removing genre field --- .../apimodel/jackson/AdmRequestMixin.java | 1 - .../jackson/DocumentRequestMixin.java | 1 - .../basistech/rosette/apimodel/ModelTest.java | 1 - .../rosette/apimodel/AdmRequest.java | 20 ---------------- .../rosette/apimodel/DocumentRequest.java | 24 ------------------- 5 files changed, 47 deletions(-) diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/AdmRequestMixin.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/AdmRequestMixin.java index 6b4cc07bb..9d8cad03a 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/AdmRequestMixin.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/AdmRequestMixin.java @@ -36,7 +36,6 @@ protected AdmRequestMixin( @JsonProperty("profileId") String profileId, @JsonProperty("text") AnnotatedText text, @JsonProperty("options") Options options, - @Deprecated @JsonProperty("genre") String genre, @JsonProperty("language") LanguageCode language ) { // diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/DocumentRequestMixin.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/DocumentRequestMixin.java index 6f3670cc4..971758500 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/DocumentRequestMixin.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/DocumentRequestMixin.java @@ -47,7 +47,6 @@ protected DocumentRequestMixin( @JsonProperty("content") Object content, @JsonProperty("contentUri") String contentUri, @JsonProperty("contentType") String contentType, - @Deprecated @JsonProperty("genre") String genre, @JsonProperty("options") Options options ) { // diff --git a/json/src/test/java/com/basistech/rosette/apimodel/ModelTest.java b/json/src/test/java/com/basistech/rosette/apimodel/ModelTest.java index 40911c120..9722c9471 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/ModelTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/ModelTest.java @@ -134,7 +134,6 @@ void packageTest(boolean inputStreams) throws ClassNotFoundException, IOExceptio o1 = DocumentRequest.builder() .profileId(r.getProfileId()) .language(r.getLanguage()) - .genre(r.getGenre()) .content(r.getContent()) .contentUri(r.getContentUri()) .options(r.getOptions()) diff --git a/model/src/main/java/com/basistech/rosette/apimodel/AdmRequest.java b/model/src/main/java/com/basistech/rosette/apimodel/AdmRequest.java index 3369a89da..2ff03054d 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/AdmRequest.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/AdmRequest.java @@ -38,40 +38,20 @@ public final class AdmRequest extends Request { */ private final O options; - /** - * @return genre - */ - @Deprecated - private final String genre; - /** * @return language */ private final LanguageCode language; - public AdmRequest(String profileId, - AnnotatedText text, - O options, - LanguageCode language) { - super(profileId); - this.text = text; - this.options = options; - this.genre = null; - this.language = language; - } - - @Builder // workaround for inheritance https://github.com/rzwitserloot/lombok/issues/853 public AdmRequest(String profileId, AnnotatedText text, O options, - @Deprecated String genre, LanguageCode language) { super(profileId); this.text = text; this.options = options; - this.genre = genre; this.language = language; } } diff --git a/model/src/main/java/com/basistech/rosette/apimodel/DocumentRequest.java b/model/src/main/java/com/basistech/rosette/apimodel/DocumentRequest.java index 51904289a..6590c6d1d 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/DocumentRequest.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/DocumentRequest.java @@ -68,47 +68,23 @@ public final class DocumentRequest extends Request { */ private final String contentType; - /** - * @return request genre - */ - @Deprecated - private final String genre; - /** * @return request options */ private final O options; - - public DocumentRequest(String profileId, - LanguageCode language, - Object content, - String contentUri, - String contentType, - O options) { - super(profileId); - this.language = language; - this.content = content; - this.contentUri = contentUri; - this.contentType = contentType; - this.genre = null; - this.options = options; - } - @Builder // workaround for inheritance https://github.com/rzwitserloot/lombok/issues/853 public DocumentRequest(String profileId, LanguageCode language, Object content, String contentUri, String contentType, - @Deprecated String genre, O options) { super(profileId); this.language = language; this.content = content; this.contentUri = contentUri; this.contentType = contentType; - this.genre = genre; this.options = options; } From 89ed1f6016ca59d643e1187687be8bb82d5aa9bf Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Fri, 30 Dec 2022 17:17:29 -0500 Subject: [PATCH 159/415] Preparing release. Version set to 1.24.0-SNAPSHOT --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 2 +- release/pom.xml | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 322d638d1..242ff84f5 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.103-SNAPSHOT + 1.24.0-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 6a955bfbc..d107cc1d2 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.103-SNAPSHOT + 1.24.0-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 25c95ff44..abcc124c6 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.103-SNAPSHOT + 1.24.0-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 36aaffc87..35f811f66 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.103-SNAPSHOT + 1.24.0-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 88301e6b0..f367cb1a3 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.103-SNAPSHOT + 1.24.0-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 459fa6854..434447daf 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.103-SNAPSHOT + 1.24.0-SNAPSHOT rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 6a86e3065..3ad7dd863 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.103-SNAPSHOT + 1.24.0-SNAPSHOT target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.23.103-SNAPSHOT + 1.24.0-SNAPSHOT diff --git a/pom.xml b/pom.xml index 94c12e1c8..406de32be 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.23.103-SNAPSHOT + 1.24.0-SNAPSHOT open-source-parent com.basistech diff --git a/release/pom.xml b/release/pom.xml index f662ac4c5..ca29dc8a2 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.23.103-SNAPSHOT + 1.24.0-SNAPSHOT com.basistech.rosette rosette-api-release From c1c25e106e362955acb5f2535274c0d72e20e625 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Fri, 30 Dec 2022 17:18:58 -0500 Subject: [PATCH 160/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.24.0 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 242ff84f5..d6d68e412 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.0-SNAPSHOT + 1.24.0 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index d107cc1d2..6ee68d398 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.0-SNAPSHOT + 1.24.0 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index abcc124c6..2d935df45 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.0-SNAPSHOT + 1.24.0 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 35f811f66..14da35a4c 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.0-SNAPSHOT + 1.24.0 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index f367cb1a3..d62b91eca 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.0-SNAPSHOT + 1.24.0 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 434447daf..44737a319 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.0-SNAPSHOT + 1.24.0 rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 3ad7dd863..d29c7bf2b 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.0-SNAPSHOT + 1.24.0 target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.24.0-SNAPSHOT + 1.24.0 diff --git a/pom.xml b/pom.xml index 406de32be..5c52e34a4 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.24.0-SNAPSHOT + 1.24.0 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - HEAD + rosette-api-java-binding-1.24.0 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index ca29dc8a2..f704763f4 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.0-SNAPSHOT + 1.24.0 com.basistech.rosette rosette-api-release From 5b8f07889a822e7645195df122eecb1b2d664b02 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Fri, 30 Dec 2022 17:19:00 -0500 Subject: [PATCH 161/415] [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index d6d68e412..cca5b5751 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.0 + 1.24.1-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 6ee68d398..533b64f3c 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.0 + 1.24.1-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 2d935df45..b41864406 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.0 + 1.24.1-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 14da35a4c..54b622e84 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.0 + 1.24.1-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index d62b91eca..10da577be 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.0 + 1.24.1-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 44737a319..2e9c1d783 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.0 + 1.24.1-SNAPSHOT rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index d29c7bf2b..ae3fc3eb3 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.0 + 1.24.1-SNAPSHOT target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.24.0 + 1.24.1-SNAPSHOT diff --git a/pom.xml b/pom.xml index 5c52e34a4..33905a28e 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.24.0 + 1.24.1-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.24.0 + HEAD This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index f704763f4..179d3c2db 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.0 + 1.24.1-SNAPSHOT com.basistech.rosette rosette-api-release From e3a9363fef6449ec02d20969064fcd7a62321d6a Mon Sep 17 00:00:00 2001 From: Yaison <> Date: Wed, 4 Jan 2023 18:14:32 -0400 Subject: [PATCH 162/415] RCB-613: removing deprecated code --- .../apimodel/jackson/ApiModelMixinModule.java | 5 +- .../basistech/rosette/apimodel/Address.java | 126 ------------------ .../rosette/apimodel/CategoriesOptions.java | 11 -- .../rosette/apimodel/EntitiesOptions.java | 7 - .../basistech/rosette/apimodel/Entity.java | 7 - 5 files changed, 1 insertion(+), 155 deletions(-) delete mode 100644 model/src/main/java/com/basistech/rosette/apimodel/Address.java diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/ApiModelMixinModule.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/ApiModelMixinModule.java index 9778b1510..3343aadbb 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/ApiModelMixinModule.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/ApiModelMixinModule.java @@ -16,7 +16,6 @@ package com.basistech.rosette.apimodel.jackson; -import com.basistech.rosette.apimodel.Address; import com.basistech.rosette.apimodel.AddressSimilarityRequest; import com.basistech.rosette.apimodel.AdmRequest; import com.basistech.rosette.apimodel.ConfigurationRequest; @@ -38,7 +37,6 @@ * Jackson module to configure Json serialization and deserialization for the * Rosette API model. */ -@SuppressWarnings("deprecation") public class ApiModelMixinModule extends AnnotatedDataModelModule { public ApiModelMixinModule() { @@ -69,8 +67,7 @@ public void setupModule(Module.SetupContext context) { context.setMixInAnnotations(NameDeduplicationRequest.class, NameDeduplicationRequestMixin.class); context.setMixInAnnotations(NameDeduplicationRequest.NameDeduplicationRequestBuilder.class, NameDeduplicationRequestMixin.NameDeduplicationRequestBuilderMixin.class); - context.setMixInAnnotations(Address.class, AddressMixin.class); - context.setMixInAnnotations(Address.AddressBuilder.class, AddressMixin.AddressBuilderMixin.class); + context.setMixInAnnotations(FieldedAddress.class, FieldedAddressMixin.class); context.setMixInAnnotations(FieldedAddress.FieldedAddressBuilder.class, FieldedAddressMixin.FieldedAddressBuilderMixin.class); diff --git a/model/src/main/java/com/basistech/rosette/apimodel/Address.java b/model/src/main/java/com/basistech/rosette/apimodel/Address.java deleted file mode 100644 index 501a89554..000000000 --- a/model/src/main/java/com/basistech/rosette/apimodel/Address.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright 2022 Basis Technology Corp. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.basistech.rosette.apimodel; - -import lombok.Builder; -import lombok.Value; - -/** - * @deprecated - * Class that represents an address - */ -@Value -@Builder -@Deprecated -public class Address implements IAddress { - - /** - * @return the address house - */ - String house; - - /** - * @return the address house number - */ - String houseNumber; - - /** - * @return the address road - */ - String road; - - /** - * @return the address unit - */ - String unit; - - /** - * @return the address level - */ - String level; - - /** - * @return the address staircase - */ - String staircase; - - /** - * @return the address entrance - */ - String entrance; - - /** - * @return the address suburb - */ - String suburb; - - /** - * @return the address city district - */ - String cityDistrict; - - /** - * @return the address city - */ - String city; - - /** - * @return the address island - */ - String island; - - /** - * @return the address state district - */ - String stateDistrict; - - /** - * @return the address state - */ - String state; - - /** - * @return the address country region - */ - String countryRegion; - - /** - * @return the address country - */ - String country; - - /** - * @return the address world region - */ - String worldRegion; - - /** - * @return the address postal code - */ - String postCode; - - /** - * @return the address P.O. Box - */ - String poBox; - - @Override - public boolean fielded() { - return true; - } - -} diff --git a/model/src/main/java/com/basistech/rosette/apimodel/CategoriesOptions.java b/model/src/main/java/com/basistech/rosette/apimodel/CategoriesOptions.java index 87c5a4e9a..f0364f3cb 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/CategoriesOptions.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/CategoriesOptions.java @@ -20,8 +20,6 @@ import lombok.Builder; import lombok.Value; -import javax.validation.constraints.Min; - /** * Categorization options */ @@ -30,15 +28,6 @@ @JacksonMixin public class CategoriesOptions extends Options { - /** - * @deprecated - * Users should use {@link singleLabel} to return only one result - * or {@link scoreThreshold} to filter results based on raw score - * @return number of categories - */ - @Min(1) - private final Integer numCategories; - /** * Single label mode will return only the highest scoring category, regardless of score * If singleLabel is false, every category whose score exceeds the default diff --git a/model/src/main/java/com/basistech/rosette/apimodel/EntitiesOptions.java b/model/src/main/java/com/basistech/rosette/apimodel/EntitiesOptions.java index a5ae7cf5a..1a0339b5c 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/EntitiesOptions.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/EntitiesOptions.java @@ -63,13 +63,6 @@ public class EntitiesOptions extends Options { */ String modelType; - /** - * @deprecated use includeDBpediaTypes instead. - * @return the includeDBpediaType flag. - */ - @Deprecated(since = "1.14.0", forRemoval = true) - Boolean includeDBpediaType; - /** * @since 1.14.0 (19.08) * @return the includeDBpediaType flag. diff --git a/model/src/main/java/com/basistech/rosette/apimodel/Entity.java b/model/src/main/java/com/basistech/rosette/apimodel/Entity.java index 33d74de26..546b02806 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/Entity.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/Entity.java @@ -84,13 +84,6 @@ public class Entity { */ Label sentiment; - /** - * @deprecated use dbpediaTypes instead. - * @return the DBpediaType - */ - @Deprecated(since = "1.14.0", forRemoval = true) - String dbpediaType; - /** * @since 1.14.0 (19.08) * @return the DBpediaTypes From f6f9540e89d8b0d2b8629f7c9193789fc9b056a9 Mon Sep 17 00:00:00 2001 From: Yaison <> Date: Wed, 4 Jan 2023 18:39:01 -0400 Subject: [PATCH 163/415] RCB-613: test fix --- api/src/test/mock-data/response/eng-url-entities.json | 1 - json/src/test/data/EntitiesResponse.json | 1 - .../basistech/rosette/apimodel/PolymorphicRequestTest.java | 6 +++--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/api/src/test/mock-data/response/eng-url-entities.json b/api/src/test/mock-data/response/eng-url-entities.json index a7c4abc63..dc6458d64 100644 --- a/api/src/test/mock-data/response/eng-url-entities.json +++ b/api/src/test/mock-data/response/eng-url-entities.json @@ -20,7 +20,6 @@ "mention": "Washington", "normalized": "Washington", "type": "LOCATION", - "dbpediaType": "test1", "dbpediaTypes": [ "test1" ] diff --git a/json/src/test/data/EntitiesResponse.json b/json/src/test/data/EntitiesResponse.json index 1fd0105a9..de567d958 100644 --- a/json/src/test/data/EntitiesResponse.json +++ b/json/src/test/data/EntitiesResponse.json @@ -15,7 +15,6 @@ "salience": 1.0, "confidence": 1.0, "linkingConfidence": 1.0, - "dbpediaType": "test1", "dbpediaTypes": [ "test1", "test2" diff --git a/json/src/test/java/com/basistech/rosette/apimodel/PolymorphicRequestTest.java b/json/src/test/java/com/basistech/rosette/apimodel/PolymorphicRequestTest.java index 1b9fc03e3..634fc2627 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/PolymorphicRequestTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/PolymorphicRequestTest.java @@ -42,17 +42,17 @@ void testRequestTypes() throws Exception { Request request = mapper.readValue(json, new TypeReference>() { }); assertEquals(DOC_REQUEST, request.getClass().getName()); - json = "{\"content\": \"what is my type\", \"language\": \"eng\", \"options\": {\"includeDBpediaType\": true, \"calculateConfidence\": true}}"; + json = "{\"content\": \"what is my type\", \"language\": \"eng\", \"options\": {\"includeDBpediaTypes\": true, \"calculateConfidence\": true}}"; request = mapper.readValue(json, new TypeReference>() { }); assertEquals(DOC_REQUEST, request.getClass().getName()); assertNull(((DocumentRequest) request).getOptions().getIncludePermID()); - json = "{\"content\": \"what is my type\", \"language\": \"eng\", \"options\": {\"includeDBpediaType\": true, \"calculateConfidence\": true, \"includePermID\": true}}"; + json = "{\"content\": \"what is my type\", \"language\": \"eng\", \"options\": {\"includeDBpediaTypes\": true, \"calculateConfidence\": true, \"includePermID\": true}}"; request = mapper.readValue(json, new TypeReference>() { }); assertEquals(DOC_REQUEST, request.getClass().getName()); assertTrue(((DocumentRequest) request).getOptions().getIncludePermID()); - json = "{\"content\": \"what is my type\", \"language\": \"eng\", \"options\": {\"includeDBpediaType\": true, \"calculateConfidence\": true, \"includePermID\": false}}"; + json = "{\"content\": \"what is my type\", \"language\": \"eng\", \"options\": {\"includeDBpediaTypes\": true, \"calculateConfidence\": true, \"includePermID\": false}}"; request = mapper.readValue(json, new TypeReference>() { }); assertEquals(DOC_REQUEST, request.getClass().getName()); assertFalse(((DocumentRequest) request).getOptions().getIncludePermID()); From 62a1c8854cd459063eb4f925d7a3d092890de420 Mon Sep 17 00:00:00 2001 From: seth-basistech Date: Fri, 6 Jan 2023 14:10:33 -0600 Subject: [PATCH 164/415] Use docker image from updated org --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index e91e88593..424e42b14 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -11,7 +11,7 @@ node ("docker-light") { echo "${env.ALT_URL}" def useUrl = ("${env.ALT_URL}" == "null") ? "${env.BINDING_TEST_URL}" : "${env.ALT_URL}" withEnv(["API_KEY=${env.ROSETTE_API_KEY}", "ALT_URL=${useUrl}"]) { - sh "docker run --rm -e API_KEY=${API_KEY} -e ALT_URL=${ALT_URL} -v ${SOURCEDIR}:/source rosetteapi/docker-java" + sh "docker run --rm -e API_KEY=${API_KEY} -e ALT_URL=${ALT_URL} -v ${SOURCEDIR}:/source rosette/docker-java" } } slack(true) From 6696a35f22c4a02ce6d6b3213a5d1caeedba2ce1 Mon Sep 17 00:00:00 2001 From: Mauricio Godoy Date: Mon, 30 Jan 2023 10:03:10 -0300 Subject: [PATCH 165/415] Change version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 33905a28e..63ed63fb6 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.24.1-SNAPSHOT + 1.24.100 open-source-parent com.basistech From 5126e06c21b5e4917d7d7bcae3c57a65043bd5ce Mon Sep 17 00:00:00 2001 From: Mauricio Godoy Date: Mon, 30 Jan 2023 10:21:33 -0300 Subject: [PATCH 166/415] version change for internal release --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 2 +- release/pom.xml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index cca5b5751..3126d56ab 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.1-SNAPSHOT + 1.24.100 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 533b64f3c..f783188ee 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.1-SNAPSHOT + 1.24.100 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index b41864406..788a8f2d0 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.1-SNAPSHOT + 1.24.100 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 54b622e84..3c6927826 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.1-SNAPSHOT + 1.24.100 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 10da577be..0348a8c00 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.1-SNAPSHOT + 1.24.100 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 2e9c1d783..d1c384ef4 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.1-SNAPSHOT + 1.24.100 rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index ae3fc3eb3..a53dbf01d 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.1-SNAPSHOT + 1.24.100 target/test-bundles diff --git a/release/pom.xml b/release/pom.xml index 179d3c2db..b9ad25429 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.1-SNAPSHOT + 1.24.100 com.basistech.rosette rosette-api-release From 4efb69dc79be00aab7aed7035e5ce83d820eba7f Mon Sep 17 00:00:00 2001 From: Mauricio Godoy Date: Mon, 30 Jan 2023 10:26:46 -0300 Subject: [PATCH 167/415] Verison changes --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 63ed63fb6..33905a28e 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.24.100 + 1.24.1-SNAPSHOT open-source-parent com.basistech From 8ae3b08037d580e94d57a98451e3a23a53901e2e Mon Sep 17 00:00:00 2001 From: Mauricio Godoy Date: Mon, 30 Jan 2023 10:28:07 -0300 Subject: [PATCH 168/415] Change Version --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 2 +- release/pom.xml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 3126d56ab..cca5b5751 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.100 + 1.24.1-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index f783188ee..533b64f3c 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.100 + 1.24.1-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 788a8f2d0..b41864406 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.100 + 1.24.1-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 3c6927826..54b622e84 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.100 + 1.24.1-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 0348a8c00..10da577be 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.100 + 1.24.1-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index d1c384ef4..2e9c1d783 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.100 + 1.24.1-SNAPSHOT rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index a53dbf01d..ae3fc3eb3 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.100 + 1.24.1-SNAPSHOT target/test-bundles diff --git a/release/pom.xml b/release/pom.xml index b9ad25429..179d3c2db 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.100 + 1.24.1-SNAPSHOT com.basistech.rosette rosette-api-release From 8b7f53b7d4de55a8f031916a25d75cd088e82f03 Mon Sep 17 00:00:00 2001 From: Mauricio Godoy Date: Mon, 30 Jan 2023 10:30:13 -0300 Subject: [PATCH 169/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.24.100 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index cca5b5751..3126d56ab 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.1-SNAPSHOT + 1.24.100 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 533b64f3c..f783188ee 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.1-SNAPSHOT + 1.24.100 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index b41864406..788a8f2d0 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.1-SNAPSHOT + 1.24.100 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 54b622e84..3c6927826 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.1-SNAPSHOT + 1.24.100 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 10da577be..0348a8c00 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.1-SNAPSHOT + 1.24.100 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 2e9c1d783..d1c384ef4 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.1-SNAPSHOT + 1.24.100 rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index ae3fc3eb3..353143a12 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.1-SNAPSHOT + 1.24.100 target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.24.1-SNAPSHOT + 1.24.100 diff --git a/pom.xml b/pom.xml index 33905a28e..fc12a5b00 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.24.1-SNAPSHOT + 1.24.100 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - HEAD + rosette-api-java-binding-1.24.100 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 179d3c2db..b9ad25429 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.1-SNAPSHOT + 1.24.100 com.basistech.rosette rosette-api-release From 615f4a676154a33d3f616ac37b8cf32bb8ee219e Mon Sep 17 00:00:00 2001 From: Mauricio Godoy Date: Mon, 30 Jan 2023 10:34:13 -0300 Subject: [PATCH 170/415] [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 3126d56ab..e16581ef7 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.100 + 1.24.101-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index f783188ee..684ded73f 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.100 + 1.24.101-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 788a8f2d0..14c93542d 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.100 + 1.24.101-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 3c6927826..f17af0539 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.100 + 1.24.101-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 0348a8c00..a8215c21b 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.100 + 1.24.101-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index d1c384ef4..903685627 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.100 + 1.24.101-SNAPSHOT rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 353143a12..f2a1578cf 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.100 + 1.24.101-SNAPSHOT target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.24.100 + 1.24.101-SNAPSHOT diff --git a/pom.xml b/pom.xml index fc12a5b00..e7cb8a785 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.24.100 + 1.24.101-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.24.100 + HEAD This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index b9ad25429..f4f7332ee 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.100 + 1.24.101-SNAPSHOT com.basistech.rosette rosette-api-release From ae3340589d0d28ecc7252c70ca00c88df61870ab Mon Sep 17 00:00:00 2001 From: Julien Cherry <6952800+juliencherry@users.noreply.github.com> Date: Wed, 22 Feb 2023 12:06:50 -0500 Subject: [PATCH 171/415] COMN-297: Use parent POM 13.0.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 33905a28e..099dc1ea1 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ open-source-parent com.basistech - 12.0.0 + 13.0.0 pom From 969264ec4df0cd66e4d1e5863fe8f7a5b8ee572e Mon Sep 17 00:00:00 2001 From: Julien Cherry Date: Tue, 28 Feb 2023 14:03:13 -0500 Subject: [PATCH 172/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.24.1 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index cca5b5751..61e93a1a1 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.1-SNAPSHOT + 1.24.1 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 533b64f3c..81879a1d5 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.1-SNAPSHOT + 1.24.1 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index b41864406..105535f9d 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.1-SNAPSHOT + 1.24.1 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 54b622e84..08a3a262f 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.1-SNAPSHOT + 1.24.1 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 10da577be..de868d6b6 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.1-SNAPSHOT + 1.24.1 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 2e9c1d783..a833e1aae 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.1-SNAPSHOT + 1.24.1 rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index ae3fc3eb3..522305b20 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.1-SNAPSHOT + 1.24.1 target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.24.1-SNAPSHOT + 1.24.1 diff --git a/pom.xml b/pom.xml index 099dc1ea1..513cd8702 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.24.1-SNAPSHOT + 1.24.1 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - HEAD + rosette-api-java-binding-1.24.1 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 179d3c2db..8adbe2ba0 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.1-SNAPSHOT + 1.24.1 com.basistech.rosette rosette-api-release From 8466a37414392136bc8ab0a21097a2582f33830f Mon Sep 17 00:00:00 2001 From: Julien Cherry Date: Tue, 28 Feb 2023 14:03:16 -0500 Subject: [PATCH 173/415] [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 61e93a1a1..6268f053e 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.1 + 1.24.2-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 81879a1d5..4f56f2ec1 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.1 + 1.24.2-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 105535f9d..170054c86 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.1 + 1.24.2-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 08a3a262f..b426fc2bd 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.1 + 1.24.2-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index de868d6b6..ef552428a 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.1 + 1.24.2-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index a833e1aae..190ce2afb 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.1 + 1.24.2-SNAPSHOT rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 522305b20..3ef98cc2d 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.1 + 1.24.2-SNAPSHOT target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.24.1 + 1.24.2-SNAPSHOT diff --git a/pom.xml b/pom.xml index 513cd8702..176624851 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.24.1 + 1.24.2-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.24.1 + HEAD This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 8adbe2ba0..5e5206504 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.1 + 1.24.2-SNAPSHOT com.basistech.rosette rosette-api-release From fe760ee155a99f6d74704aa233b89be1653d07a9 Mon Sep 17 00:00:00 2001 From: Matthew Love Date: Fri, 3 Mar 2023 11:57:13 -0500 Subject: [PATCH 174/415] WS-2698: Use custom artifact --- api/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/pom.xml b/api/pom.xml index 4f56f2ec1..b015fa831 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -69,7 +69,7 @@ - org.apache.httpcomponents + com.basis.org.apache.httpcomponents httpclient-osgi ${http-components.version} From 178c297c91a0c57423a421e88464debb2a33a215 Mon Sep 17 00:00:00 2001 From: Matthew Love Date: Fri, 3 Mar 2023 13:15:48 -0500 Subject: [PATCH 175/415] WS-2698: Add property for version number --- api/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/pom.xml b/api/pom.xml index b015fa831..d2a922b31 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -71,7 +71,7 @@ com.basis.org.apache.httpcomponents httpclient-osgi - ${http-components.version} + ${bt-custom-httpclient-osgi-version} org.apache.httpcomponents From 8969b639510e0081a7daceb4467b5eb27f1a97ba Mon Sep 17 00:00:00 2001 From: Matthew Love <46176691+matt-l-01@users.noreply.github.com> Date: Thu, 9 Mar 2023 12:22:35 -0500 Subject: [PATCH 176/415] WS-2698: Open source parent version update --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 176624851..0f9556445 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ open-source-parent com.basistech - 13.0.0 + 14.0.0 pom From eb451ec429f10db73018fb6e92f1a8ac2f10ab27 Mon Sep 17 00:00:00 2001 From: matt-l-01 <46176691+matt-l-01@users.noreply.github.com> Date: Tue, 14 Mar 2023 16:42:14 -0400 Subject: [PATCH 177/415] WS-2698: Typo --- api/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/pom.xml b/api/pom.xml index d2a922b31..cd7748b4e 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -69,7 +69,7 @@ - com.basis.org.apache.httpcomponents + com.basistech.org.apache.httpcomponents httpclient-osgi ${bt-custom-httpclient-osgi-version} From 8f9208cb3c20e62e7e07d61b4079a6eb7e9520b5 Mon Sep 17 00:00:00 2001 From: Katsuya Tomioka Date: Mon, 27 Mar 2023 10:20:58 -0400 Subject: [PATCH 178/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.25.0 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 6268f053e..468f60d63 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.2-SNAPSHOT + 1.25.0 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index cd7748b4e..dbb16a3c1 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.2-SNAPSHOT + 1.25.0 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 170054c86..c64d1f351 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.2-SNAPSHOT + 1.25.0 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index b426fc2bd..974217449 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.2-SNAPSHOT + 1.25.0 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index ef552428a..648d44bfa 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.2-SNAPSHOT + 1.25.0 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index f18538a9e..0437af117 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.2-SNAPSHOT + 1.25.0 rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 3ef98cc2d..5bcf40430 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.2-SNAPSHOT + 1.25.0 target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.24.2-SNAPSHOT + 1.25.0 diff --git a/pom.xml b/pom.xml index 0f9556445..2a0fd3529 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.24.2-SNAPSHOT + 1.25.0 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - HEAD + rosette-api-java-binding-1.25.0 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 5e5206504..a75895522 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.24.2-SNAPSHOT + 1.25.0 com.basistech.rosette rosette-api-release From 59b132fbb2b81d12f408ae1da49949f816eadc51 Mon Sep 17 00:00:00 2001 From: Katsuya Tomioka Date: Mon, 27 Mar 2023 10:21:06 -0400 Subject: [PATCH 179/415] [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 468f60d63..9ba99432b 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.0 + 1.25.1-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index dbb16a3c1..523943d26 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.0 + 1.25.1-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index c64d1f351..efc6e072e 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.0 + 1.25.1-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 974217449..7f405f4ff 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.0 + 1.25.1-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 648d44bfa..a3870999c 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.0 + 1.25.1-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 0437af117..5917a5dbc 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.0 + 1.25.1-SNAPSHOT rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 5bcf40430..e32c0bd08 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.0 + 1.25.1-SNAPSHOT target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.25.0 + 1.25.1-SNAPSHOT diff --git a/pom.xml b/pom.xml index 2a0fd3529..c30d0b9a4 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.25.0 + 1.25.1-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.25.0 + HEAD This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index a75895522..c868b44e7 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.0 + 1.25.1-SNAPSHOT com.basistech.rosette rosette-api-release From 9978b546babdb21692bc0413cded769975d9df56 Mon Sep 17 00:00:00 2001 From: Katsuya Tomioka Date: Wed, 29 Mar 2023 18:51:31 -0400 Subject: [PATCH 180/415] WS-2744: add no-op genre back in --- .../rosette/apimodel/jackson/DocumentRequestMixin.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/DocumentRequestMixin.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/DocumentRequestMixin.java index 971758500..5070277d1 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/DocumentRequestMixin.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/DocumentRequestMixin.java @@ -20,6 +20,7 @@ import com.basistech.util.LanguageCode; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -30,6 +31,7 @@ //CHECKSTYLE:OFF @JsonTypeName("DocumentRequest") +@JsonIgnoreProperties({"genre"}) @JsonInclude(JsonInclude.Include.NON_NULL) public abstract class DocumentRequestMixin { From 49953d7ab1c5b500c9ada2974921e9c7bebc5458 Mon Sep 17 00:00:00 2001 From: Katsuya Tomioka Date: Wed, 29 Mar 2023 18:51:52 -0400 Subject: [PATCH 181/415] WS-2744: add test for genre --- .../basistech/rosette/apimodel/PolymorphicRequestTest.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/json/src/test/java/com/basistech/rosette/apimodel/PolymorphicRequestTest.java b/json/src/test/java/com/basistech/rosette/apimodel/PolymorphicRequestTest.java index 634fc2627..c4cc156d9 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/PolymorphicRequestTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/PolymorphicRequestTest.java @@ -38,10 +38,14 @@ public void init() { @Test void testRequestTypes() throws Exception { - String json = "{\"content\": \"what is my type\", \"language\": \"eng\", \"options\": {\"calculateConfidence\": true}}"; + String json = "{\"content\": \"what is my type\", \"language\": \"eng\", \"genre\": \"news\"}"; Request request = mapper.readValue(json, new TypeReference>() { }); assertEquals(DOC_REQUEST, request.getClass().getName()); + json = "{\"content\": \"what is my type\", \"language\": \"eng\", \"options\": {\"calculateConfidence\": true}}"; + request = mapper.readValue(json, new TypeReference>() { }); + assertEquals(DOC_REQUEST, request.getClass().getName()); + json = "{\"content\": \"what is my type\", \"language\": \"eng\", \"options\": {\"includeDBpediaTypes\": true, \"calculateConfidence\": true}}"; request = mapper.readValue(json, new TypeReference>() { }); assertEquals(DOC_REQUEST, request.getClass().getName()); From 2246c64339057aa99da1a99650582e5b16bcc095 Mon Sep 17 00:00:00 2001 From: Katsuya Tomioka Date: Wed, 29 Mar 2023 18:52:37 -0400 Subject: [PATCH 182/415] WS-2744: add back (deprecated) numCategories to CategoriesOptions --- .../basistech/rosette/apimodel/CategoriesOptions.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/model/src/main/java/com/basistech/rosette/apimodel/CategoriesOptions.java b/model/src/main/java/com/basistech/rosette/apimodel/CategoriesOptions.java index f0364f3cb..72fef68f5 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/CategoriesOptions.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/CategoriesOptions.java @@ -17,6 +17,7 @@ package com.basistech.rosette.apimodel; import com.basistech.rosette.annotations.JacksonMixin; +import javax.validation.constraints.Min; import lombok.Builder; import lombok.Value; @@ -28,6 +29,16 @@ @JacksonMixin public class CategoriesOptions extends Options { + /** + * @deprecated + * Users should use {@link singleLabel} to return only one result + * or {@link scoreThreshold} to filter results based on raw score + * @return number of categories + */ + @Deprecated + @Min(1) + private final Integer numCategories; + /** * Single label mode will return only the highest scoring category, regardless of score * If singleLabel is false, every category whose score exceeds the default From daf931e1e98467d4049081372b1101c8fe2eee21 Mon Sep 17 00:00:00 2001 From: Katsuya Tomioka Date: Wed, 29 Mar 2023 19:38:59 -0400 Subject: [PATCH 183/415] WS-2744: [maven-release-plugin] prepare release rosette-api-java-binding-1.25.100 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 9ba99432b..053b12dce 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.1-SNAPSHOT + 1.25.100 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 523943d26..2887ace72 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.1-SNAPSHOT + 1.25.100 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index efc6e072e..890d00ed1 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.1-SNAPSHOT + 1.25.100 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 7f405f4ff..b7b0209a3 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.1-SNAPSHOT + 1.25.100 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index a3870999c..da5099018 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.1-SNAPSHOT + 1.25.100 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 5917a5dbc..1b583a8b7 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.1-SNAPSHOT + 1.25.100 rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index e32c0bd08..6923cac3e 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.1-SNAPSHOT + 1.25.100 target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.25.1-SNAPSHOT + 1.25.100 diff --git a/pom.xml b/pom.xml index c30d0b9a4..0ef484875 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.25.1-SNAPSHOT + 1.25.100 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - HEAD + rosette-api-java-binding-1.25.100 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index c868b44e7..4c4f09f25 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.1-SNAPSHOT + 1.25.100 com.basistech.rosette rosette-api-release From fd90e63bbcf6d07bfd32fccd300e9d798c843307 Mon Sep 17 00:00:00 2001 From: Katsuya Tomioka Date: Wed, 29 Mar 2023 19:39:03 -0400 Subject: [PATCH 184/415] WS-2744: [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 053b12dce..0b2f91701 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.100 + 1.25.101-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 2887ace72..6bf20b854 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.100 + 1.25.101-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 890d00ed1..2f486b844 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.100 + 1.25.101-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index b7b0209a3..48d00412a 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.100 + 1.25.101-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index da5099018..5546972d3 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.100 + 1.25.101-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 1b583a8b7..08b5eb203 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.100 + 1.25.101-SNAPSHOT rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 6923cac3e..843c23ce9 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.100 + 1.25.101-SNAPSHOT target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.25.100 + 1.25.101-SNAPSHOT diff --git a/pom.xml b/pom.xml index 0ef484875..ec0a6631e 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.25.100 + 1.25.101-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.25.100 + HEAD This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 4c4f09f25..8ef570354 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.100 + 1.25.101-SNAPSHOT com.basistech.rosette rosette-api-release From 49c8745ff5debc6c5b9c965dfc57aeb91739a611 Mon Sep 17 00:00:00 2001 From: TomHubbardBT Date: Thu, 30 Mar 2023 08:06:36 -0400 Subject: [PATCH 185/415] added a test for deserializing genre --- .../com/basistech/rosette/apimodel/ModelTest.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/json/src/test/java/com/basistech/rosette/apimodel/ModelTest.java b/json/src/test/java/com/basistech/rosette/apimodel/ModelTest.java index 9722c9471..41cc18c6c 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/ModelTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/ModelTest.java @@ -18,10 +18,13 @@ import com.basistech.rosette.apimodel.jackson.ApiModelMixinModule; import com.basistech.rosette.apimodel.jackson.DocumentRequestMixin; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectWriter; import com.google.common.collect.Lists; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -43,6 +46,7 @@ import java.util.stream.Stream; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; @SuppressWarnings("PMD.UnusedPrivateMethod") // Parameterized Tests @@ -376,4 +380,12 @@ private Object createObjectOfType(Type type) { } return object; } + + @Test + void doNotDeserializeGenre() throws JsonProcessingException { + String json = "{\"content\": \"foo\", \"genre\":\"foo\"}"; + // Ensure that the document request no longer deserializes genre + Request request = mapper.readValue(json, new TypeReference>() { }); + assertTrue(mapper.writeValueAsString(request).indexOf("genre") == -1); + } } From a386e61c17af078a7c1a6ac24ded11d67298f0c5 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Fri, 31 Mar 2023 18:24:31 -0400 Subject: [PATCH 186/415] Preparing release. Version set to 1.25.1-SNAPSHOT --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 2 +- release/pom.xml | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 0b2f91701..9ba99432b 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.101-SNAPSHOT + 1.25.1-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 6bf20b854..523943d26 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.101-SNAPSHOT + 1.25.1-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 2f486b844..efc6e072e 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.101-SNAPSHOT + 1.25.1-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 48d00412a..7f405f4ff 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.101-SNAPSHOT + 1.25.1-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 5546972d3..a3870999c 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.101-SNAPSHOT + 1.25.1-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 08b5eb203..5917a5dbc 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.101-SNAPSHOT + 1.25.1-SNAPSHOT rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 843c23ce9..e32c0bd08 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.101-SNAPSHOT + 1.25.1-SNAPSHOT target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.25.101-SNAPSHOT + 1.25.1-SNAPSHOT diff --git a/pom.xml b/pom.xml index ec0a6631e..c30d0b9a4 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.25.101-SNAPSHOT + 1.25.1-SNAPSHOT open-source-parent com.basistech diff --git a/release/pom.xml b/release/pom.xml index 8ef570354..c868b44e7 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.101-SNAPSHOT + 1.25.1-SNAPSHOT com.basistech.rosette rosette-api-release From b074c024e29afdde1e1e0faba460c5c475d552e1 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Fri, 31 Mar 2023 18:25:58 -0400 Subject: [PATCH 187/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.25.1 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 9ba99432b..cfddbb4ff 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.1-SNAPSHOT + 1.25.1 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 523943d26..0710c5c01 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.1-SNAPSHOT + 1.25.1 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index efc6e072e..1295f5a9f 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.1-SNAPSHOT + 1.25.1 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 7f405f4ff..88e5ed440 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.1-SNAPSHOT + 1.25.1 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index a3870999c..f69f0bd9a 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.1-SNAPSHOT + 1.25.1 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 5917a5dbc..f01bb8fdd 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.1-SNAPSHOT + 1.25.1 rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index e32c0bd08..ff9f52062 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.1-SNAPSHOT + 1.25.1 target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.25.1-SNAPSHOT + 1.25.1 diff --git a/pom.xml b/pom.xml index c30d0b9a4..ca4db04c8 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.25.1-SNAPSHOT + 1.25.1 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - HEAD + rosette-api-java-binding-1.25.1 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index c868b44e7..8867dbee1 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.1-SNAPSHOT + 1.25.1 com.basistech.rosette rosette-api-release From 2d9587b33212a75e4e8e32b0cf6be9f1d3c7495f Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Fri, 31 Mar 2023 18:26:00 -0400 Subject: [PATCH 188/415] [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index cfddbb4ff..206a5c2bb 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.1 + 1.25.2-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 0710c5c01..733288a0d 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.1 + 1.25.2-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 1295f5a9f..475e8cb1e 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.1 + 1.25.2-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 88e5ed440..cc54c1928 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.1 + 1.25.2-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index f69f0bd9a..e165389bc 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.1 + 1.25.2-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index f01bb8fdd..312d0a246 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.1 + 1.25.2-SNAPSHOT rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index ff9f52062..333b2c1fd 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.1 + 1.25.2-SNAPSHOT target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.25.1 + 1.25.2-SNAPSHOT diff --git a/pom.xml b/pom.xml index ca4db04c8..6e2d1a98c 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.25.1 + 1.25.2-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.25.1 + HEAD This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 8867dbee1..89fff4fbc 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.1 + 1.25.2-SNAPSHOT com.basistech.rosette rosette-api-release From 54913abb1dce9afcb802168bc9d28bf33c38e1b3 Mon Sep 17 00:00:00 2001 From: seth-mg Date: Wed, 5 Apr 2023 10:14:48 -0500 Subject: [PATCH 189/415] Notes on deprecating fields. --- DEVELOPER.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/DEVELOPER.md b/DEVELOPER.md index 4dd463632..e733bfd8e 100644 --- a/DEVELOPER.md +++ b/DEVELOPER.md @@ -1,5 +1,8 @@ ## Developer Notes +#### Deprecation Strategies +If we remove a field via deprecation, the field can still be passed in, but we will no longer deserialize it. As an example see [PR 204](https://github.com/rosette-api/java/pull/204). + #### Building and Releasing To be updated.. From 981a142b37ad40b4b51b19c852c5f3c370f4ea9c Mon Sep 17 00:00:00 2001 From: David Corbett Date: Fri, 19 May 2023 14:25:46 -0400 Subject: [PATCH 190/415] COMN-299: Update the parent POM to version 15.0.0 --- .../java/com/basistech/rosette/apimodel/batch/BatchRequest.java | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/model/src/main/java/com/basistech/rosette/apimodel/batch/BatchRequest.java b/model/src/main/java/com/basistech/rosette/apimodel/batch/BatchRequest.java index de91b9711..a47eabe37 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/batch/BatchRequest.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/batch/BatchRequest.java @@ -36,7 +36,7 @@ public final class BatchRequest { * @return id an ID string. */ @Builder.Default - private final String batchId = UUID.randomUUID().toString();; + private final String batchId = UUID.randomUUID().toString(); /** * A URL for RosetteAPI to call to inform you the completion of the batch. diff --git a/pom.xml b/pom.xml index 6e2d1a98c..50587ed83 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ open-source-parent com.basistech - 14.0.0 + 15.0.0 pom From 2f7698c644081559d9263d89ebca83a2aa6a5379 Mon Sep 17 00:00:00 2001 From: Julien Cherry <6952800+juliencherry@users.noreply.github.com> Date: Wed, 7 Jun 2023 10:36:52 -0400 Subject: [PATCH 191/415] RD-2603: Add embeddings mode options to semantic vectors and similar terms endpoints in the model --- .../rosette/apimodel/EmbeddingsMode.java | 28 ++++++++++++++++ .../apimodel/SemanticVectorsOptions.java | 33 +++++++++++-------- .../rosette/apimodel/SimilarTermsOptions.java | 8 ++++- 3 files changed, 54 insertions(+), 15 deletions(-) create mode 100644 model/src/main/java/com/basistech/rosette/apimodel/EmbeddingsMode.java diff --git a/model/src/main/java/com/basistech/rosette/apimodel/EmbeddingsMode.java b/model/src/main/java/com/basistech/rosette/apimodel/EmbeddingsMode.java new file mode 100644 index 000000000..bb8d19f19 --- /dev/null +++ b/model/src/main/java/com/basistech/rosette/apimodel/EmbeddingsMode.java @@ -0,0 +1,28 @@ +/* + * Copyright 2023 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.basistech.rosette.apimodel; + +/** + * The generation of embeddings to use for all languages. Defaults to second generation unless the language only + * supports first generation embeddings + */ +public enum EmbeddingsMode { + DEFAULT, + GEN_1, + GEN_2, + /**/; +} diff --git a/model/src/main/java/com/basistech/rosette/apimodel/SemanticVectorsOptions.java b/model/src/main/java/com/basistech/rosette/apimodel/SemanticVectorsOptions.java index 71511c936..36162817b 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/SemanticVectorsOptions.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/SemanticVectorsOptions.java @@ -1,18 +1,18 @@ /* -* Copyright 2018 Basis Technology Corp. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2023 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.basistech.rosette.apimodel; import com.basistech.rosette.annotations.JacksonMixin; @@ -32,4 +32,9 @@ public class SemanticVectorsOptions extends Options { */ private Boolean perToken; + /** + * @return the generation of embeddings to use for all languages, defaulting to second generation embeddings unless + * the language supports first generation embeddings + */ + private EmbeddingsMode embeddingsMode; } diff --git a/model/src/main/java/com/basistech/rosette/apimodel/SimilarTermsOptions.java b/model/src/main/java/com/basistech/rosette/apimodel/SimilarTermsOptions.java index 0fc68bab5..f7baf2005 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/SimilarTermsOptions.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/SimilarTermsOptions.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 Basis Technology Corp. + * Copyright 2023 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,4 +42,10 @@ public class SimilarTermsOptions extends Options { * @return the number of similar terms requested */ private final Integer count; + + /** + * @return the generation of embeddings to use for all languages, defaulting to second generation embeddings unless + * the language supports first generation embeddings + */ + private EmbeddingsMode embeddingsMode; } From 109c6cf716c211dbedb7537a04b8cf595711c09e Mon Sep 17 00:00:00 2001 From: Julien Cherry <6952800+juliencherry@users.noreply.github.com> Date: Mon, 5 Jun 2023 16:36:07 -0400 Subject: [PATCH 192/415] RD-2603: Update examples of semantic vectors and similar terms endpoints --- .../examples/SemanticVectorsExample.java | 32 +++++++++++-------- .../rosette/examples/SimilarTermsExample.java | 4 ++- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/examples/src/main/java/com/basistech/rosette/examples/SemanticVectorsExample.java b/examples/src/main/java/com/basistech/rosette/examples/SemanticVectorsExample.java index 85075a32e..821813748 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/SemanticVectorsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/SemanticVectorsExample.java @@ -1,22 +1,23 @@ /* -* Copyright 2022 Basis Technology Corp. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2023 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.basistech.rosette.examples; import com.basistech.rosette.api.HttpRosetteAPI; import com.basistech.rosette.apimodel.DocumentRequest; +import com.basistech.rosette.apimodel.EmbeddingsMode; import com.basistech.rosette.apimodel.SemanticVectorsOptions; import com.basistech.rosette.apimodel.SemanticVectorsResponse; @@ -50,6 +51,9 @@ private void run() throws IOException { // When no options, use . DocumentRequest request = DocumentRequest.builder() .content(semanticVectorsData) + .options(SemanticVectorsOptions.builder() + .embeddingsMode(EmbeddingsMode.GEN_1) + .build()) .build(); SemanticVectorsResponse response = rosetteApi.perform(SEMANTIC_VECTORS_SERVICE_PATH, request, SemanticVectorsResponse.class); System.out.println(responseToJson(response)); diff --git a/examples/src/main/java/com/basistech/rosette/examples/SimilarTermsExample.java b/examples/src/main/java/com/basistech/rosette/examples/SimilarTermsExample.java index fa7888fd8..9e441916b 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/SimilarTermsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/SimilarTermsExample.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Basis Technology Corp. + * Copyright 2023 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ import com.basistech.rosette.api.HttpRosetteAPI; import com.basistech.rosette.apimodel.DocumentRequest; +import com.basistech.rosette.apimodel.EmbeddingsMode; import com.basistech.rosette.apimodel.SimilarTermsOptions; import com.basistech.rosette.apimodel.SimilarTermsResponse; import com.basistech.util.LanguageCode; @@ -54,6 +55,7 @@ private void run() throws IOException { DocumentRequest request = DocumentRequest.builder() .content(similarTermsData) .options(SimilarTermsOptions.builder() + .embeddingsMode(EmbeddingsMode.GEN_1) .resultLanguages(Lists.newArrayList(LanguageCode.SPANISH, LanguageCode.GERMAN, LanguageCode.JAPANESE)) .build()) .build(); From 18f0346fbb8ec014b9f91d73377dd2c43a9b305c Mon Sep 17 00:00:00 2001 From: seth-mg Date: Fri, 23 Jun 2023 12:46:21 -0500 Subject: [PATCH 193/415] Teams instead of Slack --- Jenkinsfile.examples | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile.examples b/Jenkinsfile.examples index 2c600f9d9..fad51cfde 100644 --- a/Jenkinsfile.examples +++ b/Jenkinsfile.examples @@ -22,17 +22,18 @@ node { sh "docker run --rm -e API_KEY=${API_KEY} -e ALT_URL=${ALT_URL} -e VERSION=${PUBLISHED_VERSION} -v ${SOURCEDIR}:/source ${TEST_CONTAINER}" } } - slack(true) + postToTeams(true) } catch (e) { currentBuild.result = "FAILED" - slack(false) + postToTeams(false) throw e } } -def slack(boolean success) { +def postToTeams(boolean success) { + def webhookUrl = "${env.TEAMS_PNC_JENKINS_WEBHOOK_URL}" def color = success ? "#00FF00" : "#FF0000" def status = success ? "SUCCESSFUL" : "FAILED" - def message = status + ": Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})" - slackSend(color: color, channel: "#p-n-c_jenkins", message: message) + def message = "*" + status + ":* '${env.JOB_NAME}' - [${env.BUILD_NUMBER}] - ${env.BUILD_URL}" + office365ConnectorSend(webhookUrl: webhookUrl, color: color, message: message, status: status) } From c39682dd5222cd3ee0fcfbcbcb9f4f20a0a20c49 Mon Sep 17 00:00:00 2001 From: seth-mg Date: Fri, 23 Jun 2023 12:53:41 -0500 Subject: [PATCH 194/415] Teams not Slack --- Jenkinsfile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 424e42b14..dc4fde048 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,17 +14,18 @@ node ("docker-light") { sh "docker run --rm -e API_KEY=${API_KEY} -e ALT_URL=${ALT_URL} -v ${SOURCEDIR}:/source rosette/docker-java" } } - slack(true) + postToTeams(true) } catch (e) { currentBuild.result = "FAILED" - slack(false) + postToTeams(false) throw e } } -def slack(boolean success) { +def postToTeams(boolean success) { + def webhookUrl = "${env.TEAMS_PNC_JENKINS_WEBHOOK_URL}" def color = success ? "#00FF00" : "#FF0000" def status = success ? "SUCCESSFUL" : "FAILED" - def message = status + ": Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})" - slackSend(color: color, channel: "#p-n-c_jenkins", message: message) + def message = "*" + status + ":* '${env.JOB_NAME}' - [${env.BUILD_NUMBER}] - ${env.BUILD_URL}" + office365ConnectorSend(webhookUrl: webhookUrl, color: color, message: message, status: status) } From 673b666bed32370fb32bef51bad712994c845801 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Wed, 28 Jun 2023 13:07:13 +0200 Subject: [PATCH 195/415] TEJ-1997: added event negation options --- .../apimodel/EventsNegationOption.java | 46 +++++++++++++++++++ .../rosette/apimodel/EventsOptions.java | 4 +- 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 model/src/main/java/com/basistech/rosette/apimodel/EventsNegationOption.java diff --git a/model/src/main/java/com/basistech/rosette/apimodel/EventsNegationOption.java b/model/src/main/java/com/basistech/rosette/apimodel/EventsNegationOption.java new file mode 100644 index 000000000..07155c548 --- /dev/null +++ b/model/src/main/java/com/basistech/rosette/apimodel/EventsNegationOption.java @@ -0,0 +1,46 @@ +/* + * Copyright 2021 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.basistech.rosette.apimodel; + +import java.util.EnumSet; + +public enum EventsNegationOption { + IGNORE("Ignore"), + BOTH("Both"), + ONLY_POSITIVE("Only positive"), + ONLY_NEGATIVE("Only negative"); + + private final String label; + + EventsNegationOption(String label) { + this.label = label; + } + + public static EventsNegationOption forValue(String value) { + for (EventsNegationOption negationOption : EnumSet.allOf(EventsNegationOption.class)) { + if (negationOption.toString().equalsIgnoreCase(value)) { + return negationOption; + } + } + throw new IllegalArgumentException("invalid events negation option: " + value); + } + + @Override + public String toString() { + return label; + } +} diff --git a/model/src/main/java/com/basistech/rosette/apimodel/EventsOptions.java b/model/src/main/java/com/basistech/rosette/apimodel/EventsOptions.java index 52aa4c703..2b81f6c63 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/EventsOptions.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/EventsOptions.java @@ -34,7 +34,7 @@ public class EventsOptions extends Options { /** * Default options */ - public static final EventsOptions DEFAULT = EventsOptions.builder().build(); + public static final EventsOptions DEFAULT = EventsOptions.builder().negation(EventsNegationOption.IGNORE).build(); /** * workspaceId to use. @@ -42,4 +42,6 @@ public class EventsOptions extends Options { String workspaceId; EnumMap> plan; + + EventsNegationOption negation; } From 22c7312997ca3131c0ab0f7707aa55c2b6dd5e69 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Thu, 29 Jun 2023 12:06:16 +0200 Subject: [PATCH 196/415] TEJ-1997: update license year --- .../com/basistech/rosette/apimodel/EventsNegationOption.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/src/main/java/com/basistech/rosette/apimodel/EventsNegationOption.java b/model/src/main/java/com/basistech/rosette/apimodel/EventsNegationOption.java index 07155c548..922d9dd34 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/EventsNegationOption.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/EventsNegationOption.java @@ -1,5 +1,5 @@ /* - * Copyright 2021 Basis Technology Corp. + * Copyright 2023 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From 8feb329e45704cd3b77b8a5ff418c0150ae64a71 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Thu, 29 Jun 2023 15:01:40 +0200 Subject: [PATCH 197/415] TEJ-1997: eventsOptions builder test --- .../rosette/apimodel/EventsOptionsTest.java | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 model/src/test/java/com/basistech/rosette/apimodel/EventsOptionsTest.java diff --git a/model/src/test/java/com/basistech/rosette/apimodel/EventsOptionsTest.java b/model/src/test/java/com/basistech/rosette/apimodel/EventsOptionsTest.java new file mode 100644 index 000000000..f17c89a91 --- /dev/null +++ b/model/src/test/java/com/basistech/rosette/apimodel/EventsOptionsTest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2023 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.basistech.rosette.apimodel; + +import org.junit.jupiter.api.Test; + +import static com.basistech.rosette.apimodel.EventsOptions.DEFAULT; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +class EventsOptionsTest { + + @Test + void builderDefaults() { + var eventsOptions = DEFAULT; + assertNotNull(eventsOptions); + + assertEquals(EventsNegationOption.IGNORE, eventsOptions.getNegation()); + } +} From 7fe1b350858a10ff3a899a7761b81e97b93214ff Mon Sep 17 00:00:00 2001 From: seth-mg Date: Thu, 29 Jun 2023 11:52:53 -0500 Subject: [PATCH 198/415] Teams not Slack --- CI.Jenkinsfile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/CI.Jenkinsfile b/CI.Jenkinsfile index 36a152e1e..985484513 100644 --- a/CI.Jenkinsfile +++ b/CI.Jenkinsfile @@ -25,17 +25,18 @@ node ("docker-light") { /opt/maven-basis/bin/mvn --batch-mode clean install sonar:sonar $mySonarOpts\"" } } - slack(true) + postToTeams(true) } catch (e) { currentBuild.result = "FAILED" - slack(false) + postToTeams(false) throw e } } -def slack(boolean success) { +def postToTeams(boolean success) { + def webhookUrl = "${env.TEAMS_PNC_JENKINS_WEBHOOK_URL}" def color = success ? "#00FF00" : "#FF0000" def status = success ? "SUCCESSFUL" : "FAILED" - def message = status + ": Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})" - slackSend(color: color, channel: "#p-n-c_jenkins", message: message) + def message = "*" + status + ":* '${env.JOB_NAME}' - [${env.BUILD_NUMBER}] - ${env.BUILD_URL}" + office365ConnectorSend(webhookUrl: webhookUrl, color: color, message: message, status: status) } From 0ac4aa98ff03473d645309dd1fce3702bb543ccf Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Mon, 3 Jul 2023 10:16:45 +0200 Subject: [PATCH 199/415] TEJ-1997: preparing internal release --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 2 +- release/pom.xml | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 206a5c2bb..d9852488f 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.2-SNAPSHOT + 1.25.201-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 733288a0d..db8e10bfe 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.2-SNAPSHOT + 1.25.201-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 475e8cb1e..c76bc13b5 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.2-SNAPSHOT + 1.25.201-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index cc54c1928..959c40c69 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.2-SNAPSHOT + 1.25.201-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index e165389bc..710d18825 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.2-SNAPSHOT + 1.25.201-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 312d0a246..7245ed74c 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.2-SNAPSHOT + 1.25.201-SNAPSHOT rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 333b2c1fd..f082e9f98 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.2-SNAPSHOT + 1.25.201-SNAPSHOT target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.25.2-SNAPSHOT + 1.25.201-SNAPSHOT diff --git a/pom.xml b/pom.xml index 50587ed83..87f698e1f 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.25.2-SNAPSHOT + 1.25.201-SNAPSHOT open-source-parent com.basistech diff --git a/release/pom.xml b/release/pom.xml index 89fff4fbc..5bc7c38c1 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.2-SNAPSHOT + 1.25.201-SNAPSHOT com.basistech.rosette rosette-api-release From 6138ef5562202c77f6726bbf3a6c25fc84dea1b0 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Mon, 3 Jul 2023 10:25:46 +0200 Subject: [PATCH 200/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.25.201 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index d9852488f..275e7acb4 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.201-SNAPSHOT + 1.25.201 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index db8e10bfe..11cb6343a 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.201-SNAPSHOT + 1.25.201 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index c76bc13b5..ed0236d4e 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.201-SNAPSHOT + 1.25.201 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 959c40c69..c055640f6 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.201-SNAPSHOT + 1.25.201 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 710d18825..0ebb694b6 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.201-SNAPSHOT + 1.25.201 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 7245ed74c..2556e4d47 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.201-SNAPSHOT + 1.25.201 rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index f082e9f98..9bf44a091 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.201-SNAPSHOT + 1.25.201 target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.25.201-SNAPSHOT + 1.25.201 diff --git a/pom.xml b/pom.xml index 87f698e1f..80b3ed2b5 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.25.201-SNAPSHOT + 1.25.201 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - HEAD + rosette-api-java-binding-1.25.201 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 5bc7c38c1..d9f1a0f05 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.201-SNAPSHOT + 1.25.201 com.basistech.rosette rosette-api-release From f1e31b79f8caf1b2cb44f1ac1539895ac2b71f8b Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Mon, 3 Jul 2023 10:25:50 +0200 Subject: [PATCH 201/415] [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 275e7acb4..62e1c48ac 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.201 + 1.25.202-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 11cb6343a..3805113ed 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.201 + 1.25.202-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index ed0236d4e..0545314ed 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.201 + 1.25.202-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index c055640f6..afc104ccb 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.201 + 1.25.202-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 0ebb694b6..46e9952ef 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.201 + 1.25.202-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 2556e4d47..761da986c 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.201 + 1.25.202-SNAPSHOT rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 9bf44a091..42299eaa5 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.201 + 1.25.202-SNAPSHOT target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.25.201 + 1.25.202-SNAPSHOT diff --git a/pom.xml b/pom.xml index 80b3ed2b5..f2b4de3e2 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.25.201 + 1.25.202-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.25.201 + HEAD This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index d9f1a0f05..d529c8bd2 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.201 + 1.25.202-SNAPSHOT com.basistech.rosette rosette-api-release From 2323d9d9934f1fd5b9e9acc9ab2c03310b4780d5 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Tue, 11 Jul 2023 17:42:38 -0400 Subject: [PATCH 202/415] Preparing release. Version set to 1.19.1-SNAPSHOT --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 2 +- release/pom.xml | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 206a5c2bb..12cfd46ed 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.2-SNAPSHOT + 1.19.1-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 733288a0d..2d2612363 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.2-SNAPSHOT + 1.19.1-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 475e8cb1e..211a3be2a 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.2-SNAPSHOT + 1.19.1-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index cc54c1928..4eda3e2a4 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.2-SNAPSHOT + 1.19.1-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index e165389bc..7f537c4a6 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.2-SNAPSHOT + 1.19.1-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 312d0a246..e9733cae2 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.2-SNAPSHOT + 1.19.1-SNAPSHOT rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 333b2c1fd..15591e2e8 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.2-SNAPSHOT + 1.19.1-SNAPSHOT target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.25.2-SNAPSHOT + 1.19.1-SNAPSHOT diff --git a/pom.xml b/pom.xml index 50587ed83..5c421df58 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.25.2-SNAPSHOT + 1.19.1-SNAPSHOT open-source-parent com.basistech diff --git a/release/pom.xml b/release/pom.xml index 89fff4fbc..ac2329728 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.2-SNAPSHOT + 1.19.1-SNAPSHOT com.basistech.rosette rosette-api-release From 97661ab95ed4561f4bb63fada915698cfdc145d2 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Tue, 11 Jul 2023 17:43:32 -0400 Subject: [PATCH 203/415] Preparing release. Version set to 1.26.0-SNAPSHOT --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 2 +- release/pom.xml | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 12cfd46ed..63af6ba7d 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.19.1-SNAPSHOT + 1.26.0-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 2d2612363..efdd475fa 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.19.1-SNAPSHOT + 1.26.0-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 211a3be2a..a5fa54b16 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.19.1-SNAPSHOT + 1.26.0-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 4eda3e2a4..21fefb4bd 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.19.1-SNAPSHOT + 1.26.0-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 7f537c4a6..e15387787 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.19.1-SNAPSHOT + 1.26.0-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index e9733cae2..10ae55a67 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.19.1-SNAPSHOT + 1.26.0-SNAPSHOT rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 15591e2e8..030699af3 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.19.1-SNAPSHOT + 1.26.0-SNAPSHOT target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.19.1-SNAPSHOT + 1.26.0-SNAPSHOT diff --git a/pom.xml b/pom.xml index 5c421df58..a6c3b1778 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.19.1-SNAPSHOT + 1.26.0-SNAPSHOT open-source-parent com.basistech diff --git a/release/pom.xml b/release/pom.xml index ac2329728..d1ec444da 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.19.1-SNAPSHOT + 1.26.0-SNAPSHOT com.basistech.rosette rosette-api-release From 365b3b0e11b0cb6eaf3d61f4b9cd964ffdb59177 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Tue, 11 Jul 2023 17:44:59 -0400 Subject: [PATCH 204/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.26.0 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 63af6ba7d..90041f518 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.26.0-SNAPSHOT + 1.26.0 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index efdd475fa..1a586bc51 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.26.0-SNAPSHOT + 1.26.0 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index a5fa54b16..f48612589 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.26.0-SNAPSHOT + 1.26.0 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 21fefb4bd..7222e6361 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.26.0-SNAPSHOT + 1.26.0 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index e15387787..c6e59fe90 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.26.0-SNAPSHOT + 1.26.0 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 10ae55a67..67c2747f0 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.26.0-SNAPSHOT + 1.26.0 rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 030699af3..9f50c9ac2 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.26.0-SNAPSHOT + 1.26.0 target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.26.0-SNAPSHOT + 1.26.0 diff --git a/pom.xml b/pom.xml index a6c3b1778..9111e3abd 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.26.0-SNAPSHOT + 1.26.0 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - HEAD + rosette-api-java-binding-1.26.0 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index d1ec444da..2a075f32d 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.26.0-SNAPSHOT + 1.26.0 com.basistech.rosette rosette-api-release From 2a0720eb6144047cd6f3a73caa773ee0fa5d9308 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Tue, 11 Jul 2023 17:45:02 -0400 Subject: [PATCH 205/415] [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 90041f518..28adb4cc2 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.26.0 + 1.26.1-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 1a586bc51..3e30c50f2 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.26.0 + 1.26.1-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index f48612589..8ebd3097e 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.26.0 + 1.26.1-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 7222e6361..379884b06 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.26.0 + 1.26.1-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index c6e59fe90..51f321cb3 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.26.0 + 1.26.1-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 67c2747f0..2143a3ee3 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.26.0 + 1.26.1-SNAPSHOT rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 9f50c9ac2..003397415 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.26.0 + 1.26.1-SNAPSHOT target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.26.0 + 1.26.1-SNAPSHOT diff --git a/pom.xml b/pom.xml index 9111e3abd..4eb609f7f 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.26.0 + 1.26.1-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.26.0 + HEAD This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 2a075f32d..33ce3caa2 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.26.0 + 1.26.1-SNAPSHOT com.basistech.rosette rosette-api-release From a91276c03e4e55e761240820c3a0050d94d399f7 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Thu, 13 Jul 2023 17:12:20 +0200 Subject: [PATCH 206/415] RCB-597: create request class for multithreading --- .../basistech/rosette/api/HttpRosetteAPI.java | 74 ++++++++++++++++++- .../basistech/rosette/api/RosetteRequest.java | 52 +++++++++++++ 2 files changed, 124 insertions(+), 2 deletions(-) create mode 100644 api/src/main/java/com/basistech/rosette/api/RosetteRequest.java diff --git a/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java b/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java index 5299fabd7..930c703b4 100644 --- a/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java +++ b/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java @@ -67,13 +67,18 @@ import java.net.URISyntaxException; import java.nio.charset.StandardCharsets; import java.util.ArrayList; +import java.util.Collection; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Properties; import java.util.Set; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; import java.util.concurrent.Future; +import java.util.concurrent.TimeUnit; import java.util.regex.Pattern; +import java.util.stream.Collectors; import java.util.zip.GZIPInputStream; import static java.net.HttpURLConnection.HTTP_OK; @@ -98,6 +103,8 @@ public class HttpRosetteAPI extends AbstractRosetteAPI { private List
additionalHeaders; private int connectionConcurrency = 2; private boolean closeClientOnClose = true; + private ExecutorService threadPool; + private int shutdownWait; private HttpRosetteAPI() { // use builder @@ -119,7 +126,8 @@ private HttpRosetteAPI() { */ HttpRosetteAPI(String key, String urlToCall, Integer failureRetries, CloseableHttpClient httpClient, List
additionalHeaders, - Integer connectionConcurrency, boolean onlyAcceptKnownFields) throws HttpRosetteAPIException { + Integer connectionConcurrency, boolean onlyAcceptKnownFields, + Integer shutdownWait) throws HttpRosetteAPIException { urlBase = urlToCall == null ? urlBase : TRAILING_SLASHES.matcher(urlToCall.trim()).replaceAll(""); if (failureRetries != null && failureRetries >= 1) { this.failureRetries = failureRetries; @@ -128,6 +136,10 @@ private HttpRosetteAPI() { if (connectionConcurrency != null) { this.connectionConcurrency = connectionConcurrency; } + this.threadPool = Executors.newFixedThreadPool(this.connectionConcurrency * 2); + if (shutdownWait != null) { + this.shutdownWait = shutdownWait; + } mapper = ApiModelMixinModule.setupObjectMapper(new ObjectMapper()); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, onlyAcceptKnownFields); @@ -601,11 +613,57 @@ private T getResponse(HttpResponse httpResponse, Class cla } } + /** + * Creates a RosetteRequest which can be sent concurrently through this HttpRosetteAPI + * + * @param endpoint the endpoint to which the request is sent to + * @param request the request object + * @param responseClass Response's class + * @return RequestThread which when started sends the predefined request through this http client + * @param Type of the response + */ + public RosetteRequest createRosetteRequest(String endpoint, + Request request, + Class responseClass) { + return new RosetteRequest<>(this, request, endpoint, responseClass); + } + + /** + * Sends the request concurrently + * @param request the request to be sent + * @return A Future with the response of the request + * @param type of the response object + */ + public Future submitRequest(RosetteRequest request) { + return this.threadPool.submit(request); + } + + /** + * Sends the requests concurrently + * @param requests list of the requests to be sent + * @return A list of Futures with the responses to the requests + */ + public List> submitRequests(Collection> requests) { + return requests.stream() + .map(this::submitRequest) + .collect(Collectors.toList()); + } + + @Override public void close() throws IOException { if (closeClientOnClose) { httpClient.close(); } + try { + this.threadPool.shutdown(); + boolean terminated = this.threadPool.awaitTermination(this.shutdownWait, TimeUnit.SECONDS); + if (!terminated) { + this.threadPool.shutdownNow(); + } + } catch (InterruptedException e) { + this.threadPool.shutdownNow(); + } } /** @@ -619,6 +677,7 @@ public static class Builder { private CloseableHttpClient httpClient; private List
additionalHeaders = new ArrayList<>(); private boolean onlyAcceptKnownFields; + private Integer shutdownWait; /** * Specify the API key. This is required for use with the public API, and @@ -701,6 +760,16 @@ public Builder onlyAcceptKnownFields(boolean onlyAcceptKnownFields) { return this; } + /** + * Specify how long in seconds the api should wait for pending requests before forcefully terminating + * @param shutdownWaitSeconds the length of the wait in seconds. The default is 0. + * @return this. + */ + public Builder shutdownWait(int shutdownWaitSeconds) { + this.shutdownWait = shutdownWaitSeconds; + return this; + } + /** * Build the API object. * @return the new API object. @@ -713,7 +782,8 @@ public HttpRosetteAPI build() throws HttpRosetteAPIException { httpClient, additionalHeaders, concurrency, - onlyAcceptKnownFields); + onlyAcceptKnownFields, + shutdownWait); } } } diff --git a/api/src/main/java/com/basistech/rosette/api/RosetteRequest.java b/api/src/main/java/com/basistech/rosette/api/RosetteRequest.java new file mode 100644 index 000000000..724bcef79 --- /dev/null +++ b/api/src/main/java/com/basistech/rosette/api/RosetteRequest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.basistech.rosette.api; + +import com.basistech.rosette.apimodel.Request; +import com.basistech.rosette.apimodel.Response; + +import java.util.concurrent.Callable; + +/** + * This class encompasses a future request that can be sent concurrently + * @param type of the response object + */ +public class RosetteRequest implements Callable { + private final HttpRosetteAPI api; + private final Request request; + private final String servicePath; + private final Class responseClass; + private R response; + + RosetteRequest(HttpRosetteAPI api, + Request request, + String servicePath, Class responseClass) { + this.api = api; + this.request = request; + this.servicePath = servicePath; + this.responseClass = responseClass; + } + + @Override + public R call() { + this.response = api.perform(this.servicePath, this.request, this.responseClass); + return this.response; + } + + public R getResponse() { + return this.response; + } +} From 25fa222c0aec9da739d87af6a38989ca0feb5701 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Thu, 13 Jul 2023 17:13:23 +0200 Subject: [PATCH 207/415] RCB-597: add example --- .../rosette/examples/ConcurrencyExample.java | 143 ++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 examples/src/main/java/com/basistech/rosette/examples/ConcurrencyExample.java diff --git a/examples/src/main/java/com/basistech/rosette/examples/ConcurrencyExample.java b/examples/src/main/java/com/basistech/rosette/examples/ConcurrencyExample.java new file mode 100644 index 000000000..5f5c2c6ff --- /dev/null +++ b/examples/src/main/java/com/basistech/rosette/examples/ConcurrencyExample.java @@ -0,0 +1,143 @@ +/* + * Copyright 2023 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.basistech.rosette.examples; + +import com.basistech.rosette.api.HttpRosetteAPI; +import com.basistech.rosette.api.MorphologicalFeature; +import com.basistech.rosette.api.RosetteRequest; +import com.basistech.rosette.apimodel.DocumentRequest; +import com.basistech.rosette.apimodel.EntitiesOptions; +import com.basistech.rosette.apimodel.EntitiesResponse; +import com.basistech.rosette.apimodel.LanguageOptions; +import com.basistech.rosette.apimodel.LanguageResponse; +import com.basistech.rosette.apimodel.MorphologyOptions; +import com.basistech.rosette.apimodel.MorphologyResponse; +import com.basistech.rosette.apimodel.Name; +import com.basistech.rosette.apimodel.NameDeduplicationRequest; +import com.basistech.rosette.apimodel.Response; +import com.basistech.rosette.apimodel.TokensResponse; +import com.basistech.rosette.apimodel.TransliterationResponse; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.Future; + +import static com.basistech.rosette.api.common.AbstractRosetteAPI.ENTITIES_SERVICE_PATH; +import static com.basistech.rosette.api.common.AbstractRosetteAPI.LANGUAGE_SERVICE_PATH; +import static com.basistech.rosette.api.common.AbstractRosetteAPI.MORPHOLOGY_SERVICE_PATH; +import static com.basistech.rosette.api.common.AbstractRosetteAPI.NAME_DEDUPLICATION_SERVICE_PATH; +import static com.basistech.rosette.api.common.AbstractRosetteAPI.TOKENS_SERVICE_PATH; +import static com.basistech.rosette.api.common.AbstractRosetteAPI.TRANSLITERATION_SERVICE_PATH; + +/** + * Example which demonstrates the usage of concurrent requests + */ +public final class ConcurrencyExample extends ExampleBase { + public static void main(String[] args) { + try { + new ConcurrencyExample().run(); + } catch (Exception e) { + e.printStackTrace(); + System.exit(1); + } + } + + private void run() throws IOException, ExecutionException, InterruptedException { + //Setting up the Api + int maximumConcurrency = 3; + HttpRosetteAPI rosetteApi = new HttpRosetteAPI.Builder() + .key("getApiKeyFromSystemProperty") + .url("http://localhost:8181/rest/v1") + .connectionConcurrency(maximumConcurrency) + .build(); + + List> threads = new ArrayList<>(); + // Setting up entities request + String entitiesTextData = + "The Securities and Exchange Commission today announced the leadership of the agency’s trial unit. " + + "Bridget Fitzpatrick has been named Chief Litigation Counsel of the SEC " + + "and David Gottesman will continue to serve as the agency’s Deputy Chief Litigation Counsel. " + + "Since December 2016, Ms. Fitzpatrick and Mr. Gottesman have served as Co-Acting Chief Litigation Counsel. " + + "In that role, they were jointly responsible for supervising the trial unit at the agency’s Washington D.C. headquarters " + + "as well as coordinating with litigators in the SEC’s 11 regional offices around the country."; + threads.add( + rosetteApi.createRosetteRequest(ENTITIES_SERVICE_PATH, + DocumentRequest.builder().content(entitiesTextData).build(), + EntitiesResponse.class) + ); + // Setting up language request + String languageData = "Por favor Señorita, says the man."; + threads.add( + rosetteApi.createRosetteRequest(LANGUAGE_SERVICE_PATH, + DocumentRequest.builder().content(languageData).build(), + LanguageResponse.class) + ); + // Setting up morphology request + String morphologyCompleteData = "The quick brown fox jumped over the lazy dog. 👍🏾 Yes he did. B)"; + threads.add( + rosetteApi.createRosetteRequest(MORPHOLOGY_SERVICE_PATH + "/" + MorphologicalFeature.COMPLETE, + DocumentRequest.builder().content(morphologyCompleteData).build(), + MorphologyResponse.class) + ); + //Setting up names deduplication request + String nameDedupeData = "John Smith,Johnathon Smith,Fred Jones"; + List listOfNames = new ArrayList<>(Arrays.asList(nameDedupeData.split(","))); + + ArrayList names = new ArrayList<>(); + for (String name: listOfNames) { + names.add(Name.builder().text(name).build()); + } + double threshold = 0.75; + threads.add( + rosetteApi.createRosetteRequest(NAME_DEDUPLICATION_SERVICE_PATH, + NameDeduplicationRequest.builder().names(names).threshold(threshold).build(), + MorphologyResponse.class) + ); + //Setting up the tokens request + String tokensData = "北京大学生物系主任办公室内部会议"; + threads.add( + rosetteApi.createRosetteRequest(TOKENS_SERVICE_PATH, + DocumentRequest.builder().content(tokensData).build(), + TokensResponse.class) + ); + //Setting up the transliteration request + String transliterationData = "ana r2ye7 el gam3a el sa3a 3 el 3asr"; + threads.add( + rosetteApi.createRosetteRequest(TRANSLITERATION_SERVICE_PATH, + DocumentRequest.builder().content(transliterationData).build(), + TransliterationResponse.class) + ); + + // start the threads + List> futures = rosetteApi.submitRequests(threads); + + // wait for the threads to finish + for (int i = 0; i < threads.size(); i++) { + futures.get(i).get(); + } + + for (int i = 0; i < threads.size(); i++) { + System.out.println(responseToJson(threads.get(i).getResponse())); + } + rosetteApi.close(); + } + + + +} From 5d12f094fdc0088570e1f037d6b38470b09e96ce Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Fri, 14 Jul 2023 11:18:05 +0200 Subject: [PATCH 208/415] RCB-597: handling ErrorResponses --- .../basistech/rosette/api/HttpRosetteAPI.java | 14 ++++++-------- .../basistech/rosette/api/RosetteRequest.java | 19 +++++++++++-------- .../rosette/examples/ConcurrencyExample.java | 7 +++---- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java b/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java index 930c703b4..7943becd2 100644 --- a/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java +++ b/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java @@ -620,21 +620,19 @@ private T getResponse(HttpResponse httpResponse, Class cla * @param request the request object * @param responseClass Response's class * @return RequestThread which when started sends the predefined request through this http client - * @param Type of the response */ - public RosetteRequest createRosetteRequest(String endpoint, - Request request, - Class responseClass) { - return new RosetteRequest<>(this, request, endpoint, responseClass); + public RosetteRequest createRosetteRequest(String endpoint, + Request request, + Class responseClass) { + return new RosetteRequest(this, request, endpoint, responseClass); } /** * Sends the request concurrently * @param request the request to be sent * @return A Future with the response of the request - * @param type of the response object */ - public Future submitRequest(RosetteRequest request) { + public Future submitRequest(RosetteRequest request) { return this.threadPool.submit(request); } @@ -643,7 +641,7 @@ public Future submitRequest(RosetteRequest request) { * @param requests list of the requests to be sent * @return A list of Futures with the responses to the requests */ - public List> submitRequests(Collection> requests) { + public List> submitRequests(Collection requests) { return requests.stream() .map(this::submitRequest) .collect(Collectors.toList()); diff --git a/api/src/main/java/com/basistech/rosette/api/RosetteRequest.java b/api/src/main/java/com/basistech/rosette/api/RosetteRequest.java index 724bcef79..bf2f5598f 100644 --- a/api/src/main/java/com/basistech/rosette/api/RosetteRequest.java +++ b/api/src/main/java/com/basistech/rosette/api/RosetteRequest.java @@ -22,18 +22,17 @@ /** * This class encompasses a future request that can be sent concurrently - * @param type of the response object */ -public class RosetteRequest implements Callable { +public class RosetteRequest implements Callable { private final HttpRosetteAPI api; private final Request request; private final String servicePath; - private final Class responseClass; - private R response; + private final Class responseClass; + private Response response; RosetteRequest(HttpRosetteAPI api, Request request, - String servicePath, Class responseClass) { + String servicePath, Class responseClass) { this.api = api; this.request = request; this.servicePath = servicePath; @@ -41,12 +40,16 @@ public class RosetteRequest implements Callable { } @Override - public R call() { - this.response = api.perform(this.servicePath, this.request, this.responseClass); + public Response call() { + try { + this.response = api.perform(this.servicePath, this.request, this.responseClass); + } catch (HttpRosetteAPIException ex) { + this.response = ex.getErrorResponse(); + } return this.response; } - public R getResponse() { + public Response getResponse() { return this.response; } } diff --git a/examples/src/main/java/com/basistech/rosette/examples/ConcurrencyExample.java b/examples/src/main/java/com/basistech/rosette/examples/ConcurrencyExample.java index 5f5c2c6ff..c981ce601 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/ConcurrencyExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/ConcurrencyExample.java @@ -67,7 +67,7 @@ private void run() throws IOException, ExecutionException, InterruptedException .connectionConcurrency(maximumConcurrency) .build(); - List> threads = new ArrayList<>(); + List threads = new ArrayList<>(); // Setting up entities request String entitiesTextData = "The Securities and Exchange Commission today announced the leadership of the agency’s trial unit. " @@ -89,10 +89,9 @@ private void run() throws IOException, ExecutionException, InterruptedException LanguageResponse.class) ); // Setting up morphology request - String morphologyCompleteData = "The quick brown fox jumped over the lazy dog. 👍🏾 Yes he did. B)"; threads.add( rosetteApi.createRosetteRequest(MORPHOLOGY_SERVICE_PATH + "/" + MorphologicalFeature.COMPLETE, - DocumentRequest.builder().content(morphologyCompleteData).build(), + DocumentRequest.builder().build(), MorphologyResponse.class) ); //Setting up names deduplication request @@ -125,7 +124,7 @@ private void run() throws IOException, ExecutionException, InterruptedException ); // start the threads - List> futures = rosetteApi.submitRequests(threads); + List> futures = rosetteApi.submitRequests(threads); // wait for the threads to finish for (int i = 0; i < threads.size(); i++) { From 9476cb90e14a0246d08e548b2e44544fbe27a797 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Fri, 14 Jul 2023 13:31:21 +0200 Subject: [PATCH 209/415] RCB-597: add tests --- .../rosette/api/RosetteRequestTest.java | 234 ++++++++++++++++++ .../rosette/examples/ConcurrencyExample.java | 1 + 2 files changed, 235 insertions(+) create mode 100644 api/src/test/java/com/basistech/rosette/api/RosetteRequestTest.java diff --git a/api/src/test/java/com/basistech/rosette/api/RosetteRequestTest.java b/api/src/test/java/com/basistech/rosette/api/RosetteRequestTest.java new file mode 100644 index 000000000..669a36761 --- /dev/null +++ b/api/src/test/java/com/basistech/rosette/api/RosetteRequestTest.java @@ -0,0 +1,234 @@ +/* + * Copyright 2023 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.basistech.rosette.api; + +import com.basistech.rosette.api.common.AbstractRosetteAPI; +import com.basistech.rosette.apimodel.DocumentRequest; +import com.basistech.rosette.apimodel.EntitiesOptions; +import com.basistech.rosette.apimodel.EntitiesResponse; +import com.basistech.rosette.apimodel.ErrorResponse; +import com.basistech.rosette.apimodel.LanguageOptions; +import com.basistech.rosette.apimodel.LanguageResponse; +import com.basistech.rosette.apimodel.Response; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClients; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockserver.client.MockServerClient; +import org.mockserver.junit.jupiter.MockServerExtension; +import org.mockserver.matchers.Times; +import org.mockserver.model.HttpRequest; +import org.mockserver.model.HttpResponse; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.Future; +import java.util.concurrent.TimeUnit; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertInstanceOf; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +@ExtendWith(MockServerExtension.class) +class RosetteRequestTest { + private MockServerClient mockServer; + private HttpRosetteAPI api; + + @BeforeEach + void setup(MockServerClient mockServer) { + this.mockServer = mockServer; + } + + private void setupResponse(String requestPath, String responseString, int statusCode, int delayMillis, int requestTimes) { + this.mockServer.when(HttpRequest.request().withPath(requestPath), Times.exactly(requestTimes)) + .respond(HttpResponse.response() + .withHeader("Content-Type", "application/json") + .withHeader("X-RosetteAPI-Concurrency", "5") + .withStatusCode(statusCode) + .withBody(responseString) + .withDelay(TimeUnit.MILLISECONDS, delayMillis)); + } + + + @Test + void successfulRequest() throws ExecutionException, InterruptedException { + //Api client setup + this.api = new HttpRosetteAPI.Builder().url(String.format("http://localhost:%d/rest/v1", mockServer.getPort())).build(); + + //response setup + String entitiesResponse = "{\"entities\" : [ { \"type\" : \"ORGANIZATION\", \"mention\" : \"Securities and Exchange Commission\", \"normalized\" : \"U.S. Securities and Exchange Commission\", \"count\" : 1, \"mentionOffsets\" : [ { \"startOffset\" : 4, \"endOffset\" : 38 } ], \"entityId\" : \"Q953944\", \"confidence\" : 0.39934742, \"linkingConfidence\" : 0.67404154 } ] }"; + setupResponse("/rest/v1/entities", entitiesResponse, 200, 0, 1); + + //request setup + String entitiesTextData = "The Securities and Exchange Commission today announced the leadership of the agency’s trial unit."; + DocumentRequest entitiesRequestData = DocumentRequest.builder() + .content(entitiesTextData) + .build(); + RosetteRequest entitiesRequest = this.api.createRosetteRequest(AbstractRosetteAPI.ENTITIES_SERVICE_PATH, entitiesRequestData, EntitiesResponse.class); + + //testing the request + Future response = this.api.submitRequest(entitiesRequest); + assertInstanceOf(EntitiesResponse.class, response.get()); + assertEquals(response.get(), entitiesRequest.getResponse()); + } + + + @Test + void errorResponse() throws ExecutionException, InterruptedException { + //Api client setup + this.api = new HttpRosetteAPI.Builder().url(String.format("http://localhost:%d/rest/v1", mockServer.getPort())).build(); + + //response setup + String entitiesResponse = "{ \"code\" : \"badRequestFormat\", \"message\" : \"no content provided; must be one of an attachment, an inline \\\"content\\\" field, or an external \\\"contentUri\\\"\" }"; + setupResponse("/rest/v1/entities", entitiesResponse, 400, 0, 1); + + //request setup + DocumentRequest entitiesRequestData = DocumentRequest.builder() + .build(); + RosetteRequest entitiesRequest = this.api.createRosetteRequest(AbstractRosetteAPI.ENTITIES_SERVICE_PATH, entitiesRequestData, EntitiesResponse.class); + + //testing the request + Future response = this.api.submitRequest(entitiesRequest); + assertInstanceOf(ErrorResponse.class, response.get()); + assertEquals(response.get(), entitiesRequest.getResponse()); + } + + @Test + void testTiming() throws ExecutionException, InterruptedException { + int delay = 100; + //api setup + this.api = new HttpRosetteAPI.Builder().url(String.format("http://localhost:%d/rest/v1", mockServer.getPort())) + .connectionConcurrency(1).build(); + + //responses setup + int entitiesRespCount = 10; + int languageRespCount = 4; + assertEquals(0, entitiesRespCount % 2); + assertEquals(0, entitiesRespCount % 2); + String entitiesResponse = "{\"entities\" : [ { \"type\" : \"ORGANIZATION\", \"mention\" : \"Securities and Exchange Commission\", \"normalized\" : \"U.S. Securities and Exchange Commission\", \"count\" : 1, \"mentionOffsets\" : [ { \"startOffset\" : 4, \"endOffset\" : 38 } ], \"entityId\" : \"Q953944\", \"confidence\" : 0.39934742, \"linkingConfidence\" : 0.67404154 } ] }"; + setupResponse("/rest/v1/entities", entitiesResponse, 200, delay, entitiesRespCount); + String languageResponse = " {\"code\" : \"badRequestFormat\", \"message\" : \"no content provided; must be one of an attachment, an inline \\\"content\\\" field, or an external \\\"contentUri\\\"\" }"; + setupResponse("/rest/v1/language", languageResponse, 400, delay, languageRespCount); + + //requests setup + String entitiesTextData = "The Securities and Exchange Commission today announced the leadership of the agency’s trial unit."; + DocumentRequest entitiesRequestData = DocumentRequest.builder() + .content(entitiesTextData) + .build(); + DocumentRequest languageRequestData = DocumentRequest.builder().build(); + List requests = new ArrayList<>(); + for (int i = 0; i < entitiesRespCount / 2; i++) { + requests.add(this.api.createRosetteRequest(AbstractRosetteAPI.ENTITIES_SERVICE_PATH, entitiesRequestData, EntitiesResponse.class)); + } + for (int i = 0; i < languageRespCount / 2; i++) { + requests.add(this.api.createRosetteRequest(AbstractRosetteAPI.LANGUAGE_SERVICE_PATH, languageRequestData, LanguageResponse.class)); + } + + //run requests + Date d1 = new Date(); + List> responses = this.api.submitRequests(requests); + for (int i = 0; i < responses.size(); i++) { + responses.get(i).get(); + } + Date d2 = new Date(); + + assertTrue(d2.getTime() - d1.getTime() > delay * requests.size()); // at least as long as the delay in the request + + //run requests concurrency + int concurrency = 3; + this.api = new HttpRosetteAPI.Builder().url(String.format("http://localhost:%d/rest/v1", mockServer.getPort())) + .connectionConcurrency(3).build(); + + requests = new ArrayList<>(); + for (int i = 0; i < entitiesRespCount / 2; i++) { + requests.add(this.api.createRosetteRequest(AbstractRosetteAPI.ENTITIES_SERVICE_PATH, entitiesRequestData, EntitiesResponse.class)); + } + for (int i = 0; i < entitiesRespCount / 2; i++) { + requests.add(this.api.createRosetteRequest(AbstractRosetteAPI.LANGUAGE_SERVICE_PATH, languageRequestData, LanguageResponse.class)); + } + + + d1 = new Date(); + responses = this.api.submitRequests(requests); + for (int i = 0; i < responses.size(); i++) { + responses.get(i).get(); + } + d2 = new Date(); + + assertTrue(d2.getTime() - d1.getTime() < delay * requests.size()); // less than serial requests + assertTrue(d2.getTime() - d1.getTime() > requests.size() / concurrency * delay); // running faster than this would suggest it exceeds the maximum concurrency + } + + private RosetteRequest setupShutdownTest(int shutdownWaitSeconds, int responseDelayMillis, CloseableHttpClient client) { + this.api = new HttpRosetteAPI.Builder() + .url(String.format("http://localhost:%d/rest/v1", mockServer.getPort())) + .shutdownWait(shutdownWaitSeconds) + .httpClient(client) + .build(); + + //response setup + String entitiesResponse = "{\"entities\" : [ { \"type\" : \"ORGANIZATION\", \"mention\" : \"Securities and Exchange Commission\", \"normalized\" : \"U.S. Securities and Exchange Commission\", \"count\" : 1, \"mentionOffsets\" : [ { \"startOffset\" : 4, \"endOffset\" : 38 } ], \"entityId\" : \"Q953944\", \"confidence\" : 0.39934742, \"linkingConfidence\" : 0.67404154 } ] }"; + setupResponse("/rest/v1/entities", entitiesResponse, 200, responseDelayMillis, 1); + + //request setup + String entitiesTextData = "The Securities and Exchange Commission today announced the leadership of the agency’s trial unit."; + DocumentRequest entitiesRequestData = DocumentRequest.builder() + .content(entitiesTextData) + .build(); + return this.api.createRosetteRequest(AbstractRosetteAPI.ENTITIES_SERVICE_PATH, entitiesRequestData, EntitiesResponse.class); + } + + @Test + void successfulShutdown() throws IOException { + /* creating http client to avoid closing the httpClient of HttpRosetteApi during close() + * which automatically closes the pending threads. This way the shutdown behaviour can be tested.*/ + CloseableHttpClient httpClient = HttpClients.createDefault(); + int shutdownWait = 3; + RosetteRequest request = setupShutdownTest(shutdownWait, 1000, httpClient); + this.api.submitRequest(request); + this.api.close(); + httpClient.close(); + + assertInstanceOf(EntitiesResponse.class, request.getResponse()); //got response successfully + } + + @Test + void timeoutShutdown() throws IOException { + /* creating http client to avoid closing the httpClient of HttpRosetteApi during close() + * which automatically closes the pending threads. This way the shutdown behaviour can be tested.*/ + CloseableHttpClient httpClient = HttpClients.createDefault(); + int shutdownWait = 3; + RosetteRequest request = setupShutdownTest(shutdownWait, 5000, httpClient); + this.api.submitRequest(request); + this.api.close(); + + httpClient.close(); + assertNull(request.getResponse()); //didn't get a response, it was forcefully shutdown + } + + + @AfterEach + void after() throws IOException { + this.api.close(); + } + +} \ No newline at end of file diff --git a/examples/src/main/java/com/basistech/rosette/examples/ConcurrencyExample.java b/examples/src/main/java/com/basistech/rosette/examples/ConcurrencyExample.java index c981ce601..d10e71d22 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/ConcurrencyExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/ConcurrencyExample.java @@ -89,6 +89,7 @@ private void run() throws IOException, ExecutionException, InterruptedException LanguageResponse.class) ); // Setting up morphology request + // No content is given to this request and it will return an error response threads.add( rosetteApi.createRosetteRequest(MORPHOLOGY_SERVICE_PATH + "/" + MorphologicalFeature.COMPLETE, DocumentRequest.builder().build(), From 8e7422ffbd29e5ee85de6de56e2f6641b2554edd Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Fri, 14 Jul 2023 13:33:19 +0200 Subject: [PATCH 210/415] RCB-597: fix example api setup --- .../com/basistech/rosette/examples/ConcurrencyExample.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/src/main/java/com/basistech/rosette/examples/ConcurrencyExample.java b/examples/src/main/java/com/basistech/rosette/examples/ConcurrencyExample.java index d10e71d22..187b9b471 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/ConcurrencyExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/ConcurrencyExample.java @@ -62,8 +62,8 @@ private void run() throws IOException, ExecutionException, InterruptedException //Setting up the Api int maximumConcurrency = 3; HttpRosetteAPI rosetteApi = new HttpRosetteAPI.Builder() - .key("getApiKeyFromSystemProperty") - .url("http://localhost:8181/rest/v1") + .key(getApiKeyFromSystemProperty()) + .url(getAltUrlFromSystemProperty()) .connectionConcurrency(maximumConcurrency) .build(); From bfe2b87d280dbc59a7c3b83c75550b5291581381 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Fri, 14 Jul 2023 13:54:06 +0200 Subject: [PATCH 211/415] RCB-597: fix doc --- api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java b/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java index 7943becd2..5361dd34b 100644 --- a/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java +++ b/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java @@ -619,7 +619,7 @@ private T getResponse(HttpResponse httpResponse, Class cla * @param endpoint the endpoint to which the request is sent to * @param request the request object * @param responseClass Response's class - * @return RequestThread which when started sends the predefined request through this http client + * @return RosetteRequest which when started sends the predefined request through this http client */ public RosetteRequest createRosetteRequest(String endpoint, Request request, From 1645d03269aceaa287047e9fd56840aa93ffdb96 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Fri, 14 Jul 2023 13:54:22 +0200 Subject: [PATCH 212/415] RCB-597: fix response type --- .../com/basistech/rosette/examples/ConcurrencyExample.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/src/main/java/com/basistech/rosette/examples/ConcurrencyExample.java b/examples/src/main/java/com/basistech/rosette/examples/ConcurrencyExample.java index 187b9b471..cc1dd38ea 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/ConcurrencyExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/ConcurrencyExample.java @@ -27,6 +27,7 @@ import com.basistech.rosette.apimodel.MorphologyResponse; import com.basistech.rosette.apimodel.Name; import com.basistech.rosette.apimodel.NameDeduplicationRequest; +import com.basistech.rosette.apimodel.NameDeduplicationResponse; import com.basistech.rosette.apimodel.Response; import com.basistech.rosette.apimodel.TokensResponse; import com.basistech.rosette.apimodel.TransliterationResponse; @@ -107,7 +108,7 @@ private void run() throws IOException, ExecutionException, InterruptedException threads.add( rosetteApi.createRosetteRequest(NAME_DEDUPLICATION_SERVICE_PATH, NameDeduplicationRequest.builder().names(names).threshold(threshold).build(), - MorphologyResponse.class) + NameDeduplicationResponse.class) ); //Setting up the tokens request String tokensData = "北京大学生物系主任办公室内部会议"; From b585780608566fe8465f8668953ce7bf11af957f Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Fri, 14 Jul 2023 14:01:32 +0200 Subject: [PATCH 213/415] RCB-597: fix comment --- .../test/java/com/basistech/rosette/api/RosetteRequestTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/test/java/com/basistech/rosette/api/RosetteRequestTest.java b/api/src/test/java/com/basistech/rosette/api/RosetteRequestTest.java index 669a36761..dd7d4f414 100644 --- a/api/src/test/java/com/basistech/rosette/api/RosetteRequestTest.java +++ b/api/src/test/java/com/basistech/rosette/api/RosetteRequestTest.java @@ -153,7 +153,7 @@ void testTiming() throws ExecutionException, InterruptedException { assertTrue(d2.getTime() - d1.getTime() > delay * requests.size()); // at least as long as the delay in the request - //run requests concurrency + //run requests concurrently int concurrency = 3; this.api = new HttpRosetteAPI.Builder().url(String.format("http://localhost:%d/rest/v1", mockServer.getPort())) .connectionConcurrency(3).build(); From 7dbbff002a36f48797e6c11a894dc897896cfece Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Fri, 21 Jul 2023 08:40:51 +0200 Subject: [PATCH 214/415] RCB-597: move thread pool to example --- .../basistech/rosette/api/HttpRosetteAPI.java | 57 +--------------- .../rosette/api/RosetteRequestTest.java | 66 ++++--------------- .../rosette/examples/ConcurrencyExample.java | 27 ++++---- 3 files changed, 28 insertions(+), 122 deletions(-) diff --git a/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java b/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java index 5361dd34b..f55ed1aca 100644 --- a/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java +++ b/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java @@ -67,18 +67,13 @@ import java.net.URISyntaxException; import java.nio.charset.StandardCharsets; import java.util.ArrayList; -import java.util.Collection; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Properties; import java.util.Set; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; import java.util.concurrent.Future; -import java.util.concurrent.TimeUnit; import java.util.regex.Pattern; -import java.util.stream.Collectors; import java.util.zip.GZIPInputStream; import static java.net.HttpURLConnection.HTTP_OK; @@ -103,8 +98,6 @@ public class HttpRosetteAPI extends AbstractRosetteAPI { private List
additionalHeaders; private int connectionConcurrency = 2; private boolean closeClientOnClose = true; - private ExecutorService threadPool; - private int shutdownWait; private HttpRosetteAPI() { // use builder @@ -126,8 +119,7 @@ private HttpRosetteAPI() { */ HttpRosetteAPI(String key, String urlToCall, Integer failureRetries, CloseableHttpClient httpClient, List
additionalHeaders, - Integer connectionConcurrency, boolean onlyAcceptKnownFields, - Integer shutdownWait) throws HttpRosetteAPIException { + Integer connectionConcurrency, boolean onlyAcceptKnownFields) throws HttpRosetteAPIException { urlBase = urlToCall == null ? urlBase : TRAILING_SLASHES.matcher(urlToCall.trim()).replaceAll(""); if (failureRetries != null && failureRetries >= 1) { this.failureRetries = failureRetries; @@ -136,10 +128,6 @@ private HttpRosetteAPI() { if (connectionConcurrency != null) { this.connectionConcurrency = connectionConcurrency; } - this.threadPool = Executors.newFixedThreadPool(this.connectionConcurrency * 2); - if (shutdownWait != null) { - this.shutdownWait = shutdownWait; - } mapper = ApiModelMixinModule.setupObjectMapper(new ObjectMapper()); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, onlyAcceptKnownFields); @@ -627,41 +615,12 @@ public RosetteRequest createRosetteRequest(String endpoint, return new RosetteRequest(this, request, endpoint, responseClass); } - /** - * Sends the request concurrently - * @param request the request to be sent - * @return A Future with the response of the request - */ - public Future submitRequest(RosetteRequest request) { - return this.threadPool.submit(request); - } - - /** - * Sends the requests concurrently - * @param requests list of the requests to be sent - * @return A list of Futures with the responses to the requests - */ - public List> submitRequests(Collection requests) { - return requests.stream() - .map(this::submitRequest) - .collect(Collectors.toList()); - } - @Override public void close() throws IOException { if (closeClientOnClose) { httpClient.close(); } - try { - this.threadPool.shutdown(); - boolean terminated = this.threadPool.awaitTermination(this.shutdownWait, TimeUnit.SECONDS); - if (!terminated) { - this.threadPool.shutdownNow(); - } - } catch (InterruptedException e) { - this.threadPool.shutdownNow(); - } } /** @@ -675,7 +634,6 @@ public static class Builder { private CloseableHttpClient httpClient; private List
additionalHeaders = new ArrayList<>(); private boolean onlyAcceptKnownFields; - private Integer shutdownWait; /** * Specify the API key. This is required for use with the public API, and @@ -758,16 +716,6 @@ public Builder onlyAcceptKnownFields(boolean onlyAcceptKnownFields) { return this; } - /** - * Specify how long in seconds the api should wait for pending requests before forcefully terminating - * @param shutdownWaitSeconds the length of the wait in seconds. The default is 0. - * @return this. - */ - public Builder shutdownWait(int shutdownWaitSeconds) { - this.shutdownWait = shutdownWaitSeconds; - return this; - } - /** * Build the API object. * @return the new API object. @@ -780,8 +728,7 @@ public HttpRosetteAPI build() throws HttpRosetteAPIException { httpClient, additionalHeaders, concurrency, - onlyAcceptKnownFields, - shutdownWait); + onlyAcceptKnownFields); } } } diff --git a/api/src/test/java/com/basistech/rosette/api/RosetteRequestTest.java b/api/src/test/java/com/basistech/rosette/api/RosetteRequestTest.java index dd7d4f414..af7b1259a 100644 --- a/api/src/test/java/com/basistech/rosette/api/RosetteRequestTest.java +++ b/api/src/test/java/com/basistech/rosette/api/RosetteRequestTest.java @@ -23,8 +23,6 @@ import com.basistech.rosette.apimodel.LanguageOptions; import com.basistech.rosette.apimodel.LanguageResponse; import com.basistech.rosette.apimodel.Response; -import org.apache.http.impl.client.CloseableHttpClient; -import org.apache.http.impl.client.HttpClients; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -40,12 +38,13 @@ import java.util.Date; import java.util.List; import java.util.concurrent.ExecutionException; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertInstanceOf; -import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertTrue; @ExtendWith(MockServerExtension.class) @@ -86,9 +85,11 @@ void successfulRequest() throws ExecutionException, InterruptedException { RosetteRequest entitiesRequest = this.api.createRosetteRequest(AbstractRosetteAPI.ENTITIES_SERVICE_PATH, entitiesRequestData, EntitiesResponse.class); //testing the request - Future response = this.api.submitRequest(entitiesRequest); + ExecutorService threadPool = Executors.newFixedThreadPool(1); + Future response = threadPool.submit(entitiesRequest); assertInstanceOf(EntitiesResponse.class, response.get()); assertEquals(response.get(), entitiesRequest.getResponse()); + threadPool.shutdownNow(); } @@ -107,9 +108,11 @@ void errorResponse() throws ExecutionException, InterruptedException { RosetteRequest entitiesRequest = this.api.createRosetteRequest(AbstractRosetteAPI.ENTITIES_SERVICE_PATH, entitiesRequestData, EntitiesResponse.class); //testing the request - Future response = this.api.submitRequest(entitiesRequest); + ExecutorService threadPool = Executors.newFixedThreadPool(1); + Future response = threadPool.submit(entitiesRequest); assertInstanceOf(ErrorResponse.class, response.get()); assertEquals(response.get(), entitiesRequest.getResponse()); + threadPool.shutdownNow(); } @Test @@ -144,8 +147,9 @@ void testTiming() throws ExecutionException, InterruptedException { } //run requests + ExecutorService threadPool = Executors.newFixedThreadPool(7); Date d1 = new Date(); - List> responses = this.api.submitRequests(requests); + List> responses = threadPool.invokeAll(requests); for (int i = 0; i < responses.size(); i++) { responses.get(i).get(); } @@ -168,7 +172,7 @@ void testTiming() throws ExecutionException, InterruptedException { d1 = new Date(); - responses = this.api.submitRequests(requests); + responses = threadPool.invokeAll(requests); for (int i = 0; i < responses.size(); i++) { responses.get(i).get(); } @@ -178,54 +182,6 @@ void testTiming() throws ExecutionException, InterruptedException { assertTrue(d2.getTime() - d1.getTime() > requests.size() / concurrency * delay); // running faster than this would suggest it exceeds the maximum concurrency } - private RosetteRequest setupShutdownTest(int shutdownWaitSeconds, int responseDelayMillis, CloseableHttpClient client) { - this.api = new HttpRosetteAPI.Builder() - .url(String.format("http://localhost:%d/rest/v1", mockServer.getPort())) - .shutdownWait(shutdownWaitSeconds) - .httpClient(client) - .build(); - - //response setup - String entitiesResponse = "{\"entities\" : [ { \"type\" : \"ORGANIZATION\", \"mention\" : \"Securities and Exchange Commission\", \"normalized\" : \"U.S. Securities and Exchange Commission\", \"count\" : 1, \"mentionOffsets\" : [ { \"startOffset\" : 4, \"endOffset\" : 38 } ], \"entityId\" : \"Q953944\", \"confidence\" : 0.39934742, \"linkingConfidence\" : 0.67404154 } ] }"; - setupResponse("/rest/v1/entities", entitiesResponse, 200, responseDelayMillis, 1); - - //request setup - String entitiesTextData = "The Securities and Exchange Commission today announced the leadership of the agency’s trial unit."; - DocumentRequest entitiesRequestData = DocumentRequest.builder() - .content(entitiesTextData) - .build(); - return this.api.createRosetteRequest(AbstractRosetteAPI.ENTITIES_SERVICE_PATH, entitiesRequestData, EntitiesResponse.class); - } - - @Test - void successfulShutdown() throws IOException { - /* creating http client to avoid closing the httpClient of HttpRosetteApi during close() - * which automatically closes the pending threads. This way the shutdown behaviour can be tested.*/ - CloseableHttpClient httpClient = HttpClients.createDefault(); - int shutdownWait = 3; - RosetteRequest request = setupShutdownTest(shutdownWait, 1000, httpClient); - this.api.submitRequest(request); - this.api.close(); - httpClient.close(); - - assertInstanceOf(EntitiesResponse.class, request.getResponse()); //got response successfully - } - - @Test - void timeoutShutdown() throws IOException { - /* creating http client to avoid closing the httpClient of HttpRosetteApi during close() - * which automatically closes the pending threads. This way the shutdown behaviour can be tested.*/ - CloseableHttpClient httpClient = HttpClients.createDefault(); - int shutdownWait = 3; - RosetteRequest request = setupShutdownTest(shutdownWait, 5000, httpClient); - this.api.submitRequest(request); - this.api.close(); - - httpClient.close(); - assertNull(request.getResponse()); //didn't get a response, it was forcefully shutdown - } - - @AfterEach void after() throws IOException { this.api.close(); diff --git a/examples/src/main/java/com/basistech/rosette/examples/ConcurrencyExample.java b/examples/src/main/java/com/basistech/rosette/examples/ConcurrencyExample.java index cc1dd38ea..eb97bff0c 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/ConcurrencyExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/ConcurrencyExample.java @@ -37,6 +37,8 @@ import java.util.Arrays; import java.util.List; import java.util.concurrent.ExecutionException; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; import java.util.concurrent.Future; import static com.basistech.rosette.api.common.AbstractRosetteAPI.ENTITIES_SERVICE_PATH; @@ -68,7 +70,7 @@ private void run() throws IOException, ExecutionException, InterruptedException .connectionConcurrency(maximumConcurrency) .build(); - List threads = new ArrayList<>(); + List requests = new ArrayList<>(); // Setting up entities request String entitiesTextData = "The Securities and Exchange Commission today announced the leadership of the agency’s trial unit. " @@ -77,21 +79,21 @@ private void run() throws IOException, ExecutionException, InterruptedException + "Since December 2016, Ms. Fitzpatrick and Mr. Gottesman have served as Co-Acting Chief Litigation Counsel. " + "In that role, they were jointly responsible for supervising the trial unit at the agency’s Washington D.C. headquarters " + "as well as coordinating with litigators in the SEC’s 11 regional offices around the country."; - threads.add( + requests.add( rosetteApi.createRosetteRequest(ENTITIES_SERVICE_PATH, DocumentRequest.builder().content(entitiesTextData).build(), EntitiesResponse.class) ); // Setting up language request String languageData = "Por favor Señorita, says the man."; - threads.add( + requests.add( rosetteApi.createRosetteRequest(LANGUAGE_SERVICE_PATH, DocumentRequest.builder().content(languageData).build(), LanguageResponse.class) ); // Setting up morphology request // No content is given to this request and it will return an error response - threads.add( + requests.add( rosetteApi.createRosetteRequest(MORPHOLOGY_SERVICE_PATH + "/" + MorphologicalFeature.COMPLETE, DocumentRequest.builder().build(), MorphologyResponse.class) @@ -105,38 +107,39 @@ private void run() throws IOException, ExecutionException, InterruptedException names.add(Name.builder().text(name).build()); } double threshold = 0.75; - threads.add( + requests.add( rosetteApi.createRosetteRequest(NAME_DEDUPLICATION_SERVICE_PATH, NameDeduplicationRequest.builder().names(names).threshold(threshold).build(), NameDeduplicationResponse.class) ); //Setting up the tokens request String tokensData = "北京大学生物系主任办公室内部会议"; - threads.add( + requests.add( rosetteApi.createRosetteRequest(TOKENS_SERVICE_PATH, DocumentRequest.builder().content(tokensData).build(), TokensResponse.class) ); //Setting up the transliteration request String transliterationData = "ana r2ye7 el gam3a el sa3a 3 el 3asr"; - threads.add( + requests.add( rosetteApi.createRosetteRequest(TRANSLITERATION_SERVICE_PATH, DocumentRequest.builder().content(transliterationData).build(), TransliterationResponse.class) ); // start the threads - List> futures = rosetteApi.submitRequests(threads); + ExecutorService threadPool = Executors.newFixedThreadPool(maximumConcurrency); + List> futures = threadPool.invokeAll(requests); // wait for the threads to finish - for (int i = 0; i < threads.size(); i++) { + for (int i = 0; i < requests.size(); i++) { futures.get(i).get(); } - for (int i = 0; i < threads.size(); i++) { - System.out.println(responseToJson(threads.get(i).getResponse())); + for (int i = 0; i < requests.size(); i++) { + System.out.println(responseToJson(requests.get(i).getResponse())); } - rosetteApi.close(); + threadPool.shutdown(); } From c5b9a7ba78bc299c59e242ce2c3d2d208d36683c Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Fri, 21 Jul 2023 09:30:07 +0200 Subject: [PATCH 215/415] WS-2853: use map in enum forValue method --- .../apimodel/EventsNegationOption.java | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/model/src/main/java/com/basistech/rosette/apimodel/EventsNegationOption.java b/model/src/main/java/com/basistech/rosette/apimodel/EventsNegationOption.java index 922d9dd34..63e69594b 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/EventsNegationOption.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/EventsNegationOption.java @@ -16,7 +16,10 @@ package com.basistech.rosette.apimodel; -import java.util.EnumSet; +import java.util.Arrays; +import java.util.Map; +import java.util.function.Function; +import java.util.stream.Collectors; public enum EventsNegationOption { IGNORE("Ignore"), @@ -24,6 +27,16 @@ public enum EventsNegationOption { ONLY_POSITIVE("Only positive"), ONLY_NEGATIVE("Only negative"); + private static final Map STRING_KEYS; + + static { + STRING_KEYS = Arrays.stream(EventsNegationOption.values()) + .collect(Collectors.toMap( + value -> value.toString().toLowerCase(), + Function.identity() + )); + } + private final String label; EventsNegationOption(String label) { @@ -31,12 +44,7 @@ public enum EventsNegationOption { } public static EventsNegationOption forValue(String value) { - for (EventsNegationOption negationOption : EnumSet.allOf(EventsNegationOption.class)) { - if (negationOption.toString().equalsIgnoreCase(value)) { - return negationOption; - } - } - throw new IllegalArgumentException("invalid events negation option: " + value); + return STRING_KEYS.get(value.toLowerCase()); } @Override From 98682b98315c4327d2aa433ca4bd5d2c70df98c2 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Fri, 21 Jul 2023 09:30:23 +0200 Subject: [PATCH 216/415] WS-2853: EventsNegationOption tests --- .../apimodel/EventsNegationOptionTest.java | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 model/src/test/java/com/basistech/rosette/apimodel/EventsNegationOptionTest.java diff --git a/model/src/test/java/com/basistech/rosette/apimodel/EventsNegationOptionTest.java b/model/src/test/java/com/basistech/rosette/apimodel/EventsNegationOptionTest.java new file mode 100644 index 000000000..e021243ba --- /dev/null +++ b/model/src/test/java/com/basistech/rosette/apimodel/EventsNegationOptionTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2023 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.basistech.rosette.apimodel; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + +class EventsNegationOptionTest { + + @Test + void forValueSuccess() { + assertEquals(EventsNegationOption.IGNORE, EventsNegationOption.forValue("ignore")); + assertEquals(EventsNegationOption.BOTH, EventsNegationOption.forValue("BOTH")); + assertEquals(EventsNegationOption.ONLY_POSITIVE, EventsNegationOption.forValue("Only Positive")); + assertEquals(EventsNegationOption.ONLY_NEGATIVE, EventsNegationOption.forValue("OnLy NeGaTiVe")); + } + + @Test + void forValueFailure() { + assertNull(EventsNegationOption.forValue("dummy")); + } +} \ No newline at end of file From ffd22d62ef17342971bd36c6b53dd3e6d3add01e Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Tue, 25 Jul 2023 10:38:45 +0200 Subject: [PATCH 217/415] WS-2853: Update POM versions for merge --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 2 +- release/pom.xml | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 62e1c48ac..28adb4cc2 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.202-SNAPSHOT + 1.26.1-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 3805113ed..3e30c50f2 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.202-SNAPSHOT + 1.26.1-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 0545314ed..8ebd3097e 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.202-SNAPSHOT + 1.26.1-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index afc104ccb..379884b06 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.202-SNAPSHOT + 1.26.1-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 46e9952ef..51f321cb3 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.202-SNAPSHOT + 1.26.1-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 761da986c..2143a3ee3 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.202-SNAPSHOT + 1.26.1-SNAPSHOT rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 42299eaa5..003397415 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.202-SNAPSHOT + 1.26.1-SNAPSHOT target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.25.202-SNAPSHOT + 1.26.1-SNAPSHOT diff --git a/pom.xml b/pom.xml index f2b4de3e2..4eb609f7f 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.25.202-SNAPSHOT + 1.26.1-SNAPSHOT open-source-parent com.basistech diff --git a/release/pom.xml b/release/pom.xml index d529c8bd2..33ce3caa2 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.25.202-SNAPSHOT + 1.26.1-SNAPSHOT com.basistech.rosette rosette-api-release From bd288a520019feee47d8ee764b147ba5cfa750dd Mon Sep 17 00:00:00 2001 From: Katsuya Tomioka Date: Fri, 4 Aug 2023 16:55:09 -0400 Subject: [PATCH 218/415] no-jira-release-1.26.100: [maven-release-plugin] prepare release rosette-api-java-binding-1.26.100 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 28adb4cc2..7fa517a60 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.26.1-SNAPSHOT + 1.26.100 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 3e30c50f2..cc060906e 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.26.1-SNAPSHOT + 1.26.100 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 8ebd3097e..e793c851e 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.26.1-SNAPSHOT + 1.26.100 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 379884b06..0bbf87c67 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.26.1-SNAPSHOT + 1.26.100 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 51f321cb3..6cf924d71 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.26.1-SNAPSHOT + 1.26.100 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 2143a3ee3..49b72aa9c 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.26.1-SNAPSHOT + 1.26.100 rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 003397415..df306e97b 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.26.1-SNAPSHOT + 1.26.100 target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.26.1-SNAPSHOT + 1.26.100 diff --git a/pom.xml b/pom.xml index 4eb609f7f..4f0c7fd39 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.26.1-SNAPSHOT + 1.26.100 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - HEAD + rosette-api-java-binding-1.26.100 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 33ce3caa2..3a6c96a9e 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.26.1-SNAPSHOT + 1.26.100 com.basistech.rosette rosette-api-release From b7f8bf8e23e90f1426d3799d4441ba6626697973 Mon Sep 17 00:00:00 2001 From: Katsuya Tomioka Date: Fri, 4 Aug 2023 16:55:11 -0400 Subject: [PATCH 219/415] no-jira-release-1.26.100: [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 7fa517a60..e8832d36e 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.26.100 + 1.26.101-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index cc060906e..3a467e659 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.26.100 + 1.26.101-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index e793c851e..286f77bad 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.26.100 + 1.26.101-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 0bbf87c67..c1d6bcb95 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.26.100 + 1.26.101-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 6cf924d71..ecb518284 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.26.100 + 1.26.101-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 49b72aa9c..ddde9ffca 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.26.100 + 1.26.101-SNAPSHOT rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index df306e97b..8d5225416 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.26.100 + 1.26.101-SNAPSHOT target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.26.100 + 1.26.101-SNAPSHOT diff --git a/pom.xml b/pom.xml index 4f0c7fd39..57fe3554b 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.26.100 + 1.26.101-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.26.100 + HEAD This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 3a6c96a9e..160ba2ed1 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.26.100 + 1.26.101-SNAPSHOT com.basistech.rosette rosette-api-release From fc6d44661e3f3f25d6899b18df792cd3d60659e4 Mon Sep 17 00:00:00 2001 From: Julien Cherry <6952800+juliencherry@users.noreply.github.com> Date: Thu, 9 Nov 2023 11:21:22 -0500 Subject: [PATCH 220/415] COMN-302: Update the parent POM to version 17.0.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 57fe3554b..aba7d688a 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ open-source-parent com.basistech - 15.0.0 + 17.0.0 pom From 4b2fedc4614fb4017a444dbad89c807428fc376a Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Mon, 4 Dec 2023 14:33:12 +0100 Subject: [PATCH 221/415] WS-3053: replace rosette.com in categories example --- .../java/com/basistech/rosette/examples/CategoriesExample.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/src/main/java/com/basistech/rosette/examples/CategoriesExample.java b/examples/src/main/java/com/basistech/rosette/examples/CategoriesExample.java index 75f35b668..29e448084 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/CategoriesExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/CategoriesExample.java @@ -42,7 +42,7 @@ public static void main(String[] args) { } private void run() throws IOException { - String categoriesUrlData = "https://www.rosette.com/about/"; + String categoriesUrlData = "https://www.babelstreet.com/rosette"; HttpRosetteAPI rosetteApi = new HttpRosetteAPI.Builder() .key(getApiKeyFromSystemProperty()) .url(getAltUrlFromSystemProperty()) From 9e463aed288f2ed5d580f20943c9388c46ffeea0 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Tue, 5 Dec 2023 08:52:25 +0100 Subject: [PATCH 222/415] WS-3053: update readme and use text for categories --- README.md | 4 +--- .../com/basistech/rosette/examples/CategoriesExample.java | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 067e71300..e7f95a749 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ - + --- @@ -12,8 +12,6 @@ comparing the similarity of names, categorizing and adding linguistic tags to te ## Rosette API Access - Rosette Cloud [Sign Up](https://developer.rosette.com/signup) -- Rosette Enterprise [Evaluation](https://www.rosette.com/product-eval/) - ## Quick Start #### Maven diff --git a/examples/src/main/java/com/basistech/rosette/examples/CategoriesExample.java b/examples/src/main/java/com/basistech/rosette/examples/CategoriesExample.java index 29e448084..6e2a937b1 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/CategoriesExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/CategoriesExample.java @@ -42,7 +42,7 @@ public static void main(String[] args) { } private void run() throws IOException { - String categoriesUrlData = "https://www.babelstreet.com/rosette"; + String categoriesTextData = "If you are a fan of the British television series Downton Abbey and you are planning to be in New York anytime before April 2nd, there is a perfect stop for you while in town."; HttpRosetteAPI rosetteApi = new HttpRosetteAPI.Builder() .key(getApiKeyFromSystemProperty()) .url(getAltUrlFromSystemProperty()) @@ -50,7 +50,7 @@ private void run() throws IOException { //The api object creates an http client, but to provide your own: //api.httpClient(CloseableHttpClient) DocumentRequest request = DocumentRequest.builder() - .contentUri(categoriesUrlData) + .content(categoriesTextData) .build(); CategoriesResponse response = rosetteApi.perform(CATEGORIES_SERVICE_PATH, request, CategoriesResponse.class); System.out.println(responseToJson(response)); From f06656ed58161faa601d2b756c1c60b646a29d41 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Wed, 10 Jan 2024 17:56:59 -0500 Subject: [PATCH 223/415] Preparing release. Version set to 1.28.0-SNAPSHOT --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 2 +- release/pom.xml | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index e8832d36e..c4a395c1a 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.26.101-SNAPSHOT + 1.28.0-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 3a467e659..2197c14e8 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.26.101-SNAPSHOT + 1.28.0-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 286f77bad..e8860aaa6 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.26.101-SNAPSHOT + 1.28.0-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index c1d6bcb95..279eb164e 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.26.101-SNAPSHOT + 1.28.0-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index ecb518284..610977a7c 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.26.101-SNAPSHOT + 1.28.0-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index ddde9ffca..35b16f8cb 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.26.101-SNAPSHOT + 1.28.0-SNAPSHOT rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 8d5225416..1a647c49e 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.26.101-SNAPSHOT + 1.28.0-SNAPSHOT target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.26.101-SNAPSHOT + 1.28.0-SNAPSHOT diff --git a/pom.xml b/pom.xml index aba7d688a..bb64a4a37 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.26.101-SNAPSHOT + 1.28.0-SNAPSHOT open-source-parent com.basistech diff --git a/release/pom.xml b/release/pom.xml index 160ba2ed1..3e549ddae 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.26.101-SNAPSHOT + 1.28.0-SNAPSHOT com.basistech.rosette rosette-api-release From 9f57c8bbd4d3ea42d66c0f49d99a30e711ecdcfd Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Wed, 10 Jan 2024 17:57:58 -0500 Subject: [PATCH 224/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.28.0 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index c4a395c1a..6d4fcb268 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.28.0-SNAPSHOT + 1.28.0 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 2197c14e8..30b88e282 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.28.0-SNAPSHOT + 1.28.0 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index e8860aaa6..24c17f757 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.28.0-SNAPSHOT + 1.28.0 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 279eb164e..9741a9dbe 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.28.0-SNAPSHOT + 1.28.0 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 610977a7c..506fd56dc 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.28.0-SNAPSHOT + 1.28.0 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 35b16f8cb..691b690f9 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.28.0-SNAPSHOT + 1.28.0 rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index 1a647c49e..e7948e67c 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.28.0-SNAPSHOT + 1.28.0 target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.28.0-SNAPSHOT + 1.28.0 diff --git a/pom.xml b/pom.xml index bb64a4a37..7b33ba6ae 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.28.0-SNAPSHOT + 1.28.0 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - HEAD + rosette-api-java-binding-1.28.0 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 3e549ddae..cfeb3950f 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.28.0-SNAPSHOT + 1.28.0 com.basistech.rosette rosette-api-release From cd011a690051159e94e8ff870265242fa6c0b8c3 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Wed, 10 Jan 2024 17:58:00 -0500 Subject: [PATCH 225/415] [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- osgi-itests/pom.xml | 4 ++-- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 6d4fcb268..ce41bba4c 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.28.0 + 1.28.1-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 30b88e282..c3778fd5c 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.28.0 + 1.28.1-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 24c17f757..2bc51f412 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.28.0 + 1.28.1-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 9741a9dbe..760aae7fd 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.28.0 + 1.28.1-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 506fd56dc..1f862e409 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.28.0 + 1.28.1-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 691b690f9..0bf5badcf 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.28.0 + 1.28.1-SNAPSHOT rosette-api-model rosette-api-model diff --git a/osgi-itests/pom.xml b/osgi-itests/pom.xml index e7948e67c..36684bb38 100644 --- a/osgi-itests/pom.xml +++ b/osgi-itests/pom.xml @@ -5,7 +5,7 @@ com.basistech.rosette rosette-api-java-binding - 1.28.0 + 1.28.1-SNAPSHOT target/test-bundles @@ -14,7 +14,7 @@ com.basistech.rosette rosette-api - 1.28.0 + 1.28.1-SNAPSHOT diff --git a/pom.xml b/pom.xml index 7b33ba6ae..3cd691a31 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.28.0 + 1.28.1-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.28.0 + HEAD This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index cfeb3950f..6e6e87625 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.28.0 + 1.28.1-SNAPSHOT com.basistech.rosette rosette-api-release From fa43846da2cf7ee3e19802352923ccb2ad115050 Mon Sep 17 00:00:00 2001 From: seth-mg Date: Tue, 16 Jan 2024 15:51:21 -0600 Subject: [PATCH 226/415] Update CI.Jenkinsfile Re-permission for Jenkins cleanup. Not comprehensive but good enough for now. --- CI.Jenkinsfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CI.Jenkinsfile b/CI.Jenkinsfile index 985484513..25f8005fe 100644 --- a/CI.Jenkinsfile +++ b/CI.Jenkinsfile @@ -22,7 +22,10 @@ node ("docker-light") { bash -c \"apt-get update && \ apt-get install -y git && \ pushd /source && \ - /opt/maven-basis/bin/mvn --batch-mode clean install sonar:sonar $mySonarOpts\"" + /opt/maven-basis/bin/mvn --batch-mode clean install sonar:sonar $mySonarOpts && \ + echo && \ + echo [INFO] Re-permission files for cleanup. && \ + chown -R jenkins:jenkins /source\"" } } postToTeams(true) From b882cff8d5aad3fecd8ff04093b1e06f474715f4 Mon Sep 17 00:00:00 2001 From: Fiona Hasanaj Date: Fri, 2 Feb 2024 13:00:19 -0500 Subject: [PATCH 227/415] RLPNC-7350: Support for name-translation to return multiple results --- .../basistech/rosette/api/RosetteAPITest.java | 25 ++++++++ .../NameMultipleTranslationsExample.java | 58 +++++++++++++++++++ .../jackson/NameTranslationRequestMixin.java | 3 +- .../rosette/apimodel/NameTranslation.java | 37 ++++++++++++ .../apimodel/NameTranslationRequest.java | 21 ++++++- .../apimodel/NameTranslationResponse.java | 7 +++ 6 files changed, 149 insertions(+), 2 deletions(-) create mode 100644 examples/src/main/java/com/basistech/rosette/examples/NameMultipleTranslationsExample.java create mode 100644 model/src/main/java/com/basistech/rosette/apimodel/NameTranslation.java diff --git a/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java b/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java index 859c02806..e12898af9 100644 --- a/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java +++ b/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java @@ -258,11 +258,36 @@ void testTranslateName(String testFilename, String responseStr, int statusCode) } } + private static Stream testMultiTranslateNameParameters() throws IOException { + return getTestFiles("-multi-name-translation.json"); + } + + @ParameterizedTest(name = "testFilename: {0}; statusCode: {2}") + @MethodSource("testMultiTranslateNameParameters") + void testMultiTranslateName(String testFilename, String responseStr, int statusCode) throws IOException { + setStatusCodeResponse(responseStr, statusCode); + NameTranslationRequest request = readValueNameTranslation(testFilename); + try { + NameTranslationResponse response = api.perform(AbstractRosetteAPI.NAME_TRANSLATION_SERVICE_PATH, request, + NameTranslationResponse.class); + verifyMultiNameTranslations(response, responseStr); + } catch (HttpRosetteAPIException e) { + verifyException(e, responseStr); + } + } + private void verifyNameTranslation(NameTranslationResponse response, String responseStr) throws IOException { NameTranslationResponse goldResponse = mapper.readValue(responseStr, NameTranslationResponse.class); assertEquals(goldResponse.getTranslation(), response.getTranslation()); } + private void verifyMultiNameTranslations(NameTranslationResponse response, String responseStr) throws IOException { + NameTranslationResponse goldResponse = mapper.readValue(responseStr, NameTranslationResponse.class); + assertEquals(goldResponse.getTranslations(), response.getTranslations()); + assertEquals(goldResponse.getTranslation(), response.getTranslation()); + assertEquals(goldResponse.getConfidence(), response.getConfidence()); + } + private NameTranslationRequest readValueNameTranslation(String testFilename) throws IOException { File input = new File("src/test/mock-data/request", testFilename); return mapper.readValue(input, NameTranslationRequest.class); diff --git a/examples/src/main/java/com/basistech/rosette/examples/NameMultipleTranslationsExample.java b/examples/src/main/java/com/basistech/rosette/examples/NameMultipleTranslationsExample.java new file mode 100644 index 000000000..bec2e62df --- /dev/null +++ b/examples/src/main/java/com/basistech/rosette/examples/NameMultipleTranslationsExample.java @@ -0,0 +1,58 @@ +/* +* Copyright 2024 Basis Technology Corp. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package com.basistech.rosette.examples; + +import static com.basistech.rosette.api.common.AbstractRosetteAPI.NAME_TRANSLATION_SERVICE_PATH; + +import java.io.IOException; + +import com.basistech.rosette.api.HttpRosetteAPI; +import com.basistech.rosette.apimodel.NameTranslationRequest; +import com.basistech.rosette.apimodel.NameTranslationResponse; +import com.basistech.util.LanguageCode; + +/** + * Example which demonstrates the name translation api with maximumResults option set. + */ +@SuppressWarnings({"java:S1166", "java:S2221", "java:S106"}) +public final class NameMultipleTranslationsExample extends ExampleBase { + public static void main(String[] args) { + try { + new NameMultipleTranslationsExample().run(); + } catch (Exception e) { + e.printStackTrace(); + System.exit(1); + } + } + + private void run() throws IOException { + String translatedNameData = "معمر محمد أبو منيار القذاف"; + NameTranslationRequest request = NameTranslationRequest.builder() + .name(translatedNameData) + .targetLanguage(LanguageCode.ENGLISH) + .maximumResults(10) + .build(); + + HttpRosetteAPI rosetteApi = new HttpRosetteAPI.Builder() + .key(getApiKeyFromSystemProperty()) + .url(getAltUrlFromSystemProperty()) + .build(); + //The api object creates an http client, but to provide your own: + //api.httpClient(CloseableHttpClient) + NameTranslationResponse response = rosetteApi.perform(NAME_TRANSLATION_SERVICE_PATH, request, NameTranslationResponse.class); + System.out.println(responseToJson(response)); + } +} diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/NameTranslationRequestMixin.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/NameTranslationRequestMixin.java index b36da04cc..90b0976bb 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/NameTranslationRequestMixin.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/NameTranslationRequestMixin.java @@ -41,7 +41,8 @@ protected NameTranslationRequestMixin( @JsonProperty("sourceLanguageOfUse") LanguageCode sourceLanguageOfUse, @JsonProperty("targetLanguage") LanguageCode targetLanguage, @JsonProperty("targetScript") ISO15924 targetScript, - @JsonProperty("targetScheme") TransliterationScheme targetScheme + @JsonProperty("targetScheme") TransliterationScheme targetScheme, + @JsonProperty("maximumResults") Integer maximumResults ) { // } diff --git a/model/src/main/java/com/basistech/rosette/apimodel/NameTranslation.java b/model/src/main/java/com/basistech/rosette/apimodel/NameTranslation.java new file mode 100644 index 000000000..196405080 --- /dev/null +++ b/model/src/main/java/com/basistech/rosette/apimodel/NameTranslation.java @@ -0,0 +1,37 @@ +/* + * Copyright 2024 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.basistech.rosette.apimodel; + +import lombok.Builder; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +import com.basistech.rosette.annotations.JacksonMixin; + +@Getter +@EqualsAndHashCode +@Builder +@JacksonMixin +public class NameTranslation { + String translation; + Double confidence; + + public NameTranslation(String translation, Double confidence) { + this.translation = translation; + this.confidence = confidence; + } +} diff --git a/model/src/main/java/com/basistech/rosette/apimodel/NameTranslationRequest.java b/model/src/main/java/com/basistech/rosette/apimodel/NameTranslationRequest.java index 7b3ae0f72..aa585f0df 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/NameTranslationRequest.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/NameTranslationRequest.java @@ -72,7 +72,11 @@ public final class NameTranslationRequest extends Request { */ private final TransliterationScheme targetScheme; - @Builder // workaround for inheritance https://github.com/rzwitserloot/lombok/issues/853 + /** + * @return the maximum number of translation results to return + */ + private final Integer maximumResults; + public NameTranslationRequest(String profileId, String name, String entityType, @@ -82,6 +86,20 @@ public NameTranslationRequest(String profileId, LanguageCode targetLanguage, ISO15924 targetScript, TransliterationScheme targetScheme) { + this(profileId, name, entityType, sourceScript, sourceLanguageOfOrigin, sourceLanguageOfUse, targetLanguage, targetScript, targetScheme, null); + } + + @Builder // workaround for inheritance https://github.com/rzwitserloot/lombok/issues/853 + public NameTranslationRequest(String profileId, + String name, + String entityType, + ISO15924 sourceScript, + LanguageCode sourceLanguageOfOrigin, + LanguageCode sourceLanguageOfUse, + LanguageCode targetLanguage, + ISO15924 targetScript, + TransliterationScheme targetScheme, + Integer maximumResults) { super(profileId); this.name = name; this.entityType = entityType; @@ -91,5 +109,6 @@ public NameTranslationRequest(String profileId, this.targetLanguage = targetLanguage; this.targetScript = targetScript; this.targetScheme = targetScheme; + this.maximumResults = maximumResults; } } diff --git a/model/src/main/java/com/basistech/rosette/apimodel/NameTranslationResponse.java b/model/src/main/java/com/basistech/rosette/apimodel/NameTranslationResponse.java index c465ed5e5..57f71c30b 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/NameTranslationResponse.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/NameTranslationResponse.java @@ -16,6 +16,8 @@ package com.basistech.rosette.apimodel; +import java.util.List; + import com.basistech.rosette.annotations.JacksonMixin; import com.basistech.util.ISO15924; import com.basistech.util.LanguageCode; @@ -72,4 +74,9 @@ public class NameTranslationResponse extends Response { * @return the translation confidence (0.0-1.0) */ private final Double confidence; + + /** + * @return the translation + */ + private final List translations; } From 95db413bb675daa25a84a8b52ed52b084a97fb2c Mon Sep 17 00:00:00 2001 From: Fiona Hasanaj Date: Fri, 2 Feb 2024 13:32:25 -0500 Subject: [PATCH 228/415] RLPNC-7350: Clean up --- api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java b/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java index e12898af9..1d5872bd4 100644 --- a/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java +++ b/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java @@ -284,8 +284,6 @@ private void verifyNameTranslation(NameTranslationResponse response, String resp private void verifyMultiNameTranslations(NameTranslationResponse response, String responseStr) throws IOException { NameTranslationResponse goldResponse = mapper.readValue(responseStr, NameTranslationResponse.class); assertEquals(goldResponse.getTranslations(), response.getTranslations()); - assertEquals(goldResponse.getTranslation(), response.getTranslation()); - assertEquals(goldResponse.getConfidence(), response.getConfidence()); } private NameTranslationRequest readValueNameTranslation(String testFilename) throws IOException { From 8892a80a29364e8134fdefc7aab7b279bbdbf65f Mon Sep 17 00:00:00 2001 From: Fiona Hasanaj Date: Thu, 8 Feb 2024 11:15:48 -0500 Subject: [PATCH 229/415] RLPNC-7350: Add test files --- .../request/rnt-1-multi-name-translation.json | 11 +++++ .../rnt-1-multi-name-translation.json | 49 +++++++++++++++++++ .../rnt-1-multi-name-translation.status | 1 + 3 files changed, 61 insertions(+) create mode 100644 api/src/test/mock-data/request/rnt-1-multi-name-translation.json create mode 100644 api/src/test/mock-data/response/rnt-1-multi-name-translation.json create mode 100644 api/src/test/mock-data/response/rnt-1-multi-name-translation.status diff --git a/api/src/test/mock-data/request/rnt-1-multi-name-translation.json b/api/src/test/mock-data/request/rnt-1-multi-name-translation.json new file mode 100644 index 000000000..4f17c3b1d --- /dev/null +++ b/api/src/test/mock-data/request/rnt-1-multi-name-translation.json @@ -0,0 +1,11 @@ +{ + "entityType": "PERSON", + "name": "معمر محمد أبو منيار القذاف", + "sourceLanguageOfOrigin": "ara", + "sourceLanguageOfUse": "ara", + "sourceScript": "Arab", + "targetLanguage": "eng", + "targetScheme": "IC", + "targetScript": "Latn", + "maximumResults": 10 +} diff --git a/api/src/test/mock-data/response/rnt-1-multi-name-translation.json b/api/src/test/mock-data/response/rnt-1-multi-name-translation.json new file mode 100644 index 000000000..428d21e0c --- /dev/null +++ b/api/src/test/mock-data/response/rnt-1-multi-name-translation.json @@ -0,0 +1,49 @@ +{ + "sourceScript": "Arab", + "sourceLanguageOfUse": "ara", + "targetLanguage": "eng", + "targetScript": "Latn", + "targetScheme": "IC", + "translations": [ + { + "translatio": "Mu'ammar Muhammad Abu-Minyar al-Qadhaf", + "confidence": 0.10655738 + }, + { + "translation": "Mu'ammar Muhammad Abu-Minyar al-Qadhaf", + "confidence": 0.10382514 + }, + { + "translation": "Mu'ammar Muhammad Abaw Minyar al-Qadhaf", + "confidence": 0.1010929 + }, + { + "translation": "Mu'ammar Muhammad Abu-Minyar al-Qadhaf", + "confidence": 0.10094909 + }, + { + "translation": "Mu'ammar Mhammad Abu-Minyar al-Qadhaf", + "confidence": 0.10094909 + }, + { + "translation": "Mu'ammar Muhammad Abu-Minyar al-Qadhaf", + "confidence": 0.09836066 + }, + { + "translation": "Mu'ammar Muhammad Abw Minyar al-Qadhaf", + "confidence": 0.09836066 + }, + { + "translation": "Mu'ammar Mhammad Abu-Minyar al-Qadhaf", + "confidence": 0.09836066 + }, + { + "translation": "Mu'ammar Muhammad Abaw Minyar al-Qadhaf", + "confidence": 0.09577222 + }, + { + "translation": "Mu'ammar Mhammad Abaw Minyar al-Qadhaf", + "confidence": 0.09577222 + } + ] +} \ No newline at end of file diff --git a/api/src/test/mock-data/response/rnt-1-multi-name-translation.status b/api/src/test/mock-data/response/rnt-1-multi-name-translation.status new file mode 100644 index 000000000..ae4ee13c0 --- /dev/null +++ b/api/src/test/mock-data/response/rnt-1-multi-name-translation.status @@ -0,0 +1 @@ +200 \ No newline at end of file From 73dfba96c8e4a287557d795d67ec645ae0dcc3d2 Mon Sep 17 00:00:00 2001 From: seth-mg Date: Mon, 12 Feb 2024 12:28:50 -0600 Subject: [PATCH 230/415] Update CI.Jenkinsfile Update chown parameters as we are running in a container. --- CI.Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CI.Jenkinsfile b/CI.Jenkinsfile index 25f8005fe..2cd8fc964 100644 --- a/CI.Jenkinsfile +++ b/CI.Jenkinsfile @@ -24,8 +24,8 @@ node ("docker-light") { pushd /source && \ /opt/maven-basis/bin/mvn --batch-mode clean install sonar:sonar $mySonarOpts && \ echo && \ - echo [INFO] Re-permission files for cleanup. && \ - chown -R jenkins:jenkins /source\"" + echo [INFO] Set file permissions to UID and GID of jenkins user for cleanup. && \ + chown -R 9960:9960 /source\"" } } postToTeams(true) From 2a1a2a14bcae54ffd00cf126169626146883bdec Mon Sep 17 00:00:00 2001 From: seth-mg Date: Mon, 12 Feb 2024 12:35:50 -0600 Subject: [PATCH 231/415] Update CI.Jenkinsfile Run chown even with a failure. --- CI.Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CI.Jenkinsfile b/CI.Jenkinsfile index 2cd8fc964..d29275ca9 100644 --- a/CI.Jenkinsfile +++ b/CI.Jenkinsfile @@ -22,7 +22,7 @@ node ("docker-light") { bash -c \"apt-get update && \ apt-get install -y git && \ pushd /source && \ - /opt/maven-basis/bin/mvn --batch-mode clean install sonar:sonar $mySonarOpts && \ + /opt/maven-basis/bin/mvn --batch-mode clean install sonar:sonar $mySonarOpts; \ echo && \ echo [INFO] Set file permissions to UID and GID of jenkins user for cleanup. && \ chown -R 9960:9960 /source\"" From 88d15681e9089bde4ee33443ca3de42a30e3ae82 Mon Sep 17 00:00:00 2001 From: David Corbett Date: Fri, 23 Feb 2024 14:28:44 -0500 Subject: [PATCH 232/415] COMN-308: Remove OSGi support --- annotations/bnd.bnd | 2 - annotations/pom.xml | 15 +- api/bnd.bnd | 2 - api/pom.xml | 39 +---- bnd.bnd | 1 - common/bnd.bnd | 1 - common/pom.xml | 19 +-- json/bnd.bnd | 2 - json/pom.xml | 13 -- model/bnd.bnd | 2 - model/pom.xml | 16 -- osgi-itests/bnd.bnd | 8 - osgi-itests/it.bndrun | 18 --- osgi-itests/pom.xml | 138 ------------------ .../rosette/osgi/it/RosetteApiOsgiTest.java | 31 ---- pom.xml | 48 +----- 16 files changed, 4 insertions(+), 351 deletions(-) delete mode 100644 annotations/bnd.bnd delete mode 100644 api/bnd.bnd delete mode 100644 bnd.bnd delete mode 100644 common/bnd.bnd delete mode 100644 json/bnd.bnd delete mode 100644 model/bnd.bnd delete mode 100644 osgi-itests/bnd.bnd delete mode 100644 osgi-itests/it.bndrun delete mode 100644 osgi-itests/pom.xml delete mode 100644 osgi-itests/src/main/java/com/basistech/rosette/osgi/it/RosetteApiOsgiTest.java diff --git a/annotations/bnd.bnd b/annotations/bnd.bnd deleted file mode 100644 index 099e137e3..000000000 --- a/annotations/bnd.bnd +++ /dev/null @@ -1,2 +0,0 @@ -Bundle-Version: ${osgi-version} -Export-Package: com.basistech.rosette.annotations diff --git a/annotations/pom.xml b/annotations/pom.xml index ce41bba4c..512cf97e5 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -1,6 +1,6 @@ - - - - - org.apache.felix - org.apache.felix.framework - ${felix-framework.version} - runtime - - - org.apache.felix - org.apache.felix.configadmin - ${felix-configadmin.version} - compile - - - - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-simple - - - - - org.osgi - osgi.enroute.junit.wrapper - ${osgi-enroute-junit-wrapper.version} - - - org.osgi - osgi.enroute.hamcrest.wrapper - ${osgi-enroute-hamcrest-wrapper.version} - - - - - - - maven-dependency-plugin - - - pre-integration-test - copy-it-dependencies - - copy-dependencies - - - ${bundle-repo} - osgi.cmpn - - - - - - - biz.aQute.bnd - bnd-maven-plugin - - - org.apache.maven.plugins - maven-jar-plugin - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - ${bundle-repo} - - - - - - biz.aQute.bnd - bnd-indexer-maven-plugin - ${bnd-maven-plugin.version} - - ${bundle-repo} - true - - - - index-repo - pre-integration-test - - local-index - - - - - - - - biz.aQute.bnd - bnd-testing-maven-plugin - ${bnd-maven-plugin.version} - - false - - it.bndrun - - true - - - - integration-test - it-bnd-testing - - testing - - - - - - - diff --git a/osgi-itests/src/main/java/com/basistech/rosette/osgi/it/RosetteApiOsgiTest.java b/osgi-itests/src/main/java/com/basistech/rosette/osgi/it/RosetteApiOsgiTest.java deleted file mode 100644 index 11ff75ac0..000000000 --- a/osgi-itests/src/main/java/com/basistech/rosette/osgi/it/RosetteApiOsgiTest.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2022 Basis Technology Corp. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.basistech.rosette.osgi.it; - -import com.basistech.rosette.api.HttpRosetteAPI; -import org.junit.Test; - -import static org.junit.Assert.assertNotNull; - -@SuppressWarnings("java:S5960") // This is a test class. -public class RosetteApiOsgiTest { - @Test - public void smokeTest() { - HttpRosetteAPI api = new HttpRosetteAPI.Builder().build(); - assertNotNull(api); - } -} diff --git a/pom.xml b/pom.xml index 3cd691a31..df8cab7c8 100644 --- a/pom.xml +++ b/pom.xml @@ -1,6 +1,6 @@ - - set-dep-properties - generate-resources - - properties - - - - org.codehaus.mojo build-helper-maven-plugin @@ -202,18 +168,6 @@ - - biz.aQute.bnd - bnd-maven-plugin - ${bnd-maven-plugin.version} - - - - bnd-process - - - - From b7c312cd412983b12c6e1f5f5de0c720f24d362d Mon Sep 17 00:00:00 2001 From: fhasanaj Date: Mon, 26 Feb 2024 10:57:34 -0500 Subject: [PATCH 233/415] Update rnt-1-multi-name-translation.json --- .../test/mock-data/response/rnt-1-multi-name-translation.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/test/mock-data/response/rnt-1-multi-name-translation.json b/api/src/test/mock-data/response/rnt-1-multi-name-translation.json index 428d21e0c..98b5d555f 100644 --- a/api/src/test/mock-data/response/rnt-1-multi-name-translation.json +++ b/api/src/test/mock-data/response/rnt-1-multi-name-translation.json @@ -46,4 +46,4 @@ "confidence": 0.09577222 } ] -} \ No newline at end of file +} From 42f7f31b680c5b830b8e1647502120a932ae6f4c Mon Sep 17 00:00:00 2001 From: fhasanaj Date: Mon, 26 Feb 2024 10:57:46 -0500 Subject: [PATCH 234/415] Update rnt-1-multi-name-translation.status --- .../test/mock-data/response/rnt-1-multi-name-translation.status | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/test/mock-data/response/rnt-1-multi-name-translation.status b/api/src/test/mock-data/response/rnt-1-multi-name-translation.status index ae4ee13c0..08839f6bb 100644 --- a/api/src/test/mock-data/response/rnt-1-multi-name-translation.status +++ b/api/src/test/mock-data/response/rnt-1-multi-name-translation.status @@ -1 +1 @@ -200 \ No newline at end of file +200 From 4677c1cc0aacac9dbf050580fc2b61f7f6caf9fe Mon Sep 17 00:00:00 2001 From: David Corbett Date: Wed, 28 Feb 2024 08:56:46 -0500 Subject: [PATCH 235/415] COMN-303: Update the parent POM to version 18.0.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index df8cab7c8..6f576f65e 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ open-source-parent com.basistech - 17.0.0 + 18.0.0 pom From 147bf28b9aa281c26b35320b7cf8e4cc5f0480cb Mon Sep 17 00:00:00 2001 From: Jennifer Welch Date: Fri, 1 Mar 2024 08:52:37 -0500 Subject: [PATCH 236/415] Update EntitiesOptions.java Adding useIndocServer flag --- .../com/basistech/rosette/apimodel/EntitiesOptions.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/model/src/main/java/com/basistech/rosette/apimodel/EntitiesOptions.java b/model/src/main/java/com/basistech/rosette/apimodel/EntitiesOptions.java index 1a0339b5c..693c6f720 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/EntitiesOptions.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/EntitiesOptions.java @@ -100,4 +100,11 @@ public class EntitiesOptions extends Options { * CURRENCY:AMT and CURRENCY:TYPE */ Boolean regexCurrencySplit; + + /** + * @return useIndocServer flag. If true, REX will make request to indoc-coref-server and merge + * results with existing entities. + * default false + */ + Boolean useIndocServer; } From 54ad9734eca8003dd5ed928f9167d35bddaab094 Mon Sep 17 00:00:00 2001 From: meganlevin <136371605+meganlevin@users.noreply.github.com> Date: Fri, 22 Mar 2024 10:02:37 -0400 Subject: [PATCH 237/415] RLPNC-7384: Add Request Object in Java Bindings (#215) RLPNC-7384: support RecordSimilarity --------- Co-authored-by: Megan Co-authored-by: Fiona Hasanaj Co-authored-by: Norbert Nagy Co-authored-by: Akos Varga Co-authored-by: jsquatrito Co-authored-by: norbert nagy <138497912+nnagyprecognoxcom@users.noreply.github.com> Co-authored-by: Ethan Roseman Co-authored-by: Ian Redpath --- .../basistech/rosette/api/RosetteAPITest.java | 65 +++++++++++ ...rni-1-record-similarity-missing-field.json | 53 +++++++++ .../rni-1-record-similarity-null-field.json | 53 +++++++++ .../request/rni-1-record-similarity.json | 59 ++++++++++ ...rni-1-record-similarity-missing-field.json | 5 + ...i-1-record-similarity-missing-field.status | 1 + .../rni-1-record-similarity-null-field.json | 5 + .../rni-1-record-similarity-null-field.status | 1 + .../response/rni-1-record-similarity.json | 51 +++++++++ .../response/rni-1-record-similarity.status | 1 + .../api/common/AbstractRosetteAPI.java | 2 + .../examples/RecordSimilarityExample.java | 108 ++++++++++++++++++ json/bnd.bnd | 2 + .../apimodel/jackson/ApiModelMixinModule.java | 15 +++ .../AddressFieldDeserializer.java | 42 +++++++ .../DateFieldDeserializer.java | 42 +++++++ .../NameFieldDeserializer.java | 42 +++++++ ...RecordSimilarityDeserializerUtilities.java | 72 ++++++++++++ .../RecordSimilarityRequestDeserializer.java | 74 ++++++++++++ .../RecordSimilarityResultDeserializer.java | 54 +++++++++ .../basistech/rosette/apimodel/ModelTest.java | 4 +- .../apimodel/RecordSimilarityRequestTest.java | 101 ++++++++++++++++ model/bnd.bnd | 2 + .../RecordSimilarityExplainInfo.java | 33 ++++++ .../RecordSimilarityFieldExplainInfo.java | 35 ++++++ .../RecordSimilarityFieldInfo.java | 34 ++++++ .../RecordSimilarityProperties.java | 32 ++++++ .../RecordSimilarityRecords.java | 34 ++++++ .../RecordSimilarityRequest.java | 46 ++++++++ .../RecordSimilarityResponse.java | 48 ++++++++ .../RecordSimilarityResult.java | 36 ++++++ .../records/AddressField.java | 51 +++++++++ .../recordsimilarity/records/DateField.java | 50 ++++++++ .../recordsimilarity/records/NameField.java | 56 +++++++++ .../records/RecordFieldType.java | 31 +++++ .../records/RecordSimilarityField.java | 20 ++++ 36 files changed, 1359 insertions(+), 1 deletion(-) create mode 100644 api/src/test/mock-data/request/rni-1-record-similarity-missing-field.json create mode 100644 api/src/test/mock-data/request/rni-1-record-similarity-null-field.json create mode 100644 api/src/test/mock-data/request/rni-1-record-similarity.json create mode 100644 api/src/test/mock-data/response/rni-1-record-similarity-missing-field.json create mode 100644 api/src/test/mock-data/response/rni-1-record-similarity-missing-field.status create mode 100644 api/src/test/mock-data/response/rni-1-record-similarity-null-field.json create mode 100644 api/src/test/mock-data/response/rni-1-record-similarity-null-field.status create mode 100644 api/src/test/mock-data/response/rni-1-record-similarity.json create mode 100644 api/src/test/mock-data/response/rni-1-record-similarity.status create mode 100644 examples/src/main/java/com/basistech/rosette/examples/RecordSimilarityExample.java create mode 100644 json/bnd.bnd create mode 100644 json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/AddressFieldDeserializer.java create mode 100644 json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/DateFieldDeserializer.java create mode 100644 json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/NameFieldDeserializer.java create mode 100644 json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java create mode 100644 json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityRequestDeserializer.java create mode 100644 json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityResultDeserializer.java create mode 100644 json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java create mode 100644 model/bnd.bnd create mode 100644 model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityExplainInfo.java create mode 100644 model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldExplainInfo.java create mode 100644 model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java create mode 100644 model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityProperties.java create mode 100644 model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityRecords.java create mode 100644 model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityRequest.java create mode 100644 model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponse.java create mode 100644 model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResult.java create mode 100644 model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/AddressField.java create mode 100644 model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/DateField.java create mode 100644 model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/NameField.java create mode 100644 model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/RecordFieldType.java create mode 100644 model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/RecordSimilarityField.java diff --git a/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java b/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java index 1d5872bd4..83c488f87 100644 --- a/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java +++ b/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java @@ -39,6 +39,9 @@ import com.basistech.rosette.apimodel.SentimentResponse; import com.basistech.rosette.apimodel.SyntaxDependenciesResponse; import com.basistech.rosette.apimodel.jackson.ApiModelMixinModule; +import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityRequest; +import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityResponse; + import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException; @@ -212,6 +215,68 @@ private NameSimilarityRequest readValueNameMatcher(String testFilename) throws I return mapper.readValue(input, NameSimilarityRequest.class); } + private static Stream testMatchRecordParameters() throws IOException { + return getTestFiles("-record-similarity.json"); + } + + @ParameterizedTest(name = "testFilename: {0}; statusCode: {2}") + @MethodSource("testMatchRecordParameters") + void testMatchRecord(String testFilename, String responseStr, int statusCode) throws IOException { + setStatusCodeResponse(responseStr, statusCode); + RecordSimilarityRequest request = readValueRecordMatcher(testFilename); + try { + RecordSimilarityResponse response = api.perform(AbstractRosetteAPI.RECORD_SIMILARITY_SERVICE_PATH, request, + RecordSimilarityResponse.class); + verifyRecordMatcher(response, responseStr); + } catch (HttpRosetteAPIException e) { + verifyException(e, responseStr); + } + } + + private static Stream testMatchRecordMissingFieldParameters() throws IOException { + return getTestFiles("-record-similarity-missing-field.json"); + } + + @ParameterizedTest(name = "testFilename: {0}; statusCode: {2}") + @MethodSource("testMatchRecordMissingFieldParameters") + void testMatchRecordMissingField(String testFilename, String responseStr, int statusCode) throws IOException { + setStatusCodeResponse(responseStr, statusCode); + + try { + readValueRecordMatcher(testFilename); + fail("Did not throw exception for a field type in request but not in mapping"); + } catch (IllegalArgumentException e) { + assertEquals("Unsupported field name: primaryName not found in field mapping", e.getMessage()); + } + } + + private static Stream testMatchRecordNullFieldParameters() throws IOException { + return getTestFiles("-record-similarity-null-field.json"); + } + + @ParameterizedTest(name = "testFilename: {0}; statusCode: {2}") + @MethodSource("testMatchRecordNullFieldParameters") + void testMatchRecordNullField(String testFilename, String responseStr, int statusCode) throws IOException { + setStatusCodeResponse(responseStr, statusCode); + + try { + readValueRecordMatcher(testFilename); + fail("Did not throw exception for a field with null type"); + } catch (IllegalArgumentException e) { + assertEquals("Unspecified field type for: primaryName", e.getMessage()); + } + } + + private void verifyRecordMatcher(RecordSimilarityResponse response, String responseStr) throws IOException { + RecordSimilarityResponse goldResponse = mapper.readValue(responseStr, RecordSimilarityResponse.class); + assertEquals(goldResponse.getResults(), response.getResults()); + } + + private RecordSimilarityRequest readValueRecordMatcher(String testFilename) throws IOException { + File input = new File("src/test/mock-data/request", testFilename); + return mapper.readValue(input, RecordSimilarityRequest.class); + } + private static Stream testMatchAddressParameters() throws IOException { return getTestFiles("-address-similarity.json"); } diff --git a/api/src/test/mock-data/request/rni-1-record-similarity-missing-field.json b/api/src/test/mock-data/request/rni-1-record-similarity-missing-field.json new file mode 100644 index 000000000..dfe1dfa3c --- /dev/null +++ b/api/src/test/mock-data/request/rni-1-record-similarity-missing-field.json @@ -0,0 +1,53 @@ +{ + "fields": { + "homeAddress": { + "type": "rni_address", + "weight": 0.5 + }, + "dob": { + "type": "rni_date", + "weight": 0.2 + }, + "dob2": { + "type": "rni_date", + "weight": 0.1 + }, + "addr": { + "type": "rni_address", + "weight": 0.5 + } + }, + "properties": { + "threshold": 0.7 + }, + "records": { + "left": [ + { + "primaryName": { + "data": "Ethan R", + "language": "eng", + "entityType": "PERSON" + }, + "dob": "1993-04-16", + "dob2": "1993/04/16", + "addr": "123 Roadlane Ave" + }, + { + "primaryName": "Evan R", + "dob": "1993-04-16" + } + ], + "right": [ + { + "primaryName": "Seth R", + "dob": "1993-04-16" + }, + { + "primaryName": "Ivan R", + "dob": "1993-04-16", + "dob2": "1993/04/16", + "addr": "123 Roadlane Ave" + } + ] + } +} \ No newline at end of file diff --git a/api/src/test/mock-data/request/rni-1-record-similarity-null-field.json b/api/src/test/mock-data/request/rni-1-record-similarity-null-field.json new file mode 100644 index 000000000..5802f2f91 --- /dev/null +++ b/api/src/test/mock-data/request/rni-1-record-similarity-null-field.json @@ -0,0 +1,53 @@ +{ + "fields": { + "primaryName": { + "type": null, + "weight": 0.5 + }, + "dob": { + "type": "rni_date", + "weight": 0.2 + }, + "dob2": { + "type": "rni_date", + "weight": 0.1 + }, + "addr": { + "type": "rni_address", + "weight": 0.5 + } + }, + "properties": { + "threshold": 0.7 + }, + "records": { + "left": [ + { + "primaryName": { + "data": "Ethan R", + "language": "eng", + "entityType": "PERSON" + }, + "dob": "1993-04-16", + "dob2": "1993/04/16", + "addr": "123 Roadlane Ave" + }, + { + "primaryName": "Evan R", + "dob": "1993-04-16" + } + ], + "right": [ + { + "primaryName": "Seth R", + "dob": "1993-04-16" + }, + { + "primaryName": "Ivan R", + "dob": "1993-04-16", + "dob2": "1993/04/16", + "addr": "123 Roadlane Ave" + } + ] + } +} \ No newline at end of file diff --git a/api/src/test/mock-data/request/rni-1-record-similarity.json b/api/src/test/mock-data/request/rni-1-record-similarity.json new file mode 100644 index 000000000..ff91c578f --- /dev/null +++ b/api/src/test/mock-data/request/rni-1-record-similarity.json @@ -0,0 +1,59 @@ +{ + "fields": { + "primaryName": { + "type": "rni_name", + "weight": 0.5 + }, + "dob": { + "type": "rni_date", + "weight": 0.2 + }, + "dob2": { + "type": "rni_date", + "weight": 0.1 + }, + "addr": { + "type": "rni_address", + "weight": 0.5 + } + }, + "properties": { + "threshold": 0.7 + }, + "records": { + "left": [ + { + "primaryName": { + "text": "Ethan R", + "language": "eng", + "entityType": "PERSON" + }, + "dob": "1993-04-16", + "dob2": "1993/04/16", + "addr": "123 Roadlane Ave" + }, + { + "primaryName": { + "text": "Evan R" + }, + "dob": "1993-04-16" + } + ], + "right": [ + { + "primaryName": { + "text": "Seth R" + }, + "dob": "1993-04-16" + }, + { + "primaryName": { + "text": "Ivan R" + }, + "dob": "1993-04-16", + "dob2": "1993/04/16", + "addr": "123 Roadlane Ave" + } + ] + } +} diff --git a/api/src/test/mock-data/response/rni-1-record-similarity-missing-field.json b/api/src/test/mock-data/response/rni-1-record-similarity-missing-field.json new file mode 100644 index 000000000..8b55dfcc5 --- /dev/null +++ b/api/src/test/mock-data/response/rni-1-record-similarity-missing-field.json @@ -0,0 +1,5 @@ +{ + "code": "badRequestFormat", + "message": "Unsupported field name: primaryName not found in field mapping", + "stack": null +} \ No newline at end of file diff --git a/api/src/test/mock-data/response/rni-1-record-similarity-missing-field.status b/api/src/test/mock-data/response/rni-1-record-similarity-missing-field.status new file mode 100644 index 000000000..6b3ed8d68 --- /dev/null +++ b/api/src/test/mock-data/response/rni-1-record-similarity-missing-field.status @@ -0,0 +1 @@ +400 \ No newline at end of file diff --git a/api/src/test/mock-data/response/rni-1-record-similarity-null-field.json b/api/src/test/mock-data/response/rni-1-record-similarity-null-field.json new file mode 100644 index 000000000..13a42c51e --- /dev/null +++ b/api/src/test/mock-data/response/rni-1-record-similarity-null-field.json @@ -0,0 +1,5 @@ +{ + "code": "badRequestFormat", + "message": "Unspecified field type for: primaryName", + "stack": null +} \ No newline at end of file diff --git a/api/src/test/mock-data/response/rni-1-record-similarity-null-field.status b/api/src/test/mock-data/response/rni-1-record-similarity-null-field.status new file mode 100644 index 000000000..6b3ed8d68 --- /dev/null +++ b/api/src/test/mock-data/response/rni-1-record-similarity-null-field.status @@ -0,0 +1 @@ +400 \ No newline at end of file diff --git a/api/src/test/mock-data/response/rni-1-record-similarity.json b/api/src/test/mock-data/response/rni-1-record-similarity.json new file mode 100644 index 000000000..6a5576d98 --- /dev/null +++ b/api/src/test/mock-data/response/rni-1-record-similarity.json @@ -0,0 +1,51 @@ +{ + "results": [ + { + "fields": { + "primaryName": { + "type": "rni_name", + "weight": 0.5 + }, + "dob": { + "type": "rni_date", + "weight": 0.2 + }, + "dob2": { + "type": "rni_date", + "weight": 0.1 + }, + "addr": { + "type": "rni_address", + "weight": 0.5 + } + }, + "score": 0.87, + "left": { + "primaryName": "Ethan R", + "dob": "1993-04-16", + "dob2": "1993/04/16", + "addr": "123 Roadlane Ave" + }, + "right": { + "primaryName": "Seth R", + "dob": "1993-04-16" + }, + "explainInfo": { + "scoredFields": { + "primaryName": { + "rawScore": 0.99, + "calculatedWeight": 0.7142857142857143 + }, + "dob": { + "rawScore": 0.8, + "calculatedWeight": 0.2857142857142857 + } + }, + "rightOnlyFields": [ + "dob2", + "addr" + ] + } + } + ] +} diff --git a/api/src/test/mock-data/response/rni-1-record-similarity.status b/api/src/test/mock-data/response/rni-1-record-similarity.status new file mode 100644 index 000000000..08839f6bb --- /dev/null +++ b/api/src/test/mock-data/response/rni-1-record-similarity.status @@ -0,0 +1 @@ +200 diff --git a/common/src/main/java/com/basistech/rosette/api/common/AbstractRosetteAPI.java b/common/src/main/java/com/basistech/rosette/api/common/AbstractRosetteAPI.java index 21966736d..f1f6ea665 100644 --- a/common/src/main/java/com/basistech/rosette/api/common/AbstractRosetteAPI.java +++ b/common/src/main/java/com/basistech/rosette/api/common/AbstractRosetteAPI.java @@ -42,6 +42,7 @@ public abstract class AbstractRosetteAPI implements AutoCloseable { public static final String NAME_DEDUPLICATION_SERVICE_PATH = "/name-deduplication"; public static final String NAME_TRANSLATION_SERVICE_PATH = "/name-translation"; public static final String NAME_SIMILARITY_SERVICE_PATH = "/name-similarity"; + public static final String RECORD_SIMILARITY_SERVICE_PATH = "/record-similarity"; public static final String ADDRESS_SIMILARITY_SERVICE_PATH = "/address-similarity"; public static final String TOKENS_SERVICE_PATH = "/tokens"; public static final String SENTENCES_SERVICE_PATH = "/sentences"; @@ -81,6 +82,7 @@ public abstract class AbstractRosetteAPI implements AutoCloseable { public static final Set NAMES_ENDPOINTS = new HashSet<>(Arrays.asList( NAME_SIMILARITY_SERVICE_PATH, + RECORD_SIMILARITY_SERVICE_PATH, NAME_TRANSLATION_SERVICE_PATH, NAME_DEDUPLICATION_SERVICE_PATH, ADDRESS_SIMILARITY_SERVICE_PATH diff --git a/examples/src/main/java/com/basistech/rosette/examples/RecordSimilarityExample.java b/examples/src/main/java/com/basistech/rosette/examples/RecordSimilarityExample.java new file mode 100644 index 000000000..5f983073e --- /dev/null +++ b/examples/src/main/java/com/basistech/rosette/examples/RecordSimilarityExample.java @@ -0,0 +1,108 @@ +/* + * Copyright 2024 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.basistech.rosette.examples; + +import com.basistech.rosette.api.HttpRosetteAPI; +import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityFieldInfo; +import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityProperties; +import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityRecords; +import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityRequest; +import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityResponse; +import com.basistech.rosette.apimodel.recordsimilarity.records.AddressField; +import com.basistech.rosette.apimodel.recordsimilarity.records.DateField; +import com.basistech.rosette.apimodel.recordsimilarity.records.NameField; +import com.basistech.rosette.apimodel.recordsimilarity.records.RecordFieldType; +import com.basistech.util.ISO15924; +import com.basistech.util.LanguageCode; + +import java.io.IOException; +import java.util.List; +import java.util.Map; + +import static com.basistech.rosette.api.common.AbstractRosetteAPI.RECORD_SIMILARITY_SERVICE_PATH; + +/** + * Example which demonstrates record similarity. + */ +@SuppressWarnings({"java:S1166", "java:S2221", "java:S106"}) +public class RecordSimilarityExample extends ExampleBase { + public static void main(String[] args) { + try { + new RecordSimilarityExample().run(); + } catch (Exception e) { + e.printStackTrace(); + System.exit(1); + } + } + + private void run() throws IOException { + String primaryNameField = "primaryName"; + String dobField = "dob"; + String dob2Field = "dob2"; + String addrField = "addr"; + String dobHyphen = "1993-04-16"; + RecordSimilarityRequest request = RecordSimilarityRequest.builder() + .fields(Map.of( + primaryNameField, RecordSimilarityFieldInfo.builder().type(RecordFieldType.NAME).weight(0.5).build(), + dobField, RecordSimilarityFieldInfo.builder().type(RecordFieldType.DATE).weight(0.2).build(), + dob2Field, RecordSimilarityFieldInfo.builder().type(RecordFieldType.DATE).weight(0.1).build(), + addrField, RecordSimilarityFieldInfo.builder().type(RecordFieldType.ADDRESS).weight(0.5).build())) + .properties(RecordSimilarityProperties.builder().threshold(0.7).includeExplainInfo(true).build()) + .records(RecordSimilarityRecords.builder() + .left( + List.of( + Map.of( + primaryNameField, NameField.FieldedName.builder() + .text("Ethan R").entityType("PERSON") + .language(LanguageCode.ENGLISH) + .languageOfOrigin(LanguageCode.ENGLISH) + .script(ISO15924.Latn) + .build(), + dobField, DateField.UnfieldedDate.builder().date(dobHyphen).build(), + dob2Field, DateField.FieldedDate.builder().date("1993/04/16").build(), + addrField, AddressField.UnfieldedAddress.builder().address("123 Roadlane Ave").build() + ), + Map.of( + primaryNameField, NameField.FieldedName.builder().text("Evan R").build(), + dobField, DateField.FieldedDate.builder().date(dobHyphen).build() + ) + ) + ).right( + List.of( + Map.of( + primaryNameField, NameField.FieldedName.builder().text("Seth R").language(LanguageCode.ENGLISH).build(), + dobField, DateField.FieldedDate.builder().date(dobHyphen).build() + ), + Map.of( + primaryNameField, NameField.UnfieldedName.builder().text("Ivan R").build(), + dobField, DateField.FieldedDate.builder().date(dobHyphen).build(), + dob2Field, DateField.FieldedDate.builder().date("1993/04/16").build(), + addrField, AddressField.FieldedAddress.builder().address("123 Roadlane Ave").build() + ) + ) + ).build() + ).build(); + + HttpRosetteAPI rosetteAPI = new HttpRosetteAPI.Builder() + .key(getApiKeyFromSystemProperty()) + .url(getAltUrlFromSystemProperty()) + .build(); + //The api object creates an http client, but to provide your own: + //api.httpClient(CloseableHttpClient) + RecordSimilarityResponse response = rosetteAPI.perform(RECORD_SIMILARITY_SERVICE_PATH, request, RecordSimilarityResponse.class); + System.out.println(responseToJson(response)); + } +} diff --git a/json/bnd.bnd b/json/bnd.bnd new file mode 100644 index 000000000..9e993d607 --- /dev/null +++ b/json/bnd.bnd @@ -0,0 +1,2 @@ +Bundle-Version: ${osgi-version} +Export-Package: com.basistech.rosette.apimodel.jackson,com.basistech.rosette.apimodel.jackson.batch,com.basistech.rosette.apimodel.jackson.recordsimilaritydeserializers diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/ApiModelMixinModule.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/ApiModelMixinModule.java index 3343aadbb..848b73207 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/ApiModelMixinModule.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/ApiModelMixinModule.java @@ -24,9 +24,19 @@ import com.basistech.rosette.apimodel.IAddress; import com.basistech.rosette.apimodel.Name; import com.basistech.rosette.apimodel.NameDeduplicationRequest; +import com.basistech.rosette.apimodel.jackson.recordsimilaritydeserializers.AddressFieldDeserializer; +import com.basistech.rosette.apimodel.jackson.recordsimilaritydeserializers.DateFieldDeserializer; +import com.basistech.rosette.apimodel.jackson.recordsimilaritydeserializers.NameFieldDeserializer; +import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityResult; +import com.basistech.rosette.apimodel.jackson.recordsimilaritydeserializers.RecordSimilarityResultDeserializer; +import com.basistech.rosette.apimodel.recordsimilarity.records.AddressField; +import com.basistech.rosette.apimodel.recordsimilarity.records.DateField; +import com.basistech.rosette.apimodel.recordsimilarity.records.NameField; import com.basistech.rosette.apimodel.NameSimilarityRequest; import com.basistech.rosette.apimodel.NameTranslationRequest; import com.basistech.rosette.apimodel.UnfieldedAddress; +import com.basistech.rosette.apimodel.jackson.recordsimilaritydeserializers.RecordSimilarityRequestDeserializer; +import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityRequest; import com.basistech.rosette.dm.jackson.AnnotatedDataModelModule; import com.fasterxml.jackson.databind.MapperFeature; import com.fasterxml.jackson.databind.Module; @@ -84,6 +94,11 @@ public void setupModule(Module.SetupContext context) { // IAddresses require a custom deserializer SimpleDeserializers deserializers = new SimpleDeserializers(); deserializers.addDeserializer(IAddress.class, new AddressDeserializer()); + deserializers.addDeserializer(NameField.class, new NameFieldDeserializer()); + deserializers.addDeserializer(DateField.class, new DateFieldDeserializer()); + deserializers.addDeserializer(AddressField.class, new AddressFieldDeserializer()); + deserializers.addDeserializer(RecordSimilarityRequest.class, new RecordSimilarityRequestDeserializer()); + deserializers.addDeserializer(RecordSimilarityResult.class, new RecordSimilarityResultDeserializer()); context.addDeserializers(deserializers); } diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/AddressFieldDeserializer.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/AddressFieldDeserializer.java new file mode 100644 index 000000000..b38c46217 --- /dev/null +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/AddressFieldDeserializer.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.basistech.rosette.apimodel.jackson.recordsimilaritydeserializers; + +import com.basistech.rosette.apimodel.recordsimilarity.records.AddressField; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; + +import java.io.IOException; + +public class AddressFieldDeserializer extends StdDeserializer { + public AddressFieldDeserializer() { + super(AddressField.class); + } + + @Override + public AddressField deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException { + final JsonNode node = jsonParser.getCodec().readTree(jsonParser); + if (node.isObject()) { + return jsonParser.getCodec().treeToValue(node, AddressField.FieldedAddress.class); + } else if (node.isTextual()) { + return AddressField.UnfieldedAddress.builder().address(node.textValue()).build(); + } + throw new IOException("Invalid JSON structure: unexpected node type"); + } +} diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/DateFieldDeserializer.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/DateFieldDeserializer.java new file mode 100644 index 000000000..422f34252 --- /dev/null +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/DateFieldDeserializer.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.basistech.rosette.apimodel.jackson.recordsimilaritydeserializers; + +import com.basistech.rosette.apimodel.recordsimilarity.records.DateField; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; + +import java.io.IOException; + +public class DateFieldDeserializer extends StdDeserializer { + public DateFieldDeserializer() { + super(DateField.class); + } + + @Override + public DateField deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException { + final JsonNode node = jsonParser.getCodec().readTree(jsonParser); + if (node.isObject()) { + return jsonParser.getCodec().treeToValue(node, DateField.FieldedDate.class); + } else if (node.isTextual()) { + return DateField.UnfieldedDate.builder().date(node.textValue()).build(); + } + throw new IOException("Invalid JSON structure: unexpected node type"); + } +} diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/NameFieldDeserializer.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/NameFieldDeserializer.java new file mode 100644 index 000000000..8fb372bc0 --- /dev/null +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/NameFieldDeserializer.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.basistech.rosette.apimodel.jackson.recordsimilaritydeserializers; + +import com.basistech.rosette.apimodel.recordsimilarity.records.NameField; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; + +import java.io.IOException; + +public class NameFieldDeserializer extends StdDeserializer { + public NameFieldDeserializer() { + super(NameField.class); + } + + @Override + public NameField deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException { + final JsonNode node = jsonParser.getCodec().readTree(jsonParser); + if (node.isObject()) { + return jsonParser.getCodec().treeToValue(node, NameField.FieldedName.class); + } else if (node.isTextual()) { + return NameField.UnfieldedName.builder().text(node.textValue()).build(); + } + throw new IOException("Invalid JSON structure: unexpected node type"); + } +} diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java new file mode 100644 index 000000000..40dba0fa1 --- /dev/null +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java @@ -0,0 +1,72 @@ +/* + * Copyright 2024 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.basistech.rosette.apimodel.jackson.recordsimilaritydeserializers; + +import java.io.IOException; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.JsonNode; +import javax.validation.Valid; + +import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityFieldInfo; +import com.basistech.rosette.apimodel.recordsimilarity.records.AddressField; +import com.basistech.rosette.apimodel.recordsimilarity.records.DateField; +import com.basistech.rosette.apimodel.recordsimilarity.records.NameField; +import com.basistech.rosette.apimodel.recordsimilarity.records.RecordSimilarityField; + +final class RecordSimilarityDeserializerUtilities { + + private RecordSimilarityDeserializerUtilities() { } + + static Map parseRecord(JsonNode jsonNode, @Valid Map fields, JsonParser jsonParser) throws IOException { + final Iterator> recordsIterator = jsonNode.fields(); + final Map recordMap = new HashMap<>(); + while (recordsIterator.hasNext()) { + final Map.Entry recordEntry = recordsIterator.next(); + final String fieldName = recordEntry.getKey(); + final JsonNode fieldValue = recordEntry.getValue(); + + if (fields.containsKey(fieldName)) { + final RecordSimilarityFieldInfo fieldInfo = fields.get(fieldName); + final RecordSimilarityField fieldData; + if (fieldInfo == null) { + throw new IllegalArgumentException("Unspecified field type for: " + fieldName); + } + switch (fieldInfo.getType()) { + case DATE: + fieldData = fieldValue.traverse(jsonParser.getCodec()).readValueAs(DateField.class); + break; + case NAME: + fieldData = fieldValue.traverse(jsonParser.getCodec()).readValueAs(NameField.class); + break; + case ADDRESS: + fieldData = fieldValue.traverse(jsonParser.getCodec()).readValueAs(AddressField.class); + break; + default: + throw new IllegalArgumentException("Unsupported field type: " + fieldInfo.getType()); + } + recordMap.put(fieldName, fieldData); + } else { + throw new IllegalArgumentException("Unsupported field name: " + fieldName + " not found in field mapping"); + } + } + return recordMap; + } +} diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityRequestDeserializer.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityRequestDeserializer.java new file mode 100644 index 000000000..11d3883b4 --- /dev/null +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityRequestDeserializer.java @@ -0,0 +1,74 @@ +/* + * Copyright 2024 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.basistech.rosette.apimodel.jackson.recordsimilaritydeserializers; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; + +import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityFieldInfo; +import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityProperties; +import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityRecords; +import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityRequest; +import com.basistech.rosette.apimodel.recordsimilarity.records.RecordSimilarityField; + +public class RecordSimilarityRequestDeserializer extends StdDeserializer { + + public RecordSimilarityRequestDeserializer() { + super(RecordSimilarityRequest.class); + } + + @Override + public RecordSimilarityRequest deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException { + try (jsonParser) { + final JsonNode node = jsonParser.getCodec().readTree(jsonParser); + final Map fields = node.get("fields") != null ? node.get("fields").traverse(jsonParser.getCodec()).readValueAs(new TypeReference>() { }) : new HashMap<>(); + final RecordSimilarityProperties properties = node.get("properties") != null ? node.get("properties").traverse(jsonParser.getCodec()).readValueAs(RecordSimilarityProperties.class) : RecordSimilarityProperties.builder().build(); + RecordSimilarityRecords records = null; + String recordsField = "records"; + if (node.get(recordsField) != null && fields != null && node.get(recordsField).get("left") != null && node.get(recordsField).get("right") != null) { + records = RecordSimilarityRecords.builder() + .left(parseRecords(node.get(recordsField).get("left"), fields, jsonParser)) + .right(parseRecords(node.get(recordsField).get("right"), fields, jsonParser)) + .build(); + } + return RecordSimilarityRequest.builder() + .fields(fields) + .properties(properties) + .records(records) + .build(); + } + } + + private static List> parseRecords(final JsonNode arrayNode, + final Map fields, + final JsonParser jsonParser) throws IOException { + final List> records = new ArrayList<>(); + for (JsonNode recordNode : arrayNode) { + records.add(RecordSimilarityDeserializerUtilities.parseRecord(recordNode, fields, jsonParser)); + } + return records; + } +} diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityResultDeserializer.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityResultDeserializer.java new file mode 100644 index 000000000..0fc84f8bd --- /dev/null +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityResultDeserializer.java @@ -0,0 +1,54 @@ +/* + * Copyright 2024 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.basistech.rosette.apimodel.jackson.recordsimilaritydeserializers; + +import java.io.IOException; +import java.util.Map; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; + +import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityExplainInfo; +import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityFieldInfo; +import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityResult; +import com.basistech.rosette.apimodel.recordsimilarity.records.RecordSimilarityField; + +public class RecordSimilarityResultDeserializer extends StdDeserializer { + + public RecordSimilarityResultDeserializer() { + super(RecordSimilarityResult.class); + } + + @Override + public RecordSimilarityResult deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException { + final JsonNode node = jsonParser.getCodec().readTree(jsonParser); + final Map fields = node.get("fields") != null ? node.get("fields").traverse(jsonParser.getCodec()).readValueAs(new TypeReference>() { }) : null; + final Double score = node.get("score") != null ? node.get("score").traverse(jsonParser.getCodec()).readValueAs(Double.class) : null; + final RecordSimilarityExplainInfo explainInfo = node.get("explainInfo") != null ? node.get("explainInfo").traverse(jsonParser.getCodec()).readValueAs(RecordSimilarityExplainInfo.class) : null; + Map left = node.get("left") != null && fields != null ? RecordSimilarityDeserializerUtilities.parseRecord(node.get("left"), fields, jsonParser) : null; + Map right = node.get("right") != null && fields != null ? RecordSimilarityDeserializerUtilities.parseRecord(node.get("right"), fields, jsonParser) : null; + return RecordSimilarityResult.builder() + .score(score) + .left(left) + .right(right) + .explainInfo(explainInfo) + .build(); + } +} diff --git a/json/src/test/java/com/basistech/rosette/apimodel/ModelTest.java b/json/src/test/java/com/basistech/rosette/apimodel/ModelTest.java index 41cc18c6c..2565b9ab3 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/ModelTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/ModelTest.java @@ -69,7 +69,6 @@ public void init() { @MethodSource("packageTestParameters") void packageTest(boolean inputStreams) throws ClassNotFoundException, IOException { Reflections reflections = new Reflections(this.getClass().getPackage().getName(), new SubTypesScanner(false)); - Set> allClasses = reflections.getSubTypesOf(Object.class); for (Object clazz : allClasses) { String className = ((Class) clazz).getName(); @@ -100,6 +99,9 @@ void packageTest(boolean inputStreams) throws ClassNotFoundException, IOExceptio if (className.contains("ConfigurationRequest")) { continue; } + if (className.contains("RecordSimilarityRequest")) { + continue; + } Class c = Class.forName(className); if (Modifier.isAbstract(c.getModifiers())) { diff --git a/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java b/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java new file mode 100644 index 000000000..71f350220 --- /dev/null +++ b/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java @@ -0,0 +1,101 @@ +/* + * Copyright 2022 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.basistech.rosette.apimodel; + +import com.basistech.rosette.apimodel.jackson.ApiModelMixinModule; +import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityFieldInfo; +import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityProperties; +import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityRecords; +import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityRequest; +import com.basistech.rosette.apimodel.recordsimilarity.records.AddressField; +import com.basistech.rosette.apimodel.recordsimilarity.records.DateField; +import com.basistech.rosette.apimodel.recordsimilarity.records.NameField; +import com.basistech.rosette.apimodel.recordsimilarity.records.RecordFieldType; +import com.basistech.util.ISO15924; +import com.basistech.util.LanguageCode; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.junit.jupiter.api.Test; + +import java.util.List; +import java.util.Map; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +class RecordSimilarityRequestTest { + + private static final ObjectMapper MAPPER = ApiModelMixinModule.setupObjectMapper(new ObjectMapper()); + + private static final String EXPECTED_JSON = "{\"fields\":{\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"addr\":{\"type\":\"rni_address\",\"weight\":0.5}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true},\"records\":{\"left\":[{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"dob\":\"1993-04-16\",\"addr\":\"123 Roadlane Ave\"},{\"primaryName\":{\"text\":\"Evan R\"},\"dob\":{\"date\":\"1993-04-16\"}}],\"right\":[{\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"},\"dob\":{\"date\":\"1993-04-16\"}},{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":\"Ivan R\",\"dob\":{\"date\":\"1993-04-16\"},\"addr\":{\"address\":\"123 Roadlane Ave\"}}]}}"; + private static final RecordSimilarityRequest EXPECTED_REQUEST = RecordSimilarityRequest.builder() + .fields(Map.of( + "primaryName", RecordSimilarityFieldInfo.builder().type(RecordFieldType.NAME).weight(0.5).build(), + "dob", RecordSimilarityFieldInfo.builder().type(RecordFieldType.DATE).weight(0.2).build(), + "dob2", RecordSimilarityFieldInfo.builder().type(RecordFieldType.DATE).weight(0.1).build(), + "addr", RecordSimilarityFieldInfo.builder().type(RecordFieldType.ADDRESS).weight(0.5).build())) + .properties(RecordSimilarityProperties.builder().threshold(0.7).includeExplainInfo(true).build()) + .records(RecordSimilarityRecords.builder() + .left( + List.of( + Map.of( + "primaryName", NameField.FieldedName.builder() + .text("Ethan R").entityType("PERSON") + .language(LanguageCode.ENGLISH) + .languageOfOrigin(LanguageCode.ENGLISH) + .script(ISO15924.Latn) + .build(), + "dob", DateField.UnfieldedDate.builder().date("1993-04-16").build(), + "dob2", DateField.FieldedDate.builder().date("1993/04/16").build(), + "addr", AddressField.UnfieldedAddress.builder().address("123 Roadlane Ave").build() + ), + Map.of( + "primaryName", NameField.FieldedName.builder().text("Evan R").build(), + "dob", DateField.FieldedDate.builder().date("1993-04-16").build() + ) + ) + ).right( + List.of( + Map.of( + "primaryName", NameField.FieldedName.builder().text("Seth R").language(LanguageCode.ENGLISH).build(), + "dob", DateField.FieldedDate.builder().date("1993-04-16").build() + ), + Map.of( + "primaryName", NameField.UnfieldedName.builder().text("Ivan R").build(), + "dob", DateField.FieldedDate.builder().date("1993-04-16").build(), + "dob2", DateField.FieldedDate.builder().date("1993/04/16").build(), + "addr", AddressField.FieldedAddress.builder().address("123 Roadlane Ave").build() + ) + ) + ).build() + ).build(); + + @Test + void testDeserialization() throws JsonProcessingException { + final RecordSimilarityRequest request = MAPPER.readValue(EXPECTED_JSON, new TypeReference<>() { }); + assertEquals(EXPECTED_REQUEST, request); + } + + @Test + void testSerialization() throws JsonProcessingException { + final JsonNode expectedJson = MAPPER.readTree(EXPECTED_JSON); + final JsonNode actualJson = MAPPER.valueToTree(EXPECTED_REQUEST); + assertEquals(expectedJson, actualJson); + } + +} diff --git a/model/bnd.bnd b/model/bnd.bnd new file mode 100644 index 000000000..19f8fc479 --- /dev/null +++ b/model/bnd.bnd @@ -0,0 +1,2 @@ +Bundle-Version: ${osgi-version} +Export-Package: com.basistech.rosette.apimodel,com.basistech.rosette.apimodel.batch,com.basistech.rosette.apimodel.recordsimilarity,com.basistech.rosette.apimodel.recordsimilarity.records diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityExplainInfo.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityExplainInfo.java new file mode 100644 index 000000000..35eabccac --- /dev/null +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityExplainInfo.java @@ -0,0 +1,33 @@ +/* + * Copyright 2024 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.basistech.rosette.apimodel.recordsimilarity; + +import java.util.List; +import java.util.Map; + +import lombok.Builder; +import lombok.Value; +import lombok.extern.jackson.Jacksonized; + +@Builder +@Jacksonized +@Value +public class RecordSimilarityExplainInfo { + Map scoredFields; + List leftOnlyFields; + List rightOnlyFields; +} diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldExplainInfo.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldExplainInfo.java new file mode 100644 index 000000000..462098fbf --- /dev/null +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldExplainInfo.java @@ -0,0 +1,35 @@ +/* + * Copyright 2024 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.basistech.rosette.apimodel.recordsimilarity; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.JsonNode; +import lombok.Builder; +import lombok.Value; +import lombok.extern.jackson.Jacksonized; + +@Builder +@Jacksonized +@Value +@JsonInclude(JsonInclude.Include.NON_NULL) +public class RecordSimilarityFieldExplainInfo { + double weight; + double calculatedWeight; + double rawScore; + double finalScore; + JsonNode details; +} diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java new file mode 100644 index 000000000..2ddec1080 --- /dev/null +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java @@ -0,0 +1,34 @@ +/* + * Copyright 2022 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.basistech.rosette.apimodel.recordsimilarity; + +import com.basistech.rosette.apimodel.recordsimilarity.records.RecordFieldType; + +import javax.validation.Valid; +import lombok.Builder; +import lombok.Value; +import lombok.extern.jackson.Jacksonized; + +import javax.validation.constraints.NotNull; + +@Jacksonized +@Builder +@Value +public class RecordSimilarityFieldInfo { + @NotNull @Valid RecordFieldType type; + Double weight; +} diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityProperties.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityProperties.java new file mode 100644 index 000000000..551a1ec94 --- /dev/null +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityProperties.java @@ -0,0 +1,32 @@ +/* + * Copyright 2022 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.basistech.rosette.apimodel.recordsimilarity; + +import javax.validation.Valid; +import javax.validation.constraints.NotNull; +import lombok.Builder; +import lombok.Value; +import lombok.extern.jackson.Jacksonized; + +@Jacksonized +@Builder +@Value +public class RecordSimilarityProperties { + @Builder.Default + @NotNull @Valid Double threshold = 0.0; + @NotNull @Valid boolean includeExplainInfo; +} diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityRecords.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityRecords.java new file mode 100644 index 000000000..a21daa5a8 --- /dev/null +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityRecords.java @@ -0,0 +1,34 @@ +/* + * Copyright 2022 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.basistech.rosette.apimodel.recordsimilarity; + +import java.util.List; +import java.util.Map; +import com.basistech.rosette.apimodel.recordsimilarity.records.RecordSimilarityField; + +import javax.validation.Valid; +import lombok.Builder; +import lombok.Value; + +import javax.validation.constraints.NotEmpty; + +@Builder +@Value +public class RecordSimilarityRecords { + @NotEmpty @Valid List> left; + @NotEmpty @Valid List> right; +} diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityRequest.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityRequest.java new file mode 100644 index 000000000..82d1b1266 --- /dev/null +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityRequest.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.basistech.rosette.apimodel.recordsimilarity; + +import com.basistech.rosette.apimodel.Request; +import com.fasterxml.jackson.annotation.JsonInclude; +import javax.validation.Valid; +import lombok.Value; +import lombok.Builder; + +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; +import java.util.Map; + +@Value +@JsonInclude(JsonInclude.Include.NON_NULL) +public class RecordSimilarityRequest extends Request { + @NotEmpty @Valid Map fields; + @Valid RecordSimilarityProperties properties; + @NotNull @Valid RecordSimilarityRecords records; + + @Builder // workaround for inheritance https://github.com/rzwitserloot/lombok/issues/853 + public RecordSimilarityRequest(String profileId, + Map fields, + RecordSimilarityProperties properties, + RecordSimilarityRecords records) { + super(profileId); + this.fields = fields; + this.properties = properties; + this.records = records; + } +} diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponse.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponse.java new file mode 100644 index 000000000..099728a7b --- /dev/null +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponse.java @@ -0,0 +1,48 @@ +/* + * Copyright 2024 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.basistech.rosette.apimodel.recordsimilarity; + +import java.util.List; +import java.util.Map; + +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Builder; +import lombok.Value; +import lombok.extern.jackson.Jacksonized; + +import com.basistech.rosette.apimodel.Response; + +import javax.validation.Valid; + +/** + * Response data model for comparison of two records. + */ +@Value +@Builder +@Jacksonized +@JsonInclude(JsonInclude.Include.NON_NULL) +public class RecordSimilarityResponse extends Response { + @Valid Map fields; + /** + * @return list of record match results + */ + @Valid List results; + /** + * @return error message to user in case no results matched the threshold + */ + @Valid String errorMessage; +} diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResult.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResult.java new file mode 100644 index 000000000..f74464de4 --- /dev/null +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResult.java @@ -0,0 +1,36 @@ +/* + * Copyright 2024 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.basistech.rosette.apimodel.recordsimilarity; + +import java.util.Map; + +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Value; +import lombok.experimental.SuperBuilder; + +import com.basistech.rosette.apimodel.recordsimilarity.records.RecordSimilarityField; + +@Value +@SuperBuilder +@JsonInclude(JsonInclude.Include.NON_NULL) +public class RecordSimilarityResult { + double score; + Map left; + Map right; + RecordSimilarityExplainInfo explainInfo; + String error; +} diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/AddressField.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/AddressField.java new file mode 100644 index 000000000..26fd13440 --- /dev/null +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/AddressField.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.basistech.rosette.apimodel.recordsimilarity.records; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonValue; + +import lombok.Value; +import lombok.experimental.NonFinal; +import lombok.experimental.SuperBuilder; +import lombok.extern.jackson.Jacksonized; + +import javax.validation.constraints.NotBlank; + +@SuperBuilder +@Value +@NonFinal +public abstract class AddressField implements RecordSimilarityField { + @NotBlank String address; + + @Jacksonized + @SuperBuilder + @Value + public static class UnfieldedAddress extends AddressField { + @JsonValue public String toJson() { + return super.getAddress(); + } + } + + @Jacksonized + @SuperBuilder + @Value + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class FieldedAddress extends AddressField { + } + +} diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/DateField.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/DateField.java new file mode 100644 index 000000000..4467320f5 --- /dev/null +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/DateField.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.basistech.rosette.apimodel.recordsimilarity.records; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.Value; +import lombok.experimental.NonFinal; +import lombok.experimental.SuperBuilder; +import lombok.extern.jackson.Jacksonized; + +import javax.validation.constraints.NotBlank; + +@SuperBuilder +@Value +@NonFinal +public abstract class DateField implements RecordSimilarityField { + @NotBlank String date; + + @Jacksonized + @SuperBuilder + @Value + public static class UnfieldedDate extends DateField { + @JsonValue public String toJson() { + return super.getDate(); + } + } + + @Jacksonized + @SuperBuilder + @Value + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class FieldedDate extends DateField { + } + +} diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/NameField.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/NameField.java new file mode 100644 index 000000000..b4eba359f --- /dev/null +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/NameField.java @@ -0,0 +1,56 @@ +/* + * Copyright 2024 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.basistech.rosette.apimodel.recordsimilarity.records; + +import com.basistech.util.ISO15924; +import com.basistech.util.LanguageCode; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.Value; +import lombok.experimental.NonFinal; +import lombok.experimental.SuperBuilder; +import lombok.extern.jackson.Jacksonized; + +import javax.validation.constraints.NotBlank; + +@SuperBuilder +@Value +@NonFinal +public abstract class NameField implements RecordSimilarityField { + @NotBlank String text; + + @Jacksonized + @SuperBuilder + @Value + public static class UnfieldedName extends NameField { + @JsonValue public String toJson() { + return super.getText(); + } + } + + @Jacksonized + @SuperBuilder + @Value + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class FieldedName extends NameField { + String entityType; + LanguageCode language; + LanguageCode languageOfOrigin; + ISO15924 script; + } + +} diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/RecordFieldType.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/RecordFieldType.java new file mode 100644 index 000000000..dc5b278ed --- /dev/null +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/RecordFieldType.java @@ -0,0 +1,31 @@ +/* + * Copyright 2022 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.basistech.rosette.apimodel.recordsimilarity.records; + +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AllArgsConstructor; +import lombok.Getter; + +@AllArgsConstructor +@Getter +public enum RecordFieldType { + NAME("rni_name"), + DATE("rni_date"), + ADDRESS("rni_address"); + + @JsonValue private final String value; +} diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/RecordSimilarityField.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/RecordSimilarityField.java new file mode 100644 index 000000000..46745ad90 --- /dev/null +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/RecordSimilarityField.java @@ -0,0 +1,20 @@ +/* + * Copyright 2022 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.basistech.rosette.apimodel.recordsimilarity.records; + +public interface RecordSimilarityField { +} From eb8e8f4162e11c70f93fd7c7a863b10b90c5a6de Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Mon, 25 Mar 2024 14:11:31 +0100 Subject: [PATCH 238/415] no-jira: fix jenkins skipping failed maven command return code --- CI.Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CI.Jenkinsfile b/CI.Jenkinsfile index d29275ca9..2cd8fc964 100644 --- a/CI.Jenkinsfile +++ b/CI.Jenkinsfile @@ -22,7 +22,7 @@ node ("docker-light") { bash -c \"apt-get update && \ apt-get install -y git && \ pushd /source && \ - /opt/maven-basis/bin/mvn --batch-mode clean install sonar:sonar $mySonarOpts; \ + /opt/maven-basis/bin/mvn --batch-mode clean install sonar:sonar $mySonarOpts && \ echo && \ echo [INFO] Set file permissions to UID and GID of jenkins user for cleanup. && \ chown -R 9960:9960 /source\"" From ac18153630a4727b288f21e61e4354da2d37500d Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Mon, 25 Mar 2024 15:45:55 +0100 Subject: [PATCH 239/415] no-jira: run the cleanup every time --- CI.Jenkinsfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CI.Jenkinsfile b/CI.Jenkinsfile index 2cd8fc964..d4864dfe4 100644 --- a/CI.Jenkinsfile +++ b/CI.Jenkinsfile @@ -22,10 +22,12 @@ node ("docker-light") { bash -c \"apt-get update && \ apt-get install -y git && \ pushd /source && \ - /opt/maven-basis/bin/mvn --batch-mode clean install sonar:sonar $mySonarOpts && \ + /opt/maven-basis/bin/mvn --batch-mode clean install sonar:sonar $mySonarOpts; \ + maven_ret=\$?; \ echo && \ echo [INFO] Set file permissions to UID and GID of jenkins user for cleanup. && \ - chown -R 9960:9960 /source\"" + chown -R 9960:9960 /source && \ + exit \$maven_ret\" } } postToTeams(true) From ad87418bd8fc96dc1f4cc60b4fc4f8bbb4b4cec7 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Mon, 25 Mar 2024 16:20:21 +0100 Subject: [PATCH 240/415] no-jira: add " --- CI.Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CI.Jenkinsfile b/CI.Jenkinsfile index d4864dfe4..ffca20959 100644 --- a/CI.Jenkinsfile +++ b/CI.Jenkinsfile @@ -27,7 +27,7 @@ node ("docker-light") { echo && \ echo [INFO] Set file permissions to UID and GID of jenkins user for cleanup. && \ chown -R 9960:9960 /source && \ - exit \$maven_ret\" + exit \$maven_ret\"" } } postToTeams(true) From 7802b7f1bbe970f377fe16fedd904b69e449f579 Mon Sep 17 00:00:00 2001 From: Grace Calianese <132861517+gcalianese@users.noreply.github.com> Date: Mon, 25 Mar 2024 11:28:28 -0400 Subject: [PATCH 241/415] update illegal argument condition --- .../RecordSimilarityDeserializerUtilities.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java index 40dba0fa1..68f2fc7c0 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java @@ -46,7 +46,7 @@ static Map parseRecord(JsonNode jsonNode, @Valid if (fields.containsKey(fieldName)) { final RecordSimilarityFieldInfo fieldInfo = fields.get(fieldName); final RecordSimilarityField fieldData; - if (fieldInfo == null) { + if (fieldInfo == null || fieldInfo.getType() == null) { throw new IllegalArgumentException("Unspecified field type for: " + fieldName); } switch (fieldInfo.getType()) { From e9a10dc679e1a8dc155179be307b4b73ea5c759e Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Mon, 25 Mar 2024 16:47:06 +0100 Subject: [PATCH 242/415] no-jira: testing --- CI.Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CI.Jenkinsfile b/CI.Jenkinsfile index ffca20959..2367de63b 100644 --- a/CI.Jenkinsfile +++ b/CI.Jenkinsfile @@ -23,11 +23,11 @@ node ("docker-light") { apt-get install -y git && \ pushd /source && \ /opt/maven-basis/bin/mvn --batch-mode clean install sonar:sonar $mySonarOpts; \ - maven_ret=\$?; \ + maven_ret=\\\$?; \ echo && \ echo [INFO] Set file permissions to UID and GID of jenkins user for cleanup. && \ chown -R 9960:9960 /source && \ - exit \$maven_ret\"" + exit \\\$maven_ret\"" } } postToTeams(true) From af37395195bcb5426eedc1a0b8b7420f978aed81 Mon Sep 17 00:00:00 2001 From: Grace Calianese <132861517+gcalianese@users.noreply.github.com> Date: Mon, 25 Mar 2024 12:02:30 -0400 Subject: [PATCH 243/415] remove codesmell --- .../RecordSimilarityDeserializerUtilities.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java index 68f2fc7c0..510454af2 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java @@ -46,7 +46,7 @@ static Map parseRecord(JsonNode jsonNode, @Valid if (fields.containsKey(fieldName)) { final RecordSimilarityFieldInfo fieldInfo = fields.get(fieldName); final RecordSimilarityField fieldData; - if (fieldInfo == null || fieldInfo.getType() == null) { + if (fieldInfo.getType() == null) { throw new IllegalArgumentException("Unspecified field type for: " + fieldName); } switch (fieldInfo.getType()) { From d75ac35c4acc2b7346c2157123d43692d4dcd5bf Mon Sep 17 00:00:00 2001 From: Katsuya Tomioka Date: Mon, 25 Mar 2024 12:45:36 -0400 Subject: [PATCH 244/415] run maven in Jenkinsfile --- CI.Jenkinsfile | 12 +++++++++++- Jenkinsfile | 10 ++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/CI.Jenkinsfile b/CI.Jenkinsfile index 2367de63b..b79b1cfdc 100644 --- a/CI.Jenkinsfile +++ b/CI.Jenkinsfile @@ -1,13 +1,23 @@ node ("docker-light") { def sourceDir = pwd() try { + def mavenLocalRepo = "$JENKINS_HOME/maven-local-repositories/executor-$EXECUTOR_NUMBER" stage("Clean up") { step([$class: 'WsCleanup']) + sh "rm -rf $mavenLocalRepo" } stage("Checkout Code") { checkout scm } - stage("Maven Build") { + stage("Build") { + withMaven(maven: "Basis", + mavenLocalRepo: mavenLocalRepo, + publisherStrategy: "EXPLICIT") { + sh "mvn clean verify" + } + + } + stage("Test with Docker") { withSonarQubeEnv { mySonarOpts="-Dsonar.login=${env.SONAR_AUTH_TOKEN} -Dsonar.host.url=${env.SONAR_HOST_URL}" if ("${env.CHANGE_BRANCH}" != "null") { diff --git a/Jenkinsfile b/Jenkinsfile index dc4fde048..a029425b5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,12 +1,22 @@ node ("docker-light") { def SOURCEDIR = pwd() try { + def mavenLocalRepo = "$JENKINS_HOME/maven-local-repositories/executor-$EXECUTOR_NUMBER" stage("Clean up") { step([$class: 'WsCleanup']) + sh "rm -rf $mavenLocalRepo" } stage("Checkout Code") { checkout scm } + stage("Build") { + withMaven(maven: "Basis", + mavenLocalRepo: mavenLocalRepo, + publisherStrategy: "EXPLICIT") { + sh "mvn clean verify" + } + + } stage("Test with Docker") { echo "${env.ALT_URL}" def useUrl = ("${env.ALT_URL}" == "null") ? "${env.BINDING_TEST_URL}" : "${env.ALT_URL}" From 7a1f6c429a471ce6ee15600a3fe1d823bb0b0aac Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Tue, 26 Mar 2024 16:54:53 +0000 Subject: [PATCH 245/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.29.100 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 512cf97e5..b68fcb683 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.28.1-SNAPSHOT + 1.29.100 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 372e4154d..c04d8807e 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.28.1-SNAPSHOT + 1.29.100 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 20867353b..b7b87b42b 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.28.1-SNAPSHOT + 1.29.100 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 760aae7fd..bf402a768 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.28.1-SNAPSHOT + 1.29.100 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 5302005af..627362606 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.28.1-SNAPSHOT + 1.29.100 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 7e9ece8e0..04d78eab7 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.28.1-SNAPSHOT + 1.29.100 rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 6f576f65e..98d92c067 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.28.1-SNAPSHOT + 1.29.100 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - HEAD + rosette-api-java-binding-1.29.100 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 6e6e87625..1acf64a1e 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.28.1-SNAPSHOT + 1.29.100 com.basistech.rosette rosette-api-release From 81cb036a65b922c3fac6abb455d66e1001751f6b Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Tue, 26 Mar 2024 16:59:03 +0000 Subject: [PATCH 246/415] [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 2 +- release/pom.xml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index b68fcb683..ab37003f0 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.29.100 + 1.29.101-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index c04d8807e..bd1113c23 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.29.100 + 1.29.101-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index b7b87b42b..84198e3b9 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.29.100 + 1.29.101-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index bf402a768..08e877ab7 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.29.100 + 1.29.101-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 627362606..55943a4d4 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.29.100 + 1.29.101-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 04d78eab7..bd041a33b 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.29.100 + 1.29.101-SNAPSHOT rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 98d92c067..3a69be01b 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.29.100 + 1.29.101-SNAPSHOT open-source-parent com.basistech diff --git a/release/pom.xml b/release/pom.xml index 1acf64a1e..c0c730b16 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.29.100 + 1.29.101-SNAPSHOT com.basistech.rosette rosette-api-release From 0ec0fa0d6e7f26b4c766b738a2927716e5bb6941 Mon Sep 17 00:00:00 2001 From: Norbert Nagy Date: Fri, 12 Apr 2024 15:49:57 +0200 Subject: [PATCH 247/415] RLPNC-7501 record similarity left and right object correct deserialization --- .../apimodel/jackson/ApiModelMixinModule.java | 6 +- ...RecordSimilarityDeserializerUtilities.java | 22 ++++++- .../RecordSimilarityRequestDeserializer.java | 2 +- .../RecordSimilarityResponseDeserializer.java | 62 +++++++++++++++++++ .../RecordSimilarityResultDeserializer.java | 54 ---------------- .../RecordSimilarityResponse.java | 2 - 6 files changed, 85 insertions(+), 63 deletions(-) create mode 100644 json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityResponseDeserializer.java delete mode 100644 json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityResultDeserializer.java diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/ApiModelMixinModule.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/ApiModelMixinModule.java index 848b73207..6d766d657 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/ApiModelMixinModule.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/ApiModelMixinModule.java @@ -27,8 +27,8 @@ import com.basistech.rosette.apimodel.jackson.recordsimilaritydeserializers.AddressFieldDeserializer; import com.basistech.rosette.apimodel.jackson.recordsimilaritydeserializers.DateFieldDeserializer; import com.basistech.rosette.apimodel.jackson.recordsimilaritydeserializers.NameFieldDeserializer; -import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityResult; -import com.basistech.rosette.apimodel.jackson.recordsimilaritydeserializers.RecordSimilarityResultDeserializer; +import com.basistech.rosette.apimodel.jackson.recordsimilaritydeserializers.RecordSimilarityResponseDeserializer; +import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityResponse; import com.basistech.rosette.apimodel.recordsimilarity.records.AddressField; import com.basistech.rosette.apimodel.recordsimilarity.records.DateField; import com.basistech.rosette.apimodel.recordsimilarity.records.NameField; @@ -98,7 +98,7 @@ public void setupModule(Module.SetupContext context) { deserializers.addDeserializer(DateField.class, new DateFieldDeserializer()); deserializers.addDeserializer(AddressField.class, new AddressFieldDeserializer()); deserializers.addDeserializer(RecordSimilarityRequest.class, new RecordSimilarityRequestDeserializer()); - deserializers.addDeserializer(RecordSimilarityResult.class, new RecordSimilarityResultDeserializer()); + deserializers.addDeserializer(RecordSimilarityResponse.class, new RecordSimilarityResponseDeserializer()); context.addDeserializers(deserializers); } diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java index 510454af2..0864dd025 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java @@ -21,9 +21,11 @@ import java.util.Iterator; import java.util.Map; +import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityExplainInfo; +import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityResult; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.databind.JsonNode; -import javax.validation.Valid; +import javax.validation.constraints.NotNull; import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityFieldInfo; import com.basistech.rosette.apimodel.recordsimilarity.records.AddressField; @@ -33,9 +35,23 @@ final class RecordSimilarityDeserializerUtilities { - private RecordSimilarityDeserializerUtilities() { } + private RecordSimilarityDeserializerUtilities() { + } + + public static RecordSimilarityResult parseResult(JsonNode node, JsonParser jsonParser, @NotNull Map fields) throws IOException { + final Double score = node.get("score") != null ? node.get("score").traverse(jsonParser.getCodec()).readValueAs(Double.class) : null; + final RecordSimilarityExplainInfo explainInfo = node.get("explainInfo") != null ? node.get("explainInfo").traverse(jsonParser.getCodec()).readValueAs(RecordSimilarityExplainInfo.class) : null; + Map left = node.get("left") != null ? parseRecord(node.get("left"), jsonParser, fields) : null; + Map right = node.get("right") != null ? parseRecord(node.get("right"), jsonParser, fields) : null; + return RecordSimilarityResult.builder() + .score(score) + .left(left) + .right(right) + .explainInfo(explainInfo) + .build(); + } - static Map parseRecord(JsonNode jsonNode, @Valid Map fields, JsonParser jsonParser) throws IOException { + static Map parseRecord(JsonNode jsonNode, JsonParser jsonParser, @NotNull Map fields) throws IOException { final Iterator> recordsIterator = jsonNode.fields(); final Map recordMap = new HashMap<>(); while (recordsIterator.hasNext()) { diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityRequestDeserializer.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityRequestDeserializer.java index 11d3883b4..32b0fb6ab 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityRequestDeserializer.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityRequestDeserializer.java @@ -67,7 +67,7 @@ private static List> parseRecords(final JsonN final JsonParser jsonParser) throws IOException { final List> records = new ArrayList<>(); for (JsonNode recordNode : arrayNode) { - records.add(RecordSimilarityDeserializerUtilities.parseRecord(recordNode, fields, jsonParser)); + records.add(RecordSimilarityDeserializerUtilities.parseRecord(recordNode, jsonParser, fields)); } return records; } diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityResponseDeserializer.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityResponseDeserializer.java new file mode 100644 index 000000000..ff1b73e9e --- /dev/null +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityResponseDeserializer.java @@ -0,0 +1,62 @@ +/* + * Copyright 2024 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.basistech.rosette.apimodel.jackson.recordsimilaritydeserializers; + +import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityFieldInfo; +import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityResponse; +import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityResult; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Optional; + +public class RecordSimilarityResponseDeserializer extends StdDeserializer { + + private static final TypeReference> FIELDS_TYPE_REFERENCE = new TypeReference<>() { + }; + + public RecordSimilarityResponseDeserializer() { + super(RecordSimilarityResponse.class); + } + + @Override + public RecordSimilarityResponse deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException { + final JsonNode node = jsonParser.getCodec().readTree(jsonParser); + + Map fields = node.get("fields").traverse(jsonParser.getCodec()).readValueAs(FIELDS_TYPE_REFERENCE); + String errorMessage = Optional.ofNullable(node.get("errorMessage")).map(JsonNode::asText).orElse(null); + + JsonNode resultsNode = node.get("results"); + List results = new ArrayList<>(resultsNode.size()); + for (JsonNode resultNode : resultsNode) { + results.add(RecordSimilarityDeserializerUtilities.parseResult(resultNode, jsonParser, fields)); + } + + return RecordSimilarityResponse.builder() + .fields(fields) + .results(results) + .errorMessage(errorMessage) + .build(); + } +} diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityResultDeserializer.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityResultDeserializer.java deleted file mode 100644 index 0fc84f8bd..000000000 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityResultDeserializer.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2024 Basis Technology Corp. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.basistech.rosette.apimodel.jackson.recordsimilaritydeserializers; - -import java.io.IOException; -import java.util.Map; - -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; - -import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityExplainInfo; -import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityFieldInfo; -import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityResult; -import com.basistech.rosette.apimodel.recordsimilarity.records.RecordSimilarityField; - -public class RecordSimilarityResultDeserializer extends StdDeserializer { - - public RecordSimilarityResultDeserializer() { - super(RecordSimilarityResult.class); - } - - @Override - public RecordSimilarityResult deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException { - final JsonNode node = jsonParser.getCodec().readTree(jsonParser); - final Map fields = node.get("fields") != null ? node.get("fields").traverse(jsonParser.getCodec()).readValueAs(new TypeReference>() { }) : null; - final Double score = node.get("score") != null ? node.get("score").traverse(jsonParser.getCodec()).readValueAs(Double.class) : null; - final RecordSimilarityExplainInfo explainInfo = node.get("explainInfo") != null ? node.get("explainInfo").traverse(jsonParser.getCodec()).readValueAs(RecordSimilarityExplainInfo.class) : null; - Map left = node.get("left") != null && fields != null ? RecordSimilarityDeserializerUtilities.parseRecord(node.get("left"), fields, jsonParser) : null; - Map right = node.get("right") != null && fields != null ? RecordSimilarityDeserializerUtilities.parseRecord(node.get("right"), fields, jsonParser) : null; - return RecordSimilarityResult.builder() - .score(score) - .left(left) - .right(right) - .explainInfo(explainInfo) - .build(); - } -} diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponse.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponse.java index 099728a7b..f840527a5 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponse.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponse.java @@ -22,7 +22,6 @@ import com.fasterxml.jackson.annotation.JsonInclude; import lombok.Builder; import lombok.Value; -import lombok.extern.jackson.Jacksonized; import com.basistech.rosette.apimodel.Response; @@ -33,7 +32,6 @@ */ @Value @Builder -@Jacksonized @JsonInclude(JsonInclude.Include.NON_NULL) public class RecordSimilarityResponse extends Response { @Valid Map fields; From d5a3e3cb6a719fb111a8144b11b376e43daf8a9b Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Fri, 12 Apr 2024 11:59:55 -0400 Subject: [PATCH 248/415] Add an UnknownField class, Unknown record type and deserializer --- .../apimodel/jackson/ApiModelMixinModule.java | 7 +++ .../apimodel/jackson/UnknownFieldMixin.java | 38 +++++++++++++++ ...RecordSimilarityDeserializerUtilities.java | 4 +- .../UnknownFieldDeserializer.java | 47 ++++++++++++++++++ .../records/RecordFieldType.java | 3 +- .../records/UnknownField.java | 48 +++++++++++++++++++ 6 files changed, 145 insertions(+), 2 deletions(-) create mode 100644 json/src/main/java/com/basistech/rosette/apimodel/jackson/UnknownFieldMixin.java create mode 100644 json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/UnknownFieldDeserializer.java create mode 100644 model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/ApiModelMixinModule.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/ApiModelMixinModule.java index 848b73207..7f9c49399 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/ApiModelMixinModule.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/ApiModelMixinModule.java @@ -27,6 +27,7 @@ import com.basistech.rosette.apimodel.jackson.recordsimilaritydeserializers.AddressFieldDeserializer; import com.basistech.rosette.apimodel.jackson.recordsimilaritydeserializers.DateFieldDeserializer; import com.basistech.rosette.apimodel.jackson.recordsimilaritydeserializers.NameFieldDeserializer; +import com.basistech.rosette.apimodel.jackson.recordsimilaritydeserializers.UnknownFieldDeserializer; import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityResult; import com.basistech.rosette.apimodel.jackson.recordsimilaritydeserializers.RecordSimilarityResultDeserializer; import com.basistech.rosette.apimodel.recordsimilarity.records.AddressField; @@ -37,6 +38,7 @@ import com.basistech.rosette.apimodel.UnfieldedAddress; import com.basistech.rosette.apimodel.jackson.recordsimilaritydeserializers.RecordSimilarityRequestDeserializer; import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityRequest; +import com.basistech.rosette.apimodel.recordsimilarity.records.UnknownField; import com.basistech.rosette.dm.jackson.AnnotatedDataModelModule; import com.fasterxml.jackson.databind.MapperFeature; import com.fasterxml.jackson.databind.Module; @@ -84,6 +86,10 @@ public void setupModule(Module.SetupContext context) { context.setMixInAnnotations(UnfieldedAddress.class, UnfieldedAddressMixin.class); context.setMixInAnnotations(UnfieldedAddress.UnfieldedAddressBuilder.class, UnfieldedAddressMixin.UnfieldedAddressBuilderMixin.class); + + context.setMixInAnnotations(UnknownField.class, UnknownFieldMixin.class); + context.setMixInAnnotations(UnknownField.class, UnknownFieldMixin.UnknownFieldBuilderMixin.class); + context.setMixInAnnotations(AddressSimilarityRequest.class, AddressSimilarityRequestMixin.class); context.setMixInAnnotations(AddressSimilarityRequest.AddressSimilarityRequestBuilder.class, AddressSimilarityRequestMixin.AddressSimilarityRequestBuilderMixin.class); @@ -97,6 +103,7 @@ public void setupModule(Module.SetupContext context) { deserializers.addDeserializer(NameField.class, new NameFieldDeserializer()); deserializers.addDeserializer(DateField.class, new DateFieldDeserializer()); deserializers.addDeserializer(AddressField.class, new AddressFieldDeserializer()); + deserializers.addDeserializer(UnknownField.class, new UnknownFieldDeserializer()); deserializers.addDeserializer(RecordSimilarityRequest.class, new RecordSimilarityRequestDeserializer()); deserializers.addDeserializer(RecordSimilarityResult.class, new RecordSimilarityResultDeserializer()); context.addDeserializers(deserializers); diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/UnknownFieldMixin.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/UnknownFieldMixin.java new file mode 100644 index 000000000..5d4a23f00 --- /dev/null +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/UnknownFieldMixin.java @@ -0,0 +1,38 @@ +/* + * Copyright 2022 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.basistech.rosette.apimodel.jackson; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; + +@JsonTypeName("UnknownField") +@JsonInclude(JsonInclude.Include.NON_NULL) +public abstract class UnknownFieldMixin { + + + @JsonCreator + protected UnknownFieldMixin(@JsonProperty("data") String data) { + // + } + + @JsonPOJOBuilder(withPrefix = "") + abstract static class UnknownFieldBuilderMixin { + } +} \ No newline at end of file diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java index 510454af2..13f6f364b 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java @@ -30,6 +30,7 @@ import com.basistech.rosette.apimodel.recordsimilarity.records.DateField; import com.basistech.rosette.apimodel.recordsimilarity.records.NameField; import com.basistech.rosette.apimodel.recordsimilarity.records.RecordSimilarityField; +import com.basistech.rosette.apimodel.recordsimilarity.records.UnknownField; final class RecordSimilarityDeserializerUtilities { @@ -60,7 +61,8 @@ static Map parseRecord(JsonNode jsonNode, @Valid fieldData = fieldValue.traverse(jsonParser.getCodec()).readValueAs(AddressField.class); break; default: - throw new IllegalArgumentException("Unsupported field type: " + fieldInfo.getType()); + fieldData = fieldValue.traverse(jsonParser.getCodec()).readValueAs(UnknownField.class); +// throw new IllegalArgumentException("Unsupported field type: " + fieldInfo.getType()); } recordMap.put(fieldName, fieldData); } else { diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/UnknownFieldDeserializer.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/UnknownFieldDeserializer.java new file mode 100644 index 000000000..a2f9e7a49 --- /dev/null +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/UnknownFieldDeserializer.java @@ -0,0 +1,47 @@ +/* + * Copyright 2024 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.basistech.rosette.apimodel.jackson.recordsimilaritydeserializers; + +import com.basistech.rosette.apimodel.recordsimilarity.records.UnknownField; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +//import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; + +import java.io.IOException; + +public class UnknownFieldDeserializer extends StdDeserializer { + public UnknownFieldDeserializer() { + super(UnknownField.class); + } + + @Override + public UnknownField deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException { +// final JsonNode node = jsonParser.getCodec().readTree(jsonParser); + try { + return UnknownField.builder().build(); +// if (node.isObject()) { +// return jsonParser.getCodec().treeToValue(node, AddressField.FieldedAddress.class); +// } else if (node.isTextual()) { +// return AddressField.UnfieldedAddress.builder().address(node.textValue()).build(); +// } + } catch (Exception e) { + throw new IOException("Invalid JSON structure: unexpected node type"); + } + } +} diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/RecordFieldType.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/RecordFieldType.java index dc5b278ed..61d573865 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/RecordFieldType.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/RecordFieldType.java @@ -25,7 +25,8 @@ public enum RecordFieldType { NAME("rni_name"), DATE("rni_date"), - ADDRESS("rni_address"); + ADDRESS("rni_address"), + UNKNOWN("unknown"); @JsonValue private final String value; } diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java new file mode 100644 index 000000000..a98ac25a0 --- /dev/null +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java @@ -0,0 +1,48 @@ +/* + * Copyright 2024 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.basistech.rosette.apimodel.recordsimilarity.records; + +import java.util.HashMap; +import java.util.Map; + +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.Value; +import lombok.experimental.SuperBuilder; +import lombok.extern.jackson.Jacksonized; + +@Jacksonized +@SuperBuilder +@Value +@JsonIgnoreProperties(ignoreUnknown = true) +public class UnknownField implements RecordSimilarityField { + private Map unknownFields = new HashMap<>(); + + @JsonAnySetter + public void setUnknownField(String name, Object value) { + unknownFields.put(name, value); + } + + @JsonValue public String toJson() { + StringBuilder jsonString = new StringBuilder(); + for (String fieldName : unknownFields.keySet()) { + jsonString.append("\"" + fieldName + "\":\"" + unknownFields.get(fieldName).toString() + "\""); + } + return jsonString.toString(); + } +} From 013bfe92163c8b133f22f47ad8697d51720d1044 Mon Sep 17 00:00:00 2001 From: Norbert Nagy Date: Mon, 15 Apr 2024 08:41:39 +0200 Subject: [PATCH 249/415] RLPNC-7421 fixing nullpointer --- .../RecordSimilarityDeserializerUtilities.java | 6 +++--- .../RecordSimilarityResponseDeserializer.java | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java index 0864dd025..904147004 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java @@ -38,11 +38,11 @@ final class RecordSimilarityDeserializerUtilities { private RecordSimilarityDeserializerUtilities() { } - public static RecordSimilarityResult parseResult(JsonNode node, JsonParser jsonParser, @NotNull Map fields) throws IOException { + public static RecordSimilarityResult parseResult(JsonNode node, JsonParser jsonParser, Map fields) throws IOException { final Double score = node.get("score") != null ? node.get("score").traverse(jsonParser.getCodec()).readValueAs(Double.class) : null; final RecordSimilarityExplainInfo explainInfo = node.get("explainInfo") != null ? node.get("explainInfo").traverse(jsonParser.getCodec()).readValueAs(RecordSimilarityExplainInfo.class) : null; - Map left = node.get("left") != null ? parseRecord(node.get("left"), jsonParser, fields) : null; - Map right = node.get("right") != null ? parseRecord(node.get("right"), jsonParser, fields) : null; + Map left = node.get("left") != null && fields != null ? parseRecord(node.get("left"), jsonParser, fields) : null; + Map right = node.get("right") != null && fields != null ? parseRecord(node.get("right"), jsonParser, fields) : null; return RecordSimilarityResult.builder() .score(score) .left(left) diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityResponseDeserializer.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityResponseDeserializer.java index ff1b73e9e..468ffa8dc 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityResponseDeserializer.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityResponseDeserializer.java @@ -44,7 +44,9 @@ public RecordSimilarityResponseDeserializer() { public RecordSimilarityResponse deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException { final JsonNode node = jsonParser.getCodec().readTree(jsonParser); - Map fields = node.get("fields").traverse(jsonParser.getCodec()).readValueAs(FIELDS_TYPE_REFERENCE); + JsonNode fieldsNode = node.get("fields"); + + Map fields = fieldsNode != null ? node.get("fields").traverse(jsonParser.getCodec()).readValueAs(FIELDS_TYPE_REFERENCE) : null; String errorMessage = Optional.ofNullable(node.get("errorMessage")).map(JsonNode::asText).orElse(null); JsonNode resultsNode = node.get("results"); From 379af4db3c38095b1eef7eba9d7bf0ee0be4f19c Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Mon, 15 Apr 2024 14:22:44 -0400 Subject: [PATCH 250/415] update RecordFieldType deserializer to allow for all other Strings to return UNKNOWN --- .../records/RecordFieldType.java | 38 ++++++++++++++++++- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/RecordFieldType.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/RecordFieldType.java index 61d573865..07d05bc7f 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/RecordFieldType.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/RecordFieldType.java @@ -16,17 +16,51 @@ package com.basistech.rosette.apimodel.recordsimilarity.records; +import java.io.IOException; + import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import lombok.AllArgsConstructor; import lombok.Getter; @AllArgsConstructor @Getter +@JsonDeserialize(using = RecordFieldType.RecordFieldTypeDeserializer.class) public enum RecordFieldType { NAME("rni_name"), DATE("rni_date"), ADDRESS("rni_address"), - UNKNOWN("unknown"); + UNKNOWN(null); + + @JsonValue private String value; - @JsonValue private final String value; + public static class RecordFieldTypeDeserializer extends JsonDeserializer { + private RecordFieldType fromString(String value) { + RecordFieldType type; + switch (value) { + case "rni_name": + type = NAME; + break; + case "rni_date": + type = DATE; + break; + case "rni_address": + type = ADDRESS; + break; + default: + type = UNKNOWN; + type.value = value; + } + return type; + } + @Override + public RecordFieldType deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) + throws IOException { + String value = jsonParser.getValueAsString(); + return fromString(value); + } + } } From c55e34a66dd586bd031baaa2b00e63bbd447525e Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Tue, 16 Apr 2024 15:43:39 -0400 Subject: [PATCH 251/415] remove UnknownField Deserializer from deserializers, don't throw exception if field not found in mapping, update UnknownField class --- .../apimodel/jackson/ApiModelMixinModule.java | 6 --- ...RecordSimilarityDeserializerUtilities.java | 40 +++++++++---------- .../records/UnknownField.java | 34 ++++++---------- 3 files changed, 30 insertions(+), 50 deletions(-) diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/ApiModelMixinModule.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/ApiModelMixinModule.java index 7f9c49399..a76afbd80 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/ApiModelMixinModule.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/ApiModelMixinModule.java @@ -27,7 +27,6 @@ import com.basistech.rosette.apimodel.jackson.recordsimilaritydeserializers.AddressFieldDeserializer; import com.basistech.rosette.apimodel.jackson.recordsimilaritydeserializers.DateFieldDeserializer; import com.basistech.rosette.apimodel.jackson.recordsimilaritydeserializers.NameFieldDeserializer; -import com.basistech.rosette.apimodel.jackson.recordsimilaritydeserializers.UnknownFieldDeserializer; import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityResult; import com.basistech.rosette.apimodel.jackson.recordsimilaritydeserializers.RecordSimilarityResultDeserializer; import com.basistech.rosette.apimodel.recordsimilarity.records.AddressField; @@ -38,7 +37,6 @@ import com.basistech.rosette.apimodel.UnfieldedAddress; import com.basistech.rosette.apimodel.jackson.recordsimilaritydeserializers.RecordSimilarityRequestDeserializer; import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityRequest; -import com.basistech.rosette.apimodel.recordsimilarity.records.UnknownField; import com.basistech.rosette.dm.jackson.AnnotatedDataModelModule; import com.fasterxml.jackson.databind.MapperFeature; import com.fasterxml.jackson.databind.Module; @@ -87,9 +85,6 @@ public void setupModule(Module.SetupContext context) { context.setMixInAnnotations(UnfieldedAddress.UnfieldedAddressBuilder.class, UnfieldedAddressMixin.UnfieldedAddressBuilderMixin.class); - context.setMixInAnnotations(UnknownField.class, UnknownFieldMixin.class); - context.setMixInAnnotations(UnknownField.class, UnknownFieldMixin.UnknownFieldBuilderMixin.class); - context.setMixInAnnotations(AddressSimilarityRequest.class, AddressSimilarityRequestMixin.class); context.setMixInAnnotations(AddressSimilarityRequest.AddressSimilarityRequestBuilder.class, AddressSimilarityRequestMixin.AddressSimilarityRequestBuilderMixin.class); @@ -103,7 +98,6 @@ public void setupModule(Module.SetupContext context) { deserializers.addDeserializer(NameField.class, new NameFieldDeserializer()); deserializers.addDeserializer(DateField.class, new DateFieldDeserializer()); deserializers.addDeserializer(AddressField.class, new AddressFieldDeserializer()); - deserializers.addDeserializer(UnknownField.class, new UnknownFieldDeserializer()); deserializers.addDeserializer(RecordSimilarityRequest.class, new RecordSimilarityRequestDeserializer()); deserializers.addDeserializer(RecordSimilarityResult.class, new RecordSimilarityResultDeserializer()); context.addDeserializers(deserializers); diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java index 13f6f364b..1467650dd 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java @@ -44,30 +44,26 @@ static Map parseRecord(JsonNode jsonNode, @Valid final String fieldName = recordEntry.getKey(); final JsonNode fieldValue = recordEntry.getValue(); - if (fields.containsKey(fieldName)) { - final RecordSimilarityFieldInfo fieldInfo = fields.get(fieldName); - final RecordSimilarityField fieldData; - if (fieldInfo.getType() == null) { - throw new IllegalArgumentException("Unspecified field type for: " + fieldName); - } - switch (fieldInfo.getType()) { - case DATE: - fieldData = fieldValue.traverse(jsonParser.getCodec()).readValueAs(DateField.class); - break; - case NAME: - fieldData = fieldValue.traverse(jsonParser.getCodec()).readValueAs(NameField.class); - break; - case ADDRESS: - fieldData = fieldValue.traverse(jsonParser.getCodec()).readValueAs(AddressField.class); - break; - default: - fieldData = fieldValue.traverse(jsonParser.getCodec()).readValueAs(UnknownField.class); + final RecordSimilarityFieldInfo fieldInfo = fields.get(fieldName); + final RecordSimilarityField fieldData; + if (fieldInfo.getType() == null) { + throw new IllegalArgumentException("Unspecified field type for: " + fieldName); + } + switch (fieldInfo.getType()) { + case DATE: + fieldData = fieldValue.traverse(jsonParser.getCodec()).readValueAs(DateField.class); + break; + case NAME: + fieldData = fieldValue.traverse(jsonParser.getCodec()).readValueAs(NameField.class); + break; + case ADDRESS: + fieldData = fieldValue.traverse(jsonParser.getCodec()).readValueAs(AddressField.class); + break; + default: + fieldData = fieldValue.traverse(jsonParser.getCodec()).readValueAs(UnknownField.class); // throw new IllegalArgumentException("Unsupported field type: " + fieldInfo.getType()); - } - recordMap.put(fieldName, fieldData); - } else { - throw new IllegalArgumentException("Unsupported field name: " + fieldName + " not found in field mapping"); } + recordMap.put(fieldName, fieldData); } return recordMap; } diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java index a98ac25a0..8ce4625f7 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java @@ -16,33 +16,23 @@ package com.basistech.rosette.apimodel.recordsimilarity.records; -import java.util.HashMap; -import java.util.Map; - -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -import lombok.Value; -import lombok.experimental.SuperBuilder; -import lombok.extern.jackson.Jacksonized; +import lombok.Getter; -@Jacksonized -@SuperBuilder -@Value -@JsonIgnoreProperties(ignoreUnknown = true) +@Getter public class UnknownField implements RecordSimilarityField { - private Map unknownFields = new HashMap<>(); + Object data; - @JsonAnySetter - public void setUnknownField(String name, Object value) { - unknownFields.put(name, value); + @JsonCreator + public UnknownField(Object data) { + this.data = data; } - @JsonValue public String toJson() { - StringBuilder jsonString = new StringBuilder(); - for (String fieldName : unknownFields.keySet()) { - jsonString.append("\"" + fieldName + "\":\"" + unknownFields.get(fieldName).toString() + "\""); - } - return jsonString.toString(); + + @JsonValue + public String toJson() { + return this.data.toString(); } + } From 39fabf81d8bde3f98f49c132ff1490d6231bca2e Mon Sep 17 00:00:00 2001 From: jsquatrito Date: Tue, 16 Apr 2024 15:45:53 -0400 Subject: [PATCH 252/415] RLPNC-7496: Adds parameters + parameter universes to RecordSimilarityRequest --- .../RecordSimilarityRequestDeserializer.java | 7 ++ .../apimodel/RecordSimilarityRequestTest.java | 108 +++++++++++++++++- .../RecordSimilarityRequest.java | 12 +- 3 files changed, 125 insertions(+), 2 deletions(-) diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityRequestDeserializer.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityRequestDeserializer.java index 11d3883b4..1990af207 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityRequestDeserializer.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityRequestDeserializer.java @@ -46,6 +46,7 @@ public RecordSimilarityRequest deserialize(JsonParser jsonParser, Deserializatio final JsonNode node = jsonParser.getCodec().readTree(jsonParser); final Map fields = node.get("fields") != null ? node.get("fields").traverse(jsonParser.getCodec()).readValueAs(new TypeReference>() { }) : new HashMap<>(); final RecordSimilarityProperties properties = node.get("properties") != null ? node.get("properties").traverse(jsonParser.getCodec()).readValueAs(RecordSimilarityProperties.class) : RecordSimilarityProperties.builder().build(); + RecordSimilarityRecords records = null; String recordsField = "records"; if (node.get(recordsField) != null && fields != null && node.get(recordsField).get("left") != null && node.get(recordsField).get("right") != null) { @@ -54,10 +55,16 @@ public RecordSimilarityRequest deserialize(JsonParser jsonParser, Deserializatio .right(parseRecords(node.get(recordsField).get("right"), fields, jsonParser)) .build(); } + + final Map parameters = node.get("parameters") != null ? node.get("parameters").traverse(jsonParser.getCodec()).readValueAs(new TypeReference>() { }) : null; + final String parameterUniverse = node.get("parameterUniverse") != null ? node.get("parameterUniverse").traverse(jsonParser.getCodec()).readValueAs(String.class) : null; + return RecordSimilarityRequest.builder() .fields(fields) .properties(properties) .records(records) + .parameters(parameters) + .parameterUniverse(parameterUniverse) .build(); } } diff --git a/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java b/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java index 71f350220..af83c9129 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java @@ -43,11 +43,14 @@ class RecordSimilarityRequestTest { private static final ObjectMapper MAPPER = ApiModelMixinModule.setupObjectMapper(new ObjectMapper()); private static final String EXPECTED_JSON = "{\"fields\":{\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"addr\":{\"type\":\"rni_address\",\"weight\":0.5}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true},\"records\":{\"left\":[{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"dob\":\"1993-04-16\",\"addr\":\"123 Roadlane Ave\"},{\"primaryName\":{\"text\":\"Evan R\"},\"dob\":{\"date\":\"1993-04-16\"}}],\"right\":[{\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"},\"dob\":{\"date\":\"1993-04-16\"}},{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":\"Ivan R\",\"dob\":{\"date\":\"1993-04-16\"},\"addr\":{\"address\":\"123 Roadlane Ave\"}}]}}"; + private static final String EXPECTED_JSON_WITH_PARAMS = "{\"fields\":{\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"addr\":{\"type\":\"rni_address\",\"weight\":0.5}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true},\"records\":{\"left\":[{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"dob\":\"1993-04-16\",\"addr\":\"123 Roadlane Ave\"},{\"primaryName\":{\"text\":\"Evan R\"},\"dob\":{\"date\":\"1993-04-16\"}}],\"right\":[{\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"},\"dob\":{\"date\":\"1993-04-16\"}},{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":\"Ivan R\",\"dob\":{\"date\":\"1993-04-16\"},\"addr\":{\"address\":\"123 Roadlane Ave\"}}]},\"parameters\":{\"timeDistanceWeight\":\"0.8\",\"stringDistanceWeight\":\"0.1\"}}"; + private static final String EXPECTED_JSON_WITH_UNIVERSE = "{\"fields\":{\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"addr\":{\"type\":\"rni_address\",\"weight\":0.5}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true},\"records\":{\"left\":[{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"dob\":\"1993-04-16\",\"addr\":\"123 Roadlane Ave\"},{\"primaryName\":{\"text\":\"Evan R\"},\"dob\":{\"date\":\"1993-04-16\"}}],\"right\":[{\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"},\"dob\":{\"date\":\"1993-04-16\"}},{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":\"Ivan R\",\"dob\":{\"date\":\"1993-04-16\"},\"addr\":{\"address\":\"123 Roadlane Ave\"}}]},\"parameterUniverse\":\"myUniverse\"}"; + private static final RecordSimilarityRequest EXPECTED_REQUEST = RecordSimilarityRequest.builder() .fields(Map.of( + "dob2", RecordSimilarityFieldInfo.builder().type(RecordFieldType.DATE).weight(0.1).build(), "primaryName", RecordSimilarityFieldInfo.builder().type(RecordFieldType.NAME).weight(0.5).build(), "dob", RecordSimilarityFieldInfo.builder().type(RecordFieldType.DATE).weight(0.2).build(), - "dob2", RecordSimilarityFieldInfo.builder().type(RecordFieldType.DATE).weight(0.1).build(), "addr", RecordSimilarityFieldInfo.builder().type(RecordFieldType.ADDRESS).weight(0.5).build())) .properties(RecordSimilarityProperties.builder().threshold(0.7).includeExplainInfo(true).build()) .records(RecordSimilarityRecords.builder() @@ -85,10 +88,105 @@ class RecordSimilarityRequestTest { ).build() ).build(); + private static final RecordSimilarityRequest EXPECTED_REQUEST_WITH_PARAMS = RecordSimilarityRequest.builder() + .fields(Map.of( + "dob2", RecordSimilarityFieldInfo.builder().type(RecordFieldType.DATE).weight(0.1).build(), + "primaryName", RecordSimilarityFieldInfo.builder().type(RecordFieldType.NAME).weight(0.5).build(), + "dob", RecordSimilarityFieldInfo.builder().type(RecordFieldType.DATE).weight(0.2).build(), + "addr", RecordSimilarityFieldInfo.builder().type(RecordFieldType.ADDRESS).weight(0.5).build())) + .properties(RecordSimilarityProperties.builder().threshold(0.7).includeExplainInfo(true).build()) + .records(RecordSimilarityRecords.builder() + .left( + List.of( + Map.of( + "primaryName", NameField.FieldedName.builder() + .text("Ethan R").entityType("PERSON") + .language(LanguageCode.ENGLISH) + .languageOfOrigin(LanguageCode.ENGLISH) + .script(ISO15924.Latn) + .build(), + "dob", DateField.UnfieldedDate.builder().date("1993-04-16").build(), + "dob2", DateField.FieldedDate.builder().date("1993/04/16").build(), + "addr", AddressField.UnfieldedAddress.builder().address("123 Roadlane Ave").build() + ), + Map.of( + "primaryName", NameField.FieldedName.builder().text("Evan R").build(), + "dob", DateField.FieldedDate.builder().date("1993-04-16").build() + ) + ) + ).right( + List.of( + Map.of( + "primaryName", NameField.FieldedName.builder().text("Seth R").language(LanguageCode.ENGLISH).build(), + "dob", DateField.FieldedDate.builder().date("1993-04-16").build() + ), + Map.of( + "primaryName", NameField.UnfieldedName.builder().text("Ivan R").build(), + "dob", DateField.FieldedDate.builder().date("1993-04-16").build(), + "dob2", DateField.FieldedDate.builder().date("1993/04/16").build(), + "addr", AddressField.FieldedAddress.builder().address("123 Roadlane Ave").build() + ) + ) + ).build() + ) + .parameters(Map.of( + "timeDistanceWeight", "0.8", + "stringDistanceWeight", "0.1")) + .build(); + + private static final RecordSimilarityRequest EXPECTED_REQUEST_WITH_UNIVERSE = RecordSimilarityRequest.builder() + .fields(Map.of( + "dob", RecordSimilarityFieldInfo.builder().type(RecordFieldType.DATE).weight(0.2).build(), + "primaryName", RecordSimilarityFieldInfo.builder().type(RecordFieldType.NAME).weight(0.5).build(), + "dob2", RecordSimilarityFieldInfo.builder().type(RecordFieldType.DATE).weight(0.1).build(), + "addr", RecordSimilarityFieldInfo.builder().type(RecordFieldType.ADDRESS).weight(0.5).build())) + .properties(RecordSimilarityProperties.builder().threshold(0.7).includeExplainInfo(true).build()) + .records(RecordSimilarityRecords.builder() + .left( + List.of( + Map.of( + "primaryName", NameField.FieldedName.builder() + .text("Ethan R").entityType("PERSON") + .language(LanguageCode.ENGLISH) + .languageOfOrigin(LanguageCode.ENGLISH) + .script(ISO15924.Latn) + .build(), + "dob", DateField.UnfieldedDate.builder().date("1993-04-16").build(), + "dob2", DateField.FieldedDate.builder().date("1993/04/16").build(), + "addr", AddressField.UnfieldedAddress.builder().address("123 Roadlane Ave").build() + ), + Map.of( + "primaryName", NameField.FieldedName.builder().text("Evan R").build(), + "dob", DateField.FieldedDate.builder().date("1993-04-16").build() + ) + ) + ).right( + List.of( + Map.of( + "primaryName", NameField.FieldedName.builder().text("Seth R").language(LanguageCode.ENGLISH).build(), + "dob", DateField.FieldedDate.builder().date("1993-04-16").build() + ), + Map.of( + "primaryName", NameField.UnfieldedName.builder().text("Ivan R").build(), + "dob", DateField.FieldedDate.builder().date("1993-04-16").build(), + "dob2", DateField.FieldedDate.builder().date("1993/04/16").build(), + "addr", AddressField.FieldedAddress.builder().address("123 Roadlane Ave").build() + ) + ) + ).build() + ) + .parameterUniverse("myUniverse").build(); + @Test void testDeserialization() throws JsonProcessingException { final RecordSimilarityRequest request = MAPPER.readValue(EXPECTED_JSON, new TypeReference<>() { }); assertEquals(EXPECTED_REQUEST, request); + + final RecordSimilarityRequest requestParams = MAPPER.readValue(EXPECTED_JSON_WITH_PARAMS, new TypeReference<>() { }); + assertEquals(EXPECTED_REQUEST_WITH_PARAMS, requestParams); + + final RecordSimilarityRequest requestUniverse = MAPPER.readValue(EXPECTED_JSON_WITH_UNIVERSE, new TypeReference<>() { }); + assertEquals(EXPECTED_REQUEST_WITH_UNIVERSE, requestUniverse); } @Test @@ -96,6 +194,14 @@ void testSerialization() throws JsonProcessingException { final JsonNode expectedJson = MAPPER.readTree(EXPECTED_JSON); final JsonNode actualJson = MAPPER.valueToTree(EXPECTED_REQUEST); assertEquals(expectedJson, actualJson); + + final JsonNode expectedParamJson = MAPPER.readTree(EXPECTED_JSON_WITH_PARAMS); + final JsonNode actualParamJson = MAPPER.valueToTree(EXPECTED_REQUEST_WITH_PARAMS); + assertEquals(expectedParamJson, actualParamJson); + + final JsonNode expectedUniverseJson = MAPPER.readTree(EXPECTED_JSON_WITH_UNIVERSE); + final JsonNode actualUniverseJson = MAPPER.valueToTree(EXPECTED_REQUEST_WITH_UNIVERSE); + assertEquals(expectedUniverseJson, actualUniverseJson); } } diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityRequest.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityRequest.java index 82d1b1266..af33ded45 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityRequest.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityRequest.java @@ -32,15 +32,25 @@ public class RecordSimilarityRequest extends Request { @NotEmpty @Valid Map fields; @Valid RecordSimilarityProperties properties; @NotNull @Valid RecordSimilarityRecords records; + @Valid Map parameters; + @Valid String parameterUniverse; @Builder // workaround for inheritance https://github.com/rzwitserloot/lombok/issues/853 public RecordSimilarityRequest(String profileId, Map fields, RecordSimilarityProperties properties, - RecordSimilarityRecords records) { + RecordSimilarityRecords records, + Map parameters, + String parameterUniverse) { super(profileId); this.fields = fields; this.properties = properties; this.records = records; + this.parameters = parameters; + this.parameterUniverse = parameterUniverse; + + if (this.parameters != null && parameterUniverse != null) { + throw new IllegalArgumentException("Parameters and parameter universe may not both be specified"); + } } } From 92a47617bb1d6f99be93704fbfb46802a1c2db2f Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Tue, 16 Apr 2024 15:50:37 -0400 Subject: [PATCH 253/415] delete unknown field mixin --- .../apimodel/jackson/UnknownFieldMixin.java | 38 ------------------- 1 file changed, 38 deletions(-) delete mode 100644 json/src/main/java/com/basistech/rosette/apimodel/jackson/UnknownFieldMixin.java diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/UnknownFieldMixin.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/UnknownFieldMixin.java deleted file mode 100644 index 5d4a23f00..000000000 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/UnknownFieldMixin.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2022 Basis Technology Corp. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.basistech.rosette.apimodel.jackson; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; - -@JsonTypeName("UnknownField") -@JsonInclude(JsonInclude.Include.NON_NULL) -public abstract class UnknownFieldMixin { - - - @JsonCreator - protected UnknownFieldMixin(@JsonProperty("data") String data) { - // - } - - @JsonPOJOBuilder(withPrefix = "") - abstract static class UnknownFieldBuilderMixin { - } -} \ No newline at end of file From 2cdf95c82732cdef1045a6786f7f71799ed04335 Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Tue, 16 Apr 2024 15:53:06 -0400 Subject: [PATCH 254/415] update UnknownField deserializer --- .../UnknownFieldDeserializer.java | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/UnknownFieldDeserializer.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/UnknownFieldDeserializer.java index a2f9e7a49..bd307084a 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/UnknownFieldDeserializer.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/UnknownFieldDeserializer.java @@ -20,7 +20,7 @@ import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.databind.DeserializationContext; -//import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import java.io.IOException; @@ -32,16 +32,12 @@ public UnknownFieldDeserializer() { @Override public UnknownField deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException { -// final JsonNode node = jsonParser.getCodec().readTree(jsonParser); - try { - return UnknownField.builder().build(); -// if (node.isObject()) { -// return jsonParser.getCodec().treeToValue(node, AddressField.FieldedAddress.class); -// } else if (node.isTextual()) { -// return AddressField.UnfieldedAddress.builder().address(node.textValue()).build(); -// } - } catch (Exception e) { - throw new IOException("Invalid JSON structure: unexpected node type"); + final JsonNode node = jsonParser.getCodec().readTree(jsonParser); + if (node.isObject()) { + return jsonParser.getCodec().treeToValue(node, UnknownField.class); + } else if (node.isTextual()) { + return new UnknownField(node.textValue()); } + throw new IOException("Invalid JSON structure: unexpected node type"); } } From 9137d7ef36cad40ea957d9f689926214080d6358 Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Tue, 16 Apr 2024 15:59:51 -0400 Subject: [PATCH 255/415] delete UnknownFieldDeserializer --- .../UnknownFieldDeserializer.java | 43 ------------------- 1 file changed, 43 deletions(-) delete mode 100644 json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/UnknownFieldDeserializer.java diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/UnknownFieldDeserializer.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/UnknownFieldDeserializer.java deleted file mode 100644 index bd307084a..000000000 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/UnknownFieldDeserializer.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2024 Basis Technology Corp. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.basistech.rosette.apimodel.jackson.recordsimilaritydeserializers; - -import com.basistech.rosette.apimodel.recordsimilarity.records.UnknownField; - -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; - -import java.io.IOException; - -public class UnknownFieldDeserializer extends StdDeserializer { - public UnknownFieldDeserializer() { - super(UnknownField.class); - } - - @Override - public UnknownField deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException { - final JsonNode node = jsonParser.getCodec().readTree(jsonParser); - if (node.isObject()) { - return jsonParser.getCodec().treeToValue(node, UnknownField.class); - } else if (node.isTextual()) { - return new UnknownField(node.textValue()); - } - throw new IOException("Invalid JSON structure: unexpected node type"); - } -} From b8e4eba1546e5db6f0067ebff1718655ef48621b Mon Sep 17 00:00:00 2001 From: Norbert Nagy Date: Wed, 17 Apr 2024 13:22:48 +0200 Subject: [PATCH 256/415] RLPNC-7501 fixing problems, adding ian's test --- ...RecordSimilarityDeserializerUtilities.java | 7 +- .../RecordSimilarityResponseDeserializer.java | 8 +- .../RecordSimilarityResponseTest.java | 144 ++++++++++++++++++ .../RecordSimilarityExplainInfo.java | 2 + .../RecordSimilarityProperties.java | 2 +- .../RecordSimilarityResult.java | 2 +- 6 files changed, 158 insertions(+), 7 deletions(-) create mode 100644 json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java index 904147004..9f67fe5dd 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java @@ -20,6 +20,7 @@ import java.util.HashMap; import java.util.Iterator; import java.util.Map; +import java.util.Optional; import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityExplainInfo; import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityResult; @@ -41,13 +42,15 @@ private RecordSimilarityDeserializerUtilities() { public static RecordSimilarityResult parseResult(JsonNode node, JsonParser jsonParser, Map fields) throws IOException { final Double score = node.get("score") != null ? node.get("score").traverse(jsonParser.getCodec()).readValueAs(Double.class) : null; final RecordSimilarityExplainInfo explainInfo = node.get("explainInfo") != null ? node.get("explainInfo").traverse(jsonParser.getCodec()).readValueAs(RecordSimilarityExplainInfo.class) : null; - Map left = node.get("left") != null && fields != null ? parseRecord(node.get("left"), jsonParser, fields) : null; - Map right = node.get("right") != null && fields != null ? parseRecord(node.get("right"), jsonParser, fields) : null; + final Map left = node.get("left") != null && fields != null ? parseRecord(node.get("left"), jsonParser, fields) : null; + final Map right = node.get("right") != null && fields != null ? parseRecord(node.get("right"), jsonParser, fields) : null; + final String error = Optional.ofNullable(node.get("error")).map(JsonNode::asText).orElse(null); return RecordSimilarityResult.builder() .score(score) .left(left) .right(right) .explainInfo(explainInfo) + .error(error) .build(); } diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityResponseDeserializer.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityResponseDeserializer.java index 468ffa8dc..781157a83 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityResponseDeserializer.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityResponseDeserializer.java @@ -50,9 +50,11 @@ public RecordSimilarityResponse deserialize(JsonParser jsonParser, Deserializati String errorMessage = Optional.ofNullable(node.get("errorMessage")).map(JsonNode::asText).orElse(null); JsonNode resultsNode = node.get("results"); - List results = new ArrayList<>(resultsNode.size()); - for (JsonNode resultNode : resultsNode) { - results.add(RecordSimilarityDeserializerUtilities.parseResult(resultNode, jsonParser, fields)); + List results = new ArrayList<>(); + if (resultsNode != null) { + for (JsonNode resultNode : resultsNode) { + results.add(RecordSimilarityDeserializerUtilities.parseResult(resultNode, jsonParser, fields)); + } } return RecordSimilarityResponse.builder() diff --git a/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java b/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java new file mode 100644 index 000000000..efc052c1c --- /dev/null +++ b/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java @@ -0,0 +1,144 @@ +/* + * Copyright 2024 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.basistech.rosette.apimodel.recordsimilarity; + + +import com.basistech.rosette.apimodel.jackson.ApiModelMixinModule; +import com.basistech.rosette.apimodel.recordsimilarity.records.AddressField; +import com.basistech.rosette.apimodel.recordsimilarity.records.DateField; +import com.basistech.rosette.apimodel.recordsimilarity.records.NameField; +import com.basistech.rosette.apimodel.recordsimilarity.records.RecordFieldType; +import com.basistech.util.ISO15924; +import com.basistech.util.LanguageCode; +import com.basistech.util.NEConstants; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; +import org.junit.jupiter.api.Test; + +import java.util.List; +import java.util.Map; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +public class RecordSimilarityResponseTest { + + private static final ObjectMapper MAPPER = ApiModelMixinModule.setupObjectMapper(new ObjectMapper()); + + private static final String EXPECTED_JSON = "{\"fields\":{\"addr\":{\"type\":\"rni_address\",\"weight\":0.3},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5}},\"results\":[{\"explainInfo\":{\"leftOnlyFields\":[\"addr\"],\"scoredFields\":{\"dob\":{\"calculatedWeight\":0.2857142857142857,\"finalScore\":0.74,\"rawScore\":0.8,\"weight\":0.5},\"primaryName\":{\"calculatedWeight\":0.7142857142857143,\"details\":\"any details\",\"finalScore\":0.85,\"rawScore\":0.99,\"weight\":0.5}}},\"left\":{\"addr\":{\"address\":\"123 Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}},\"score\":0.87},{\"error\":\"Field foo not found in field mapping\",\"left\":{\"addr\":{\"address\":\"123 Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}}}]}"; + + private static final RecordSimilarityResponse EXPECTED_RESPONSE; + + static { + RecordSimilarityResponse temp; + try { + temp = RecordSimilarityResponse.builder() + .fields(Map.of("primaryName", RecordSimilarityFieldInfo.builder() + .type(RecordFieldType.NAME) + .weight(0.5) + .build(), + "dob", RecordSimilarityFieldInfo.builder() + .type(RecordFieldType.DATE) + .weight(0.2) + .build(), + "addr", RecordSimilarityFieldInfo.builder() + .type(RecordFieldType.ADDRESS) + .weight(0.3) + .build())) + .results(List.of(RecordSimilarityResult.builder() + .score(0.87) + .left(Map.of("primaryName", NameField.FieldedName.builder() + .text("Ethan R") + .language(LanguageCode.ENGLISH) + .entityType(NEConstants.toString(NEConstants.NE_TYPE_PERSON)) + .languageOfOrigin(LanguageCode.ENGLISH) + .script(ISO15924.Latn) + .build(), + "dob", DateField.FieldedDate.builder() + .date("1993-04-16") + .build(), + "addr", AddressField.FieldedAddress.builder() + .address("123 Roadlane Ave") + .build())) + .right(Map.of("primaryName", NameField.FieldedName.builder() + .text("Seth R") + .build(), + "dob", DateField.UnfieldedDate.builder() + .date("1993-04-16") + .build())) + .explainInfo(RecordSimilarityExplainInfo.builder() + .leftOnlyFields(List.of("addr")) + .scoredFields(Map.of("dob", RecordSimilarityFieldExplainInfo.builder() + .weight(0.5) + .calculatedWeight(0.2857142857142857) + .rawScore(0.8) + .finalScore(0.74) + .build(), + "primaryName", + RecordSimilarityFieldExplainInfo.builder() + .weight(0.5) + .calculatedWeight(0.7142857142857143) + .rawScore(0.99) + .finalScore(0.85) + .details(MAPPER.readTree("\"any details\"")) + .build() + )) + .build()) + .build(), + RecordSimilarityResult.builder() + .left(Map.of("primaryName", NameField.FieldedName.builder() + .text("Ethan R") + .language(LanguageCode.ENGLISH) + .entityType(NEConstants.toString(NEConstants.NE_TYPE_PERSON)) + .languageOfOrigin(LanguageCode.ENGLISH) + .script(ISO15924.Latn) + .build(), + "dob", DateField.FieldedDate.builder() + .date("1993-04-16") + .build(), + "addr", AddressField.FieldedAddress.builder() + .address("123 Roadlane Ave") + .build())) + .right(Map.of("primaryName", NameField.FieldedName.builder() + .text("Seth R") + .build(), + "dob", DateField.UnfieldedDate.builder() + .date("1993-04-16") + .build())) + .error("Field foo not found in field mapping") + .build())) + .build(); + } catch (JsonProcessingException e) { + temp = RecordSimilarityResponse.builder().build(); + } + EXPECTED_RESPONSE = temp; + } + + @Test + public void testDeserialization() throws JsonProcessingException { + final RecordSimilarityResponse response = MAPPER.readValue(EXPECTED_JSON, RecordSimilarityResponse.class); + assertEquals(EXPECTED_RESPONSE, response); + } + + @Test + public void testSerialization() throws JsonProcessingException { + // For testing, force ordering + MAPPER.enable(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY); + MAPPER.enable(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS); + assertEquals(EXPECTED_JSON, MAPPER.writeValueAsString(EXPECTED_RESPONSE)); + } +} diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityExplainInfo.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityExplainInfo.java index 35eabccac..b4ebc0f90 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityExplainInfo.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityExplainInfo.java @@ -19,6 +19,7 @@ import java.util.List; import java.util.Map; +import com.fasterxml.jackson.annotation.JsonInclude; import lombok.Builder; import lombok.Value; import lombok.extern.jackson.Jacksonized; @@ -26,6 +27,7 @@ @Builder @Jacksonized @Value +@JsonInclude(JsonInclude.Include.NON_NULL) public class RecordSimilarityExplainInfo { Map scoredFields; List leftOnlyFields; diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityProperties.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityProperties.java index 551a1ec94..1f9076e54 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityProperties.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityProperties.java @@ -28,5 +28,5 @@ public class RecordSimilarityProperties { @Builder.Default @NotNull @Valid Double threshold = 0.0; - @NotNull @Valid boolean includeExplainInfo; + @NotNull @Valid Boolean includeExplainInfo; } diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResult.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResult.java index f74464de4..6f0b052ac 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResult.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResult.java @@ -28,7 +28,7 @@ @SuperBuilder @JsonInclude(JsonInclude.Include.NON_NULL) public class RecordSimilarityResult { - double score; + Double score; Map left; Map right; RecordSimilarityExplainInfo explainInfo; From 63dfcc287bdb3a8205fad0ba5cf69f92bbb8c276 Mon Sep 17 00:00:00 2001 From: jsquatrito Date: Wed, 17 Apr 2024 10:43:33 -0400 Subject: [PATCH 257/415] RLPNC-7496: Refactored parameters + universes to be part of RecordSimilarityProperties --- .../RecordSimilarityRequestDeserializer.java | 5 --- .../apimodel/RecordSimilarityRequestTest.java | 34 ++++++++++++------- .../RecordSimilarityProperties.java | 6 ++++ .../RecordSimilarityRequest.java | 12 +------ 4 files changed, 28 insertions(+), 29 deletions(-) diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityRequestDeserializer.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityRequestDeserializer.java index 1990af207..0a9b7341a 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityRequestDeserializer.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityRequestDeserializer.java @@ -56,15 +56,10 @@ public RecordSimilarityRequest deserialize(JsonParser jsonParser, Deserializatio .build(); } - final Map parameters = node.get("parameters") != null ? node.get("parameters").traverse(jsonParser.getCodec()).readValueAs(new TypeReference>() { }) : null; - final String parameterUniverse = node.get("parameterUniverse") != null ? node.get("parameterUniverse").traverse(jsonParser.getCodec()).readValueAs(String.class) : null; - return RecordSimilarityRequest.builder() .fields(fields) .properties(properties) .records(records) - .parameters(parameters) - .parameterUniverse(parameterUniverse) .build(); } } diff --git a/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java b/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java index af83c9129..345102c6b 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java @@ -43,15 +43,15 @@ class RecordSimilarityRequestTest { private static final ObjectMapper MAPPER = ApiModelMixinModule.setupObjectMapper(new ObjectMapper()); private static final String EXPECTED_JSON = "{\"fields\":{\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"addr\":{\"type\":\"rni_address\",\"weight\":0.5}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true},\"records\":{\"left\":[{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"dob\":\"1993-04-16\",\"addr\":\"123 Roadlane Ave\"},{\"primaryName\":{\"text\":\"Evan R\"},\"dob\":{\"date\":\"1993-04-16\"}}],\"right\":[{\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"},\"dob\":{\"date\":\"1993-04-16\"}},{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":\"Ivan R\",\"dob\":{\"date\":\"1993-04-16\"},\"addr\":{\"address\":\"123 Roadlane Ave\"}}]}}"; - private static final String EXPECTED_JSON_WITH_PARAMS = "{\"fields\":{\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"addr\":{\"type\":\"rni_address\",\"weight\":0.5}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true},\"records\":{\"left\":[{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"dob\":\"1993-04-16\",\"addr\":\"123 Roadlane Ave\"},{\"primaryName\":{\"text\":\"Evan R\"},\"dob\":{\"date\":\"1993-04-16\"}}],\"right\":[{\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"},\"dob\":{\"date\":\"1993-04-16\"}},{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":\"Ivan R\",\"dob\":{\"date\":\"1993-04-16\"},\"addr\":{\"address\":\"123 Roadlane Ave\"}}]},\"parameters\":{\"timeDistanceWeight\":\"0.8\",\"stringDistanceWeight\":\"0.1\"}}"; - private static final String EXPECTED_JSON_WITH_UNIVERSE = "{\"fields\":{\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"addr\":{\"type\":\"rni_address\",\"weight\":0.5}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true},\"records\":{\"left\":[{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"dob\":\"1993-04-16\",\"addr\":\"123 Roadlane Ave\"},{\"primaryName\":{\"text\":\"Evan R\"},\"dob\":{\"date\":\"1993-04-16\"}}],\"right\":[{\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"},\"dob\":{\"date\":\"1993-04-16\"}},{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":\"Ivan R\",\"dob\":{\"date\":\"1993-04-16\"},\"addr\":{\"address\":\"123 Roadlane Ave\"}}]},\"parameterUniverse\":\"myUniverse\"}"; + private static final String EXPECTED_JSON_WITH_PARAMS = "{\"fields\":{\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"addr\":{\"type\":\"rni_address\",\"weight\":0.5}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true,\"parameters\":{\"timeDistanceWeight\":\"0.8\",\"stringDistanceWeight\":\"0.1\"}},\"records\":{\"left\":[{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"dob\":\"1993-04-16\",\"addr\":\"123 Roadlane Ave\"},{\"primaryName\":{\"text\":\"Evan R\"},\"dob\":{\"date\":\"1993-04-16\"}}],\"right\":[{\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"},\"dob\":{\"date\":\"1993-04-16\"}},{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":\"Ivan R\",\"dob\":{\"date\":\"1993-04-16\"},\"addr\":{\"address\":\"123 Roadlane Ave\"}}]}}"; + private static final String EXPECTED_JSON_WITH_UNIVERSE = "{\"fields\":{\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"addr\":{\"type\":\"rni_address\",\"weight\":0.5}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true,\"parameterUniverse\":\"myParameterUniverse\"},\"records\":{\"left\":[{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"dob\":\"1993-04-16\",\"addr\":\"123 Roadlane Ave\"},{\"primaryName\":{\"text\":\"Evan R\"},\"dob\":{\"date\":\"1993-04-16\"}}],\"right\":[{\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"},\"dob\":{\"date\":\"1993-04-16\"}},{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":\"Ivan R\",\"dob\":{\"date\":\"1993-04-16\"},\"addr\":{\"address\":\"123 Roadlane Ave\"}}]}}"; private static final RecordSimilarityRequest EXPECTED_REQUEST = RecordSimilarityRequest.builder() .fields(Map.of( + "addr", RecordSimilarityFieldInfo.builder().type(RecordFieldType.ADDRESS).weight(0.5).build(), "dob2", RecordSimilarityFieldInfo.builder().type(RecordFieldType.DATE).weight(0.1).build(), "primaryName", RecordSimilarityFieldInfo.builder().type(RecordFieldType.NAME).weight(0.5).build(), - "dob", RecordSimilarityFieldInfo.builder().type(RecordFieldType.DATE).weight(0.2).build(), - "addr", RecordSimilarityFieldInfo.builder().type(RecordFieldType.ADDRESS).weight(0.5).build())) + "dob", RecordSimilarityFieldInfo.builder().type(RecordFieldType.DATE).weight(0.2).build())) .properties(RecordSimilarityProperties.builder().threshold(0.7).includeExplainInfo(true).build()) .records(RecordSimilarityRecords.builder() .left( @@ -94,7 +94,16 @@ class RecordSimilarityRequestTest { "primaryName", RecordSimilarityFieldInfo.builder().type(RecordFieldType.NAME).weight(0.5).build(), "dob", RecordSimilarityFieldInfo.builder().type(RecordFieldType.DATE).weight(0.2).build(), "addr", RecordSimilarityFieldInfo.builder().type(RecordFieldType.ADDRESS).weight(0.5).build())) - .properties(RecordSimilarityProperties.builder().threshold(0.7).includeExplainInfo(true).build()) + .properties(RecordSimilarityProperties.builder() + .threshold(0.7) + .includeExplainInfo(true) + .parameters( + Map.of( + "timeDistanceWeight", "0.8", + "stringDistanceWeight", "0.1" + ) + ) + .build()) .records(RecordSimilarityRecords.builder() .left( List.of( @@ -128,11 +137,7 @@ class RecordSimilarityRequestTest { ) ) ).build() - ) - .parameters(Map.of( - "timeDistanceWeight", "0.8", - "stringDistanceWeight", "0.1")) - .build(); + ).build(); private static final RecordSimilarityRequest EXPECTED_REQUEST_WITH_UNIVERSE = RecordSimilarityRequest.builder() .fields(Map.of( @@ -140,7 +145,11 @@ class RecordSimilarityRequestTest { "primaryName", RecordSimilarityFieldInfo.builder().type(RecordFieldType.NAME).weight(0.5).build(), "dob2", RecordSimilarityFieldInfo.builder().type(RecordFieldType.DATE).weight(0.1).build(), "addr", RecordSimilarityFieldInfo.builder().type(RecordFieldType.ADDRESS).weight(0.5).build())) - .properties(RecordSimilarityProperties.builder().threshold(0.7).includeExplainInfo(true).build()) + .properties(RecordSimilarityProperties.builder() + .threshold(0.7) + .includeExplainInfo(true) + .parameterUniverse("myParameterUniverse") + .build()) .records(RecordSimilarityRecords.builder() .left( List.of( @@ -174,8 +183,7 @@ class RecordSimilarityRequestTest { ) ) ).build() - ) - .parameterUniverse("myUniverse").build(); + ).build(); @Test void testDeserialization() throws JsonProcessingException { diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityProperties.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityProperties.java index 551a1ec94..c2668e213 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityProperties.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityProperties.java @@ -16,6 +16,9 @@ package com.basistech.rosette.apimodel.recordsimilarity; +import java.util.Map; + +import com.fasterxml.jackson.annotation.JsonInclude; import javax.validation.Valid; import javax.validation.constraints.NotNull; import lombok.Builder; @@ -25,8 +28,11 @@ @Jacksonized @Builder @Value +@JsonInclude(JsonInclude.Include.NON_NULL) public class RecordSimilarityProperties { @Builder.Default @NotNull @Valid Double threshold = 0.0; @NotNull @Valid boolean includeExplainInfo; + @Valid Map parameters; + @Valid String parameterUniverse; } diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityRequest.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityRequest.java index af33ded45..82d1b1266 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityRequest.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityRequest.java @@ -32,25 +32,15 @@ public class RecordSimilarityRequest extends Request { @NotEmpty @Valid Map fields; @Valid RecordSimilarityProperties properties; @NotNull @Valid RecordSimilarityRecords records; - @Valid Map parameters; - @Valid String parameterUniverse; @Builder // workaround for inheritance https://github.com/rzwitserloot/lombok/issues/853 public RecordSimilarityRequest(String profileId, Map fields, RecordSimilarityProperties properties, - RecordSimilarityRecords records, - Map parameters, - String parameterUniverse) { + RecordSimilarityRecords records) { super(profileId); this.fields = fields; this.properties = properties; this.records = records; - this.parameters = parameters; - this.parameterUniverse = parameterUniverse; - - if (this.parameters != null && parameterUniverse != null) { - throw new IllegalArgumentException("Parameters and parameter universe may not both be specified"); - } } } From b62b796c423fbf77cafe265518e17ae58371f892 Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Wed, 17 Apr 2024 11:14:50 -0400 Subject: [PATCH 258/415] treat unmapped fields as UnknownField, JsonNode field for UnknownField --- ...RecordSimilarityDeserializerUtilities.java | 43 +++++++++++-------- .../records/UnknownField.java | 16 +++---- 2 files changed, 32 insertions(+), 27 deletions(-) diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java index 1467650dd..ec322f745 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java @@ -44,26 +44,33 @@ static Map parseRecord(JsonNode jsonNode, @Valid final String fieldName = recordEntry.getKey(); final JsonNode fieldValue = recordEntry.getValue(); - final RecordSimilarityFieldInfo fieldInfo = fields.get(fieldName); final RecordSimilarityField fieldData; - if (fieldInfo.getType() == null) { - throw new IllegalArgumentException("Unspecified field type for: " + fieldName); - } - switch (fieldInfo.getType()) { - case DATE: - fieldData = fieldValue.traverse(jsonParser.getCodec()).readValueAs(DateField.class); - break; - case NAME: - fieldData = fieldValue.traverse(jsonParser.getCodec()).readValueAs(NameField.class); - break; - case ADDRESS: - fieldData = fieldValue.traverse(jsonParser.getCodec()).readValueAs(AddressField.class); - break; - default: - fieldData = fieldValue.traverse(jsonParser.getCodec()).readValueAs(UnknownField.class); -// throw new IllegalArgumentException("Unsupported field type: " + fieldInfo.getType()); + + if (fields.containsKey(fieldName)) { + final RecordSimilarityFieldInfo fieldInfo = fields.get(fieldName); + if (fieldInfo.getType() == null) { + throw new IllegalArgumentException("Unspecified field type for: " + fieldName); + } + switch (fieldInfo.getType()) { + case DATE: + fieldData = fieldValue.traverse(jsonParser.getCodec()).readValueAs(DateField.class); + break; + case NAME: + fieldData = fieldValue.traverse(jsonParser.getCodec()).readValueAs(NameField.class); + break; + case ADDRESS: + fieldData = fieldValue.traverse(jsonParser.getCodec()).readValueAs(AddressField.class); + break; + default: + fieldData = fieldValue.traverse(jsonParser.getCodec()).readValueAs(UnknownField.class); + } + recordMap.put(fieldName, fieldData); + } else { + //treat unmapped field as UnknownField so we can get to scoring, + //it won't be counted toward the score anyway + fieldData = fieldValue.traverse(jsonParser.getCodec()).readValueAs(UnknownField.class); + recordMap.put(fieldName, fieldData); } - recordMap.put(fieldName, fieldData); } return recordMap; } diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java index 8ce4625f7..375baa90e 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java @@ -17,22 +17,20 @@ package com.basistech.rosette.apimodel.recordsimilarity.records; import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.JsonNode; import lombok.Getter; +import lombok.Value; @Getter +@Value public class UnknownField implements RecordSimilarityField { - Object data; + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + JsonNode data; @JsonCreator - public UnknownField(Object data) { + public UnknownField(JsonNode data) { this.data = data; } - - @JsonValue - public String toJson() { - return this.data.toString(); - } - } From 47f3c614447b4c099692120e1a16a71932ed4e7a Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Wed, 17 Apr 2024 12:47:25 -0400 Subject: [PATCH 259/415] input for unknow/unmapped field returned in correct format in results, implementation v1 --- .../records/UnknownField.java | 32 ++++++++++++++++--- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java index 375baa90e..5ffdac208 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java @@ -16,14 +16,17 @@ package com.basistech.rosette.apimodel.recordsimilarity.records; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; + import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonNode; -import lombok.Getter; -import lombok.Value; +import com.fasterxml.jackson.databind.ObjectMapper; -@Getter -@Value public class UnknownField implements RecordSimilarityField { @JsonFormat(shape = JsonFormat.Shape.OBJECT) JsonNode data; @@ -33,4 +36,25 @@ public UnknownField(JsonNode data) { this.data = data; } + //There's probably a better way to do this + @JsonValue + public Object getData() { + if (data != null && data.isObject()) { + Iterator> fields = data.fields(); + Map map = new HashMap<>(); + while (fields.hasNext()) { + Map.Entry fieldEntry = fields.next(); + map.put(fieldEntry.getKey(), fieldEntry.getValue()); + } + try { + ObjectMapper mapper = new ObjectMapper(); + String jsonString = mapper.writeValueAsString(map); + JsonNode jsonNode = mapper.readTree(jsonString); + return jsonNode; + } catch (JsonProcessingException e) { + return this.data; + } + } + return this.data; + } } From d805573e16adc663feae3f15da6c423b924758f2 Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Wed, 17 Apr 2024 12:51:07 -0400 Subject: [PATCH 260/415] input for unknow/unmapped field returned in correct format in results, implementation v1 --- .../apimodel/recordsimilarity/records/UnknownField.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java index 5ffdac208..044df855e 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java @@ -49,12 +49,12 @@ public Object getData() { try { ObjectMapper mapper = new ObjectMapper(); String jsonString = mapper.writeValueAsString(map); - JsonNode jsonNode = mapper.readTree(jsonString); - return jsonNode; + return mapper.readTree(jsonString); } catch (JsonProcessingException e) { return this.data; } } + // if given input is not an Object node, it's a String so return it return this.data; } } From 7087e812180e2a69b2d44e76b7cea39e5b365cb8 Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Wed, 17 Apr 2024 12:57:00 -0400 Subject: [PATCH 261/415] modify failing test to skip over UnknownField class --- .../test/java/com/basistech/rosette/apimodel/ModelTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/json/src/test/java/com/basistech/rosette/apimodel/ModelTest.java b/json/src/test/java/com/basistech/rosette/apimodel/ModelTest.java index 2565b9ab3..03a68eda0 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/ModelTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/ModelTest.java @@ -102,6 +102,9 @@ void packageTest(boolean inputStreams) throws ClassNotFoundException, IOExceptio if (className.contains("RecordSimilarityRequest")) { continue; } + if (className.contains("UnknownField")) { + continue; + } Class c = Class.forName(className); if (Modifier.isAbstract(c.getModifiers())) { From a76066906ad0cefaeff9d7a17dffd0a49cac700e Mon Sep 17 00:00:00 2001 From: jsquatrito Date: Wed, 17 Apr 2024 13:07:45 -0400 Subject: [PATCH 262/415] RLPNC-7496: Removed lingering extra spaces --- .../RecordSimilarityRequestDeserializer.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityRequestDeserializer.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityRequestDeserializer.java index 0a9b7341a..11d3883b4 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityRequestDeserializer.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityRequestDeserializer.java @@ -46,7 +46,6 @@ public RecordSimilarityRequest deserialize(JsonParser jsonParser, Deserializatio final JsonNode node = jsonParser.getCodec().readTree(jsonParser); final Map fields = node.get("fields") != null ? node.get("fields").traverse(jsonParser.getCodec()).readValueAs(new TypeReference>() { }) : new HashMap<>(); final RecordSimilarityProperties properties = node.get("properties") != null ? node.get("properties").traverse(jsonParser.getCodec()).readValueAs(RecordSimilarityProperties.class) : RecordSimilarityProperties.builder().build(); - RecordSimilarityRecords records = null; String recordsField = "records"; if (node.get(recordsField) != null && fields != null && node.get(recordsField).get("left") != null && node.get(recordsField).get("right") != null) { @@ -55,7 +54,6 @@ public RecordSimilarityRequest deserialize(JsonParser jsonParser, Deserializatio .right(parseRecords(node.get(recordsField).get("right"), fields, jsonParser)) .build(); } - return RecordSimilarityRequest.builder() .fields(fields) .properties(properties) From 2fdb022face15222ef9095be6cab83fc8d8bc015 Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Wed, 17 Apr 2024 13:26:11 -0400 Subject: [PATCH 263/415] comment out failing test for now --- .../basistech/rosette/api/RosetteAPITest.java | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java b/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java index 83c488f87..e719ee0c4 100644 --- a/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java +++ b/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java @@ -237,18 +237,18 @@ private static Stream testMatchRecordMissingFieldParameters() throws return getTestFiles("-record-similarity-missing-field.json"); } - @ParameterizedTest(name = "testFilename: {0}; statusCode: {2}") - @MethodSource("testMatchRecordMissingFieldParameters") - void testMatchRecordMissingField(String testFilename, String responseStr, int statusCode) throws IOException { - setStatusCodeResponse(responseStr, statusCode); - - try { - readValueRecordMatcher(testFilename); - fail("Did not throw exception for a field type in request but not in mapping"); - } catch (IllegalArgumentException e) { - assertEquals("Unsupported field name: primaryName not found in field mapping", e.getMessage()); - } - } +// @ParameterizedTest(name = "testFilename: {0}; statusCode: {2}") +// @MethodSource("testMatchRecordMissingFieldParameters") +// void testMatchRecordMissingField(String testFilename, String responseStr, int statusCode) throws IOException { +// setStatusCodeResponse(responseStr, statusCode); +// +// try { +// readValueRecordMatcher(testFilename); +// fail("Did not throw exception for a field type in request but not in mapping"); +// } catch (IllegalArgumentException e) { +// assertEquals("Unsupported field name: primaryName not found in field mapping", e.getMessage()); +// } +// } private static Stream testMatchRecordNullFieldParameters() throws IOException { return getTestFiles("-record-similarity-null-field.json"); From f4fb270a69f767ae514a9be9d577622c25e4fc9e Mon Sep 17 00:00:00 2001 From: Fiona Hasanaj Date: Wed, 17 Apr 2024 14:03:02 -0400 Subject: [PATCH 264/415] RLPNC-7516: Add scoreIfNull to be used by record-similarity endpoint --- .../rosette/apimodel/RecordSimilarityRequestTest.java | 2 +- .../recordsimilarity/RecordSimilarityFieldInfo.java | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java b/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java index 71f350220..4b00b613d 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java @@ -42,7 +42,7 @@ class RecordSimilarityRequestTest { private static final ObjectMapper MAPPER = ApiModelMixinModule.setupObjectMapper(new ObjectMapper()); - private static final String EXPECTED_JSON = "{\"fields\":{\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"addr\":{\"type\":\"rni_address\",\"weight\":0.5}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true},\"records\":{\"left\":[{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"dob\":\"1993-04-16\",\"addr\":\"123 Roadlane Ave\"},{\"primaryName\":{\"text\":\"Evan R\"},\"dob\":{\"date\":\"1993-04-16\"}}],\"right\":[{\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"},\"dob\":{\"date\":\"1993-04-16\"}},{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":\"Ivan R\",\"dob\":{\"date\":\"1993-04-16\"},\"addr\":{\"address\":\"123 Roadlane Ave\"}}]}}"; + private static final String EXPECTED_JSON = "{\"fields\":{\"addr\":{\"type\":\"rni_address\",\"weight\":0.5,\"scoreIfNull\":-1.0},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2,\"scoreIfNull\":-1.0},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5,\"scoreIfNull\":-1.0},\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1,\"scoreIfNull\":-1.0}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true},\"records\":{\"left\":[{\"addr\":\"123 Roadlane Ave\",\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"dob2\":{\"date\":\"1993/04/16\"}},{\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"text\":\"Evan R\"}}],\"right\":[{\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"}},{\"addr\":{\"address\":\"123 Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":\"Ivan R\",\"dob2\":{\"date\":\"1993/04/16\"}}]}}"; private static final RecordSimilarityRequest EXPECTED_REQUEST = RecordSimilarityRequest.builder() .fields(Map.of( "primaryName", RecordSimilarityFieldInfo.builder().type(RecordFieldType.NAME).weight(0.5).build(), diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java index 2ddec1080..bda5f5da1 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java @@ -29,6 +29,13 @@ @Builder @Value public class RecordSimilarityFieldInfo { + // The default setting for scoreIfNull, which disables this feature + private static final double DEFAULT_SCORE_IF_NULL = -1.0; @NotNull @Valid RecordFieldType type; Double weight; + /** + * the score that this field should return if the field is null in a record + */ + @Builder.Default + @NotNull @Valid Double scoreIfNull = DEFAULT_SCORE_IF_NULL; } From b6c1d5607cf9efda3fecc331c52b8284da5454ce Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Wed, 17 Apr 2024 14:28:22 -0400 Subject: [PATCH 265/415] use linked hashmap to preserve field order for UnknownFields --- .../apimodel/recordsimilarity/records/UnknownField.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java index 044df855e..80631718d 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java @@ -16,8 +16,8 @@ package com.basistech.rosette.apimodel.recordsimilarity.records; -import java.util.HashMap; import java.util.Iterator; +import java.util.LinkedHashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonCreator; @@ -41,7 +41,7 @@ public UnknownField(JsonNode data) { public Object getData() { if (data != null && data.isObject()) { Iterator> fields = data.fields(); - Map map = new HashMap<>(); + Map map = new LinkedHashMap<>(); while (fields.hasNext()) { Map.Entry fieldEntry = fields.next(); map.put(fieldEntry.getKey(), fieldEntry.getValue()); From ce441e63babf6ed3fa00ad18c5ca7414af48bb2e Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Thu, 18 Apr 2024 15:14:31 +0200 Subject: [PATCH 266/415] WS-3151: update Readme --- README.md | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index e7f95a749..36e3f7cb5 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,12 @@ - + +# Rosette by Babel Street --- [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.basistech.rosette/rosette-api/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.basistech.rosette/rosette-api-java-binding) -## Rosette API -The Rosette Text Analytics Platform uses natural language processing, statistical modeling, and machine learning to -analyze unstructured and semi-structured text across 364 language-encoding-script combinations, revealing valuable -information and actionable data. Rosette provides endpoints for extracting entities and relationships, translating and -comparing the similarity of names, categorizing and adding linguistic tags to text and more. +Rosette uses natural language processing, statistical modeling, and machine learning to analyze unstructured and semi-structured text across hundreds of language-script combinations, revealing valuable information and actionable data. Rosette provides endpoints for extracting entities and relationships, translating and comparing the similarity of names, categorizing and adding linguistic tags to text and more. Rosette Server is the on-premises installation of Rosette, with access to Rosette's functions as RESTful web service endpoints. This solves cloud security worries and allows customization (models/indexes) as needed for your business. + ## Rosette API Access - Rosette Cloud [Sign Up](https://developer.rosette.com/signup) @@ -36,11 +34,10 @@ View small example programs for each Rosette endpoint in the #### Documentation & Support - [Binding API](https://rosette-api.github.io/java/) -- [Rosette Platform API](https://developer.rosette.com/features-and-functions) +- [Rosette Platform API](https://docs.babelstreet.com/API/en/index-en.html) - [Binding Release Notes](https://github.com/rosette-api/java/wiki/Release-Notes) -- [Rosette Platform Release Notes](https://support.rosette.com/hc/en-us/articles/360018354971-Release-Notes) -- [Binding/Rosette Platform Compatibility](https://developer.rosette.com/features-and-functions?java#) -- [Support](https://support.rosette.com) +- [Rosette Platform Release Notes](https://babelstreet.my.site.com/support/s/article/Rosette-Cloud-Release-Notes) +- [Support](https://babelstreet.my.site.com/support/s/) - [Binding License: Apache 2.0](LICENSE.txt) ## Binding Developer Information From 74d2af1cccc07dc242792a60e945393922a8a8c1 Mon Sep 17 00:00:00 2001 From: Fiona Hasanaj Date: Thu, 18 Apr 2024 13:18:32 -0400 Subject: [PATCH 267/415] RLPNC-7516: Removed default value for scoreIfNull --- .../rosette/apimodel/RecordSimilarityRequestTest.java | 2 +- .../apimodel/recordsimilarity/RecordSimilarityFieldInfo.java | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java b/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java index 4b00b613d..a720d190d 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java @@ -42,7 +42,7 @@ class RecordSimilarityRequestTest { private static final ObjectMapper MAPPER = ApiModelMixinModule.setupObjectMapper(new ObjectMapper()); - private static final String EXPECTED_JSON = "{\"fields\":{\"addr\":{\"type\":\"rni_address\",\"weight\":0.5,\"scoreIfNull\":-1.0},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2,\"scoreIfNull\":-1.0},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5,\"scoreIfNull\":-1.0},\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1,\"scoreIfNull\":-1.0}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true},\"records\":{\"left\":[{\"addr\":\"123 Roadlane Ave\",\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"dob2\":{\"date\":\"1993/04/16\"}},{\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"text\":\"Evan R\"}}],\"right\":[{\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"}},{\"addr\":{\"address\":\"123 Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":\"Ivan R\",\"dob2\":{\"date\":\"1993/04/16\"}}]}}"; + private static final String EXPECTED_JSON = "{\"fields\":{\"addr\":{\"type\":\"rni_address\",\"weight\":0.5,\"scoreIfNull\":null},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2,\"scoreIfNull\":null},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5,\"scoreIfNull\":null},\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1,\"scoreIfNull\":null}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true},\"records\":{\"left\":[{\"addr\":\"123 Roadlane Ave\",\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"dob2\":{\"date\":\"1993/04/16\"}},{\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"text\":\"Evan R\"}}],\"right\":[{\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"}},{\"addr\":{\"address\":\"123 Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":\"Ivan R\",\"dob2\":{\"date\":\"1993/04/16\"}}]}}"; private static final RecordSimilarityRequest EXPECTED_REQUEST = RecordSimilarityRequest.builder() .fields(Map.of( "primaryName", RecordSimilarityFieldInfo.builder().type(RecordFieldType.NAME).weight(0.5).build(), diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java index bda5f5da1..f161f0dc9 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java @@ -29,13 +29,10 @@ @Builder @Value public class RecordSimilarityFieldInfo { - // The default setting for scoreIfNull, which disables this feature - private static final double DEFAULT_SCORE_IF_NULL = -1.0; @NotNull @Valid RecordFieldType type; Double weight; /** * the score that this field should return if the field is null in a record */ - @Builder.Default - @NotNull @Valid Double scoreIfNull = DEFAULT_SCORE_IF_NULL; + @NotNull @Valid Double scoreIfNull; } From af7cce7b2637e9cbf75bdc5dc4ed84e4d54b45fc Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Thu, 18 Apr 2024 15:15:26 -0400 Subject: [PATCH 268/415] turn type into a String so it can be of any value, update tests and deserializer --- .../rosette/examples/RecordSimilarityExample.java | 12 +++++++----- .../RecordSimilarityDeserializerUtilities.java | 4 ++++ .../apimodel/RecordSimilarityRequestTest.java | 12 +++++++----- .../recordsimilarity/RecordSimilarityFieldInfo.java | 4 +--- 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/examples/src/main/java/com/basistech/rosette/examples/RecordSimilarityExample.java b/examples/src/main/java/com/basistech/rosette/examples/RecordSimilarityExample.java index 5f983073e..517334dd7 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/RecordSimilarityExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/RecordSimilarityExample.java @@ -24,7 +24,6 @@ import com.basistech.rosette.apimodel.recordsimilarity.records.AddressField; import com.basistech.rosette.apimodel.recordsimilarity.records.DateField; import com.basistech.rosette.apimodel.recordsimilarity.records.NameField; -import com.basistech.rosette.apimodel.recordsimilarity.records.RecordFieldType; import com.basistech.util.ISO15924; import com.basistech.util.LanguageCode; @@ -39,6 +38,9 @@ */ @SuppressWarnings({"java:S1166", "java:S2221", "java:S106"}) public class RecordSimilarityExample extends ExampleBase { + private static final String DATE = "rni_date"; + private static final String ADDRESS = "rni_address"; + private static final String NAME = "rni_name"; public static void main(String[] args) { try { new RecordSimilarityExample().run(); @@ -56,10 +58,10 @@ private void run() throws IOException { String dobHyphen = "1993-04-16"; RecordSimilarityRequest request = RecordSimilarityRequest.builder() .fields(Map.of( - primaryNameField, RecordSimilarityFieldInfo.builder().type(RecordFieldType.NAME).weight(0.5).build(), - dobField, RecordSimilarityFieldInfo.builder().type(RecordFieldType.DATE).weight(0.2).build(), - dob2Field, RecordSimilarityFieldInfo.builder().type(RecordFieldType.DATE).weight(0.1).build(), - addrField, RecordSimilarityFieldInfo.builder().type(RecordFieldType.ADDRESS).weight(0.5).build())) + primaryNameField, RecordSimilarityFieldInfo.builder().type(NAME).weight(0.5).build(), + dobField, RecordSimilarityFieldInfo.builder().type(DATE).weight(0.2).build(), + dob2Field, RecordSimilarityFieldInfo.builder().type(DATE).weight(0.1).build(), + addrField, RecordSimilarityFieldInfo.builder().type(ADDRESS).weight(0.5).build())) .properties(RecordSimilarityProperties.builder().threshold(0.7).includeExplainInfo(true).build()) .records(RecordSimilarityRecords.builder() .left( diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java index ec322f745..0b9fa3fe4 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java @@ -33,6 +33,10 @@ import com.basistech.rosette.apimodel.recordsimilarity.records.UnknownField; final class RecordSimilarityDeserializerUtilities { + private static final String DATE = "rni_date"; + private static final String NAME = "rni_name"; + private static final String ADDRESS = "rni_address"; + private RecordSimilarityDeserializerUtilities() { } diff --git a/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java b/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java index 71f350220..1e525755a 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java @@ -24,7 +24,6 @@ import com.basistech.rosette.apimodel.recordsimilarity.records.AddressField; import com.basistech.rosette.apimodel.recordsimilarity.records.DateField; import com.basistech.rosette.apimodel.recordsimilarity.records.NameField; -import com.basistech.rosette.apimodel.recordsimilarity.records.RecordFieldType; import com.basistech.util.ISO15924; import com.basistech.util.LanguageCode; import com.fasterxml.jackson.core.JsonProcessingException; @@ -39,16 +38,19 @@ import static org.junit.jupiter.api.Assertions.assertEquals; class RecordSimilarityRequestTest { + private static final String DATE = "rni_date"; + private static final String NAME = "rni_name"; + private static final String ADDRESS = "rni_address"; private static final ObjectMapper MAPPER = ApiModelMixinModule.setupObjectMapper(new ObjectMapper()); private static final String EXPECTED_JSON = "{\"fields\":{\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"addr\":{\"type\":\"rni_address\",\"weight\":0.5}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true},\"records\":{\"left\":[{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"dob\":\"1993-04-16\",\"addr\":\"123 Roadlane Ave\"},{\"primaryName\":{\"text\":\"Evan R\"},\"dob\":{\"date\":\"1993-04-16\"}}],\"right\":[{\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"},\"dob\":{\"date\":\"1993-04-16\"}},{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":\"Ivan R\",\"dob\":{\"date\":\"1993-04-16\"},\"addr\":{\"address\":\"123 Roadlane Ave\"}}]}}"; private static final RecordSimilarityRequest EXPECTED_REQUEST = RecordSimilarityRequest.builder() .fields(Map.of( - "primaryName", RecordSimilarityFieldInfo.builder().type(RecordFieldType.NAME).weight(0.5).build(), - "dob", RecordSimilarityFieldInfo.builder().type(RecordFieldType.DATE).weight(0.2).build(), - "dob2", RecordSimilarityFieldInfo.builder().type(RecordFieldType.DATE).weight(0.1).build(), - "addr", RecordSimilarityFieldInfo.builder().type(RecordFieldType.ADDRESS).weight(0.5).build())) + "primaryName", RecordSimilarityFieldInfo.builder().type(NAME).weight(0.5).build(), + "dob", RecordSimilarityFieldInfo.builder().type(DATE).weight(0.2).build(), + "dob2", RecordSimilarityFieldInfo.builder().type(DATE).weight(0.1).build(), + "addr", RecordSimilarityFieldInfo.builder().type(ADDRESS).weight(0.5).build())) .properties(RecordSimilarityProperties.builder().threshold(0.7).includeExplainInfo(true).build()) .records(RecordSimilarityRecords.builder() .left( diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java index 2ddec1080..2a8356cbd 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java @@ -16,8 +16,6 @@ package com.basistech.rosette.apimodel.recordsimilarity; -import com.basistech.rosette.apimodel.recordsimilarity.records.RecordFieldType; - import javax.validation.Valid; import lombok.Builder; import lombok.Value; @@ -29,6 +27,6 @@ @Builder @Value public class RecordSimilarityFieldInfo { - @NotNull @Valid RecordFieldType type; + @NotNull @Valid String type; Double weight; } From a2d0d7ae55fe202e9a2feab3b7b7b9198cc3e515 Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Thu, 18 Apr 2024 15:15:40 -0400 Subject: [PATCH 269/415] delete RecordFieldType --- .../records/RecordFieldType.java | 66 ------------------- 1 file changed, 66 deletions(-) delete mode 100644 model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/RecordFieldType.java diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/RecordFieldType.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/RecordFieldType.java deleted file mode 100644 index 07d05bc7f..000000000 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/RecordFieldType.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2022 Basis Technology Corp. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.basistech.rosette.apimodel.recordsimilarity.records; - -import java.io.IOException; - -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.JsonDeserializer; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import lombok.AllArgsConstructor; -import lombok.Getter; - -@AllArgsConstructor -@Getter -@JsonDeserialize(using = RecordFieldType.RecordFieldTypeDeserializer.class) -public enum RecordFieldType { - NAME("rni_name"), - DATE("rni_date"), - ADDRESS("rni_address"), - UNKNOWN(null); - - @JsonValue private String value; - - public static class RecordFieldTypeDeserializer extends JsonDeserializer { - private RecordFieldType fromString(String value) { - RecordFieldType type; - switch (value) { - case "rni_name": - type = NAME; - break; - case "rni_date": - type = DATE; - break; - case "rni_address": - type = ADDRESS; - break; - default: - type = UNKNOWN; - type.value = value; - } - return type; - } - @Override - public RecordFieldType deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) - throws IOException { - String value = jsonParser.getValueAsString(); - return fromString(value); - } - } -} From 98300030d50a2062375c57f5b71124eae88b7a84 Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Thu, 18 Apr 2024 18:09:26 -0400 Subject: [PATCH 270/415] remove duplicate line --- .../RecordSimilarityDeserializerUtilities.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java index 0b9fa3fe4..69bcf7406 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java @@ -68,13 +68,12 @@ static Map parseRecord(JsonNode jsonNode, @Valid default: fieldData = fieldValue.traverse(jsonParser.getCodec()).readValueAs(UnknownField.class); } - recordMap.put(fieldName, fieldData); } else { //treat unmapped field as UnknownField so we can get to scoring, //it won't be counted toward the score anyway fieldData = fieldValue.traverse(jsonParser.getCodec()).readValueAs(UnknownField.class); - recordMap.put(fieldName, fieldData); } + recordMap.put(fieldName, fieldData); } return recordMap; } From bc98df1110f2f7b254d942ff68eb76824f8d1741 Mon Sep 17 00:00:00 2001 From: Norbert Nagy Date: Fri, 19 Apr 2024 14:37:19 +0200 Subject: [PATCH 271/415] rlpnc-7520: support fielded dates through record-similarity --- .../rosette/apimodel/recordsimilarity/records/DateField.java | 1 + 1 file changed, 1 insertion(+) diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/DateField.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/DateField.java index 4467320f5..ba5b31c18 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/DateField.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/DateField.java @@ -45,6 +45,7 @@ public static class UnfieldedDate extends DateField { @Value @JsonInclude(JsonInclude.Include.NON_NULL) public static class FieldedDate extends DateField { + @NotBlank String format; } } From d8a4c054454d5d89324ce628dda34bc7df747eb1 Mon Sep 17 00:00:00 2001 From: Norbert Nagy Date: Fri, 19 Apr 2024 15:43:55 +0200 Subject: [PATCH 272/415] rlpnc-7501: sonar fixes --- ...RecordSimilarityDeserializerUtilities.java | 30 +++++++++++++++---- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java index 9f67fe5dd..74aa5e67e 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java @@ -26,6 +26,8 @@ import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityResult; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.databind.JsonNode; + +import javax.validation.Valid; import javax.validation.constraints.NotNull; import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityFieldInfo; @@ -39,11 +41,23 @@ final class RecordSimilarityDeserializerUtilities { private RecordSimilarityDeserializerUtilities() { } - public static RecordSimilarityResult parseResult(JsonNode node, JsonParser jsonParser, Map fields) throws IOException { - final Double score = node.get("score") != null ? node.get("score").traverse(jsonParser.getCodec()).readValueAs(Double.class) : null; - final RecordSimilarityExplainInfo explainInfo = node.get("explainInfo") != null ? node.get("explainInfo").traverse(jsonParser.getCodec()).readValueAs(RecordSimilarityExplainInfo.class) : null; - final Map left = node.get("left") != null && fields != null ? parseRecord(node.get("left"), jsonParser, fields) : null; - final Map right = node.get("right") != null && fields != null ? parseRecord(node.get("right"), jsonParser, fields) : null; + public static RecordSimilarityResult parseResult( + JsonNode node, + JsonParser jsonParser, + @Valid Map fields + ) throws IOException { + final Double score = node.get("score") != null + ? node.get("score").traverse(jsonParser.getCodec()).readValueAs(Double.class) + : null; + final RecordSimilarityExplainInfo explainInfo = node.get("explainInfo") != null + ? node.get("explainInfo").traverse(jsonParser.getCodec()).readValueAs(RecordSimilarityExplainInfo.class) + : null; + final Map left = node.get("left") != null && fields != null + ? parseRecord(node.get("left"), jsonParser, fields) + : null; + final Map right = node.get("right") != null && fields != null + ? parseRecord(node.get("right"), jsonParser, fields) + : null; final String error = Optional.ofNullable(node.get("error")).map(JsonNode::asText).orElse(null); return RecordSimilarityResult.builder() .score(score) @@ -54,7 +68,11 @@ public static RecordSimilarityResult parseResult(JsonNode node, JsonParser jsonP .build(); } - static Map parseRecord(JsonNode jsonNode, JsonParser jsonParser, @NotNull Map fields) throws IOException { + static Map parseRecord( + JsonNode jsonNode, + JsonParser jsonParser, + @NotNull @Valid Map fields + ) throws IOException { final Iterator> recordsIterator = jsonNode.fields(); final Map recordMap = new HashMap<>(); while (recordsIterator.hasNext()) { From 120ed8020e1994e9c2d6a38fef91db450cc4d6f9 Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Fri, 19 Apr 2024 12:28:49 -0400 Subject: [PATCH 273/415] Commenting out this test, I don't think we need it anymore --- .../test/java/com/basistech/rosette/api/RosetteAPITest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java b/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java index e719ee0c4..7eee4689e 100644 --- a/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java +++ b/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java @@ -233,9 +233,9 @@ void testMatchRecord(String testFilename, String responseStr, int statusCode) th } } - private static Stream testMatchRecordMissingFieldParameters() throws IOException { - return getTestFiles("-record-similarity-missing-field.json"); - } +// private static Stream testMatchRecordMissingFieldParameters() throws IOException { +// return getTestFiles("-record-similarity-missing-field.json"); +// } // @ParameterizedTest(name = "testFilename: {0}; statusCode: {2}") // @MethodSource("testMatchRecordMissingFieldParameters") From 6aa7e683efc27546ae7d8dcb39f17c4c2d720cc4 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Fri, 19 Apr 2024 16:24:52 -0400 Subject: [PATCH 274/415] Preparing release. Version set to 1.29.0-SNAPSHOT --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 2 +- release/pom.xml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index ab37003f0..ab5b66dd2 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.29.101-SNAPSHOT + 1.29.0-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index bd1113c23..c186667f7 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.29.101-SNAPSHOT + 1.29.0-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 84198e3b9..4af351b44 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.29.101-SNAPSHOT + 1.29.0-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 08e877ab7..6aa291b43 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.29.101-SNAPSHOT + 1.29.0-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 55943a4d4..4452729ab 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.29.101-SNAPSHOT + 1.29.0-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index bd041a33b..b67b82066 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.29.101-SNAPSHOT + 1.29.0-SNAPSHOT rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 3a69be01b..043c92245 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.29.101-SNAPSHOT + 1.29.0-SNAPSHOT open-source-parent com.basistech diff --git a/release/pom.xml b/release/pom.xml index c0c730b16..dbcc76a2f 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.29.101-SNAPSHOT + 1.29.0-SNAPSHOT com.basistech.rosette rosette-api-release From 30acc8b7fa0d777e5de81ce0a00bfab037644814 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Fri, 19 Apr 2024 16:25:45 -0400 Subject: [PATCH 275/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.29.0 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index ab5b66dd2..6005d75b9 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.29.0-SNAPSHOT + 1.29.0 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index c186667f7..f15125fa8 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.29.0-SNAPSHOT + 1.29.0 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 4af351b44..be9b75793 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.29.0-SNAPSHOT + 1.29.0 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 6aa291b43..994f0bd09 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.29.0-SNAPSHOT + 1.29.0 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 4452729ab..6c00546f0 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.29.0-SNAPSHOT + 1.29.0 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index b67b82066..81389915d 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.29.0-SNAPSHOT + 1.29.0 rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 043c92245..ae4710e91 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.29.0-SNAPSHOT + 1.29.0 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.29.100 + rosette-api-java-binding-1.29.0 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index dbcc76a2f..5bdc57d79 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.29.0-SNAPSHOT + 1.29.0 com.basistech.rosette rosette-api-release From bb3410bfc705a6e8494b3f7ecf92bf73d06c7ab8 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Fri, 19 Apr 2024 16:25:46 -0400 Subject: [PATCH 276/415] [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 6005d75b9..726b75045 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.29.0 + 1.29.1-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index f15125fa8..bc207b87f 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.29.0 + 1.29.1-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index be9b75793..768649e9d 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.29.0 + 1.29.1-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 994f0bd09..6f2de229a 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.29.0 + 1.29.1-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 6c00546f0..62016af29 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.29.0 + 1.29.1-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 81389915d..85e349933 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.29.0 + 1.29.1-SNAPSHOT rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index ae4710e91..361588748 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.29.0 + 1.29.1-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.29.0 + rosette-api-java-binding-1.29.100 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 5bdc57d79..169dca79d 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.29.0 + 1.29.1-SNAPSHOT com.basistech.rosette rosette-api-release From 204f5a90cbd99b8afa6da12aac18bd7c2e0d7c72 Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Mon, 22 Apr 2024 10:32:27 -0400 Subject: [PATCH 277/415] Added RecordFieldType class to reference the name, date, and address final Strings --- .../examples/RecordSimilarityExample.java | 12 ++++----- ...RecordSimilarityDeserializerUtilities.java | 11 +++----- .../apimodel/RecordSimilarityRequestTest.java | 12 ++++----- .../RecordSimilarityResponseTest.java | 6 ++--- .../records/RecordFieldType.java | 25 +++++++++++++++++++ 5 files changed, 42 insertions(+), 24 deletions(-) create mode 100644 model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/RecordFieldType.java diff --git a/examples/src/main/java/com/basistech/rosette/examples/RecordSimilarityExample.java b/examples/src/main/java/com/basistech/rosette/examples/RecordSimilarityExample.java index 517334dd7..2e2f1fb50 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/RecordSimilarityExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/RecordSimilarityExample.java @@ -24,6 +24,7 @@ import com.basistech.rosette.apimodel.recordsimilarity.records.AddressField; import com.basistech.rosette.apimodel.recordsimilarity.records.DateField; import com.basistech.rosette.apimodel.recordsimilarity.records.NameField; +import com.basistech.rosette.apimodel.recordsimilarity.records.RecordFieldType; import com.basistech.util.ISO15924; import com.basistech.util.LanguageCode; @@ -38,9 +39,6 @@ */ @SuppressWarnings({"java:S1166", "java:S2221", "java:S106"}) public class RecordSimilarityExample extends ExampleBase { - private static final String DATE = "rni_date"; - private static final String ADDRESS = "rni_address"; - private static final String NAME = "rni_name"; public static void main(String[] args) { try { new RecordSimilarityExample().run(); @@ -58,10 +56,10 @@ private void run() throws IOException { String dobHyphen = "1993-04-16"; RecordSimilarityRequest request = RecordSimilarityRequest.builder() .fields(Map.of( - primaryNameField, RecordSimilarityFieldInfo.builder().type(NAME).weight(0.5).build(), - dobField, RecordSimilarityFieldInfo.builder().type(DATE).weight(0.2).build(), - dob2Field, RecordSimilarityFieldInfo.builder().type(DATE).weight(0.1).build(), - addrField, RecordSimilarityFieldInfo.builder().type(ADDRESS).weight(0.5).build())) + primaryNameField, RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_NAME).weight(0.5).build(), + dobField, RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_DATE).weight(0.2).build(), + dob2Field, RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_DATE).weight(0.1).build(), + addrField, RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_ADDRESS).weight(0.5).build())) .properties(RecordSimilarityProperties.builder().threshold(0.7).includeExplainInfo(true).build()) .records(RecordSimilarityRecords.builder() .left( diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java index 329b8e82d..14cb642cb 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java @@ -34,14 +34,11 @@ import com.basistech.rosette.apimodel.recordsimilarity.records.AddressField; import com.basistech.rosette.apimodel.recordsimilarity.records.DateField; import com.basistech.rosette.apimodel.recordsimilarity.records.NameField; +import com.basistech.rosette.apimodel.recordsimilarity.records.RecordFieldType; import com.basistech.rosette.apimodel.recordsimilarity.records.RecordSimilarityField; import com.basistech.rosette.apimodel.recordsimilarity.records.UnknownField; final class RecordSimilarityDeserializerUtilities { - private static final String DATE = "rni_date"; - private static final String NAME = "rni_name"; - private static final String ADDRESS = "rni_address"; - private RecordSimilarityDeserializerUtilities() { } @@ -93,13 +90,13 @@ static Map parseRecord( throw new IllegalArgumentException("Unspecified field type for: " + fieldName); } switch (fieldInfo.getType()) { - case DATE: + case RecordFieldType.RNI_DATE: fieldData = fieldValue.traverse(jsonParser.getCodec()).readValueAs(DateField.class); break; - case NAME: + case RecordFieldType.RNI_NAME: fieldData = fieldValue.traverse(jsonParser.getCodec()).readValueAs(NameField.class); break; - case ADDRESS: + case RecordFieldType.RNI_ADDRESS: fieldData = fieldValue.traverse(jsonParser.getCodec()).readValueAs(AddressField.class); break; default: diff --git a/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java b/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java index 1e525755a..61f114df6 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java @@ -24,6 +24,7 @@ import com.basistech.rosette.apimodel.recordsimilarity.records.AddressField; import com.basistech.rosette.apimodel.recordsimilarity.records.DateField; import com.basistech.rosette.apimodel.recordsimilarity.records.NameField; +import com.basistech.rosette.apimodel.recordsimilarity.records.RecordFieldType; import com.basistech.util.ISO15924; import com.basistech.util.LanguageCode; import com.fasterxml.jackson.core.JsonProcessingException; @@ -38,19 +39,16 @@ import static org.junit.jupiter.api.Assertions.assertEquals; class RecordSimilarityRequestTest { - private static final String DATE = "rni_date"; - private static final String NAME = "rni_name"; - private static final String ADDRESS = "rni_address"; private static final ObjectMapper MAPPER = ApiModelMixinModule.setupObjectMapper(new ObjectMapper()); private static final String EXPECTED_JSON = "{\"fields\":{\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"addr\":{\"type\":\"rni_address\",\"weight\":0.5}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true},\"records\":{\"left\":[{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"dob\":\"1993-04-16\",\"addr\":\"123 Roadlane Ave\"},{\"primaryName\":{\"text\":\"Evan R\"},\"dob\":{\"date\":\"1993-04-16\"}}],\"right\":[{\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"},\"dob\":{\"date\":\"1993-04-16\"}},{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":\"Ivan R\",\"dob\":{\"date\":\"1993-04-16\"},\"addr\":{\"address\":\"123 Roadlane Ave\"}}]}}"; private static final RecordSimilarityRequest EXPECTED_REQUEST = RecordSimilarityRequest.builder() .fields(Map.of( - "primaryName", RecordSimilarityFieldInfo.builder().type(NAME).weight(0.5).build(), - "dob", RecordSimilarityFieldInfo.builder().type(DATE).weight(0.2).build(), - "dob2", RecordSimilarityFieldInfo.builder().type(DATE).weight(0.1).build(), - "addr", RecordSimilarityFieldInfo.builder().type(ADDRESS).weight(0.5).build())) + "primaryName", RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_NAME).weight(0.5).build(), + "dob", RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_DATE).weight(0.2).build(), + "dob2", RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_DATE).weight(0.1).build(), + "addr", RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_DATE).weight(0.5).build())) .properties(RecordSimilarityProperties.builder().threshold(0.7).includeExplainInfo(true).build()) .records(RecordSimilarityRecords.builder() .left( diff --git a/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java b/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java index efc052c1c..c0b3ddde2 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java @@ -48,15 +48,15 @@ public class RecordSimilarityResponseTest { try { temp = RecordSimilarityResponse.builder() .fields(Map.of("primaryName", RecordSimilarityFieldInfo.builder() - .type(RecordFieldType.NAME) + .type(RecordFieldType.RNI_NAME) .weight(0.5) .build(), "dob", RecordSimilarityFieldInfo.builder() - .type(RecordFieldType.DATE) + .type(RecordFieldType.RNI_DATE) .weight(0.2) .build(), "addr", RecordSimilarityFieldInfo.builder() - .type(RecordFieldType.ADDRESS) + .type(RecordFieldType.RNI_ADDRESS) .weight(0.3) .build())) .results(List.of(RecordSimilarityResult.builder() diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/RecordFieldType.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/RecordFieldType.java new file mode 100644 index 000000000..b3835b7b3 --- /dev/null +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/RecordFieldType.java @@ -0,0 +1,25 @@ +/* + * Copyright 2024 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.basistech.rosette.apimodel.recordsimilarity.records; + +public final class RecordFieldType { + public static final String RNI_NAME = "rni_name"; + public static final String RNI_DATE = "rni_date"; + public static final String RNI_ADDRESS = "rni_address"; + + private RecordFieldType() { } +} From a19354bebb6c63c8d89644403581b4192a8e18e9 Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Mon, 22 Apr 2024 10:54:52 -0400 Subject: [PATCH 278/415] updated test to include ordering so it passes every time --- .../apimodel/RecordSimilarityRequestTest.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java b/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java index 61f114df6..5af3fd391 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java @@ -29,8 +29,9 @@ import com.basistech.util.LanguageCode; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; import org.junit.jupiter.api.Test; import java.util.List; @@ -42,13 +43,13 @@ class RecordSimilarityRequestTest { private static final ObjectMapper MAPPER = ApiModelMixinModule.setupObjectMapper(new ObjectMapper()); - private static final String EXPECTED_JSON = "{\"fields\":{\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"addr\":{\"type\":\"rni_address\",\"weight\":0.5}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true},\"records\":{\"left\":[{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"dob\":\"1993-04-16\",\"addr\":\"123 Roadlane Ave\"},{\"primaryName\":{\"text\":\"Evan R\"},\"dob\":{\"date\":\"1993-04-16\"}}],\"right\":[{\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"},\"dob\":{\"date\":\"1993-04-16\"}},{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":\"Ivan R\",\"dob\":{\"date\":\"1993-04-16\"},\"addr\":{\"address\":\"123 Roadlane Ave\"}}]}}"; + private static final String EXPECTED_JSON = "{\"fields\":{\"addr\":{\"type\":\"rni_address\",\"weight\":0.5},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5}},\"properties\":{\"includeExplainInfo\":true,\"threshold\":0.7},\"records\":{\"left\":[{\"addr\":\"123 Roadlane Ave\",\"dob\":\"1993-04-16\",\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},{\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"text\":\"Evan R\"}}],\"right\":[{\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"language\":\"eng\",\"text\":\"Seth R\"}},{\"addr\":{\"address\":\"123 Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":\"Ivan R\"}]}}"; private static final RecordSimilarityRequest EXPECTED_REQUEST = RecordSimilarityRequest.builder() .fields(Map.of( "primaryName", RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_NAME).weight(0.5).build(), "dob", RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_DATE).weight(0.2).build(), "dob2", RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_DATE).weight(0.1).build(), - "addr", RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_DATE).weight(0.5).build())) + "addr", RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_ADDRESS).weight(0.5).build())) .properties(RecordSimilarityProperties.builder().threshold(0.7).includeExplainInfo(true).build()) .records(RecordSimilarityRecords.builder() .left( @@ -87,15 +88,18 @@ class RecordSimilarityRequestTest { @Test void testDeserialization() throws JsonProcessingException { + MAPPER.enable(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY); + MAPPER.enable(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS); final RecordSimilarityRequest request = MAPPER.readValue(EXPECTED_JSON, new TypeReference<>() { }); assertEquals(EXPECTED_REQUEST, request); } @Test void testSerialization() throws JsonProcessingException { - final JsonNode expectedJson = MAPPER.readTree(EXPECTED_JSON); - final JsonNode actualJson = MAPPER.valueToTree(EXPECTED_REQUEST); - assertEquals(expectedJson, actualJson); + // For testing, force ordering + MAPPER.enable(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY); + MAPPER.enable(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS); + assertEquals(EXPECTED_JSON, MAPPER.writeValueAsString(EXPECTED_REQUEST)); } } From a1095a452af5d01e275549e7b42dbaf53d2f5a0e Mon Sep 17 00:00:00 2001 From: Jacob Squatrito <132851399+mrwrench24@users.noreply.github.com> Date: Mon, 22 Apr 2024 12:15:14 -0400 Subject: [PATCH 279/415] RLPNC-7496: Updated boolean to Boolean in RecordSimilarityProperties --- .../apimodel/recordsimilarity/RecordSimilarityProperties.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityProperties.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityProperties.java index c2668e213..c80f984cd 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityProperties.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityProperties.java @@ -32,7 +32,7 @@ public class RecordSimilarityProperties { @Builder.Default @NotNull @Valid Double threshold = 0.0; - @NotNull @Valid boolean includeExplainInfo; + @NotNull @Valid Boolean includeExplainInfo; @Valid Map parameters; @Valid String parameterUniverse; } From dfdad3a5064d6b9f16146af77260ce8502146e6e Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Mon, 22 Apr 2024 16:44:29 -0400 Subject: [PATCH 280/415] added method to parse records for a response object without the field mapping, removed fields from response object --- ...RecordSimilarityDeserializerUtilities.java | 26 ++++++++++++------- .../RecordSimilarityResponseDeserializer.java | 17 +++++------- 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java index 14cb642cb..9ed83043a 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java @@ -43,22 +43,18 @@ final class RecordSimilarityDeserializerUtilities { private RecordSimilarityDeserializerUtilities() { } - public static RecordSimilarityResult parseResult( - JsonNode node, - JsonParser jsonParser, - @Valid Map fields - ) throws IOException { + public static RecordSimilarityResult parseResult(JsonNode node, JsonParser jsonParser) throws IOException { final Double score = node.get("score") != null ? node.get("score").traverse(jsonParser.getCodec()).readValueAs(Double.class) : null; final RecordSimilarityExplainInfo explainInfo = node.get("explainInfo") != null ? node.get("explainInfo").traverse(jsonParser.getCodec()).readValueAs(RecordSimilarityExplainInfo.class) : null; - final Map left = node.get("left") != null && fields != null - ? parseRecord(node.get("left"), jsonParser, fields) + final Map left = node.get("left") != null + ? parseRecordForResponse(node.get("left"), jsonParser) : null; - final Map right = node.get("right") != null && fields != null - ? parseRecord(node.get("right"), jsonParser, fields) + final Map right = node.get("right") != null + ? parseRecordForResponse(node.get("right"), jsonParser) : null; final String error = Optional.ofNullable(node.get("error")).map(JsonNode::asText).orElse(null); return RecordSimilarityResult.builder() @@ -70,6 +66,18 @@ public static RecordSimilarityResult parseResult( .build(); } + static Map parseRecordForResponse(JsonNode jsonNode, JsonParser jsonParser) throws IOException { + final Iterator> recordsIterator = jsonNode.fields(); + final Map recordMap = new HashMap<>(); + while (recordsIterator.hasNext()) { + final Map.Entry recordEntry = recordsIterator.next(); + final String fieldName = recordEntry.getKey(); + RecordSimilarityField rsf = jsonNode.get(fieldName).traverse(jsonParser.getCodec()).readValueAs(UnknownField.class); + recordMap.put(fieldName, rsf); + } + return recordMap; + } + static Map parseRecord( JsonNode jsonNode, JsonParser jsonParser, diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityResponseDeserializer.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityResponseDeserializer.java index 781157a83..f1090dc7e 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityResponseDeserializer.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityResponseDeserializer.java @@ -16,11 +16,11 @@ package com.basistech.rosette.apimodel.jackson.recordsimilaritydeserializers; -import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityFieldInfo; +//import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityFieldInfo; import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityResponse; import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityResult; import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.type.TypeReference; +//import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; @@ -28,13 +28,13 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; -import java.util.Map; +//import java.util.Map; import java.util.Optional; public class RecordSimilarityResponseDeserializer extends StdDeserializer { - private static final TypeReference> FIELDS_TYPE_REFERENCE = new TypeReference<>() { - }; +// private static final TypeReference> FIELDS_TYPE_REFERENCE = new TypeReference<>() { +// }; public RecordSimilarityResponseDeserializer() { super(RecordSimilarityResponse.class); @@ -44,21 +44,16 @@ public RecordSimilarityResponseDeserializer() { public RecordSimilarityResponse deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException { final JsonNode node = jsonParser.getCodec().readTree(jsonParser); - JsonNode fieldsNode = node.get("fields"); - - Map fields = fieldsNode != null ? node.get("fields").traverse(jsonParser.getCodec()).readValueAs(FIELDS_TYPE_REFERENCE) : null; String errorMessage = Optional.ofNullable(node.get("errorMessage")).map(JsonNode::asText).orElse(null); JsonNode resultsNode = node.get("results"); List results = new ArrayList<>(); if (resultsNode != null) { for (JsonNode resultNode : resultsNode) { - results.add(RecordSimilarityDeserializerUtilities.parseResult(resultNode, jsonParser, fields)); + results.add(RecordSimilarityDeserializerUtilities.parseResult(resultNode, jsonParser)); } } - return RecordSimilarityResponse.builder() - .fields(fields) .results(results) .errorMessage(errorMessage) .build(); From 5c88a04372969f082bde9a9f6c6759a989fb280c Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Mon, 22 Apr 2024 16:44:55 -0400 Subject: [PATCH 281/415] removed field mapping from response object --- .../apimodel/recordsimilarity/RecordSimilarityResponse.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponse.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponse.java index f840527a5..04b90de26 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponse.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponse.java @@ -17,7 +17,6 @@ package com.basistech.rosette.apimodel.recordsimilarity; import java.util.List; -import java.util.Map; import com.fasterxml.jackson.annotation.JsonInclude; import lombok.Builder; @@ -34,7 +33,6 @@ @Builder @JsonInclude(JsonInclude.Include.NON_NULL) public class RecordSimilarityResponse extends Response { - @Valid Map fields; /** * @return list of record match results */ From aabf54d0a6ce618bbde4b7b17e35c93b2b716a20 Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Mon, 22 Apr 2024 16:56:54 -0400 Subject: [PATCH 282/415] comment out fields in test --- .../RecordSimilarityResponseTest.java | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java b/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java index c0b3ddde2..009b5c2e2 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java @@ -47,18 +47,18 @@ public class RecordSimilarityResponseTest { RecordSimilarityResponse temp; try { temp = RecordSimilarityResponse.builder() - .fields(Map.of("primaryName", RecordSimilarityFieldInfo.builder() - .type(RecordFieldType.RNI_NAME) - .weight(0.5) - .build(), - "dob", RecordSimilarityFieldInfo.builder() - .type(RecordFieldType.RNI_DATE) - .weight(0.2) - .build(), - "addr", RecordSimilarityFieldInfo.builder() - .type(RecordFieldType.RNI_ADDRESS) - .weight(0.3) - .build())) +// .fields(Map.of("primaryName", RecordSimilarityFieldInfo.builder() +// .type(RecordFieldType.RNI_NAME) +// .weight(0.5) +// .build(), +// "dob", RecordSimilarityFieldInfo.builder() +// .type(RecordFieldType.RNI_DATE) +// .weight(0.2) +// .build(), +// "addr", RecordSimilarityFieldInfo.builder() +// .type(RecordFieldType.RNI_ADDRESS) +// .weight(0.3) +// .build())) .results(List.of(RecordSimilarityResult.builder() .score(0.87) .left(Map.of("primaryName", NameField.FieldedName.builder() From 2e583139a043026127eb86f6039ab65881002efd Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Mon, 22 Apr 2024 17:01:37 -0400 Subject: [PATCH 283/415] comment out test --- .../RecordSimilarityResponseTest.java | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java b/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java index 009b5c2e2..0e26d9875 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java @@ -39,7 +39,9 @@ public class RecordSimilarityResponseTest { private static final ObjectMapper MAPPER = ApiModelMixinModule.setupObjectMapper(new ObjectMapper()); - private static final String EXPECTED_JSON = "{\"fields\":{\"addr\":{\"type\":\"rni_address\",\"weight\":0.3},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5}},\"results\":[{\"explainInfo\":{\"leftOnlyFields\":[\"addr\"],\"scoredFields\":{\"dob\":{\"calculatedWeight\":0.2857142857142857,\"finalScore\":0.74,\"rawScore\":0.8,\"weight\":0.5},\"primaryName\":{\"calculatedWeight\":0.7142857142857143,\"details\":\"any details\",\"finalScore\":0.85,\"rawScore\":0.99,\"weight\":0.5}}},\"left\":{\"addr\":{\"address\":\"123 Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}},\"score\":0.87},{\"error\":\"Field foo not found in field mapping\",\"left\":{\"addr\":{\"address\":\"123 Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}}}]}"; +// private static final String EXPECTED_JSON = "{\"fields\":{\"addr\":{\"type\":\"rni_address\",\"weight\":0.3},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5}},\"results\":[{\"explainInfo\":{\"leftOnlyFields\":[\"addr\"],\"scoredFields\":{\"dob\":{\"calculatedWeight\":0.2857142857142857,\"finalScore\":0.74,\"rawScore\":0.8,\"weight\":0.5},\"primaryName\":{\"calculatedWeight\":0.7142857142857143,\"details\":\"any details\",\"finalScore\":0.85,\"rawScore\":0.99,\"weight\":0.5}}},\"left\":{\"addr\":{\"address\":\"123 Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}},\"score\":0.87},{\"error\":\"Field foo not found in field mapping\",\"left\":{\"addr\":{\"address\":\"123 Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}}}]}"; + + private static final String EXPECTED_JSON = "{\"results\":[{\"explainInfo\":{\"leftOnlyFields\":[\"addr\"],\"scoredFields\":{\"dob\":{\"calculatedWeight\":0.2857142857142857,\"finalScore\":0.74,\"rawScore\":0.8,\"weight\":0.5},\"primaryName\":{\"calculatedWeight\":0.7142857142857143,\"details\":\"any details\",\"finalScore\":0.85,\"rawScore\":0.99,\"weight\":0.5}}},\"left\":{\"addr\":{\"address\":\"123 Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}},\"score\":0.87},{\"error\":\"Field foo not found in field mapping\",\"left\":{\"addr\":{\"address\":\"123 Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}}}]}"; private static final RecordSimilarityResponse EXPECTED_RESPONSE; @@ -128,11 +130,14 @@ public class RecordSimilarityResponseTest { EXPECTED_RESPONSE = temp; } - @Test - public void testDeserialization() throws JsonProcessingException { - final RecordSimilarityResponse response = MAPPER.readValue(EXPECTED_JSON, RecordSimilarityResponse.class); - assertEquals(EXPECTED_RESPONSE, response); - } +// @Test +// public void testDeserialization() throws JsonProcessingException { +// MAPPER.enable(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY); +// MAPPER.enable(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS); +// final RecordSimilarityResponse response = MAPPER.readValue(EXPECTED_JSON, RecordSimilarityResponse.class); +// System.out.println(response.getResults().get(0).toString()); +// assertEquals(EXPECTED_RESPONSE, response); +// } @Test public void testSerialization() throws JsonProcessingException { From 32bd2022858f59c25cbd657fb5f6f903bc9ebb37 Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Tue, 23 Apr 2024 09:16:09 -0400 Subject: [PATCH 284/415] remove field mapping from test response, update deserialization test --- .../RecordSimilarityResponseTest.java | 40 ++++++++----------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java b/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java index 0e26d9875..61b23aa1e 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java @@ -20,7 +20,7 @@ import com.basistech.rosette.apimodel.recordsimilarity.records.AddressField; import com.basistech.rosette.apimodel.recordsimilarity.records.DateField; import com.basistech.rosette.apimodel.recordsimilarity.records.NameField; -import com.basistech.rosette.apimodel.recordsimilarity.records.RecordFieldType; +import com.basistech.rosette.apimodel.recordsimilarity.records.UnknownField; import com.basistech.util.ISO15924; import com.basistech.util.LanguageCode; import com.basistech.util.NEConstants; @@ -39,8 +39,6 @@ public class RecordSimilarityResponseTest { private static final ObjectMapper MAPPER = ApiModelMixinModule.setupObjectMapper(new ObjectMapper()); -// private static final String EXPECTED_JSON = "{\"fields\":{\"addr\":{\"type\":\"rni_address\",\"weight\":0.3},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5}},\"results\":[{\"explainInfo\":{\"leftOnlyFields\":[\"addr\"],\"scoredFields\":{\"dob\":{\"calculatedWeight\":0.2857142857142857,\"finalScore\":0.74,\"rawScore\":0.8,\"weight\":0.5},\"primaryName\":{\"calculatedWeight\":0.7142857142857143,\"details\":\"any details\",\"finalScore\":0.85,\"rawScore\":0.99,\"weight\":0.5}}},\"left\":{\"addr\":{\"address\":\"123 Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}},\"score\":0.87},{\"error\":\"Field foo not found in field mapping\",\"left\":{\"addr\":{\"address\":\"123 Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}}}]}"; - private static final String EXPECTED_JSON = "{\"results\":[{\"explainInfo\":{\"leftOnlyFields\":[\"addr\"],\"scoredFields\":{\"dob\":{\"calculatedWeight\":0.2857142857142857,\"finalScore\":0.74,\"rawScore\":0.8,\"weight\":0.5},\"primaryName\":{\"calculatedWeight\":0.7142857142857143,\"details\":\"any details\",\"finalScore\":0.85,\"rawScore\":0.99,\"weight\":0.5}}},\"left\":{\"addr\":{\"address\":\"123 Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}},\"score\":0.87},{\"error\":\"Field foo not found in field mapping\",\"left\":{\"addr\":{\"address\":\"123 Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}}}]}"; private static final RecordSimilarityResponse EXPECTED_RESPONSE; @@ -49,18 +47,6 @@ public class RecordSimilarityResponseTest { RecordSimilarityResponse temp; try { temp = RecordSimilarityResponse.builder() -// .fields(Map.of("primaryName", RecordSimilarityFieldInfo.builder() -// .type(RecordFieldType.RNI_NAME) -// .weight(0.5) -// .build(), -// "dob", RecordSimilarityFieldInfo.builder() -// .type(RecordFieldType.RNI_DATE) -// .weight(0.2) -// .build(), -// "addr", RecordSimilarityFieldInfo.builder() -// .type(RecordFieldType.RNI_ADDRESS) -// .weight(0.3) -// .build())) .results(List.of(RecordSimilarityResult.builder() .score(0.87) .left(Map.of("primaryName", NameField.FieldedName.builder() @@ -130,14 +116,22 @@ public class RecordSimilarityResponseTest { EXPECTED_RESPONSE = temp; } -// @Test -// public void testDeserialization() throws JsonProcessingException { -// MAPPER.enable(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY); -// MAPPER.enable(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS); -// final RecordSimilarityResponse response = MAPPER.readValue(EXPECTED_JSON, RecordSimilarityResponse.class); -// System.out.println(response.getResults().get(0).toString()); -// assertEquals(EXPECTED_RESPONSE, response); -// } + @Test + public void testDeserialization() throws JsonProcessingException { + MAPPER.enable(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY); + MAPPER.enable(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS); + final RecordSimilarityResponse response = MAPPER.readValue(EXPECTED_JSON, RecordSimilarityResponse.class); + for (int i = 0; i < response.getResults().size(); i++) { + for (String fieldName : response.getResults().get(i).getLeft().keySet()) { + assertEquals(MAPPER.writeValueAsString(response.getResults().get(i).getLeft().get(fieldName)), + MAPPER.writeValueAsString(EXPECTED_RESPONSE.getResults().get(i).getLeft().get(fieldName))); + } + for (String fieldName : response.getResults().get(i).getRight().keySet()) { + assertEquals(MAPPER.writeValueAsString(response.getResults().get(i).getRight().get(fieldName)), + MAPPER.writeValueAsString(EXPECTED_RESPONSE.getResults().get(i).getRight().get(fieldName))); + } + } + } @Test public void testSerialization() throws JsonProcessingException { From 848b47997a24c5725a20c6f5516cd8fcffcef7ee Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Tue, 23 Apr 2024 10:19:30 -0400 Subject: [PATCH 285/415] override equals method for UnknownField --- .../records/UnknownField.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java index 80631718d..c5c27f3f1 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java @@ -25,7 +25,9 @@ import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; public class UnknownField implements RecordSimilarityField { @JsonFormat(shape = JsonFormat.Shape.OBJECT) @@ -57,4 +59,21 @@ public Object getData() { // if given input is not an Object node, it's a String so return it return this.data; } + + @Override + public boolean equals(Object o) { + try { + if (o instanceof UnknownField) { + UnknownField other = (UnknownField) o; + ObjectMapper mapper = new ObjectMapper(); + mapper.enable(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY); + mapper.enable(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS); + return (mapper.writeValueAsString(this.data).equals(mapper.writeValueAsString(other.data))); + } else { + return false; + } + } catch (JsonProcessingException ex) { + return false; + } + } } From 864f8e92988c0088d7bd19c1408cfd1afd022b92 Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Tue, 23 Apr 2024 11:20:25 -0400 Subject: [PATCH 286/415] update failing test --- .../basistech/rosette/api/RosetteAPITest.java | 62 ++++++++++++++----- ...rni-1-record-similarity-missing-field.json | 37 ++++++++++- 2 files changed, 80 insertions(+), 19 deletions(-) diff --git a/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java b/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java index 7eee4689e..f760f6127 100644 --- a/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java +++ b/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java @@ -233,22 +233,52 @@ void testMatchRecord(String testFilename, String responseStr, int statusCode) th } } -// private static Stream testMatchRecordMissingFieldParameters() throws IOException { -// return getTestFiles("-record-similarity-missing-field.json"); -// } - -// @ParameterizedTest(name = "testFilename: {0}; statusCode: {2}") -// @MethodSource("testMatchRecordMissingFieldParameters") -// void testMatchRecordMissingField(String testFilename, String responseStr, int statusCode) throws IOException { -// setStatusCodeResponse(responseStr, statusCode); -// -// try { -// readValueRecordMatcher(testFilename); -// fail("Did not throw exception for a field type in request but not in mapping"); -// } catch (IllegalArgumentException e) { -// assertEquals("Unsupported field name: primaryName not found in field mapping", e.getMessage()); -// } -// } + private static Stream testMatchRecordMissingFieldParameters() throws IOException { + return getTestFiles("-record-similarity-missing-field.json"); + } + + @ParameterizedTest(name = "testFilename: {0}; statusCode: {2}") + @MethodSource("testMatchRecordMissingFieldParameters") + void testMatchRecordMissingField(String testFilename, String responseStr, int statusCode) throws IOException { + setStatusCodeResponse(responseStr, statusCode); + readValueRecordMatcher(testFilename); + assertEquals("{\n" + + " \"results\": [\n" + + " {\n" + + " \"score\": 0.0,\n" + + " \"left\": {\n" + + " \"dob2\": \"1993/04/16\",\n" + + " \"dob\": \"1993-04-16\",\n" + + " \"primaryName\": {\n" + + " \"data\": \"Ethan R\",\n" + + " \"language\": \"eng\",\n" + + " \"entityType\": \"PERSON\"\n" + + " },\n" + + " \"addr\": \"123 Roadlane Ave\"\n" + + " },\n" + + " \"right\": {\n" + + " \"dob\": \"1993-04-16\",\n" + + " \"primaryName\": \"Seth R\"\n" + + " },\n" + + " \"error\": \"Field 'primaryName' not found in field mapping\"\n" + + " },\n" + + " {\n" + + " \"score\": 0.0,\n" + + " \"left\": {\n" + + " \"dob\": \"1993-04-16\",\n" + + " \"primaryName\": \"Evan R\"\n" + + " },\n" + + " \"right\": {\n" + + " \"dob2\": \"1993/04/16\",\n" + + " \"dob\": \"1993-04-16\",\n" + + " \"primaryName\": \"Ivan R\",\n" + + " \"addr\": \"123 Roadlane Ave\"\n" + + " },\n" + + " \"error\": \"Field 'primaryName' not found in field mapping\"\n" + + " }\n" + + " ]\n" + + "}", responseStr); + } private static Stream testMatchRecordNullFieldParameters() throws IOException { return getTestFiles("-record-similarity-null-field.json"); diff --git a/api/src/test/mock-data/response/rni-1-record-similarity-missing-field.json b/api/src/test/mock-data/response/rni-1-record-similarity-missing-field.json index 8b55dfcc5..1518845c2 100644 --- a/api/src/test/mock-data/response/rni-1-record-similarity-missing-field.json +++ b/api/src/test/mock-data/response/rni-1-record-similarity-missing-field.json @@ -1,5 +1,36 @@ { - "code": "badRequestFormat", - "message": "Unsupported field name: primaryName not found in field mapping", - "stack": null + "results": [ + { + "score": 0.0, + "left": { + "dob2": "1993/04/16", + "dob": "1993-04-16", + "primaryName": { + "data": "Ethan R", + "language": "eng", + "entityType": "PERSON" + }, + "addr": "123 Roadlane Ave" + }, + "right": { + "dob": "1993-04-16", + "primaryName": "Seth R" + }, + "error": "Field 'primaryName' not found in field mapping" + }, + { + "score": 0.0, + "left": { + "dob": "1993-04-16", + "primaryName": "Evan R" + }, + "right": { + "dob2": "1993/04/16", + "dob": "1993-04-16", + "primaryName": "Ivan R", + "addr": "123 Roadlane Ave" + }, + "error": "Field 'primaryName' not found in field mapping" + } + ] } \ No newline at end of file From 125d6c63ab2c11cd6f84b70a6a7032e9849f1481 Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Tue, 23 Apr 2024 11:23:51 -0400 Subject: [PATCH 287/415] return empty string if UnknownField's data is null --- .../records/UnknownField.java | 34 +++++++++++-------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java index 80631718d..c7e37d0b4 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java @@ -39,22 +39,26 @@ public UnknownField(JsonNode data) { //There's probably a better way to do this @JsonValue public Object getData() { - if (data != null && data.isObject()) { - Iterator> fields = data.fields(); - Map map = new LinkedHashMap<>(); - while (fields.hasNext()) { - Map.Entry fieldEntry = fields.next(); - map.put(fieldEntry.getKey(), fieldEntry.getValue()); - } - try { - ObjectMapper mapper = new ObjectMapper(); - String jsonString = mapper.writeValueAsString(map); - return mapper.readTree(jsonString); - } catch (JsonProcessingException e) { - return this.data; + if (data == null) { + return ""; + } else { + if (data.isObject()) { + Iterator> fields = data.fields(); + Map map = new LinkedHashMap<>(); + while (fields.hasNext()) { + Map.Entry fieldEntry = fields.next(); + map.put(fieldEntry.getKey(), fieldEntry.getValue()); + } + try { + ObjectMapper mapper = new ObjectMapper(); + String jsonString = mapper.writeValueAsString(map); + return mapper.readTree(jsonString); + } catch (JsonProcessingException e) { + return this.data; + } } + // if given input is not an Object node, it's a String so return it + return this.data; } - // if given input is not an Object node, it's a String so return it - return this.data; } } From 77e0f142bdea29ae14790c8ef6d645dc50e40aac Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Tue, 23 Apr 2024 11:55:45 -0400 Subject: [PATCH 288/415] checkstyle and UnknownField implementation change --- .../basistech/rosette/api/RosetteAPITest.java | 46 ++++--------------- ...rni-1-record-similarity-missing-field.json | 37 +-------------- .../records/UnknownField.java | 11 ++--- 3 files changed, 15 insertions(+), 79 deletions(-) diff --git a/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java b/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java index f760f6127..e84c99067 100644 --- a/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java +++ b/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java @@ -241,43 +241,15 @@ private static Stream testMatchRecordMissingFieldParameters() throws @MethodSource("testMatchRecordMissingFieldParameters") void testMatchRecordMissingField(String testFilename, String responseStr, int statusCode) throws IOException { setStatusCodeResponse(responseStr, statusCode); - readValueRecordMatcher(testFilename); - assertEquals("{\n" + - " \"results\": [\n" + - " {\n" + - " \"score\": 0.0,\n" + - " \"left\": {\n" + - " \"dob2\": \"1993/04/16\",\n" + - " \"dob\": \"1993-04-16\",\n" + - " \"primaryName\": {\n" + - " \"data\": \"Ethan R\",\n" + - " \"language\": \"eng\",\n" + - " \"entityType\": \"PERSON\"\n" + - " },\n" + - " \"addr\": \"123 Roadlane Ave\"\n" + - " },\n" + - " \"right\": {\n" + - " \"dob\": \"1993-04-16\",\n" + - " \"primaryName\": \"Seth R\"\n" + - " },\n" + - " \"error\": \"Field 'primaryName' not found in field mapping\"\n" + - " },\n" + - " {\n" + - " \"score\": 0.0,\n" + - " \"left\": {\n" + - " \"dob\": \"1993-04-16\",\n" + - " \"primaryName\": \"Evan R\"\n" + - " },\n" + - " \"right\": {\n" + - " \"dob2\": \"1993/04/16\",\n" + - " \"dob\": \"1993-04-16\",\n" + - " \"primaryName\": \"Ivan R\",\n" + - " \"addr\": \"123 Roadlane Ave\"\n" + - " },\n" + - " \"error\": \"Field 'primaryName' not found in field mapping\"\n" + - " }\n" + - " ]\n" + - "}", responseStr); + readValueRecordMatcher(testFilename); + assertEquals("{\"results\":[{\"score\":0.0,\"left\":{\"dob2\":\"1993/04/16\"," + + "\"dob\":\"1993-04-16\",\"primaryName\":{\"data\":\"Ethan R\",\"language\":\"eng\"," + + "\"entityType\":\"PERSON\"},\"addr\":\"123 Roadlane Ave\"},\"right\":{\"dob\":\"1993-04-16\"," + + "\"primaryName\":\"Seth R\"},\"error\":\"Field 'primaryName' not found in field mapping\"}," + + "{\"score\":0.0,\"left\":{\"dob\":\"1993-04-16\",\"primaryName\":\"Evan R\"}," + + "\"right\":{\"dob2\":\"1993/04/16\",\"dob\":\"1993-04-16\",\"primaryName\":\"Ivan R\"," + + "\"addr\":\"123 Roadlane Ave\"},\"error\":\"Field 'primaryName' not found in field mapping\"}]}", + responseStr); } private static Stream testMatchRecordNullFieldParameters() throws IOException { diff --git a/api/src/test/mock-data/response/rni-1-record-similarity-missing-field.json b/api/src/test/mock-data/response/rni-1-record-similarity-missing-field.json index 1518845c2..a96a999bf 100644 --- a/api/src/test/mock-data/response/rni-1-record-similarity-missing-field.json +++ b/api/src/test/mock-data/response/rni-1-record-similarity-missing-field.json @@ -1,36 +1 @@ -{ - "results": [ - { - "score": 0.0, - "left": { - "dob2": "1993/04/16", - "dob": "1993-04-16", - "primaryName": { - "data": "Ethan R", - "language": "eng", - "entityType": "PERSON" - }, - "addr": "123 Roadlane Ave" - }, - "right": { - "dob": "1993-04-16", - "primaryName": "Seth R" - }, - "error": "Field 'primaryName' not found in field mapping" - }, - { - "score": 0.0, - "left": { - "dob": "1993-04-16", - "primaryName": "Evan R" - }, - "right": { - "dob2": "1993/04/16", - "dob": "1993-04-16", - "primaryName": "Ivan R", - "addr": "123 Roadlane Ave" - }, - "error": "Field 'primaryName' not found in field mapping" - } - ] -} \ No newline at end of file +{"results":[{"score":0.0,"left":{"dob2":"1993/04/16","dob":"1993-04-16","primaryName":{"data":"Ethan R","language":"eng","entityType":"PERSON"},"addr":"123 Roadlane Ave"},"right":{"dob":"1993-04-16","primaryName":"Seth R"},"error":"Field 'primaryName' not found in field mapping"},{"score":0.0,"left":{"dob":"1993-04-16","primaryName":"Evan R"},"right":{"dob2":"1993/04/16","dob":"1993-04-16","primaryName":"Ivan R","addr":"123 Roadlane Ave"},"error":"Field 'primaryName' not found in field mapping"}]} \ No newline at end of file diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java index c7e37d0b4..5d4415a26 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java @@ -16,8 +16,10 @@ package com.basistech.rosette.apimodel.recordsimilarity.records; +import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedHashMap; +import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonCreator; @@ -36,19 +38,16 @@ public UnknownField(JsonNode data) { this.data = data; } - //There's probably a better way to do this @JsonValue public Object getData() { if (data == null) { return ""; } else { if (data.isObject()) { - Iterator> fields = data.fields(); + List> list = new ArrayList<>(); + data.fields().forEachRemaining(list::add); Map map = new LinkedHashMap<>(); - while (fields.hasNext()) { - Map.Entry fieldEntry = fields.next(); - map.put(fieldEntry.getKey(), fieldEntry.getValue()); - } + list.stream().forEach(fieldEntry -> map.put(fieldEntry.getKey(), fieldEntry.getValue())); try { ObjectMapper mapper = new ObjectMapper(); String jsonString = mapper.writeValueAsString(map); From 2b197b776431da6bfc665c05e3a4baee2aaaea73 Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Tue, 23 Apr 2024 12:01:19 -0400 Subject: [PATCH 289/415] simplified method --- .../apimodel/recordsimilarity/records/UnknownField.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java index 5d4415a26..c8082d729 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java @@ -16,10 +16,7 @@ package com.basistech.rosette.apimodel.recordsimilarity.records; -import java.util.ArrayList; -import java.util.Iterator; import java.util.LinkedHashMap; -import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonCreator; @@ -44,10 +41,8 @@ public Object getData() { return ""; } else { if (data.isObject()) { - List> list = new ArrayList<>(); - data.fields().forEachRemaining(list::add); Map map = new LinkedHashMap<>(); - list.stream().forEach(fieldEntry -> map.put(fieldEntry.getKey(), fieldEntry.getValue())); + data.fields().forEachRemaining(fieldEntry -> map.put(fieldEntry.getKey(), fieldEntry.getValue())); try { ObjectMapper mapper = new ObjectMapper(); String jsonString = mapper.writeValueAsString(map); From 6ddba4b2f1e7baa5bf7018d5b58781f06e561b4f Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Tue, 23 Apr 2024 13:32:46 -0400 Subject: [PATCH 290/415] remove unused import, hashcode override --- .../RecordSimilarityResponseTest.java | 1 - .../recordsimilarity/records/UnknownField.java | 18 +++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java b/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java index 61b23aa1e..a7e2b8f8d 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java @@ -20,7 +20,6 @@ import com.basistech.rosette.apimodel.recordsimilarity.records.AddressField; import com.basistech.rosette.apimodel.recordsimilarity.records.DateField; import com.basistech.rosette.apimodel.recordsimilarity.records.NameField; -import com.basistech.rosette.apimodel.recordsimilarity.records.UnknownField; import com.basistech.util.ISO15924; import com.basistech.util.LanguageCode; import com.basistech.util.NEConstants; diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java index ca8f97b39..bda30b255 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java @@ -58,6 +58,8 @@ public Object getData() { } } + //compare the content of the String form of the UnknownFields' data + //enforce ordering @Override public boolean equals(Object o) { try { @@ -66,7 +68,7 @@ public boolean equals(Object o) { ObjectMapper mapper = new ObjectMapper(); mapper.enable(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY); mapper.enable(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS); - return (mapper.writeValueAsString(this.data).equals(mapper.writeValueAsString(other.data))); + return mapper.writeValueAsString(this.data).equals(mapper.writeValueAsString(other.data)); } else { return false; } @@ -74,4 +76,18 @@ public boolean equals(Object o) { return false; } } + + //hashcode based on String form + @Override + public int hashCode() { + try { + ObjectMapper mapper = new ObjectMapper(); + mapper.enable(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY); + mapper.enable(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS); + return 19 * mapper.writeValueAsString(this.data).hashCode(); + } catch (JsonProcessingException e) { + throw new RuntimeException(e); + } + } + } From 7b8e6f63ec7bfb35c79b2ff1a2ca06f5697282f5 Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Tue, 23 Apr 2024 15:48:38 -0400 Subject: [PATCH 291/415] simplify method and test --- .../RecordSimilarityDeserializerUtilities.java | 16 ++++++++-------- .../RecordSimilarityResponseTest.java | 11 +---------- 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java index 9ed83043a..fe4729a4d 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java @@ -66,15 +66,15 @@ public static RecordSimilarityResult parseResult(JsonNode node, JsonParser jsonP .build(); } - static Map parseRecordForResponse(JsonNode jsonNode, JsonParser jsonParser) throws IOException { - final Iterator> recordsIterator = jsonNode.fields(); + static Map parseRecordForResponse(JsonNode jsonNode, JsonParser jsonParser) { final Map recordMap = new HashMap<>(); - while (recordsIterator.hasNext()) { - final Map.Entry recordEntry = recordsIterator.next(); - final String fieldName = recordEntry.getKey(); - RecordSimilarityField rsf = jsonNode.get(fieldName).traverse(jsonParser.getCodec()).readValueAs(UnknownField.class); - recordMap.put(fieldName, rsf); - } + jsonNode.fields().forEachRemaining(entry -> { + try { + recordMap.put(entry.getKey(), entry.getValue().traverse(jsonParser.getCodec()).readValueAs(UnknownField.class)); + } catch (IOException e) { + throw new RuntimeException(e); + } + }); return recordMap; } diff --git a/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java b/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java index a7e2b8f8d..6c7a10a26 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java @@ -120,16 +120,7 @@ public void testDeserialization() throws JsonProcessingException { MAPPER.enable(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY); MAPPER.enable(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS); final RecordSimilarityResponse response = MAPPER.readValue(EXPECTED_JSON, RecordSimilarityResponse.class); - for (int i = 0; i < response.getResults().size(); i++) { - for (String fieldName : response.getResults().get(i).getLeft().keySet()) { - assertEquals(MAPPER.writeValueAsString(response.getResults().get(i).getLeft().get(fieldName)), - MAPPER.writeValueAsString(EXPECTED_RESPONSE.getResults().get(i).getLeft().get(fieldName))); - } - for (String fieldName : response.getResults().get(i).getRight().keySet()) { - assertEquals(MAPPER.writeValueAsString(response.getResults().get(i).getRight().get(fieldName)), - MAPPER.writeValueAsString(EXPECTED_RESPONSE.getResults().get(i).getRight().get(fieldName))); - } - } + assertEquals(MAPPER.writeValueAsString(response), MAPPER.writeValueAsString(EXPECTED_RESPONSE)); } @Test From d6b6220a62a277033e1d9cbb59e53d1fe7aa53b1 Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Wed, 24 Apr 2024 08:44:13 -0400 Subject: [PATCH 292/415] revert method logic --- .../RecordSimilarityDeserializerUtilities.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java index fe4729a4d..3910a79db 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java @@ -66,15 +66,15 @@ public static RecordSimilarityResult parseResult(JsonNode node, JsonParser jsonP .build(); } - static Map parseRecordForResponse(JsonNode jsonNode, JsonParser jsonParser) { + static Map parseRecordForResponse(JsonNode jsonNode, JsonParser jsonParser) throws IOException { final Map recordMap = new HashMap<>(); - jsonNode.fields().forEachRemaining(entry -> { - try { - recordMap.put(entry.getKey(), entry.getValue().traverse(jsonParser.getCodec()).readValueAs(UnknownField.class)); - } catch (IOException e) { - throw new RuntimeException(e); - } - }); + final Iterator> recordsIterator = jsonNode.fields(); + while (recordsIterator.hasNext()) { + final Map.Entry recordEntry = recordsIterator.next(); + final String fieldName = recordEntry.getKey(); + RecordSimilarityField rsf = jsonNode.get(fieldName).traverse(jsonParser.getCodec()).readValueAs(UnknownField.class); + recordMap.put(fieldName, rsf); + } return recordMap; } From 28d88909c2bbde764f814c01e2242aeea9fb1926 Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Wed, 24 Apr 2024 10:08:07 -0400 Subject: [PATCH 293/415] add getter annotation to RecordSimilarityProperties --- .../apimodel/recordsimilarity/RecordSimilarityProperties.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityProperties.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityProperties.java index 1f9076e54..73a380f3f 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityProperties.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityProperties.java @@ -19,12 +19,14 @@ import javax.validation.Valid; import javax.validation.constraints.NotNull; import lombok.Builder; +import lombok.Getter; import lombok.Value; import lombok.extern.jackson.Jacksonized; @Jacksonized @Builder @Value +@Getter public class RecordSimilarityProperties { @Builder.Default @NotNull @Valid Double threshold = 0.0; From 630fa8cb04295f4d328585a68e07a33a6f28307c Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Wed, 24 Apr 2024 10:21:25 -0400 Subject: [PATCH 294/415] remove commented out code, update method implementation --- .../RecordSimilarityDeserializerUtilities.java | 17 +++++++++-------- .../RecordSimilarityResponseDeserializer.java | 6 ------ 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java index 3910a79db..e1fdd8be8 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java @@ -66,15 +66,16 @@ public static RecordSimilarityResult parseResult(JsonNode node, JsonParser jsonP .build(); } - static Map parseRecordForResponse(JsonNode jsonNode, JsonParser jsonParser) throws IOException { + static Map parseRecordForResponse(JsonNode jsonNode, JsonParser jsonParser) { final Map recordMap = new HashMap<>(); - final Iterator> recordsIterator = jsonNode.fields(); - while (recordsIterator.hasNext()) { - final Map.Entry recordEntry = recordsIterator.next(); - final String fieldName = recordEntry.getKey(); - RecordSimilarityField rsf = jsonNode.get(fieldName).traverse(jsonParser.getCodec()).readValueAs(UnknownField.class); - recordMap.put(fieldName, rsf); - } + jsonNode.fields().forEachRemaining(entry -> { + String fieldName = entry.getKey(); + try { + recordMap.put(fieldName, jsonNode.get(fieldName).traverse(jsonParser.getCodec()).readValueAs(UnknownField.class)); + } catch (IOException e) { + throw new RuntimeException(e); + } + }); return recordMap; } diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityResponseDeserializer.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityResponseDeserializer.java index f1090dc7e..f8b2111b9 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityResponseDeserializer.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityResponseDeserializer.java @@ -16,11 +16,9 @@ package com.basistech.rosette.apimodel.jackson.recordsimilaritydeserializers; -//import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityFieldInfo; import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityResponse; import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityResult; import com.fasterxml.jackson.core.JsonParser; -//import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; @@ -28,14 +26,10 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; -//import java.util.Map; import java.util.Optional; public class RecordSimilarityResponseDeserializer extends StdDeserializer { -// private static final TypeReference> FIELDS_TYPE_REFERENCE = new TypeReference<>() { -// }; - public RecordSimilarityResponseDeserializer() { super(RecordSimilarityResponse.class); } From 385f6540dfd5e27bc806c82e2104a6f2a13e22ef Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Wed, 24 Apr 2024 10:23:13 -0400 Subject: [PATCH 295/415] don't need getter annotation since it's generate by value annotation --- .../apimodel/recordsimilarity/RecordSimilarityProperties.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityProperties.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityProperties.java index 73a380f3f..1f9076e54 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityProperties.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityProperties.java @@ -19,14 +19,12 @@ import javax.validation.Valid; import javax.validation.constraints.NotNull; import lombok.Builder; -import lombok.Getter; import lombok.Value; import lombok.extern.jackson.Jacksonized; @Jacksonized @Builder @Value -@Getter public class RecordSimilarityProperties { @Builder.Default @NotNull @Valid Double threshold = 0.0; From 0f19c84261e6372cb476c546a3368593f636ca6a Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Wed, 24 Apr 2024 13:46:39 -0400 Subject: [PATCH 296/415] style --- .../RecordSimilarityDeserializerUtilities.java | 3 ++- .../recordsimilarity/RecordSimilarityResponseTest.java | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java index e1fdd8be8..d744285ca 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java @@ -71,7 +71,8 @@ static Map parseRecordForResponse(JsonNode jsonNo jsonNode.fields().forEachRemaining(entry -> { String fieldName = entry.getKey(); try { - recordMap.put(fieldName, jsonNode.get(fieldName).traverse(jsonParser.getCodec()).readValueAs(UnknownField.class)); + recordMap.put(fieldName, jsonNode.get(fieldName).traverse(jsonParser.getCodec()) + .readValueAs(UnknownField.class)); } catch (IOException e) { throw new RuntimeException(e); } diff --git a/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java b/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java index 6c7a10a26..b8cdf6233 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java @@ -120,6 +120,8 @@ public void testDeserialization() throws JsonProcessingException { MAPPER.enable(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY); MAPPER.enable(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS); final RecordSimilarityResponse response = MAPPER.readValue(EXPECTED_JSON, RecordSimilarityResponse.class); + //Can't compare response objects directly since fields within names and other RecordSimilarityField may + // change order, so compare the content of their json strings with fields sorted alphabetically assertEquals(MAPPER.writeValueAsString(response), MAPPER.writeValueAsString(EXPECTED_RESPONSE)); } From f712e80af63b2a75e194f253822634fe1f536b97 Mon Sep 17 00:00:00 2001 From: Benjamin Simon Date: Thu, 25 Apr 2024 17:31:19 +0200 Subject: [PATCH 297/415] RLPNC-7512: Info block added to RecordSimilarityResponse --- .../RecordSimilarityDeserializerUtilities.java | 9 +++++++++ .../RecordSimilarityResponseDeserializer.java | 8 ++++++++ .../recordsimilarity/RecordSimilarityResponseTest.java | 7 ++++++- 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java index 74aa5e67e..3de4f9a89 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java @@ -19,8 +19,11 @@ import java.io.IOException; import java.util.HashMap; import java.util.Iterator; +import java.util.List; import java.util.Map; import java.util.Optional; +import java.util.stream.Collectors; +import java.util.stream.StreamSupport; import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityExplainInfo; import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityResult; @@ -59,12 +62,18 @@ public static RecordSimilarityResult parseResult( ? parseRecord(node.get("right"), jsonParser, fields) : null; final String error = Optional.ofNullable(node.get("error")).map(JsonNode::asText).orElse(null); + List info = Optional.ofNullable(node.get("info")) + .map(jsonNode -> StreamSupport.stream(jsonNode.spliterator(), false) + .map(JsonNode::asText) + .collect(Collectors.toList())) + .orElse(null); return RecordSimilarityResult.builder() .score(score) .left(left) .right(right) .explainInfo(explainInfo) .error(error) + .info(info) .build(); } diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityResponseDeserializer.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityResponseDeserializer.java index 781157a83..e57d066a8 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityResponseDeserializer.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityResponseDeserializer.java @@ -30,6 +30,8 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import java.util.stream.Collectors; +import java.util.stream.StreamSupport; public class RecordSimilarityResponseDeserializer extends StdDeserializer { @@ -47,6 +49,11 @@ public RecordSimilarityResponse deserialize(JsonParser jsonParser, Deserializati JsonNode fieldsNode = node.get("fields"); Map fields = fieldsNode != null ? node.get("fields").traverse(jsonParser.getCodec()).readValueAs(FIELDS_TYPE_REFERENCE) : null; + List info = Optional.ofNullable(node.get("info")) + .map(jsonNode -> StreamSupport.stream(jsonNode.spliterator(), false) + .map(JsonNode::asText) + .collect(Collectors.toList())) + .orElse(null); String errorMessage = Optional.ofNullable(node.get("errorMessage")).map(JsonNode::asText).orElse(null); JsonNode resultsNode = node.get("results"); @@ -60,6 +67,7 @@ public RecordSimilarityResponse deserialize(JsonParser jsonParser, Deserializati return RecordSimilarityResponse.builder() .fields(fields) .results(results) + .info(info) .errorMessage(errorMessage) .build(); } diff --git a/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java b/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java index efc052c1c..e9ceab7e6 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java @@ -39,7 +39,7 @@ public class RecordSimilarityResponseTest { private static final ObjectMapper MAPPER = ApiModelMixinModule.setupObjectMapper(new ObjectMapper()); - private static final String EXPECTED_JSON = "{\"fields\":{\"addr\":{\"type\":\"rni_address\",\"weight\":0.3},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5}},\"results\":[{\"explainInfo\":{\"leftOnlyFields\":[\"addr\"],\"scoredFields\":{\"dob\":{\"calculatedWeight\":0.2857142857142857,\"finalScore\":0.74,\"rawScore\":0.8,\"weight\":0.5},\"primaryName\":{\"calculatedWeight\":0.7142857142857143,\"details\":\"any details\",\"finalScore\":0.85,\"rawScore\":0.99,\"weight\":0.5}}},\"left\":{\"addr\":{\"address\":\"123 Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}},\"score\":0.87},{\"error\":\"Field foo not found in field mapping\",\"left\":{\"addr\":{\"address\":\"123 Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}}}]}"; + private static final String EXPECTED_JSON = "{\"fields\":{\"addr\":{\"type\":\"rni_address\",\"weight\":0.3},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5}},\"info\":[\"Field threshold not found in properties! Defaulting to 0.0\",\"Field weight not found in fields! Defaulting to 1.0 for all entries\"],\"results\":[{\"explainInfo\":{\"leftOnlyFields\":[\"addr\"],\"scoredFields\":{\"dob\":{\"calculatedWeight\":0.2857142857142857,\"finalScore\":0.74,\"rawScore\":0.8,\"weight\":0.5},\"primaryName\":{\"calculatedWeight\":0.7142857142857143,\"details\":\"any details\",\"finalScore\":0.85,\"rawScore\":0.99,\"weight\":0.5}}},\"left\":{\"addr\":{\"address\":\"123 Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}},\"score\":0.87},{\"error\":\"Field foo not found in field mapping\",\"info\":[\"Some info message\",\"Some other info message\"],\"left\":{\"addr\":{\"address\":\"123 Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}}}]}"; private static final RecordSimilarityResponse EXPECTED_RESPONSE; @@ -120,7 +120,12 @@ public class RecordSimilarityResponseTest { .date("1993-04-16") .build())) .error("Field foo not found in field mapping") + .info(List.of("Some info message", "Some other info message")) .build())) + .info(List.of( + "Field threshold not found in properties! Defaulting to 0.0", + "Field weight not found in fields! Defaulting to 1.0 for all entries") + ) .build(); } catch (JsonProcessingException e) { temp = RecordSimilarityResponse.builder().build(); From 4fd0742e460193445a3930a848855c535cfc4217 Mon Sep 17 00:00:00 2001 From: Benjamin Simon Date: Fri, 26 Apr 2024 11:14:51 +0200 Subject: [PATCH 298/415] RLPNC-7512: Fixes --- .../recordsimilarity/RecordSimilarityResponseTest.java | 2 +- .../apimodel/recordsimilarity/RecordSimilarityResponse.java | 6 ++++++ .../apimodel/recordsimilarity/RecordSimilarityResult.java | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java b/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java index e9ceab7e6..4cd4631da 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java @@ -96,7 +96,7 @@ public class RecordSimilarityResponseTest { .finalScore(0.85) .details(MAPPER.readTree("\"any details\"")) .build() - )) + )) .build()) .build(), RecordSimilarityResult.builder() diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponse.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponse.java index f840527a5..58a8d555a 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponse.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponse.java @@ -39,6 +39,12 @@ public class RecordSimilarityResponse extends Response { * @return list of record match results */ @Valid List results; + + /** + * @return info messages to user, that could hold additional information about the results + */ + @Valid List info; + /** * @return error message to user in case no results matched the threshold */ diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResult.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResult.java index 6f0b052ac..10fc228f0 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResult.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResult.java @@ -16,6 +16,7 @@ package com.basistech.rosette.apimodel.recordsimilarity; +import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonInclude; @@ -32,5 +33,6 @@ public class RecordSimilarityResult { Map left; Map right; RecordSimilarityExplainInfo explainInfo; + List info; String error; } From 8216111d3a242a8f7ce50767d66b7a29b5296bf0 Mon Sep 17 00:00:00 2001 From: avarga-bt Date: Thu, 25 Apr 2024 15:42:52 +0200 Subject: [PATCH 299/415] Add address fields --- .../examples/RecordSimilarityExample.java | 2 +- .../apimodel/RecordSimilarityRequestTest.java | 4 ++-- .../records/AddressField.java | 22 +++++++++++++++++-- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/examples/src/main/java/com/basistech/rosette/examples/RecordSimilarityExample.java b/examples/src/main/java/com/basistech/rosette/examples/RecordSimilarityExample.java index 5f983073e..d63c9dfc5 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/RecordSimilarityExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/RecordSimilarityExample.java @@ -90,7 +90,7 @@ private void run() throws IOException { primaryNameField, NameField.UnfieldedName.builder().text("Ivan R").build(), dobField, DateField.FieldedDate.builder().date(dobHyphen).build(), dob2Field, DateField.FieldedDate.builder().date("1993/04/16").build(), - addrField, AddressField.FieldedAddress.builder().address("123 Roadlane Ave").build() + addrField, AddressField.FieldedAddress.builder().houseNumber("123").road("Roadlane Ave").build() ) ) ).build() diff --git a/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java b/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java index 71f350220..428975a7a 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java @@ -42,7 +42,7 @@ class RecordSimilarityRequestTest { private static final ObjectMapper MAPPER = ApiModelMixinModule.setupObjectMapper(new ObjectMapper()); - private static final String EXPECTED_JSON = "{\"fields\":{\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"addr\":{\"type\":\"rni_address\",\"weight\":0.5}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true},\"records\":{\"left\":[{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"dob\":\"1993-04-16\",\"addr\":\"123 Roadlane Ave\"},{\"primaryName\":{\"text\":\"Evan R\"},\"dob\":{\"date\":\"1993-04-16\"}}],\"right\":[{\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"},\"dob\":{\"date\":\"1993-04-16\"}},{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":\"Ivan R\",\"dob\":{\"date\":\"1993-04-16\"},\"addr\":{\"address\":\"123 Roadlane Ave\"}}]}}"; + private static final String EXPECTED_JSON = "{\"fields\":{\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"addr\":{\"type\":\"rni_address\",\"weight\":0.5}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true},\"records\":{\"left\":[{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"dob\":\"1993-04-16\",\"addr\":\"123 Roadlane Ave\"},{\"primaryName\":{\"text\":\"Evan R\"},\"dob\":{\"date\":\"1993-04-16\"}}],\"right\":[{\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"},\"dob\":{\"date\":\"1993-04-16\"}},{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":\"Ivan R\",\"dob\":{\"date\":\"1993-04-16\"},\"addr\":{\"houseNumber\":\"123\",\"road\":\"Roadlane Ave\"}}]}}"; private static final RecordSimilarityRequest EXPECTED_REQUEST = RecordSimilarityRequest.builder() .fields(Map.of( "primaryName", RecordSimilarityFieldInfo.builder().type(RecordFieldType.NAME).weight(0.5).build(), @@ -79,7 +79,7 @@ class RecordSimilarityRequestTest { "primaryName", NameField.UnfieldedName.builder().text("Ivan R").build(), "dob", DateField.FieldedDate.builder().date("1993-04-16").build(), "dob2", DateField.FieldedDate.builder().date("1993/04/16").build(), - "addr", AddressField.FieldedAddress.builder().address("123 Roadlane Ave").build() + "addr", AddressField.FieldedAddress.builder().houseNumber("123").road("Roadlane Ave").build() ) ) ).build() diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/AddressField.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/AddressField.java index 26fd13440..1619dcee8 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/AddressField.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/AddressField.java @@ -30,14 +30,14 @@ @Value @NonFinal public abstract class AddressField implements RecordSimilarityField { - @NotBlank String address; @Jacksonized @SuperBuilder @Value public static class UnfieldedAddress extends AddressField { + @NotBlank String address; @JsonValue public String toJson() { - return super.getAddress(); + return address; } } @@ -46,6 +46,24 @@ public static class UnfieldedAddress extends AddressField { @Value @JsonInclude(JsonInclude.Include.NON_NULL) public static class FieldedAddress extends AddressField { + String house; + String houseNumber; + String road; + String unit; + String level; + String staircase; + String entrance; + String suburb; + String cityDistrict; + String city; + String island; + String stateDistrict; + String state; + String countryRegion; + String country; + String worldRegion; + String postCode; + String poBox; } } From 1a318ed8f7f7674d71f8b1c4fb82d849e0087d4f Mon Sep 17 00:00:00 2001 From: Benjamin Simon Date: Fri, 26 Apr 2024 13:45:09 +0200 Subject: [PATCH 300/415] RLPNC-7509: RecordSimilarityProperties validation --- .../RecordSimilarityDeserializerUtilities.java | 2 +- .../RecordSimilarityResponseDeserializer.java | 8 ++++---- .../recordsimilarity/RecordSimilarityProperties.java | 6 ++---- .../recordsimilarity/RecordSimilarityResponse.java | 1 + .../apimodel/recordsimilarity/RecordSimilarityResult.java | 3 +++ 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java index 3de4f9a89..ba5f96f46 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java @@ -62,7 +62,7 @@ public static RecordSimilarityResult parseResult( ? parseRecord(node.get("right"), jsonParser, fields) : null; final String error = Optional.ofNullable(node.get("error")).map(JsonNode::asText).orElse(null); - List info = Optional.ofNullable(node.get("info")) + final List info = Optional.ofNullable(node.get("info")) .map(jsonNode -> StreamSupport.stream(jsonNode.spliterator(), false) .map(JsonNode::asText) .collect(Collectors.toList())) diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityResponseDeserializer.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityResponseDeserializer.java index e57d066a8..0b122993c 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityResponseDeserializer.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityResponseDeserializer.java @@ -50,10 +50,10 @@ public RecordSimilarityResponse deserialize(JsonParser jsonParser, Deserializati Map fields = fieldsNode != null ? node.get("fields").traverse(jsonParser.getCodec()).readValueAs(FIELDS_TYPE_REFERENCE) : null; List info = Optional.ofNullable(node.get("info")) - .map(jsonNode -> StreamSupport.stream(jsonNode.spliterator(), false) - .map(JsonNode::asText) - .collect(Collectors.toList())) - .orElse(null); + .map(jsonNode -> StreamSupport.stream(jsonNode.spliterator(), false) + .map(JsonNode::asText) + .collect(Collectors.toList())) + .orElse(null); String errorMessage = Optional.ofNullable(node.get("errorMessage")).map(JsonNode::asText).orElse(null); JsonNode resultsNode = node.get("results"); diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityProperties.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityProperties.java index c80f984cd..a402b907c 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityProperties.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityProperties.java @@ -20,7 +20,6 @@ import com.fasterxml.jackson.annotation.JsonInclude; import javax.validation.Valid; -import javax.validation.constraints.NotNull; import lombok.Builder; import lombok.Value; import lombok.extern.jackson.Jacksonized; @@ -30,9 +29,8 @@ @Value @JsonInclude(JsonInclude.Include.NON_NULL) public class RecordSimilarityProperties { - @Builder.Default - @NotNull @Valid Double threshold = 0.0; - @NotNull @Valid Boolean includeExplainInfo; + @Valid Double threshold; + @Valid Boolean includeExplainInfo; @Valid Map parameters; @Valid String parameterUniverse; } diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponse.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponse.java index 58a8d555a..7861c8a29 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponse.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponse.java @@ -43,6 +43,7 @@ public class RecordSimilarityResponse extends Response { /** * @return info messages to user, that could hold additional information about the results */ + @JsonInclude(JsonInclude.Include.NON_EMPTY) @Valid List info; /** diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResult.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResult.java index 10fc228f0..62b9bd378 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResult.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResult.java @@ -33,6 +33,9 @@ public class RecordSimilarityResult { Map left; Map right; RecordSimilarityExplainInfo explainInfo; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) List info; + String error; } From 40d548f0efd237cc4405e8e968e088c72d50a06d Mon Sep 17 00:00:00 2001 From: Fiona Hasanaj Date: Fri, 26 Apr 2024 12:46:03 -0400 Subject: [PATCH 301/415] RLPNC-7516: Added scoreIfNull field --- .../apimodel/recordsimilarity/RecordSimilarityFieldInfo.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java index f161f0dc9..6e1c6398d 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java @@ -34,5 +34,5 @@ public class RecordSimilarityFieldInfo { /** * the score that this field should return if the field is null in a record */ - @NotNull @Valid Double scoreIfNull; + Double scoreIfNull; } From 84a0f22b5ca52a366284f0fa1804d6bcdc3cc896 Mon Sep 17 00:00:00 2001 From: Fiona Hasanaj Date: Mon, 29 Apr 2024 12:04:20 -0400 Subject: [PATCH 302/415] RLPNC-7516: Don't include null values in json for RecordSimilarityFieldInfo --- .../rosette/apimodel/RecordSimilarityRequestTest.java | 6 +++--- .../recordsimilarity/RecordSimilarityResponseTest.java | 3 ++- .../recordsimilarity/RecordSimilarityFieldInfo.java | 2 ++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java b/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java index 3583aae88..73a7bd04b 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java @@ -42,9 +42,9 @@ class RecordSimilarityRequestTest { private static final ObjectMapper MAPPER = ApiModelMixinModule.setupObjectMapper(new ObjectMapper()); - private static final String EXPECTED_JSON = "{\"fields\":{\"addr\":{\"type\":\"rni_address\",\"weight\":0.5,\"scoreIfNull\":null},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2,\"scoreIfNull\":null},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5,\"scoreIfNull\":null},\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1,\"scoreIfNull\":null}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true},\"records\":{\"left\":[{\"addr\":\"123 Roadlane Ave\",\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"dob2\":{\"date\":\"1993/04/16\"}},{\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"text\":\"Evan R\"}}],\"right\":[{\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"}},{\"addr\":{\"address\":\"123 Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":\"Ivan R\",\"dob2\":{\"date\":\"1993/04/16\"}}]}}"; - private static final String EXPECTED_JSON_WITH_PARAMS = "{\"fields\":{\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5,\"scoreIfNull\":null},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2,\"scoreIfNull\":null},\"addr\":{\"type\":\"rni_address\",\"weight\":0.5,\"scoreIfNull\":null},\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1,\"scoreIfNull\":null}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true,\"parameters\":{\"timeDistanceWeight\":\"0.8\",\"stringDistanceWeight\":\"0.1\"}},\"records\":{\"left\":[{\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"dob\":\"1993-04-16\",\"addr\":\"123 Roadlane Ave\",\"dob2\":{\"date\":\"1993/04/16\"}},{\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"text\":\"Evan R\"}}],\"right\":[{\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"}},{\"primaryName\":\"Ivan R\",\"dob\":{\"date\":\"1993-04-16\"},\"addr\":{\"address\":\"123 Roadlane Ave\"},\"dob2\":{\"date\":\"1993/04/16\"}}]}}"; - private static final String EXPECTED_JSON_WITH_UNIVERSE = "{\"fields\":{\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5,\"scoreIfNull\":null},\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1,\"scoreIfNull\":null},\"addr\":{\"type\":\"rni_address\",\"weight\":0.5,\"scoreIfNull\":null},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2,\"scoreIfNull\":null}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true,\"parameterUniverse\":\"myParameterUniverse\"},\"records\":{\"left\":[{\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"dob2\":{\"date\":\"1993/04/16\"},\"addr\":\"123 Roadlane Ave\",\"dob\":\"1993-04-16\"},{\"primaryName\":{\"text\":\"Evan R\"},\"dob\":{\"date\":\"1993-04-16\"}}],\"right\":[{\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"},\"dob\":{\"date\":\"1993-04-16\"}},{\"primaryName\":\"Ivan R\",\"dob2\":{\"date\":\"1993/04/16\"},\"addr\":{\"address\":\"123 Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"}}]}}"; + private static final String EXPECTED_JSON = "{\"fields\":{\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5},\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1},\"addr\":{\"type\":\"rni_address\",\"weight\":0.5},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true},\"records\":{\"left\":[{\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"dob2\":{\"date\":\"1993/04/16\"},\"addr\":\"123 Roadlane Ave\",\"dob\":\"1993-04-16\"},{\"primaryName\":{\"text\":\"Evan R\"},\"dob\":{\"date\":\"1993-04-16\"}}],\"right\":[{\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"},\"dob\":{\"date\":\"1993-04-16\"}},{\"primaryName\":\"Ivan R\",\"dob2\":{\"date\":\"1993/04/16\"},\"addr\":{\"address\":\"123 Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"}}]}}"; + private static final String EXPECTED_JSON_WITH_PARAMS = "{\"fields\":{\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"addr\":{\"type\":\"rni_address\",\"weight\":0.5},\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true,\"parameters\":{\"timeDistanceWeight\":\"0.8\",\"stringDistanceWeight\":\"0.1\"}},\"records\":{\"left\":[{\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"dob\":\"1993-04-16\",\"addr\":\"123 Roadlane Ave\",\"dob2\":{\"date\":\"1993/04/16\"}},{\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"text\":\"Evan R\"}}],\"right\":[{\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"}},{\"primaryName\":\"Ivan R\",\"dob\":{\"date\":\"1993-04-16\"},\"addr\":{\"address\":\"123 Roadlane Ave\"},\"dob2\":{\"date\":\"1993/04/16\"}}]}}"; + private static final String EXPECTED_JSON_WITH_UNIVERSE = "{\"fields\":{\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5},\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1},\"addr\":{\"type\":\"rni_address\",\"weight\":0.5},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true,\"parameterUniverse\":\"myParameterUniverse\"},\"records\":{\"left\":[{\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"dob2\":{\"date\":\"1993/04/16\"},\"addr\":\"123 Roadlane Ave\",\"dob\":\"1993-04-16\"},{\"primaryName\":{\"text\":\"Evan R\"},\"dob\":{\"date\":\"1993-04-16\"}}],\"right\":[{\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"},\"dob\":{\"date\":\"1993-04-16\"}},{\"primaryName\":\"Ivan R\",\"dob2\":{\"date\":\"1993/04/16\"},\"addr\":{\"address\":\"123 Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"}}]}}"; private static final RecordSimilarityRequest EXPECTED_REQUEST = RecordSimilarityRequest.builder() .fields(Map.of( diff --git a/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java b/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java index 16ff0c983..be5b159c7 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java @@ -39,7 +39,7 @@ public class RecordSimilarityResponseTest { private static final ObjectMapper MAPPER = ApiModelMixinModule.setupObjectMapper(new ObjectMapper()); - private static final String EXPECTED_JSON = "{\"fields\":{\"addr\":{\"scoreIfNull\":null,\"type\":\"rni_address\",\"weight\":0.3},\"dob\":{\"scoreIfNull\":null,\"type\":\"rni_date\",\"weight\":0.2},\"primaryName\":{\"scoreIfNull\":null,\"type\":\"rni_name\",\"weight\":0.5}},\"results\":[{\"explainInfo\":{\"leftOnlyFields\":[\"addr\"],\"scoredFields\":{\"dob\":{\"calculatedWeight\":0.2857142857142857,\"finalScore\":0.74,\"rawScore\":0.8,\"weight\":0.5},\"primaryName\":{\"calculatedWeight\":0.7142857142857143,\"details\":\"any details\",\"finalScore\":0.85,\"rawScore\":0.99,\"weight\":0.5}}},\"left\":{\"addr\":{\"address\":\"123 Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}},\"score\":0.87},{\"error\":\"Field foo not found in field mapping\",\"left\":{\"addr\":{\"address\":\"123 Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}}}]}"; + private static final String EXPECTED_JSON = "{\"fields\":{\"addr\":{\"scoreIfNull\":0.8,\"type\":\"rni_address\",\"weight\":0.3},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5}},\"results\":[{\"explainInfo\":{\"leftOnlyFields\":[\"addr\"],\"scoredFields\":{\"dob\":{\"calculatedWeight\":0.2857142857142857,\"finalScore\":0.74,\"rawScore\":0.8,\"weight\":0.5},\"primaryName\":{\"calculatedWeight\":0.7142857142857143,\"details\":\"any details\",\"finalScore\":0.85,\"rawScore\":0.99,\"weight\":0.5}}},\"left\":{\"addr\":{\"address\":\"123 Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}},\"score\":0.87},{\"error\":\"Field foo not found in field mapping\",\"left\":{\"addr\":{\"address\":\"123 Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}}}]}"; private static final RecordSimilarityResponse EXPECTED_RESPONSE; @@ -58,6 +58,7 @@ public class RecordSimilarityResponseTest { "addr", RecordSimilarityFieldInfo.builder() .type(RecordFieldType.ADDRESS) .weight(0.3) + .scoreIfNull(0.8) .build())) .results(List.of(RecordSimilarityResult.builder() .score(0.87) diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java index 6e1c6398d..3bcb4e1e9 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java @@ -18,6 +18,7 @@ import com.basistech.rosette.apimodel.recordsimilarity.records.RecordFieldType; +import com.fasterxml.jackson.annotation.JsonInclude; import javax.validation.Valid; import lombok.Builder; import lombok.Value; @@ -28,6 +29,7 @@ @Jacksonized @Builder @Value +@JsonInclude(JsonInclude.Include.NON_NULL) public class RecordSimilarityFieldInfo { @NotNull @Valid RecordFieldType type; Double weight; From 0ee4ca6c37d61da594a476516bd62bf380e172a9 Mon Sep 17 00:00:00 2001 From: avarga-bt Date: Tue, 30 Apr 2024 13:26:01 +0200 Subject: [PATCH 303/415] Fix errors after resolving merge conflict --- .../rosette/apimodel/RecordSimilarityRequestTest.java | 8 ++++---- .../recordsimilarity/RecordSimilarityResponseTest.java | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java b/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java index 8ca74bce5..acf4e6a76 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java @@ -43,8 +43,8 @@ class RecordSimilarityRequestTest { private static final ObjectMapper MAPPER = ApiModelMixinModule.setupObjectMapper(new ObjectMapper()); private static final String EXPECTED_JSON = "{\"fields\":{\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"addr\":{\"type\":\"rni_address\",\"weight\":0.5}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true},\"records\":{\"left\":[{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"dob\":\"1993-04-16\",\"addr\":\"123 Roadlane Ave\"},{\"primaryName\":{\"text\":\"Evan R\"},\"dob\":{\"date\":\"1993-04-16\"}}],\"right\":[{\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"},\"dob\":{\"date\":\"1993-04-16\"}},{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":\"Ivan R\",\"dob\":{\"date\":\"1993-04-16\"},\"addr\":{\"houseNumber\":\"123\",\"road\":\"Roadlane Ave\"}}]}}"; - private static final String EXPECTED_JSON_WITH_PARAMS = "{\"fields\":{\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"addr\":{\"type\":\"rni_address\",\"weight\":0.5}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true,\"parameters\":{\"timeDistanceWeight\":\"0.8\",\"stringDistanceWeight\":\"0.1\"}},\"records\":{\"left\":[{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"dob\":\"1993-04-16\",\"addr\":\"123 Roadlane Ave\"},{\"primaryName\":{\"text\":\"Evan R\"},\"dob\":{\"date\":\"1993-04-16\"}}],\"right\":[{\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"},\"dob\":{\"date\":\"1993-04-16\"}},{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":\"Ivan R\",\"dob\":{\"date\":\"1993-04-16\"},\"addr\":{\"address\":\"123 Roadlane Ave\"}}]}}"; - private static final String EXPECTED_JSON_WITH_UNIVERSE = "{\"fields\":{\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"addr\":{\"type\":\"rni_address\",\"weight\":0.5}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true,\"parameterUniverse\":\"myParameterUniverse\"},\"records\":{\"left\":[{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"dob\":\"1993-04-16\",\"addr\":\"123 Roadlane Ave\"},{\"primaryName\":{\"text\":\"Evan R\"},\"dob\":{\"date\":\"1993-04-16\"}}],\"right\":[{\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"},\"dob\":{\"date\":\"1993-04-16\"}},{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":\"Ivan R\",\"dob\":{\"date\":\"1993-04-16\"},\"addr\":{\"address\":\"123 Roadlane Ave\"}}]}}"; + private static final String EXPECTED_JSON_WITH_PARAMS = "{\"fields\":{\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"addr\":{\"type\":\"rni_address\",\"weight\":0.5}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true,\"parameters\":{\"timeDistanceWeight\":\"0.8\",\"stringDistanceWeight\":\"0.1\"}},\"records\":{\"left\":[{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"dob\":\"1993-04-16\",\"addr\":\"123 Roadlane Ave\"},{\"primaryName\":{\"text\":\"Evan R\"},\"dob\":{\"date\":\"1993-04-16\"}}],\"right\":[{\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"},\"dob\":{\"date\":\"1993-04-16\"}},{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":\"Ivan R\",\"dob\":{\"date\":\"1993-04-16\"},\"addr\":{\"houseNumber\":\"123\",\"road\":\"Roadlane Ave\"}}]}}"; + private static final String EXPECTED_JSON_WITH_UNIVERSE = "{\"fields\":{\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"addr\":{\"type\":\"rni_address\",\"weight\":0.5}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true,\"parameterUniverse\":\"myParameterUniverse\"},\"records\":{\"left\":[{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"dob\":\"1993-04-16\",\"addr\":\"123 Roadlane Ave\"},{\"primaryName\":{\"text\":\"Evan R\"},\"dob\":{\"date\":\"1993-04-16\"}}],\"right\":[{\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"},\"dob\":{\"date\":\"1993-04-16\"}},{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":\"Ivan R\",\"dob\":{\"date\":\"1993-04-16\"},\"addr\":{\"houseNumber\":\"123\",\"road\":\"Roadlane Ave\"}}]}}"; private static final RecordSimilarityRequest EXPECTED_REQUEST = RecordSimilarityRequest.builder() .fields(Map.of( "addr", RecordSimilarityFieldInfo.builder().type(RecordFieldType.ADDRESS).weight(0.5).build(), @@ -81,7 +81,7 @@ class RecordSimilarityRequestTest { "primaryName", NameField.UnfieldedName.builder().text("Ivan R").build(), "dob", DateField.FieldedDate.builder().date("1993-04-16").build(), "dob2", DateField.FieldedDate.builder().date("1993/04/16").build(), - "addr", AddressField.FieldedAddress.builder().address("123 Roadlane Ave").build() + "addr", AddressField.FieldedAddress.builder().houseNumber("123").road("Roadlane Ave").build() ) ) ).build() @@ -132,7 +132,7 @@ class RecordSimilarityRequestTest { "primaryName", NameField.UnfieldedName.builder().text("Ivan R").build(), "dob", DateField.FieldedDate.builder().date("1993-04-16").build(), "dob2", DateField.FieldedDate.builder().date("1993/04/16").build(), - "addr", AddressField.FieldedAddress.builder().address("123 Roadlane Ave").build() + "addr", AddressField.FieldedAddress.builder().houseNumber("123").road("Roadlane Ave").build() ) ) ).build() diff --git a/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java b/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java index 4cd4631da..c5f6509ea 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java @@ -39,7 +39,7 @@ public class RecordSimilarityResponseTest { private static final ObjectMapper MAPPER = ApiModelMixinModule.setupObjectMapper(new ObjectMapper()); - private static final String EXPECTED_JSON = "{\"fields\":{\"addr\":{\"type\":\"rni_address\",\"weight\":0.3},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5}},\"info\":[\"Field threshold not found in properties! Defaulting to 0.0\",\"Field weight not found in fields! Defaulting to 1.0 for all entries\"],\"results\":[{\"explainInfo\":{\"leftOnlyFields\":[\"addr\"],\"scoredFields\":{\"dob\":{\"calculatedWeight\":0.2857142857142857,\"finalScore\":0.74,\"rawScore\":0.8,\"weight\":0.5},\"primaryName\":{\"calculatedWeight\":0.7142857142857143,\"details\":\"any details\",\"finalScore\":0.85,\"rawScore\":0.99,\"weight\":0.5}}},\"left\":{\"addr\":{\"address\":\"123 Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}},\"score\":0.87},{\"error\":\"Field foo not found in field mapping\",\"info\":[\"Some info message\",\"Some other info message\"],\"left\":{\"addr\":{\"address\":\"123 Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}}}]}"; + private static final String EXPECTED_JSON = "{\"fields\":{\"addr\":{\"type\":\"rni_address\",\"weight\":0.3},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5}},\"info\":[\"Field threshold not found in properties! Defaulting to 0.0\",\"Field weight not found in fields! Defaulting to 1.0 for all entries\"],\"results\":[{\"explainInfo\":{\"leftOnlyFields\":[\"addr\"],\"scoredFields\":{\"dob\":{\"calculatedWeight\":0.2857142857142857,\"finalScore\":0.74,\"rawScore\":0.8,\"weight\":0.5},\"primaryName\":{\"calculatedWeight\":0.7142857142857143,\"details\":\"any details\",\"finalScore\":0.85,\"rawScore\":0.99,\"weight\":0.5}}},\"left\":{\"addr\":{\"houseNumber\":\"123\",\"road\":\"Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}},\"score\":0.87},{\"error\":\"Field foo not found in field mapping\",\"info\":[\"Some info message\",\"Some other info message\"],\"left\":{\"addr\":{\"houseNumber\":\"123\",\"road\":\"Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}}}]}"; private static final RecordSimilarityResponse EXPECTED_RESPONSE; @@ -72,7 +72,7 @@ public class RecordSimilarityResponseTest { .date("1993-04-16") .build(), "addr", AddressField.FieldedAddress.builder() - .address("123 Roadlane Ave") + .houseNumber("123").road("Roadlane Ave") .build())) .right(Map.of("primaryName", NameField.FieldedName.builder() .text("Seth R") @@ -111,7 +111,7 @@ public class RecordSimilarityResponseTest { .date("1993-04-16") .build(), "addr", AddressField.FieldedAddress.builder() - .address("123 Roadlane Ave") + .houseNumber("123").road("Roadlane Ave") .build())) .right(Map.of("primaryName", NameField.FieldedName.builder() .text("Seth R") From a9d8be7c577f9870bda12b3217c691690c303998 Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Wed, 1 May 2024 12:21:50 -0400 Subject: [PATCH 304/415] error as a list --- ...RecordSimilarityDeserializerUtilities.java | 14 +++++++++++--- .../RecordSimilarityResponseTest.java | 19 +++++++++++-------- .../RecordSimilarityResult.java | 3 ++- 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java index 14cb642cb..d63356cd6 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java @@ -17,10 +17,11 @@ package com.basistech.rosette.apimodel.jackson.recordsimilaritydeserializers; import java.io.IOException; +import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; +import java.util.List; import java.util.Map; -import java.util.Optional; import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityExplainInfo; import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityResult; @@ -60,13 +61,20 @@ public static RecordSimilarityResult parseResult( final Map right = node.get("right") != null && fields != null ? parseRecord(node.get("right"), jsonParser, fields) : null; - final String error = Optional.ofNullable(node.get("error")).map(JsonNode::asText).orElse(null); + + List errorList = new ArrayList<>(); + JsonNode errorNode = node.get("error"); + if (errorNode != null && errorNode.isArray()) { + for (JsonNode element : errorNode) { + errorList.add(element.asText()); + } + } return RecordSimilarityResult.builder() .score(score) .left(left) .right(right) .explainInfo(explainInfo) - .error(error) + .error(errorList) .build(); } diff --git a/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java b/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java index c0b3ddde2..b08f399ed 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java @@ -39,7 +39,7 @@ public class RecordSimilarityResponseTest { private static final ObjectMapper MAPPER = ApiModelMixinModule.setupObjectMapper(new ObjectMapper()); - private static final String EXPECTED_JSON = "{\"fields\":{\"addr\":{\"type\":\"rni_address\",\"weight\":0.3},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5}},\"results\":[{\"explainInfo\":{\"leftOnlyFields\":[\"addr\"],\"scoredFields\":{\"dob\":{\"calculatedWeight\":0.2857142857142857,\"finalScore\":0.74,\"rawScore\":0.8,\"weight\":0.5},\"primaryName\":{\"calculatedWeight\":0.7142857142857143,\"details\":\"any details\",\"finalScore\":0.85,\"rawScore\":0.99,\"weight\":0.5}}},\"left\":{\"addr\":{\"address\":\"123 Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}},\"score\":0.87},{\"error\":\"Field foo not found in field mapping\",\"left\":{\"addr\":{\"address\":\"123 Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}}}]}"; + private static final String EXPECTED_JSON = "{\"fields\":{\"addr\":{\"type\":\"rni_address\",\"weight\":0.3},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5}},\"results\":[{\"explainInfo\":{\"leftOnlyFields\":[\"addr\"],\"scoredFields\":{\"dob\":{\"calculatedWeight\":0.2857142857142857,\"finalScore\":0.74,\"rawScore\":0.8,\"weight\":0.5},\"primaryName\":{\"calculatedWeight\":0.7142857142857143,\"details\":\"any details\",\"finalScore\":0.85,\"rawScore\":0.99,\"weight\":0.5}}},\"left\":{\"addr\":{\"address\":\"123 Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}},\"score\":0.87},{\"left\":{\"addr\":{\"address\":\"123 Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}}}]}"; private static final RecordSimilarityResponse EXPECTED_RESPONSE; @@ -96,7 +96,7 @@ public class RecordSimilarityResponseTest { .finalScore(0.85) .details(MAPPER.readTree("\"any details\"")) .build() - )) + )) .build()) .build(), RecordSimilarityResult.builder() @@ -119,7 +119,6 @@ public class RecordSimilarityResponseTest { "dob", DateField.UnfieldedDate.builder() .date("1993-04-16") .build())) - .error("Field foo not found in field mapping") .build())) .build(); } catch (JsonProcessingException e) { @@ -128,11 +127,15 @@ public class RecordSimilarityResponseTest { EXPECTED_RESPONSE = temp; } - @Test - public void testDeserialization() throws JsonProcessingException { - final RecordSimilarityResponse response = MAPPER.readValue(EXPECTED_JSON, RecordSimilarityResponse.class); - assertEquals(EXPECTED_RESPONSE, response); - } + //TODO: Fix test +// @Test +// public void testDeserialization() throws JsonProcessingException { +// // For testing, force ordering +// MAPPER.enable(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY); +// MAPPER.enable(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS); +// final RecordSimilarityResponse response = MAPPER.readValue(EXPECTED_JSON, RecordSimilarityResponse.class); +// assertEquals(EXPECTED_RESPONSE, response); +// } @Test public void testSerialization() throws JsonProcessingException { diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResult.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResult.java index 6f0b052ac..776dedc40 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResult.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResult.java @@ -16,6 +16,7 @@ package com.basistech.rosette.apimodel.recordsimilarity; +import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonInclude; @@ -32,5 +33,5 @@ public class RecordSimilarityResult { Map left; Map right; RecordSimilarityExplainInfo explainInfo; - String error; + List error; } From 80f233e7c421afc8be1970709f4170e2b512e0bd Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Thu, 2 May 2024 10:51:38 -0400 Subject: [PATCH 305/415] override toString for UnknownField for clearer RecordSimilarityResponse object --- .../apimodel/recordsimilarity/records/UnknownField.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java index bda30b255..c0fe00099 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java @@ -37,6 +37,11 @@ public UnknownField(JsonNode data) { this.data = data; } + @Override + public String toString() { + return String.valueOf(this.data); + } + @JsonValue public Object getData() { if (data == null) { From 116d869c22f2ea033e7cb34437aa4f702f627c8e Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Thu, 2 May 2024 11:52:51 -0400 Subject: [PATCH 306/415] update toString for UnknownField --- .../apimodel/recordsimilarity/records/UnknownField.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java index c0fe00099..a756e68b4 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java @@ -39,7 +39,12 @@ public UnknownField(JsonNode data) { @Override public String toString() { - return String.valueOf(this.data); + return String.valueOf(getData()) + .replace("\"", "") + .replace(":", "=") + .replace("{", "(") + .replace("}", ")") + .replace(",", ", "); } @JsonValue From 3f62c04393864bdfbfb3a2c8c19033ff18342516 Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Thu, 2 May 2024 14:10:19 -0400 Subject: [PATCH 307/415] don't need complicated method implementation --- .../records/UnknownField.java | 21 +------------------ 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java index a756e68b4..3bbee4557 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/UnknownField.java @@ -16,9 +16,6 @@ package com.basistech.rosette.apimodel.recordsimilarity.records; -import java.util.LinkedHashMap; -import java.util.Map; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonValue; @@ -49,23 +46,7 @@ public String toString() { @JsonValue public Object getData() { - if (data == null) { - return ""; - } else { - if (data.isObject()) { - Map map = new LinkedHashMap<>(); - data.fields().forEachRemaining(fieldEntry -> map.put(fieldEntry.getKey(), fieldEntry.getValue())); - try { - ObjectMapper mapper = new ObjectMapper(); - String jsonString = mapper.writeValueAsString(map); - return mapper.readTree(jsonString); - } catch (JsonProcessingException e) { - return this.data; - } - } - // if given input is not an Object node, it's a String so return it - return this.data; - } + return this.data; } //compare the content of the String form of the UnknownFields' data From 87876598bbea61cb36a7470ada9f424d3d2fa9a2 Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Tue, 7 May 2024 11:46:25 -0400 Subject: [PATCH 308/415] resolve merge conflicts --- .../rosette/apimodel/RecordSimilarityRequestTest.java | 4 +--- .../apimodel/recordsimilarity/RecordSimilarityFieldInfo.java | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java b/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java index 7f2fee374..b27da234c 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java @@ -29,6 +29,7 @@ import com.basistech.util.LanguageCode; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import org.junit.jupiter.api.Test; @@ -44,7 +45,6 @@ class RecordSimilarityRequestTest { private static final String EXPECTED_JSON_WITH_PARAMS = "{\"fields\":{\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"addr\":{\"type\":\"rni_address\",\"weight\":0.5}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true,\"parameters\":{\"timeDistanceWeight\":\"0.8\",\"stringDistanceWeight\":\"0.1\"}},\"records\":{\"left\":[{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"dob\":\"1993-04-16\",\"addr\":\"123 Roadlane Ave\"},{\"primaryName\":{\"text\":\"Evan R\"},\"dob\":{\"date\":\"1993-04-16\"}}],\"right\":[{\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"},\"dob\":{\"date\":\"1993-04-16\"}},{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":\"Ivan R\",\"dob\":{\"date\":\"1993-04-16\"},\"addr\":{\"houseNumber\":\"123\",\"road\":\"Roadlane Ave\"}}]}}"; private static final String EXPECTED_JSON_WITH_UNIVERSE = "{\"fields\":{\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"addr\":{\"type\":\"rni_address\",\"weight\":0.5}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true,\"parameterUniverse\":\"myParameterUniverse\"},\"records\":{\"left\":[{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"dob\":\"1993-04-16\",\"addr\":\"123 Roadlane Ave\"},{\"primaryName\":{\"text\":\"Evan R\"},\"dob\":{\"date\":\"1993-04-16\"}}],\"right\":[{\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"},\"dob\":{\"date\":\"1993-04-16\"}},{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":\"Ivan R\",\"dob\":{\"date\":\"1993-04-16\"},\"addr\":{\"houseNumber\":\"123\",\"road\":\"Roadlane Ave\"}}]}}"; - private static final String EXPECTED_JSON = "{\"fields\":{\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"addr\":{\"type\":\"rni_address\",\"weight\":0.5}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true},\"records\":{\"left\":[{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"dob\":\"1993-04-16\",\"addr\":\"123 Roadlane Ave\"},{\"primaryName\":{\"text\":\"Evan R\"},\"dob\":{\"date\":\"1993-04-16\"}}],\"right\":[{\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"},\"dob\":{\"date\":\"1993-04-16\"}},{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":\"Ivan R\",\"dob\":{\"date\":\"1993-04-16\"},\"addr\":{\"address\":\"123 Roadlane Ave\"}}]}}"; private static final RecordSimilarityRequest EXPECTED_REQUEST = RecordSimilarityRequest.builder() .fields(Map.of( "addr", RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_ADDRESS).weight(0.5).scoreIfNull(0.8).build(), @@ -186,8 +186,6 @@ class RecordSimilarityRequestTest { @Test void testDeserialization() throws JsonProcessingException { - MAPPER.enable(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY); - MAPPER.enable(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS); final RecordSimilarityRequest request = MAPPER.readValue(EXPECTED_JSON, new TypeReference<>() { }); assertEquals(EXPECTED_REQUEST, request); diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java index f1e639559..c53409cb4 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java @@ -16,6 +16,7 @@ package com.basistech.rosette.apimodel.recordsimilarity; +import com.fasterxml.jackson.annotation.JsonInclude; import javax.validation.Valid; import lombok.Builder; import lombok.Value; From b634efec2a5e8af43265238d1cf5af44fa70ab99 Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Tue, 7 May 2024 13:20:22 -0400 Subject: [PATCH 309/415] resolve merge conflicts --- .../recordsimilarity/RecordSimilarityResponseTest.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java b/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java index 8dffafe2f..1934b2c43 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java @@ -20,7 +20,6 @@ import com.basistech.rosette.apimodel.recordsimilarity.records.AddressField; import com.basistech.rosette.apimodel.recordsimilarity.records.DateField; import com.basistech.rosette.apimodel.recordsimilarity.records.NameField; -import com.basistech.rosette.apimodel.recordsimilarity.records.RecordFieldType; import com.basistech.util.ISO15924; import com.basistech.util.LanguageCode; import com.basistech.util.NEConstants; @@ -39,8 +38,7 @@ public class RecordSimilarityResponseTest { private static final ObjectMapper MAPPER = ApiModelMixinModule.setupObjectMapper(new ObjectMapper()); - private static final String EXPECTED_JSON = "{\"results\":[{\"explainInfo\":{\"leftOnlyFields\":[\"addr\"],\"scoredFields\":{\"dob\":{\"calculatedWeight\":0.2857142857142857,\"finalScore\":0.74,\"rawScore\":0.8,\"weight\":0.5},\"primaryName\":{\"calculatedWeight\":0.7142857142857143,\"details\":\"any details\",\"finalScore\":0.85,\"rawScore\":0.99,\"weight\":0.5}}},\"left\":{\"addr\":{\"address\":\"123 Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}},\"score\":0.87},{\"error\":\"Field foo not found in field mapping\",\"left\":{\"addr\":{\"address\":\"123 Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}}}]}"; -// private static final String EXPECTED_JSON = "{\"fields\":{\"addr\":{\"scoreIfNull\":0.8,\"type\":\"rni_address\",\"weight\":0.3},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5}},\"info\":[\"Field threshold not found in properties! Defaulting to 0.0\",\"Field weight not found in fields! Defaulting to 1.0 for all entries\"],\"results\":[{\"explainInfo\":{\"leftOnlyFields\":[\"addr\"],\"scoredFields\":{\"dob\":{\"calculatedWeight\":0.2857142857142857,\"finalScore\":0.74,\"rawScore\":0.8,\"weight\":0.5},\"primaryName\":{\"calculatedWeight\":0.7142857142857143,\"details\":\"any details\",\"finalScore\":0.85,\"rawScore\":0.99,\"weight\":0.5}}},\"left\":{\"addr\":{\"houseNumber\":\"123\",\"road\":\"Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}},\"score\":0.87},{\"error\":\"Field foo not found in field mapping\",\"info\":[\"Some info message\",\"Some other info message\"],\"left\":{\"addr\":{\"houseNumber\":\"123\",\"road\":\"Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}}}]}"; + private static final String EXPECTED_JSON = "{\"info\":[\"Field threshold not found in properties! Defaulting to 0.0\",\"Field weight not found in fields! Defaulting to 1.0 for all entries\"],\"results\":[{\"explainInfo\":{\"leftOnlyFields\":[\"addr\"],\"scoredFields\":{\"dob\":{\"calculatedWeight\":0.2857142857142857,\"finalScore\":0.74,\"rawScore\":0.8,\"weight\":0.5},\"primaryName\":{\"calculatedWeight\":0.7142857142857143,\"details\":\"any details\",\"finalScore\":0.85,\"rawScore\":0.99,\"weight\":0.5}}},\"left\":{\"addr\":{\"houseNumber\":\"123\",\"road\":\"Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}},\"score\":0.87},{\"error\":\"Field foo not found in field mapping\",\"info\":[\"Some info message\",\"Some other info message\"],\"left\":{\"addr\":{\"houseNumber\":\"123\",\"road\":\"Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}}}]}"; private static final RecordSimilarityResponse EXPECTED_RESPONSE; From ffb04b4b3f7011de911a6a53316318b9ad5bbe90 Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Tue, 7 May 2024 15:26:25 -0400 Subject: [PATCH 310/415] resolve merge conflicts --- .../rosette/examples/RecordSimilarityExample.java | 2 +- .../RecordSimilarityResponseTest.java | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/examples/src/main/java/com/basistech/rosette/examples/RecordSimilarityExample.java b/examples/src/main/java/com/basistech/rosette/examples/RecordSimilarityExample.java index 1dcde173d..f0bc77a85 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/RecordSimilarityExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/RecordSimilarityExample.java @@ -97,7 +97,7 @@ private void run() throws IOException { ).build(); HttpRosetteAPI rosetteAPI = new HttpRosetteAPI.Builder() - .key(getApiKeyFromSystemProperty()) + .key("b1db524b37ad4b75f86729999d6017fd") .url(getAltUrlFromSystemProperty()) .build(); //The api object creates an http client, but to provide your own: diff --git a/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java b/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java index 2b6d6c53c..43d1215eb 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java @@ -30,6 +30,8 @@ import com.fasterxml.jackson.databind.SerializationFeature; import org.junit.jupiter.api.Test; +import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import java.util.Map; @@ -39,7 +41,7 @@ public class RecordSimilarityResponseTest { private static final ObjectMapper MAPPER = ApiModelMixinModule.setupObjectMapper(new ObjectMapper()); - private static final String EXPECTED_JSON = "{\"fields\":{\"addr\":{\"type\":\"rni_address\",\"weight\":0.3},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5}},\"results\":[{\"explainInfo\":{\"leftOnlyFields\":[\"addr\"],\"scoredFields\":{\"dob\":{\"calculatedWeight\":0.2857142857142857,\"finalScore\":0.74,\"rawScore\":0.8,\"weight\":0.5},\"primaryName\":{\"calculatedWeight\":0.7142857142857143,\"details\":\"any details\",\"finalScore\":0.85,\"rawScore\":0.99,\"weight\":0.5}}},\"left\":{\"addr\":{\"address\":\"123 Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}},\"score\":0.87},{\"error\":\"Field foo not found in field mapping\",\"left\":{\"addr\":{\"address\":\"123 Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}}}]}"; + private static final String EXPECTED_JSON = "{\"fields\":{\"addr\":{\"scoreIfNull\":0.8,\"type\":\"rni_address\",\"weight\":0.3},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5}},\"info\":[\"Field threshold not found in properties! Defaulting to 0.0\",\"Field weight not found in fields! Defaulting to 1.0 for all entries\"],\"results\":[{\"error\":[],\"explainInfo\":{\"leftOnlyFields\":[\"addr\"],\"scoredFields\":{\"dob\":{\"calculatedWeight\":0.2857142857142857,\"finalScore\":0.74,\"rawScore\":0.8,\"weight\":0.5},\"primaryName\":{\"calculatedWeight\":0.7142857142857143,\"details\":\"any details\",\"finalScore\":0.85,\"rawScore\":0.99,\"weight\":0.5}}},\"left\":{\"addr\":{\"houseNumber\":\"123\",\"road\":\"Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}},\"score\":0.87},{\"error\":[\"Field foo not found in field mapping\"],\"info\":[\"Some info message\",\"Some other info message\"],\"left\":{\"addr\":{\"houseNumber\":\"123\",\"road\":\"Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}}}]}"; private static final RecordSimilarityResponse EXPECTED_RESPONSE; @@ -100,6 +102,7 @@ public class RecordSimilarityResponseTest { .build() )) .build()) + .error(new ArrayList<>()) .build(), RecordSimilarityResult.builder() .left(Map.of("primaryName", NameField.FieldedName.builder() @@ -121,7 +124,7 @@ public class RecordSimilarityResponseTest { "dob", DateField.UnfieldedDate.builder() .date("1993-04-16") .build())) - .error(Arrays.AsList("Field foo not found in field mapping")) + .error(Arrays.asList("Field foo not found in field mapping")) .info(List.of("Some info message", "Some other info message")) .build())) .info(List.of( @@ -137,8 +140,12 @@ public class RecordSimilarityResponseTest { @Test public void testDeserialization() throws JsonProcessingException { + // For testing, force ordering + MAPPER.enable(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY); + MAPPER.enable(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS); final RecordSimilarityResponse response = MAPPER.readValue(EXPECTED_JSON, RecordSimilarityResponse.class); - assertEquals(EXPECTED_RESPONSE, response); + assertEquals(MAPPER.writeValueAsString(EXPECTED_RESPONSE), MAPPER.writeValueAsString(response)); +// assertEquals(EXPECTED_RESPONSE, response); } @Test From d7bedd38879b82f44ec7fcb1ec0a238f4029e5a3 Mon Sep 17 00:00:00 2001 From: Grace Calianese <132861517+gcalianese@users.noreply.github.com> Date: Fri, 10 May 2024 09:38:12 -0400 Subject: [PATCH 311/415] revert RecordSimilarityExample.java --- .../com/basistech/rosette/examples/RecordSimilarityExample.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/src/main/java/com/basistech/rosette/examples/RecordSimilarityExample.java b/examples/src/main/java/com/basistech/rosette/examples/RecordSimilarityExample.java index f0bc77a85..1dcde173d 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/RecordSimilarityExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/RecordSimilarityExample.java @@ -97,7 +97,7 @@ private void run() throws IOException { ).build(); HttpRosetteAPI rosetteAPI = new HttpRosetteAPI.Builder() - .key("b1db524b37ad4b75f86729999d6017fd") + .key(getApiKeyFromSystemProperty()) .url(getAltUrlFromSystemProperty()) .build(); //The api object creates an http client, but to provide your own: From 2efa83f0c3c03d34633840e823fc263ff0a3557f Mon Sep 17 00:00:00 2001 From: Grace Calianese Date: Mon, 13 May 2024 14:03:03 -0400 Subject: [PATCH 312/415] fix test --- .../RecordSimilarityDeserializerUtilities.java | 13 +++++-------- .../RecordSimilarityResponseTest.java | 7 +------ 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java index d18d11733..4955cdd85 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java @@ -17,7 +17,6 @@ package com.basistech.rosette.apimodel.jackson.recordsimilaritydeserializers; import java.io.IOException; -import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; @@ -61,13 +60,11 @@ public static RecordSimilarityResult parseResult(JsonNode node, JsonParser jsonP ? parseRecordForResponse(node.get("right"), jsonParser) : null; - List errorList = new ArrayList<>(); - JsonNode errorNode = node.get("error"); - if (errorNode != null && errorNode.isArray()) { - for (JsonNode element : errorNode) { - errorList.add(element.asText()); - } - } + List errorList = Optional.ofNullable(node.get("error")) + .map(jsonNode -> StreamSupport.stream(jsonNode.spliterator(), false) + .map(JsonNode::asText) + .collect(Collectors.toList())) + .orElse(null); List info = Optional.ofNullable(node.get("info")) .map(jsonNode -> StreamSupport.stream(jsonNode.spliterator(), false) .map(JsonNode::asText) diff --git a/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java b/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java index 788007ed5..7e7dbae98 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java @@ -20,7 +20,6 @@ import com.basistech.rosette.apimodel.recordsimilarity.records.AddressField; import com.basistech.rosette.apimodel.recordsimilarity.records.DateField; import com.basistech.rosette.apimodel.recordsimilarity.records.NameField; -import com.basistech.rosette.apimodel.recordsimilarity.records.RecordFieldType; import com.basistech.util.ISO15924; import com.basistech.util.LanguageCode; import com.basistech.util.NEConstants; @@ -30,7 +29,6 @@ import com.fasterxml.jackson.databind.SerializationFeature; import org.junit.jupiter.api.Test; -import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; @@ -40,10 +38,7 @@ public class RecordSimilarityResponseTest { private static final ObjectMapper MAPPER = ApiModelMixinModule.setupObjectMapper(new ObjectMapper()); - - private static final String EXPECTED_JSON = "{\"fields\":{\"addr\":{\"scoreIfNull\":0.8,\"type\":\"rni_address\",\"weight\":0.3},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5}},\"info\":[\"Field threshold not found in properties! Defaulting to 0.0\",\"Field weight not found in fields! Defaulting to 1.0 for all entries\"],\"results\":[{\"error\":[],\"explainInfo\":{\"leftOnlyFields\":[\"addr\"],\"scoredFields\":{\"dob\":{\"calculatedWeight\":0.2857142857142857,\"finalScore\":0.74,\"rawScore\":0.8,\"weight\":0.5},\"primaryName\":{\"calculatedWeight\":0.7142857142857143,\"details\":\"any details\",\"finalScore\":0.85,\"rawScore\":0.99,\"weight\":0.5}}},\"left\":{\"addr\":{\"houseNumber\":\"123\",\"road\":\"Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}},\"score\":0.87},{\"error\":[\"Field foo not found in field mapping\"],\"info\":[\"Some info message\",\"Some other info message\"],\"left\":{\"addr\":{\"houseNumber\":\"123\",\"road\":\"Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}}}]}"; - - private static final String EXPECTED_JSON = "{\"info\":[\"Field threshold not found in properties! Defaulting to 0.0\",\"Field weight not found in fields! Defaulting to 1.0 for all entries\"],\"results\":[{\"explainInfo\":{\"leftOnlyFields\":[\"addr\"],\"scoredFields\":{\"dob\":{\"calculatedWeight\":0.2857142857142857,\"finalScore\":0.74,\"rawScore\":0.8,\"weight\":0.5},\"primaryName\":{\"calculatedWeight\":0.7142857142857143,\"details\":\"any details\",\"finalScore\":0.85,\"rawScore\":0.99,\"weight\":0.5}}},\"left\":{\"addr\":{\"houseNumber\":\"123\",\"road\":\"Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}},\"score\":0.87},{\"error\":\"Field foo not found in field mapping\",\"info\":[\"Some info message\",\"Some other info message\"],\"left\":{\"addr\":{\"houseNumber\":\"123\",\"road\":\"Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}}}]}"; + private static final String EXPECTED_JSON = "{\"info\":[\"Field threshold not found in properties! Defaulting to 0.0\",\"Field weight not found in fields! Defaulting to 1.0 for all entries\"],\"results\":[{\"explainInfo\":{\"leftOnlyFields\":[\"addr\"],\"scoredFields\":{\"dob\":{\"calculatedWeight\":0.2857142857142857,\"finalScore\":0.74,\"rawScore\":0.8,\"weight\":0.5},\"primaryName\":{\"calculatedWeight\":0.7142857142857143,\"details\":\"any details\",\"finalScore\":0.85,\"rawScore\":0.99,\"weight\":0.5}}},\"left\":{\"addr\":{\"houseNumber\":\"123\",\"road\":\"Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}},\"score\":0.87},{\"error\":[\"Field foo not found in field mapping\"],\"info\":[\"Some info message\",\"Some other info message\"],\"left\":{\"addr\":{\"houseNumber\":\"123\",\"road\":\"Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}}}]}"; private static final RecordSimilarityResponse EXPECTED_RESPONSE; From 078b286fc960354454815a26fa5425640c3669f4 Mon Sep 17 00:00:00 2001 From: Benjamin Simon Date: Tue, 14 May 2024 15:16:46 +0200 Subject: [PATCH 313/415] RLPNC-7509 exclude empty errors from result --- .../apimodel/recordsimilarity/RecordSimilarityResult.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResult.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResult.java index 65ec77e49..136a80e73 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResult.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResult.java @@ -33,6 +33,8 @@ public class RecordSimilarityResult { Map left; Map right; RecordSimilarityExplainInfo explainInfo; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) List error; @JsonInclude(JsonInclude.Include.NON_EMPTY) From cf54b25550635dd120e735d7126d7b0e50167191 Mon Sep 17 00:00:00 2001 From: jsquatrito Date: Fri, 17 May 2024 12:59:38 -0400 Subject: [PATCH 314/415] RLPNC-7496: Removed unneeded validation/enforcement, added getter --- .../apimodel/recordsimilarity/RecordSimilarityFieldInfo.java | 3 ++- .../apimodel/recordsimilarity/RecordSimilarityRequest.java | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java index c53409cb4..f1c6a2337 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java @@ -19,6 +19,7 @@ import com.fasterxml.jackson.annotation.JsonInclude; import javax.validation.Valid; import lombok.Builder; +import lombok.Getter; import lombok.Value; import lombok.extern.jackson.Jacksonized; @@ -29,7 +30,7 @@ @Value @JsonInclude(JsonInclude.Include.NON_NULL) public class RecordSimilarityFieldInfo { - @NotNull @Valid String type; + @Getter @NotNull @Valid String type; Double weight; /** * the score that this field should return if the field is null in a record diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityRequest.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityRequest.java index 82d1b1266..874e820af 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityRequest.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityRequest.java @@ -22,14 +22,13 @@ import lombok.Value; import lombok.Builder; -import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import java.util.Map; @Value @JsonInclude(JsonInclude.Include.NON_NULL) public class RecordSimilarityRequest extends Request { - @NotEmpty @Valid Map fields; + @Valid Map fields; @Valid RecordSimilarityProperties properties; @NotNull @Valid RecordSimilarityRecords records; From 7df75dc743185cdd8a7eb1ae95c5ba906cde471e Mon Sep 17 00:00:00 2001 From: jsquatrito Date: Tue, 21 May 2024 14:32:03 -0400 Subject: [PATCH 315/415] RLPNC-7496: Removed getter --- .../apimodel/recordsimilarity/RecordSimilarityFieldInfo.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java index f1c6a2337..c53409cb4 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java @@ -19,7 +19,6 @@ import com.fasterxml.jackson.annotation.JsonInclude; import javax.validation.Valid; import lombok.Builder; -import lombok.Getter; import lombok.Value; import lombok.extern.jackson.Jacksonized; @@ -30,7 +29,7 @@ @Value @JsonInclude(JsonInclude.Include.NON_NULL) public class RecordSimilarityFieldInfo { - @Getter @NotNull @Valid String type; + @NotNull @Valid String type; Double weight; /** * the score that this field should return if the field is null in a record From 879ae0dcf98d6287a3fddff48ee57177a3fc2e7d Mon Sep 17 00:00:00 2001 From: jsquatrito Date: Tue, 21 May 2024 15:54:17 -0400 Subject: [PATCH 316/415] RLPNC-7496: Field type names are case-insensitive --- .../RecordSimilarityDeserializerUtilities.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java index 785a569cf..8a611b9f7 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java @@ -20,6 +20,7 @@ import java.util.HashMap; import java.util.Iterator; import java.util.List; +import java.util.Locale; import java.util.Map; import java.util.Optional; import java.util.stream.Collectors; @@ -113,7 +114,7 @@ static Map parseRecord( if (fieldInfo.getType() == null) { throw new IllegalArgumentException("Unspecified field type for: " + fieldName); } - switch (fieldInfo.getType()) { + switch (fieldInfo.getType().toLowerCase(Locale.ENGLISH)) { case RecordFieldType.RNI_DATE: fieldData = fieldValue.traverse(jsonParser.getCodec()).readValueAs(DateField.class); break; From 541564ab392d242a1fba384cce51f5e42c29ca0c Mon Sep 17 00:00:00 2001 From: Julien Cherry <6952800+juliencherry@users.noreply.github.com> Date: Fri, 24 May 2024 16:35:13 -0400 Subject: [PATCH 317/415] COMN-314: Update the parent POM to version 19.0.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 361588748..1235cee23 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ open-source-parent com.basistech - 18.0.0 + 19.0.0 pom From 845a03fbef74c599bb3dec41ce716540edd095da Mon Sep 17 00:00:00 2001 From: avarga-bt Date: Thu, 6 Jun 2024 15:02:03 +0200 Subject: [PATCH 318/415] Add fielded date to example --- .../basistech/rosette/examples/RecordSimilarityExample.java | 2 +- .../rosette/apimodel/RecordSimilarityRequestTest.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/src/main/java/com/basistech/rosette/examples/RecordSimilarityExample.java b/examples/src/main/java/com/basistech/rosette/examples/RecordSimilarityExample.java index 1dcde173d..86bfb703a 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/RecordSimilarityExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/RecordSimilarityExample.java @@ -72,7 +72,7 @@ private void run() throws IOException { .script(ISO15924.Latn) .build(), dobField, DateField.UnfieldedDate.builder().date(dobHyphen).build(), - dob2Field, DateField.FieldedDate.builder().date("1993/04/16").build(), + dob2Field, DateField.FieldedDate.builder().date("04161993").format("MMddyyyy").build(), addrField, AddressField.UnfieldedAddress.builder().address("123 Roadlane Ave").build() ), Map.of( diff --git a/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java b/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java index b27da234c..5e5fcd9fb 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java @@ -41,7 +41,7 @@ class RecordSimilarityRequestTest { private static final ObjectMapper MAPPER = ApiModelMixinModule.setupObjectMapper(new ObjectMapper()); - private static final String EXPECTED_JSON = "{\"fields\":{\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"addr\":{\"type\":\"rni_address\",\"weight\":0.5,\"scoreIfNull\":0.8}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true},\"records\":{\"left\":[{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"dob\":\"1993-04-16\",\"addr\":\"123 Roadlane Ave\"},{\"primaryName\":{\"text\":\"Evan R\"},\"dob\":{\"date\":\"1993-04-16\"}}],\"right\":[{\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"},\"dob\":{\"date\":\"1993-04-16\"}},{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":\"Ivan R\",\"dob\":{\"date\":\"1993-04-16\"},\"addr\":{\"houseNumber\":\"123\",\"road\":\"Roadlane Ave\"}}]}}"; + private static final String EXPECTED_JSON = "{\"fields\":{\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"addr\":{\"type\":\"rni_address\",\"weight\":0.5,\"scoreIfNull\":0.8}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true},\"records\":{\"left\":[{\"dob2\":{\"date\":\"1993/04/16\",\"format\":\"yyyy/MM/dd\"},\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"dob\":\"1993-04-16\",\"addr\":\"123 Roadlane Ave\"},{\"primaryName\":{\"text\":\"Evan R\"},\"dob\":{\"date\":\"1993-04-16\"}}],\"right\":[{\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"},\"dob\":{\"date\":\"1993-04-16\"}},{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":\"Ivan R\",\"dob\":{\"date\":\"1993-04-16\"},\"addr\":{\"houseNumber\":\"123\",\"road\":\"Roadlane Ave\"}}]}}"; private static final String EXPECTED_JSON_WITH_PARAMS = "{\"fields\":{\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"addr\":{\"type\":\"rni_address\",\"weight\":0.5}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true,\"parameters\":{\"timeDistanceWeight\":\"0.8\",\"stringDistanceWeight\":\"0.1\"}},\"records\":{\"left\":[{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"dob\":\"1993-04-16\",\"addr\":\"123 Roadlane Ave\"},{\"primaryName\":{\"text\":\"Evan R\"},\"dob\":{\"date\":\"1993-04-16\"}}],\"right\":[{\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"},\"dob\":{\"date\":\"1993-04-16\"}},{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":\"Ivan R\",\"dob\":{\"date\":\"1993-04-16\"},\"addr\":{\"houseNumber\":\"123\",\"road\":\"Roadlane Ave\"}}]}}"; private static final String EXPECTED_JSON_WITH_UNIVERSE = "{\"fields\":{\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"addr\":{\"type\":\"rni_address\",\"weight\":0.5}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true,\"parameterUniverse\":\"myParameterUniverse\"},\"records\":{\"left\":[{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"dob\":\"1993-04-16\",\"addr\":\"123 Roadlane Ave\"},{\"primaryName\":{\"text\":\"Evan R\"},\"dob\":{\"date\":\"1993-04-16\"}}],\"right\":[{\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"},\"dob\":{\"date\":\"1993-04-16\"}},{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":\"Ivan R\",\"dob\":{\"date\":\"1993-04-16\"},\"addr\":{\"houseNumber\":\"123\",\"road\":\"Roadlane Ave\"}}]}}"; @@ -63,7 +63,7 @@ class RecordSimilarityRequestTest { .script(ISO15924.Latn) .build(), "dob", DateField.UnfieldedDate.builder().date("1993-04-16").build(), - "dob2", DateField.FieldedDate.builder().date("1993/04/16").build(), + "dob2", DateField.FieldedDate.builder().date("1993/04/16").format("yyyy/MM/dd").build(), "addr", AddressField.UnfieldedAddress.builder().address("123 Roadlane Ave").build() ), Map.of( From c9ce798543527b54d10a457afd84d1085cacc227 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Thu, 13 Jun 2024 10:45:16 +0200 Subject: [PATCH 319/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.30.100 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 726b75045..b06fa5f90 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.29.1-SNAPSHOT + 1.30.100 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index bc207b87f..3c6389e07 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.29.1-SNAPSHOT + 1.30.100 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 768649e9d..ec404c270 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.29.1-SNAPSHOT + 1.30.100 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 6f2de229a..f64777735 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.29.1-SNAPSHOT + 1.30.100 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 62016af29..7b99e2a5f 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.29.1-SNAPSHOT + 1.30.100 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 85e349933..a1bd84d35 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.29.1-SNAPSHOT + 1.30.100 rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 361588748..91974ff95 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.29.1-SNAPSHOT + 1.30.100 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.29.100 + rosette-api-java-binding-1.30.100 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 169dca79d..35087dc96 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.29.1-SNAPSHOT + 1.30.100 com.basistech.rosette rosette-api-release From 9be7613cd209ad623e72c3c6adeaef286daccf90 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Thu, 13 Jun 2024 10:45:20 +0200 Subject: [PATCH 320/415] [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index b06fa5f90..6fc330a6d 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.100 + 1.30.101-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 3c6389e07..c8afbb177 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.100 + 1.30.101-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index ec404c270..c0930209a 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.100 + 1.30.101-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index f64777735..bf6fd944d 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.100 + 1.30.101-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 7b99e2a5f..647b3b5e8 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.100 + 1.30.101-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index a1bd84d35..137498d70 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.100 + 1.30.101-SNAPSHOT rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 91974ff95..56449a857 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.30.100 + 1.30.101-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.30.100 + rosette-api-java-binding-1.29.100 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 35087dc96..d15158294 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.100 + 1.30.101-SNAPSHOT com.basistech.rosette rosette-api-release From ce1ae3ad93f55ce42d51609af83a15f9d96aaeaf Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Wed, 19 Jun 2024 09:52:02 +0200 Subject: [PATCH 321/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.30.101 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 6fc330a6d..798c31f8b 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.101-SNAPSHOT + 1.30.101 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index c8afbb177..f7991466b 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.101-SNAPSHOT + 1.30.101 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index c0930209a..389f064a1 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.101-SNAPSHOT + 1.30.101 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index bf6fd944d..431713783 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.101-SNAPSHOT + 1.30.101 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 647b3b5e8..2df960b3e 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.101-SNAPSHOT + 1.30.101 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 137498d70..dc24ef094 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.101-SNAPSHOT + 1.30.101 rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 324231c07..183218798 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.30.101-SNAPSHOT + 1.30.101 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.29.100 + rosette-api-java-binding-1.30.101 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index d15158294..5cb002cb4 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.101-SNAPSHOT + 1.30.101 com.basistech.rosette rosette-api-release From 1c74514d2c3afab48d70d10b938469c5cec50fd4 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Wed, 19 Jun 2024 09:52:06 +0200 Subject: [PATCH 322/415] [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 798c31f8b..567a2a41a 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.101 + 1.30.102-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index f7991466b..95921ca77 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.101 + 1.30.102-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 389f064a1..31e4c9864 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.101 + 1.30.102-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 431713783..94b0ed859 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.101 + 1.30.102-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 2df960b3e..156e77b79 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.101 + 1.30.102-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index dc24ef094..09061f946 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.101 + 1.30.102-SNAPSHOT rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 183218798..4c8ad5928 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.30.101 + 1.30.102-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.30.101 + rosette-api-java-binding-1.29.100 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 5cb002cb4..21200965a 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.101 + 1.30.102-SNAPSHOT com.basistech.rosette rosette-api-release From c6858baf856ef5358592f07c511caee81a68ad50 Mon Sep 17 00:00:00 2001 From: Julien Cherry <6952800+juliencherry@users.noreply.github.com> Date: Thu, 27 Jun 2024 16:31:19 -0400 Subject: [PATCH 323/415] COMN-324: Create `dependabot.yml` --- .github/dependabot.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..9a5a1c9c2 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +version: 2 +updates: + - package-ecosystem: "maven" + directory: "/" + schedule: + interval: "weekly" + groups: + minor-and-patch: + applies-to: version-updates + update-types: + - "patch" + - "minor" From 617d1602bf1785fc19a0ea420cde17ca9dba0bf2 Mon Sep 17 00:00:00 2001 From: Julien Cherry <6952800+juliencherry@users.noreply.github.com> Date: Thu, 27 Jun 2024 16:52:02 -0400 Subject: [PATCH 324/415] COMN-324: Inherit dependency and plugin settings from parent POM --- pom.xml | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/pom.xml b/pom.xml index 4c8ad5928..54d220234 100644 --- a/pom.xml +++ b/pom.xml @@ -65,25 +65,6 @@ examples release - - - - com.basistech - common-api - ${bt-common-api-version} - - - com.basistech - adm-model - ${bt-adm-version} - - - com.basistech - adm-json - ${bt-adm-version} - - - @@ -97,7 +78,6 @@ org.apache.maven.plugins maven-clean-plugin - ${maven-clean-plugin.version} @@ -112,7 +92,6 @@ org.apache.maven.plugins maven-compiler-plugin - ${maven-compiler-plugin.version} 17 11 @@ -122,7 +101,6 @@ org.apache.maven.plugins maven-source-plugin - ${maven-source-plugin.version} attach-sources From 72ea9db94774fc05db4c44bac06e8f6b588dc27d Mon Sep 17 00:00:00 2001 From: Julien Cherry <6952800+juliencherry@users.noreply.github.com> Date: Thu, 27 Jun 2024 16:54:05 -0400 Subject: [PATCH 325/415] COMN-324: Remove stray BND files --- json/bnd.bnd | 2 -- model/bnd.bnd | 2 -- 2 files changed, 4 deletions(-) delete mode 100644 json/bnd.bnd delete mode 100644 model/bnd.bnd diff --git a/json/bnd.bnd b/json/bnd.bnd deleted file mode 100644 index 9e993d607..000000000 --- a/json/bnd.bnd +++ /dev/null @@ -1,2 +0,0 @@ -Bundle-Version: ${osgi-version} -Export-Package: com.basistech.rosette.apimodel.jackson,com.basistech.rosette.apimodel.jackson.batch,com.basistech.rosette.apimodel.jackson.recordsimilaritydeserializers diff --git a/model/bnd.bnd b/model/bnd.bnd deleted file mode 100644 index 19f8fc479..000000000 --- a/model/bnd.bnd +++ /dev/null @@ -1,2 +0,0 @@ -Bundle-Version: ${osgi-version} -Export-Package: com.basistech.rosette.apimodel,com.basistech.rosette.apimodel.batch,com.basistech.rosette.apimodel.recordsimilarity,com.basistech.rosette.apimodel.recordsimilarity.records From ae1431ff72fc33007b90167efe527173ea47646e Mon Sep 17 00:00:00 2001 From: Julien Cherry <6952800+juliencherry@users.noreply.github.com> Date: Tue, 2 Jul 2024 10:14:12 -0400 Subject: [PATCH 326/415] COMN-324: Use `bt-httpclient-version` and `bt-httpmime-version` --- api/pom.xml | 4 ++-- pom.xml | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/api/pom.xml b/api/pom.xml index 95921ca77..350bf2547 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -60,7 +60,7 @@ org.apache.httpcomponents httpclient - ${http-components.version} + ${bt-httpclient-version} commons-codec @@ -71,7 +71,7 @@ org.apache.httpcomponents httpmime - ${http-components.version} + ${bt-httpmime-version} org.apache.httpcomponents diff --git a/pom.xml b/pom.xml index 54d220234..4535a8e5c 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,6 @@ 1.9.4 1.15 3.0.2 - 4.5.13 4.4.15 1.13.0 2.0.0.Final From 353409fb9414d2736af3f5cf8dbb76b871c1df3e Mon Sep 17 00:00:00 2001 From: Julien Cherry <6952800+juliencherry@users.noreply.github.com> Date: Fri, 5 Jul 2024 14:59:40 -0400 Subject: [PATCH 327/415] COMN-324: Delete `src/site/site.xml` --- pom.xml | 1 - src/site/site.xml | 28 ---------------------------- 2 files changed, 29 deletions(-) delete mode 100644 src/site/site.xml diff --git a/pom.xml b/pom.xml index 4535a8e5c..91b890ba2 100644 --- a/pom.xml +++ b/pom.xml @@ -53,7 +53,6 @@ 1.18.20.0 5.14.0 0.10.2 - 1.5 annotations diff --git a/src/site/site.xml b/src/site/site.xml deleted file mode 100644 index 3674edf6c..000000000 --- a/src/site/site.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - Rosette API - - - - org.apache.maven.skins - maven-fluido-skin - ${site-skin-version} - - - - - - - - - - - - - - - - - - From 857c2c1cd2d518f8de69f5fab2737c9d441a4fdd Mon Sep 17 00:00:00 2001 From: Julien Cherry <6952800+juliencherry@users.noreply.github.com> Date: Fri, 5 Jul 2024 14:59:56 -0400 Subject: [PATCH 328/415] COMN-324: Remove unused Maven properties --- pom.xml | 3 --- 1 file changed, 3 deletions(-) diff --git a/pom.xml b/pom.xml index 91b890ba2..b2ee0ac22 100644 --- a/pom.xml +++ b/pom.xml @@ -42,10 +42,7 @@ 3.3.0 - 1.9.4 1.15 - 3.0.2 - 4.4.15 1.13.0 2.0.0.Final 5.9.1 From 9a798de376f39fec4873a6d8fe3c9f313e146189 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Jul 2024 19:53:26 +0000 Subject: [PATCH 329/415] Bump the minor-and-patch group across 1 directory with 7 updates Bumps the minor-and-patch group with 7 updates in the / directory: | Package | From | To | | --- | --- | --- | | [org.codehaus.mojo:build-helper-maven-plugin](https://github.com/mojohaus/build-helper-maven-plugin) | `3.3.0` | `3.6.0` | | [org.projectlombok:lombok](https://github.com/projectlombok/lombok) | `1.18.24` | `1.18.34` | | [javax.validation:validation-api](https://github.com/beanvalidation/beanvalidation-api) | `2.0.0.Final` | `2.0.1.Final` | | [org.junit.jupiter:junit-jupiter-api](https://github.com/junit-team/junit5) | `5.9.1` | `5.9.3` | | [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit5) | `5.9.1` | `5.9.3` | | [commons-codec:commons-codec](https://github.com/apache/commons-codec) | `1.15` | `1.17.0` | | org.mock-server:mockserver-junit-jupiter-no-dependencies | `5.14.0` | `5.15.0` | Updates `org.codehaus.mojo:build-helper-maven-plugin` from 3.3.0 to 3.6.0 - [Release notes](https://github.com/mojohaus/build-helper-maven-plugin/releases) - [Commits](https://github.com/mojohaus/build-helper-maven-plugin/compare/build-helper-maven-plugin-3.3.0...3.6.0) Updates `org.projectlombok:lombok` from 1.18.24 to 1.18.34 - [Changelog](https://github.com/projectlombok/lombok/blob/master/doc/changelog.markdown) - [Commits](https://github.com/projectlombok/lombok/compare/v1.18.24...v1.18.34) Updates `javax.validation:validation-api` from 2.0.0.Final to 2.0.1.Final - [Release notes](https://github.com/beanvalidation/beanvalidation-api/releases) - [Commits](https://github.com/beanvalidation/beanvalidation-api/compare/2.0.0.Final...2.0.1.Final) Updates `org.junit.jupiter:junit-jupiter-api` from 5.9.1 to 5.9.3 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.9.1...r5.9.3) Updates `org.junit.jupiter:junit-jupiter-params` from 5.9.1 to 5.9.3 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.9.1...r5.9.3) Updates `org.junit.jupiter:junit-jupiter-params` from 5.9.1 to 5.9.3 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.9.1...r5.9.3) Updates `commons-codec:commons-codec` from 1.15 to 1.17.0 - [Changelog](https://github.com/apache/commons-codec/blob/master/RELEASE-NOTES.txt) - [Commits](https://github.com/apache/commons-codec/compare/rel/commons-codec-1.15...rel/commons-codec-1.17.0) Updates `org.mock-server:mockserver-junit-jupiter-no-dependencies` from 5.14.0 to 5.15.0 --- updated-dependencies: - dependency-name: org.codehaus.mojo:build-helper-maven-plugin dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: org.projectlombok:lombok dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: javax.validation:validation-api dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter-api dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter-params dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter-params dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: commons-codec:commons-codec dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: org.mock-server:mockserver-junit-jupiter-no-dependencies dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index b2ee0ac22..acb6a58e2 100644 --- a/pom.xml +++ b/pom.xml @@ -41,14 +41,14 @@ - 3.3.0 - 1.15 + 3.6.0 + 1.17.0 1.13.0 - 2.0.0.Final - 5.9.1 - 1.18.24 + 2.0.1.Final + 5.9.3 + 1.18.34 1.18.20.0 - 5.14.0 + 5.15.0 0.10.2 From c91699e592ef58bb44b090ada374a49ad10ea5a8 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Wed, 10 Jul 2024 18:04:09 -0400 Subject: [PATCH 330/415] Preparing release. Version set to 1.30.0-SNAPSHOT --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 2 +- release/pom.xml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 567a2a41a..177df1cde 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.102-SNAPSHOT + 1.30.0-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 350bf2547..45ade6d6d 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.102-SNAPSHOT + 1.30.0-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 31e4c9864..c8cec44e1 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.102-SNAPSHOT + 1.30.0-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 94b0ed859..071640594 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.102-SNAPSHOT + 1.30.0-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 156e77b79..cbf1fc0c3 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.102-SNAPSHOT + 1.30.0-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 09061f946..47c86a8d1 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.102-SNAPSHOT + 1.30.0-SNAPSHOT rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index acb6a58e2..3bca9f6ca 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.30.102-SNAPSHOT + 1.30.0-SNAPSHOT open-source-parent com.basistech diff --git a/release/pom.xml b/release/pom.xml index 21200965a..69bee2e9c 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.102-SNAPSHOT + 1.30.0-SNAPSHOT com.basistech.rosette rosette-api-release From 8e91efa1b5c1e4b9c58f54eefcc48514e827892b Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Wed, 10 Jul 2024 18:05:02 -0400 Subject: [PATCH 331/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.30.0 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 177df1cde..11e7ad5d6 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.0-SNAPSHOT + 1.30.0 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 45ade6d6d..ee7e7e03c 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.0-SNAPSHOT + 1.30.0 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index c8cec44e1..553b4bb5c 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.0-SNAPSHOT + 1.30.0 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 071640594..c64ffd3f6 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.0-SNAPSHOT + 1.30.0 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index cbf1fc0c3..be119c634 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.0-SNAPSHOT + 1.30.0 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 47c86a8d1..50ff47372 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.0-SNAPSHOT + 1.30.0 rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 3bca9f6ca..e903c91a8 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.30.0-SNAPSHOT + 1.30.0 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.29.100 + rosette-api-java-binding-1.30.0 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 69bee2e9c..059b9634d 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.0-SNAPSHOT + 1.30.0 com.basistech.rosette rosette-api-release From 6d7c7183d79428818216f0ebc96a0367d03fe93b Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Wed, 10 Jul 2024 18:05:04 -0400 Subject: [PATCH 332/415] [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 11e7ad5d6..4d7a01594 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.0 + 1.30.1-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index ee7e7e03c..d036054f7 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.0 + 1.30.1-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 553b4bb5c..9d98fc6db 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.0 + 1.30.1-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index c64ffd3f6..5a007c8ab 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.0 + 1.30.1-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index be119c634..604c629ee 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.0 + 1.30.1-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 50ff47372..dedecbf28 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.0 + 1.30.1-SNAPSHOT rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index e903c91a8..91e75ea97 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.30.0 + 1.30.1-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.30.0 + rosette-api-java-binding-1.29.100 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 059b9634d..2e23d23e7 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.0 + 1.30.1-SNAPSHOT com.basistech.rosette rosette-api-release From 0df0c578f740d02fde101b6c970f87b1bcdb1a5d Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Wed, 10 Jul 2024 18:06:19 -0400 Subject: [PATCH 333/415] [maven-release-plugin] rollback the release of rosette-api-java-binding-1.30.0 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 2 +- release/pom.xml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 4d7a01594..177df1cde 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.1-SNAPSHOT + 1.30.0-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index d036054f7..45ade6d6d 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.1-SNAPSHOT + 1.30.0-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 9d98fc6db..c8cec44e1 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.1-SNAPSHOT + 1.30.0-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 5a007c8ab..071640594 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.1-SNAPSHOT + 1.30.0-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 604c629ee..cbf1fc0c3 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.1-SNAPSHOT + 1.30.0-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index dedecbf28..47c86a8d1 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.1-SNAPSHOT + 1.30.0-SNAPSHOT rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 91e75ea97..3bca9f6ca 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.30.1-SNAPSHOT + 1.30.0-SNAPSHOT open-source-parent com.basistech diff --git a/release/pom.xml b/release/pom.xml index 2e23d23e7..69bee2e9c 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.1-SNAPSHOT + 1.30.0-SNAPSHOT com.basistech.rosette rosette-api-release From cadb3d19e062000fbefc05b30f97b009343524c4 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Wed, 17 Jul 2024 12:21:01 -0500 Subject: [PATCH 334/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.30.0 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 177df1cde..11e7ad5d6 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.0-SNAPSHOT + 1.30.0 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 45ade6d6d..ee7e7e03c 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.0-SNAPSHOT + 1.30.0 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index c8cec44e1..553b4bb5c 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.0-SNAPSHOT + 1.30.0 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 071640594..c64ffd3f6 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.0-SNAPSHOT + 1.30.0 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index cbf1fc0c3..be119c634 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.0-SNAPSHOT + 1.30.0 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 47c86a8d1..50ff47372 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.0-SNAPSHOT + 1.30.0 rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 3bca9f6ca..e903c91a8 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.30.0-SNAPSHOT + 1.30.0 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.29.100 + rosette-api-java-binding-1.30.0 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 69bee2e9c..059b9634d 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.0-SNAPSHOT + 1.30.0 com.basistech.rosette rosette-api-release From 666e8481a79833182d3c2fc615b76208826d8a86 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Wed, 17 Jul 2024 12:21:04 -0500 Subject: [PATCH 335/415] [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 11e7ad5d6..74374e018 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.0 + 1.31.0-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index ee7e7e03c..ec98b8d13 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.0 + 1.31.0-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 553b4bb5c..db7208e08 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.0 + 1.31.0-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index c64ffd3f6..c9769c9be 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.0 + 1.31.0-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index be119c634..973a5b759 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.0 + 1.31.0-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 50ff47372..a71950faf 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.0 + 1.31.0-SNAPSHOT rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index e903c91a8..d3984ccd4 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.30.0 + 1.31.0-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.30.0 + rosette-api-java-binding-1.29.100 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 059b9634d..94157e093 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.0 + 1.31.0-SNAPSHOT com.basistech.rosette rosette-api-release From 3531d8f082785ee06321eba5ef99cdf370541201 Mon Sep 17 00:00:00 2001 From: Norbert Nagy Date: Thu, 18 Jul 2024 11:21:00 +0200 Subject: [PATCH 336/415] rlpnc-7455 add gender to names --- .../basistech/rosette/apimodel/Gender.java | 33 +++++++++++++++++++ .../com/basistech/rosette/apimodel/Name.java | 14 ++++++++ 2 files changed, 47 insertions(+) create mode 100644 model/src/main/java/com/basistech/rosette/apimodel/Gender.java diff --git a/model/src/main/java/com/basistech/rosette/apimodel/Gender.java b/model/src/main/java/com/basistech/rosette/apimodel/Gender.java new file mode 100644 index 000000000..a51e4487b --- /dev/null +++ b/model/src/main/java/com/basistech/rosette/apimodel/Gender.java @@ -0,0 +1,33 @@ +/* + * Copyright 2022 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.basistech.rosette.apimodel; + +public enum Gender { + + FEMALE(0.99), + NONBINARY(0.5), + MALE(0.01); + + private final double value; + + Gender(double value) { + this.value = value; + } + + public double getValue() { + return value; + } +} diff --git a/model/src/main/java/com/basistech/rosette/apimodel/Name.java b/model/src/main/java/com/basistech/rosette/apimodel/Name.java index 1df293b5b..7ccc1af1b 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/Name.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/Name.java @@ -51,6 +51,10 @@ public class Name { */ LanguageCode language; + + Gender gender; + + /** * Default constructor for lombok * @@ -64,6 +68,15 @@ public Name(String name, String entityType, ISO15924 script, LanguageCode langua this.entityType = entityType; this.script = script; this.language = language; + this.gender = null; + } + + public Name(String name, String entityType, ISO15924 script, LanguageCode language, Gender gender) { + this.text = name; + this.entityType = entityType; + this.script = script; + this.language = language; + this.gender = gender; } /** @@ -77,5 +90,6 @@ public Name(String name) { this.entityType = "PERSON"; this.script = ISO15924.Zyyy; this.language = LanguageCode.UNKNOWN; + this.gender = null; } } From b34f0c49621e6cba97e1ad143ed3ca3203ce4aab Mon Sep 17 00:00:00 2001 From: Norbert Nagy Date: Thu, 18 Jul 2024 12:04:48 +0200 Subject: [PATCH 337/415] rlpnc-7455 javadox --- .../java/com/basistech/rosette/apimodel/Name.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/model/src/main/java/com/basistech/rosette/apimodel/Name.java b/model/src/main/java/com/basistech/rosette/apimodel/Name.java index 7ccc1af1b..651d5da67 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/Name.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/Name.java @@ -52,11 +52,14 @@ public class Name { LanguageCode language; + /** + * @return gender of the name, {@link Gender} + */ Gender gender; /** - * Default constructor for lombok + * Default constructor for lombok (gender is optional) * * @param name * @param entityType @@ -71,6 +74,15 @@ public Name(String name, String entityType, ISO15924 script, LanguageCode langua this.gender = null; } + /** + * Default constructor for lombok with gender + * + * @param name + * @param entityType + * @param script + * @param language + * @param gender + */ public Name(String name, String entityType, ISO15924 script, LanguageCode language, Gender gender) { this.text = name; this.entityType = entityType; From 7284ad11f1c61f1fb39f24995e479ae4c61e53bd Mon Sep 17 00:00:00 2001 From: Jack Oehling Date: Fri, 19 Jul 2024 15:30:31 -0400 Subject: [PATCH 338/415] COMN-325: Migrate javax.validation to jakarta.validation --- json/pom.xml | 5 +++++ .../RecordSimilarityDeserializerUtilities.java | 4 ++-- model/pom.xml | 6 +++--- .../rosette/apimodel/AddressSimilarityRequest.java | 2 +- .../com/basistech/rosette/apimodel/CategoriesOptions.java | 2 +- .../main/java/com/basistech/rosette/apimodel/Entity.java | 2 +- .../com/basistech/rosette/apimodel/LanguageOptions.java | 8 ++++---- .../com/basistech/rosette/apimodel/LanguageWeight.java | 4 ++-- .../com/basistech/rosette/apimodel/MentionOffsets.java | 2 +- .../main/java/com/basistech/rosette/apimodel/Name.java | 2 +- .../rosette/apimodel/NameDeduplicationRequest.java | 4 ++-- .../basistech/rosette/apimodel/NameSimilarityRequest.java | 4 ++-- .../rosette/apimodel/NameTranslationRequest.java | 2 +- .../com/basistech/rosette/apimodel/TopicsOptions.java | 4 ++-- .../recordsimilarity/RecordSimilarityFieldInfo.java | 4 ++-- .../recordsimilarity/RecordSimilarityProperties.java | 2 +- .../recordsimilarity/RecordSimilarityRecords.java | 4 ++-- .../recordsimilarity/RecordSimilarityRequest.java | 4 ++-- .../recordsimilarity/RecordSimilarityResponse.java | 2 +- .../apimodel/recordsimilarity/records/AddressField.java | 2 +- .../apimodel/recordsimilarity/records/DateField.java | 2 +- .../apimodel/recordsimilarity/records/NameField.java | 2 +- pom.xml | 2 +- 23 files changed, 40 insertions(+), 35 deletions(-) diff --git a/json/pom.xml b/json/pom.xml index cbf1fc0c3..0332f418b 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -34,6 +34,11 @@ com.fasterxml.jackson.core jackson-databind + + jakarta.validation + jakarta.validation-api + ${jakarta-validation-api.version} + com.basistech.rosette rosette-api-model diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java index 8a611b9f7..9c5e07983 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java @@ -31,8 +31,8 @@ import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.databind.JsonNode; -import javax.validation.Valid; -import javax.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityFieldInfo; import com.basistech.rosette.apimodel.recordsimilarity.records.AddressField; diff --git a/model/pom.xml b/model/pom.xml index 47c86a8d1..14f970c24 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -39,9 +39,9 @@ common-api - javax.validation - validation-api - ${javax-validation-api.version} + jakarta.validation + jakarta.validation-api + ${jakarta-validation-api.version} com.basistech diff --git a/model/src/main/java/com/basistech/rosette/apimodel/AddressSimilarityRequest.java b/model/src/main/java/com/basistech/rosette/apimodel/AddressSimilarityRequest.java index e2e1c58bd..9e7b526a8 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/AddressSimilarityRequest.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/AddressSimilarityRequest.java @@ -19,7 +19,7 @@ import java.util.Map; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; import lombok.Builder; import lombok.Value; diff --git a/model/src/main/java/com/basistech/rosette/apimodel/CategoriesOptions.java b/model/src/main/java/com/basistech/rosette/apimodel/CategoriesOptions.java index 72fef68f5..658136104 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/CategoriesOptions.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/CategoriesOptions.java @@ -17,7 +17,7 @@ package com.basistech.rosette.apimodel; import com.basistech.rosette.annotations.JacksonMixin; -import javax.validation.constraints.Min; +import jakarta.validation.constraints.Min; import lombok.Builder; import lombok.Value; diff --git a/model/src/main/java/com/basistech/rosette/apimodel/Entity.java b/model/src/main/java/com/basistech/rosette/apimodel/Entity.java index 546b02806..34d750a65 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/Entity.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/Entity.java @@ -20,7 +20,7 @@ import lombok.Builder; import lombok.Value; -import javax.validation.Valid; +import jakarta.validation.Valid; import java.util.List; /** diff --git a/model/src/main/java/com/basistech/rosette/apimodel/LanguageOptions.java b/model/src/main/java/com/basistech/rosette/apimodel/LanguageOptions.java index 5007c3674..e7b48b537 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/LanguageOptions.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/LanguageOptions.java @@ -22,10 +22,10 @@ import lombok.Builder; import lombok.Value; -import javax.validation.Valid; -import javax.validation.constraints.DecimalMax; -import javax.validation.constraints.DecimalMin; -import javax.validation.constraints.Min; +import jakarta.validation.Valid; +import jakarta.validation.constraints.DecimalMax; +import jakarta.validation.constraints.DecimalMin; +import jakarta.validation.constraints.Min; import java.util.Set; /** diff --git a/model/src/main/java/com/basistech/rosette/apimodel/LanguageWeight.java b/model/src/main/java/com/basistech/rosette/apimodel/LanguageWeight.java index 0dac287d6..72e472466 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/LanguageWeight.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/LanguageWeight.java @@ -22,8 +22,8 @@ import lombok.Builder; import lombok.Value; -import javax.validation.constraints.Max; -import javax.validation.constraints.Min; +import jakarta.validation.constraints.Max; +import jakarta.validation.constraints.Min; /** * language weight used to resolve ambiguous results diff --git a/model/src/main/java/com/basistech/rosette/apimodel/MentionOffsets.java b/model/src/main/java/com/basistech/rosette/apimodel/MentionOffsets.java index b03ebea0f..846be6258 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/MentionOffsets.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/MentionOffsets.java @@ -20,7 +20,7 @@ import lombok.Builder; import lombok.Value; -import javax.validation.constraints.Min; +import jakarta.validation.constraints.Min; /** * The start and end offset/index for a given mention in a string of text diff --git a/model/src/main/java/com/basistech/rosette/apimodel/Name.java b/model/src/main/java/com/basistech/rosette/apimodel/Name.java index 1df293b5b..73d7029a0 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/Name.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/Name.java @@ -21,7 +21,7 @@ import lombok.Builder; import lombok.Value; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; /** * Class that represents a name. diff --git a/model/src/main/java/com/basistech/rosette/apimodel/NameDeduplicationRequest.java b/model/src/main/java/com/basistech/rosette/apimodel/NameDeduplicationRequest.java index 8856913f3..2165d3b0b 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/NameDeduplicationRequest.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/NameDeduplicationRequest.java @@ -19,8 +19,8 @@ import lombok.Builder; import lombok.Value; -import javax.validation.Valid; -import javax.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; import java.util.ArrayList; import java.util.List; diff --git a/model/src/main/java/com/basistech/rosette/apimodel/NameSimilarityRequest.java b/model/src/main/java/com/basistech/rosette/apimodel/NameSimilarityRequest.java index 866463f50..64d396ad9 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/NameSimilarityRequest.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/NameSimilarityRequest.java @@ -21,8 +21,8 @@ import lombok.Builder; import lombok.Value; -import javax.validation.Valid; -import javax.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; /** * Request object for name-similarity. diff --git a/model/src/main/java/com/basistech/rosette/apimodel/NameTranslationRequest.java b/model/src/main/java/com/basistech/rosette/apimodel/NameTranslationRequest.java index aa585f0df..e1c3be6a9 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/NameTranslationRequest.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/NameTranslationRequest.java @@ -22,7 +22,7 @@ import lombok.Builder; import lombok.Value; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; /** * Request for name translation. diff --git a/model/src/main/java/com/basistech/rosette/apimodel/TopicsOptions.java b/model/src/main/java/com/basistech/rosette/apimodel/TopicsOptions.java index b788f271d..04ad10f96 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/TopicsOptions.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/TopicsOptions.java @@ -19,8 +19,8 @@ import lombok.Builder; import lombok.Value; -import javax.validation.constraints.DecimalMax; -import javax.validation.constraints.DecimalMin; +import jakarta.validation.constraints.DecimalMax; +import jakarta.validation.constraints.DecimalMin; /** * Options for topics requests diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java index c53409cb4..8f3672613 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java @@ -17,12 +17,12 @@ package com.basistech.rosette.apimodel.recordsimilarity; import com.fasterxml.jackson.annotation.JsonInclude; -import javax.validation.Valid; +import jakarta.validation.Valid; import lombok.Builder; import lombok.Value; import lombok.extern.jackson.Jacksonized; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; @Jacksonized @Builder diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityProperties.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityProperties.java index a402b907c..6c9fb1a64 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityProperties.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityProperties.java @@ -19,7 +19,7 @@ import java.util.Map; import com.fasterxml.jackson.annotation.JsonInclude; -import javax.validation.Valid; +import jakarta.validation.Valid; import lombok.Builder; import lombok.Value; import lombok.extern.jackson.Jacksonized; diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityRecords.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityRecords.java index a21daa5a8..64678225b 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityRecords.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityRecords.java @@ -20,11 +20,11 @@ import java.util.Map; import com.basistech.rosette.apimodel.recordsimilarity.records.RecordSimilarityField; -import javax.validation.Valid; +import jakarta.validation.Valid; import lombok.Builder; import lombok.Value; -import javax.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotEmpty; @Builder @Value diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityRequest.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityRequest.java index 874e820af..34511c377 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityRequest.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityRequest.java @@ -18,11 +18,11 @@ import com.basistech.rosette.apimodel.Request; import com.fasterxml.jackson.annotation.JsonInclude; -import javax.validation.Valid; +import jakarta.validation.Valid; import lombok.Value; import lombok.Builder; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; import java.util.Map; @Value diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponse.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponse.java index c40094b3b..4bd89043e 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponse.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponse.java @@ -24,7 +24,7 @@ import com.basistech.rosette.apimodel.Response; -import javax.validation.Valid; +import jakarta.validation.Valid; /** * Response data model for comparison of two records. diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/AddressField.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/AddressField.java index 1619dcee8..8ec4880e9 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/AddressField.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/AddressField.java @@ -24,7 +24,7 @@ import lombok.experimental.SuperBuilder; import lombok.extern.jackson.Jacksonized; -import javax.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotBlank; @SuperBuilder @Value diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/DateField.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/DateField.java index ba5b31c18..cd2ebdc1f 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/DateField.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/DateField.java @@ -23,7 +23,7 @@ import lombok.experimental.SuperBuilder; import lombok.extern.jackson.Jacksonized; -import javax.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotBlank; @SuperBuilder @Value diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/NameField.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/NameField.java index b4eba359f..87cacf982 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/NameField.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/NameField.java @@ -25,7 +25,7 @@ import lombok.experimental.SuperBuilder; import lombok.extern.jackson.Jacksonized; -import javax.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotBlank; @SuperBuilder @Value diff --git a/pom.xml b/pom.xml index 3bca9f6ca..4c682dfda 100644 --- a/pom.xml +++ b/pom.xml @@ -43,8 +43,8 @@ 3.6.0 1.17.0 + 3.1.0 1.13.0 - 2.0.1.Final 5.9.3 1.18.34 1.18.20.0 From 7778103814c805e80f488ffccb2fbee529f6e491 Mon Sep 17 00:00:00 2001 From: Jack Oehling Date: Wed, 24 Jul 2024 12:00:09 -0400 Subject: [PATCH 339/415] COMN-328: Update JUnit 5.9.3 to 5.10.3 --- api/pom.xml | 8 +------- pom.xml | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/api/pom.xml b/api/pom.xml index ec98b8d13..eef944814 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -85,13 +85,7 @@ org.junit.jupiter - junit-jupiter-api - ${junit.version} - test - - - org.junit.jupiter - junit-jupiter-params + junit-jupiter ${junit.version} test diff --git a/pom.xml b/pom.xml index 3947f537d..3e8df3e8b 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,7 @@ 1.17.0 3.1.0 1.13.0 - 5.9.3 + 5.10.3 1.18.34 1.18.20.0 5.15.0 From 1fb22a1b503d086bf5ce8cb7e5616fc751f71f4a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 24 Jul 2024 17:52:12 +0000 Subject: [PATCH 340/415] Bump commons-codec:commons-codec Bumps the minor-and-patch group with 1 update in the / directory: [commons-codec:commons-codec](https://github.com/apache/commons-codec). Updates `commons-codec:commons-codec` from 1.17.0 to 1.17.1 - [Changelog](https://github.com/apache/commons-codec/blob/master/RELEASE-NOTES.txt) - [Commits](https://github.com/apache/commons-codec/compare/rel/commons-codec-1.17.0...rel/commons-codec-1.17.1) --- updated-dependencies: - dependency-name: commons-codec:commons-codec dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3e8df3e8b..2a556a707 100644 --- a/pom.xml +++ b/pom.xml @@ -42,7 +42,7 @@ 3.6.0 - 1.17.0 + 1.17.1 3.1.0 1.13.0 5.10.3 From 3350344604a13c281af615dcc69c3b8cbde7258e Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Fri, 2 Aug 2024 10:09:28 +0200 Subject: [PATCH 341/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.31.100 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 74374e018..fe03f4244 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.0-SNAPSHOT + 1.31.100 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index eef944814..f4c3450c2 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.0-SNAPSHOT + 1.31.100 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index db7208e08..3f12ffec8 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.0-SNAPSHOT + 1.31.100 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index c9769c9be..1651d45c1 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.0-SNAPSHOT + 1.31.100 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index acedca052..a34a5445b 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.0-SNAPSHOT + 1.31.100 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 4c5a6c595..61bd5bbd7 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.0-SNAPSHOT + 1.31.100 rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 2a556a707..a6105f80e 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.31.0-SNAPSHOT + 1.31.100 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.29.100 + rosette-api-java-binding-1.31.100 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 94157e093..c77747b4d 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.0-SNAPSHOT + 1.31.100 com.basistech.rosette rosette-api-release From 3c0ef570d9d17c098242a176fa0a9b40f3b9d88e Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Fri, 2 Aug 2024 10:09:32 +0200 Subject: [PATCH 342/415] [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index fe03f4244..b50d55e21 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.100 + 1.31.101-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index f4c3450c2..c76adf291 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.100 + 1.31.101-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 3f12ffec8..c25728478 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.100 + 1.31.101-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 1651d45c1..94aeb7af9 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.100 + 1.31.101-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index a34a5445b..06920503c 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.100 + 1.31.101-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 61bd5bbd7..7cb1ecb9a 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.100 + 1.31.101-SNAPSHOT rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index a6105f80e..41f40ad3d 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.31.100 + 1.31.101-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.31.100 + rosette-api-java-binding-1.29.100 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index c77747b4d..b26ed540f 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.100 + 1.31.101-SNAPSHOT com.basistech.rosette rosette-api-release From 8c150479ebb75ef788aa8eb27c1cebd35917319b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 19:24:49 +0000 Subject: [PATCH 343/415] Bump the minor-and-patch group with 3 updates Bumps the minor-and-patch group with 3 updates: [org.junit.jupiter:junit-jupiter-api](https://github.com/junit-team/junit5), [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit5) and [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5). Updates `org.junit.jupiter:junit-jupiter-api` from 5.10.3 to 5.11.0 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.10.3...r5.11.0) Updates `org.junit.jupiter:junit-jupiter-params` from 5.10.3 to 5.11.0 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.10.3...r5.11.0) Updates `org.junit.jupiter:junit-jupiter` from 5.10.3 to 5.11.0 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.10.3...r5.11.0) Updates `org.junit.jupiter:junit-jupiter-params` from 5.10.3 to 5.11.0 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.10.3...r5.11.0) Updates `org.junit.jupiter:junit-jupiter` from 5.10.3 to 5.11.0 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.10.3...r5.11.0) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-api dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter-params dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter-params dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 41f40ad3d..21f555238 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,7 @@ 1.17.1 3.1.0 1.13.0 - 5.10.3 + 5.11.0 1.18.34 1.18.20.0 5.15.0 From 82f3d2025fb51661cbe73e4e6cef12f6e8382e63 Mon Sep 17 00:00:00 2001 From: Julien Cherry <6952800+juliencherry@users.noreply.github.com> Date: Wed, 28 Aug 2024 01:34:25 -0400 Subject: [PATCH 344/415] COMN-318: Update the parent POM to version 20.0.0 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index b50d55e21..74374e018 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.101-SNAPSHOT + 1.31.0-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index c76adf291..eef944814 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.101-SNAPSHOT + 1.31.0-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index c25728478..db7208e08 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.101-SNAPSHOT + 1.31.0-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 94aeb7af9..c9769c9be 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.101-SNAPSHOT + 1.31.0-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 06920503c..acedca052 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.101-SNAPSHOT + 1.31.0-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 7cb1ecb9a..4c5a6c595 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.101-SNAPSHOT + 1.31.0-SNAPSHOT rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 21f555238..4249b6f86 100644 --- a/pom.xml +++ b/pom.xml @@ -18,11 +18,11 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.31.101-SNAPSHOT + 1.31.0-SNAPSHOT open-source-parent com.basistech - 19.0.0 + 20.0.0 pom diff --git a/release/pom.xml b/release/pom.xml index b26ed540f..94157e093 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.101-SNAPSHOT + 1.31.0-SNAPSHOT com.basistech.rosette rosette-api-release From 43b8a9cb8c696a471f907c2ef872e53fcd1c8a5b Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Thu, 26 Sep 2024 16:33:00 -0500 Subject: [PATCH 345/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.31.101 --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 74374e018..5ee6c3dbf 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.0-SNAPSHOT + 1.31.101 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index eef944814..ca61dadfe 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.0-SNAPSHOT + 1.31.101 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index db7208e08..1287da78e 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.0-SNAPSHOT + 1.31.101 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index c9769c9be..a234c447b 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.0-SNAPSHOT + 1.31.101 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index acedca052..fad9a6ebd 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.0-SNAPSHOT + 1.31.101 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 4c5a6c595..4cb0a842f 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.0-SNAPSHOT + 1.31.101 rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 4249b6f86..74a76af32 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.31.0-SNAPSHOT + 1.31.101 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.29.100 + rosette-api-java-binding-1.31.101 This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. diff --git a/release/pom.xml b/release/pom.xml index 94157e093..4964658be 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.0-SNAPSHOT + 1.31.101 com.basistech.rosette rosette-api-release From 2375f2a774e290c79dfd32a0d231ec44c793ee7f Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Thu, 26 Sep 2024 16:36:42 -0500 Subject: [PATCH 346/415] [maven-release-plugin] prepare for next development iteration --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 2 +- release/pom.xml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 5ee6c3dbf..74374e018 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.101 + 1.31.0-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index ca61dadfe..eef944814 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.101 + 1.31.0-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 1287da78e..db7208e08 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.101 + 1.31.0-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index a234c447b..c9769c9be 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.101 + 1.31.0-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index fad9a6ebd..acedca052 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.101 + 1.31.0-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 4cb0a842f..4c5a6c595 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.101 + 1.31.0-SNAPSHOT rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 74a76af32..d8825c9fd 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.31.101 + 1.31.0-SNAPSHOT open-source-parent com.basistech diff --git a/release/pom.xml b/release/pom.xml index 4964658be..94157e093 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.101 + 1.31.0-SNAPSHOT com.basistech.rosette rosette-api-release From aa907dbedb82d42916b15f49753513a5b1ebce46 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Oct 2024 19:15:15 +0000 Subject: [PATCH 347/415] Bump the minor-and-patch group across 1 directory with 3 updates Bumps the minor-and-patch group with 3 updates in the / directory: [org.junit.jupiter:junit-jupiter-api](https://github.com/junit-team/junit5), [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit5) and [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5). Updates `org.junit.jupiter:junit-jupiter-api` from 5.11.0 to 5.11.3 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.11.0...r5.11.3) Updates `org.junit.jupiter:junit-jupiter-params` from 5.11.0 to 5.11.3 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.11.0...r5.11.3) Updates `org.junit.jupiter:junit-jupiter` from 5.11.0 to 5.11.3 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.11.0...r5.11.3) Updates `org.junit.jupiter:junit-jupiter-params` from 5.11.0 to 5.11.3 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.11.0...r5.11.3) Updates `org.junit.jupiter:junit-jupiter` from 5.11.0 to 5.11.3 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.11.0...r5.11.3) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-api dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter-params dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter-params dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d8825c9fd..b5e0f06ab 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,7 @@ 1.17.1 3.1.0 1.13.0 - 5.11.0 + 5.11.3 1.18.34 1.18.20.0 5.15.0 From 3672111c5cbf5db9ef8bd69ddd119d845b954202 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Tue, 22 Oct 2024 14:35:48 +0200 Subject: [PATCH 348/415] WS-3314: update URL, API key header and README --- README.md | 6 +++--- .../main/java/com/basistech/rosette/api/HttpRosetteAPI.java | 4 ++-- .../java/com/basistech/rosette/examples/ExampleBase.java | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 36e3f7cb5..e7a5643f1 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Rosette uses natural language processing, statistical modeling, and machine lear ## Rosette API Access -- Rosette Cloud [Sign Up](https://developer.rosette.com/signup) +- Rosette Cloud [Sign Up](https://developer.babelstreet.com/signup) ## Quick Start #### Maven @@ -26,7 +26,7 @@ in the Maven Central badge at the top of this page. #### Test Releases Versions, of the form `x.y.z`, where `z` is greater than or equal to `100`, are internal testing versions. Do not use -them without consultation with Basis Technology Corp. +them without consultation with Babel Street.(???) #### Examples View small example programs for each Rosette endpoint in the @@ -36,7 +36,7 @@ View small example programs for each Rosette endpoint in the - [Binding API](https://rosette-api.github.io/java/) - [Rosette Platform API](https://docs.babelstreet.com/API/en/index-en.html) - [Binding Release Notes](https://github.com/rosette-api/java/wiki/Release-Notes) -- [Rosette Platform Release Notes](https://babelstreet.my.site.com/support/s/article/Rosette-Cloud-Release-Notes) +- [Rosette Platform Release Notes](https://docs.babelstreet.com/Release/en/rosette-cloud.html) - [Support](https://babelstreet.my.site.com/support/s/) - [Binding License: Apache 2.0](LICENSE.txt) diff --git a/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java b/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java index f55ed1aca..541cc9c92 100644 --- a/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java +++ b/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java @@ -83,7 +83,7 @@ */ public class HttpRosetteAPI extends AbstractRosetteAPI { - public static final String DEFAULT_URL_BASE = "https://api.rosette.com/rest/v1"; + public static final String DEFAULT_URL_BASE = "https://analytics.babelstreet.com/rest/v1"; public static final String SERVICE_NAME = "RosetteAPI"; public static final String BINDING_VERSION = getVersion(); public static final String USER_AGENT_STR = SERVICE_NAME + "-Java/" + BINDING_VERSION + "/" @@ -197,7 +197,7 @@ private void initHeaders(String key, List
additionalHeaders) { this.additionalHeaders.add(new BasicHeader(HttpHeaders.USER_AGENT, USER_AGENT_STR)); this.additionalHeaders.add(new BasicHeader(HttpHeaders.ACCEPT_ENCODING, "gzip")); if (key != null) { - this.additionalHeaders.add(new BasicHeader("X-RosetteAPI-Key", key)); + this.additionalHeaders.add(new BasicHeader("X-BabelStreetAPI-Key", key)); this.additionalHeaders.add(new BasicHeader("X-RosetteAPI-Binding", "java")); this.additionalHeaders.add(new BasicHeader("X-RosetteAPI-Binding-Version", BINDING_VERSION)); } diff --git a/examples/src/main/java/com/basistech/rosette/examples/ExampleBase.java b/examples/src/main/java/com/basistech/rosette/examples/ExampleBase.java index 781669fe1..51c9a8ff8 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/ExampleBase.java +++ b/examples/src/main/java/com/basistech/rosette/examples/ExampleBase.java @@ -50,7 +50,7 @@ protected String getApiKeyFromSystemProperty() { protected String getAltUrlFromSystemProperty() { String altUrlStr = System.getProperty(URL_PROP_NAME); if (altUrlStr == null || altUrlStr.trim().length() < 1) { - altUrlStr = "https://api.rosette.com/rest/v1"; + altUrlStr = "https://analytics.babelstreet.com/rest/v1"; } return altUrlStr.trim(); } From b98d9a27a8105cd15663554f51aaf97517c70410 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Tue, 22 Oct 2024 17:41:05 +0200 Subject: [PATCH 349/415] WS-3314: change references from Rosette to Analytics --- README.md | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index e7a5643f1..3445e8804 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,25 @@ -# Rosette by Babel Street +# Analytics by Babel Street --- [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.basistech.rosette/rosette-api/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.basistech.rosette/rosette-api-java-binding) -Rosette uses natural language processing, statistical modeling, and machine learning to analyze unstructured and semi-structured text across hundreds of language-script combinations, revealing valuable information and actionable data. Rosette provides endpoints for extracting entities and relationships, translating and comparing the similarity of names, categorizing and adding linguistic tags to text and more. Rosette Server is the on-premises installation of Rosette, with access to Rosette's functions as RESTful web service endpoints. This solves cloud security worries and allows customization (models/indexes) as needed for your business. +Our product is a full text processing pipeline from data preparation to extracting the most relevant information and +analysis utilizing precise, focused AI that has built-in human understanding. Text Analytics provides foundational +linguistic analysis for identifying languages and relating words. The result is enriched and normalized text for +high-speed search and processing without translation. +Text Analytics extracts events and entities — people, organizations, and places — from unstructured text and adds the +structure of associating those entities into events that deliver only the necessary information for near real-time +decision making. Accompanying tools shorten the process of training AI models to recognize domain-specific events. -## Rosette API Access -- Rosette Cloud [Sign Up](https://developer.babelstreet.com/signup) +The product delivers a multitude of ways to sharpen and expand search results. Semantic similarity expands search +beyond keywords to words with the same meaning, even in other languages. Sentiment analysis and topic extraction help +filter results to what’s relevant. + +## Analytics API Access +- Analytics Cloud [Sign Up](https://developer.babelstreet.com/signup) ## Quick Start #### Maven @@ -26,7 +36,7 @@ in the Maven Central badge at the top of this page. #### Test Releases Versions, of the form `x.y.z`, where `z` is greater than or equal to `100`, are internal testing versions. Do not use -them without consultation with Babel Street.(???) +them without consultation with Babel Street. #### Examples View small example programs for each Rosette endpoint in the @@ -34,9 +44,9 @@ View small example programs for each Rosette endpoint in the #### Documentation & Support - [Binding API](https://rosette-api.github.io/java/) -- [Rosette Platform API](https://docs.babelstreet.com/API/en/index-en.html) +- [Analytics Platform API](https://docs.babelstreet.com/API/en/index-en.html) - [Binding Release Notes](https://github.com/rosette-api/java/wiki/Release-Notes) -- [Rosette Platform Release Notes](https://docs.babelstreet.com/Release/en/rosette-cloud.html) +- [Analytics Platform Release Notes](https://docs.babelstreet.com/Release/en/rosette-cloud.html) - [Support](https://babelstreet.my.site.com/support/s/) - [Binding License: Apache 2.0](LICENSE.txt) From a580b026716f71895c5d77482bc67d86546e4caa Mon Sep 17 00:00:00 2001 From: Katsuya Tomioka Date: Tue, 22 Oct 2024 17:38:19 +0000 Subject: [PATCH 350/415] RCB-627: create rosette-api-all to combine model and json modules --- all/pom.xml | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 all/pom.xml diff --git a/all/pom.xml b/all/pom.xml new file mode 100644 index 000000000..8c83db90e --- /dev/null +++ b/all/pom.xml @@ -0,0 +1,74 @@ + + + + 4.0.0 + + com.basistech.rosette + rosette-api-java-binding + 1.31.0-SNAPSHOT + + rosette-api-all + rosette-api-all + Rosette API Communications + + false + + + + com.basistech + common-api + + + com.basistech.rosette + rosette-api + ${project.version} + + + com.fasterxml.jackson.core + jackson-databind + + + com.basistech + adm-json + + + + + + org.apache.maven.plugins + maven-shade-plugin + + + shade + + shade + + package + + true + + + com.basistech.* + + + + + + + + + From 682cbc61ca80b4804005376efcc8b58f41e8c7b2 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Thu, 24 Oct 2024 14:33:08 +0200 Subject: [PATCH 351/415] WS-3314: examples readme update --- examples/src/main/java/com/basistech/rosette/examples/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/src/main/java/com/basistech/rosette/examples/README.md b/examples/src/main/java/com/basistech/rosette/examples/README.md index 727811f55..3099836ad 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/README.md +++ b/examples/src/main/java/com/basistech/rosette/examples/README.md @@ -1,5 +1,5 @@ ## Endpoint Examples -Each example file demonstrates one of the capabilities of the Rosette Platform. +Each example file demonstrates one of the capabilities of the Analytics Platform. Here are some methods for running the examples. Each example will also accept an optional `-Drosette.api.altUrl` parameter for overriding the default URL. From f07ce0a6f28fea2e7c8e047a8733505d222621f3 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Thu, 24 Oct 2024 17:12:04 +0200 Subject: [PATCH 352/415] WS-3314: dark and light mode logo --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3445e8804..649f3113a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,11 @@ - + + + + + Babel Street Logo + + + # Analytics by Babel Street --- From 163e232c5b47a5611bcfe7d9bdeee33b60bf5744 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Thu, 24 Oct 2024 17:12:53 +0200 Subject: [PATCH 353/415] WS-3314: dark and light mode logo the right way around --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 649f3113a..4493ff174 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ - - + + Babel Street Logo From e53ef90af7d50f93bbc9a660c34bbd29aa2381f6 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Thu, 24 Oct 2024 17:18:48 +0200 Subject: [PATCH 354/415] WS-3314: dark and light mode logo equal width and height --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4493ff174..af863e3af 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ - Babel Street Logo + Babel Street Logo From 1377f1ec43e6090ff5064a484c96eaa1422aff40 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Fri, 25 Oct 2024 12:41:24 +0200 Subject: [PATCH 355/415] WS-3314: dark and light mode logo square versions --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index af863e3af..1e690eb21 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ - - - Babel Street Logo + + + Babel Street Logo From c0415ecd33d92af70786e9f40274946e79b0e20c Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Fri, 25 Oct 2024 12:44:48 +0200 Subject: [PATCH 356/415] WS-3314: fiy typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1e690eb21..71c43c29b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ - + Babel Street Logo From cd71a4d878cb7beed586e6a5f822fc71972e2d91 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Fri, 25 Oct 2024 15:38:29 +0200 Subject: [PATCH 357/415] WS-3314: remove Rosette mentions from javadoc and error message --- .../basistech/rosette/api/HttpRosetteAPI.java | 44 +++++++++---------- .../rosette/api/MorphologicalFeature.java | 2 +- .../api/common/AbstractRosetteAPI.java | 16 +++---- .../rosette/apimodel/AccuracyMode.java | 2 +- .../apimodel/CommonRosetteAPIException.java | 2 +- .../rosette/apimodel/ConstantsResponse.java | 4 +- .../rosette/apimodel/DocumentRequest.java | 4 +- .../rosette/apimodel/ErrorResponse.java | 2 +- .../rosette/apimodel/InfoResponse.java | 2 +- .../rosette/apimodel/batch/BatchRequest.java | 10 ++--- .../rosette/apimodel/package-info.java | 2 +- 11 files changed, 45 insertions(+), 45 deletions(-) diff --git a/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java b/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java index 541cc9c92..41bd24e55 100644 --- a/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java +++ b/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java @@ -79,7 +79,7 @@ import static java.net.HttpURLConnection.HTTP_OK; /** - * Access to the RosetteAPI via HTTP. + * Access to the Analytics API via HTTP. */ public class HttpRosetteAPI extends AbstractRosetteAPI { @@ -104,16 +104,16 @@ private HttpRosetteAPI() { } /** - * Constructs a Rosette API instance using the builder syntax. + * Constructs an Analytics API instance using the builder syntax. * - * @param key Rosette API key. This may be null for use with an on-premise deployment - * of the Rosette API. - * @param urlToCall Alternate Rosette API URL. {@code null} uses the default, public, URL. + * @param key Analytics API key. This may be null for use with an on-premise deployment + * of the Analytics API. + * @param urlToCall Alternate Analytics API URL. {@code null} uses the default, public, URL. * @param failureRetries Number of times to retry in case of failure; {@code null} uses the * default value: 1. * @param connectionConcurrency Number of concurrent connections. Pass this if have subscribed * to a plan that supports enhanced concurrency, or if you are using - * an on-premise deployment of the Rosette API. {@code null} uses the + * an on-premise deployment of the Analytics API. {@code null} uses the * default value: 2. * @throws HttpRosetteAPIException Problem with the API request */ @@ -216,10 +216,10 @@ public int getFailureRetries() { } /** - * Gets information about the Rosette API, returns name, version, build number and build time. + * Gets information about the Analytics API, returns name, version, build number and build time. * * @return InfoResponse - * @throws HttpRosetteAPIException Rosette specific exception + * @throws HttpRosetteAPIException Analytics specific exception * @throws IOException General IO exception */ public InfoResponse info() throws IOException, HttpRosetteAPIException { @@ -227,10 +227,10 @@ public InfoResponse info() throws IOException, HttpRosetteAPIException { } /** - * Pings the Rosette API for a response indicating that the service is available. + * Pings the Analytics API for a response indicating that the service is available. * * @return PingResponse - * @throws HttpRosetteAPIException Rosette specific exception + * @throws HttpRosetteAPIException Analytics specific exception * @throws IOException General IO exception */ public PingResponse ping() throws IOException, HttpRosetteAPIException { @@ -238,10 +238,10 @@ public PingResponse ping() throws IOException, HttpRosetteAPIException { } /** - * Gets the set of language and script codes supported by the specified Rosette API endpoint. + * Gets the set of language and script codes supported by the specified Analytics API endpoint. * * @return SupportedLanguagesResponse - * @throws HttpRosetteAPIException for an error returned from the Rosette API. + * @throws HttpRosetteAPIException for an error returned from the Analytics API. */ @Override public SupportedLanguagesResponse getSupportedLanguages(String endpoint) throws HttpRosetteAPIException { @@ -254,12 +254,12 @@ public SupportedLanguagesResponse getSupportedLanguages(String endpoint) throws } /** - * Gets the set of language, script codes and transliteration scheme pairs supported by the specified Rosette API + * Gets the set of language, script codes and transliteration scheme pairs supported by the specified Analytics API * endpoint. * - * @param endpoint Rosette API endpoint. + * @param endpoint Analytics API endpoint. * @return SupportedLanguagePairsResponse - * @throws HttpRosetteAPIException for an error returned from the Rosette API. + * @throws HttpRosetteAPIException for an error returned from the Analytics API. */ @Override public SupportedLanguagePairsResponse getSupportedLanguagePairs(String endpoint) throws HttpRosetteAPIException { @@ -279,7 +279,7 @@ public SupportedLanguagePairsResponse getSupportedLanguagePairs(String endpoint) * @param the type of the request object. * @param the type of the response object. * @return the response. - * @throws HttpRosetteAPIException for an error returned from the Rosette API. + * @throws HttpRosetteAPIException for an error returned from the Analytics API. * @throws RosetteRuntimeException for other errors, such as communications problems with HTTP. */ @Override @@ -300,7 +300,7 @@ public ResponseType * @param request the data for the request. * @param the type of the request object. * @return the response, {@link com.basistech.rosette.dm.AnnotatedText}. - * @throws HttpRosetteAPIException for an error returned from the Rosette API. + * @throws HttpRosetteAPIException for an error returned from the Analytics API. * @throws RosetteRuntimeException for other errors, such as communications problems with HTTP. */ @Override @@ -326,11 +326,11 @@ public AnnotatedText perform(String endpoint, Requ } /** - * Sends a GET request to Rosette API. + * Sends a GET request to Analytics API. *

* Returns a Response. * - * @param urlStr Rosette API end point. + * @param urlStr Analytics API end point. * @param clazz Response class * @return Response * @throws HttpRosetteAPIException @@ -351,11 +351,11 @@ private T sendGetRequest(String urlStr, Class clazz) thr } /** - * Sends a POST request to Rosette API. + * Sends a POST request to Analytics API. *

* Returns a Response. * - * @param urlStr Rosette API end point. + * @param urlStr Analytics API end point. * @param clazz Response class * @return Response * @throws IOException @@ -570,7 +570,7 @@ private T getResponse(HttpResponse httpResponse, Class cla } if (429 == status) { String concurrencyMessage = "You have exceeded your plan's limit on concurrent calls. " - + "This could be caused by multiple processes or threads making Rosette API calls " + + "This could be caused by multiple processes or threads making Analytics API calls " + "in parallel, or if your httpClient is configured with higher concurrency " + "than your plan allows."; if (emHeader == null) { diff --git a/api/src/main/java/com/basistech/rosette/api/MorphologicalFeature.java b/api/src/main/java/com/basistech/rosette/api/MorphologicalFeature.java index c426fa5be..7edc43785 100644 --- a/api/src/main/java/com/basistech/rosette/api/MorphologicalFeature.java +++ b/api/src/main/java/com/basistech/rosette/api/MorphologicalFeature.java @@ -17,7 +17,7 @@ package com.basistech.rosette.api; /** - * Specify which feature you want Rosette API Morphology endpoint to return. Specify COMPLETE for every feature. + * Specify which feature you want Analytics API Morphology endpoint to return. Specify COMPLETE for every feature. */ public enum MorphologicalFeature { COMPLETE("complete"), diff --git a/common/src/main/java/com/basistech/rosette/api/common/AbstractRosetteAPI.java b/common/src/main/java/com/basistech/rosette/api/common/AbstractRosetteAPI.java index f1f6ea665..1ea31110a 100644 --- a/common/src/main/java/com/basistech/rosette/api/common/AbstractRosetteAPI.java +++ b/common/src/main/java/com/basistech/rosette/api/common/AbstractRosetteAPI.java @@ -29,7 +29,7 @@ import com.basistech.rosette.dm.AnnotatedText; /** - * This class defines the common API to Rosette, whether over HTTP or other integration mechanisms. + * This class defines the common API to Analytics, whether over HTTP or other integration mechanisms. */ public abstract class AbstractRosetteAPI implements AutoCloseable { @@ -89,19 +89,19 @@ public abstract class AbstractRosetteAPI implements AutoCloseable { )); /** - * Gets the set of language and script codes supported by the specified Rosette API endpoint. + * Gets the set of language and script codes supported by the specified Analytics API endpoint. * - * @param endpoint Rosette API endpoint. + * @param endpoint Analytics API endpoint. * @return SupportedLanguagesResponse * @throws CommonRosetteAPIException for an error. */ public abstract SupportedLanguagesResponse getSupportedLanguages(String endpoint) throws CommonRosetteAPIException; /** - * Gets the set of language, script codes and transliteration scheme pairs supported by the specified Rosette API + * Gets the set of language, script codes and transliteration scheme pairs supported by the specified Analytics API * endpoint. * - * @param endpoint Rosette API endpoint. + * @param endpoint Analytics API endpoint. * @return SupportedLanguagePairsResponse * @throws CommonRosetteAPIException for an error returned from the Rosette API. */ @@ -109,7 +109,7 @@ public abstract SupportedLanguagePairsResponse getSupportedLanguagePairs(String throws CommonRosetteAPIException; /** - * Perform a request to an endpoint of the Rosette API. + * Perform a request to an endpoint of the Analytics API. * @param endpoint which endpoint. * @param request the data for the request. * @param The class of the request object for this endpoint. @@ -123,7 +123,7 @@ public abstract SupportedLanguagePairsResponse getSupportedLanguagePairs(String throws CommonRosetteAPIException; /** - * Perform a request to an endpoint of the Rosette API. + * Perform a request to an endpoint of the Analytics API. * @param endpoint which endpoint. * @param request the data for the request. * @param The class of the request object for this endpoint. @@ -134,7 +134,7 @@ public abstract AnnotatedText perform(String endpo throws CommonRosetteAPIException; /** - * Start an asynchronous request to an endpoint of the Rosette API. + * Start an asynchronous request to an endpoint of the Analytics API. * @param endpoint which endpoint. * @param request the data for the request. * @param The class of the request object for this endpoint. diff --git a/model/src/main/java/com/basistech/rosette/apimodel/AccuracyMode.java b/model/src/main/java/com/basistech/rosette/apimodel/AccuracyMode.java index 926ab4bbc..6526aebe5 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/AccuracyMode.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/AccuracyMode.java @@ -19,7 +19,7 @@ import java.util.EnumSet; /** - * Rosette API relationship accuracy mode + * Analytics API relationship accuracy mode */ public enum AccuracyMode { PRECISION("precision"), diff --git a/model/src/main/java/com/basistech/rosette/apimodel/CommonRosetteAPIException.java b/model/src/main/java/com/basistech/rosette/apimodel/CommonRosetteAPIException.java index 2cf9dfd90..04ffc7eff 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/CommonRosetteAPIException.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/CommonRosetteAPIException.java @@ -18,7 +18,7 @@ import com.basistech.rosette.RosetteRuntimeException; /** - * Exception from the Rosette API inherit from this exception. + * Exception from the Analytics API inherit from this exception. */ public class CommonRosetteAPIException extends RosetteRuntimeException { private final transient ErrorResponse errorResponse; diff --git a/model/src/main/java/com/basistech/rosette/apimodel/ConstantsResponse.java b/model/src/main/java/com/basistech/rosette/apimodel/ConstantsResponse.java index 0d13aa25c..081eea980 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/ConstantsResponse.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/ConstantsResponse.java @@ -31,12 +31,12 @@ public class ConstantsResponse extends Response { /** - * @return the version of Rosette API + * @return the version of Analytics API */ private final String version; /** - * @return the Rosette API build info + * @return the Analytics API build info */ private final String build; diff --git a/model/src/main/java/com/basistech/rosette/apimodel/DocumentRequest.java b/model/src/main/java/com/basistech/rosette/apimodel/DocumentRequest.java index 6590c6d1d..abf6acc7c 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/DocumentRequest.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/DocumentRequest.java @@ -24,7 +24,7 @@ import java.io.InputStream; /** - * This class represents the common information for all document processing requests to the Rosette API. + * This class represents the common information for all document processing requests to the Analytics API. * Most applications do not use this class directly; the methods of the {@code RosetteAPI} class * create request objects. More complex applications may create objects of * this class for themselves via the {@link DocumentRequest.DocumentRequestBuilder}. @@ -38,7 +38,7 @@ *

  • A binary file image, attached as an additional MIME part to the request. * The application provides a MIME content type in {@code contentType}.
  • *
  • A URL of a data to download. The application provides the URL in - * {@code contentUri}. Note that the Rosette API respects the content type + * {@code contentUri}. Note that the Analytics API respects the content type * returned by the server for downloaded data.
  • * * In this object the 'content' item is an {@link Object}; it contains a {@link String} diff --git a/model/src/main/java/com/basistech/rosette/apimodel/ErrorResponse.java b/model/src/main/java/com/basistech/rosette/apimodel/ErrorResponse.java index 49851851c..084be0436 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/ErrorResponse.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/ErrorResponse.java @@ -22,7 +22,7 @@ import lombok.EqualsAndHashCode; /** - * Rosette API response error data + * Analytics API response error data */ @Data @EqualsAndHashCode diff --git a/model/src/main/java/com/basistech/rosette/apimodel/InfoResponse.java b/model/src/main/java/com/basistech/rosette/apimodel/InfoResponse.java index e53fa4fd7..673944048 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/InfoResponse.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/InfoResponse.java @@ -22,7 +22,7 @@ import lombok.Getter; /** - * Rosette API information + * Analytics API information */ @Getter @EqualsAndHashCode diff --git a/model/src/main/java/com/basistech/rosette/apimodel/batch/BatchRequest.java b/model/src/main/java/com/basistech/rosette/apimodel/batch/BatchRequest.java index a47eabe37..4d610d05b 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/batch/BatchRequest.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/batch/BatchRequest.java @@ -39,12 +39,12 @@ public final class BatchRequest { private final String batchId = UUID.randomUUID().toString(); /** - * A URL for RosetteAPI to call to inform you the completion of the batch. + * A URL for Analytics API to call to inform you the completion of the batch. * It must be accessible on the Internet and can only be http: or https:. - * RosetteAPI will use the GET method so optional parameters need to be + * Analytics API will use the GET method so optional parameters need to be * included as query parameters in the URL. * - * @return completionCallbackUrl a URL for RosetteAPI to call when batch completes + * @return completionCallbackUrl a URL for Analytics API to call when batch completes */ private final String completionCallbackUrl; @@ -56,8 +56,8 @@ public final class BatchRequest { /** * Specifies where the results should be stored. Only a valid AWS S3 URL * is supported at this time. The S3 bucket needs to have a proper policy - * statement to grant read/write permission to RosetteAPI within the batch - * processing time window. RosetteAPI's AWS account number is 625892746452. + * statement to grant read/write permission to Analytics API within the batch + * processing time window. Analytics API's AWS account number is 625892746452. * * Example policy statement: * diff --git a/model/src/main/java/com/basistech/rosette/apimodel/package-info.java b/model/src/main/java/com/basistech/rosette/apimodel/package-info.java index d66c10da7..0cdb9afa3 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/package-info.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/package-info.java @@ -16,6 +16,6 @@ /** * The classes in this package make up the data model for simple requests - * and responses to the Rosette API. + * and responses to the Analytics API. */ package com.basistech.rosette.apimodel; From d2bbebb86518fd9f42e029c33d57683fbf8c2bee Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Fri, 25 Oct 2024 16:07:16 +0200 Subject: [PATCH 358/415] WS-3314: removing rosette from example variables --- .../rosette/examples/AddressSimilarityExample.java | 4 ++-- .../rosette/examples/CategoriesExample.java | 4 ++-- .../rosette/examples/ConcurrencyExample.java | 14 +++++++------- .../rosette/examples/EntitiesExample.java | 4 ++-- .../basistech/rosette/examples/EventsExample.java | 4 ++-- .../basistech/rosette/examples/ExampleBase.java | 2 +- .../basistech/rosette/examples/InfoExample.java | 4 ++-- .../rosette/examples/LanguageExample.java | 4 ++-- .../examples/LanguageMultilingualExample.java | 6 +++--- .../examples/MorphologyCompleteExample.java | 4 ++-- .../MorphologyCompoundComponentsExample.java | 4 ++-- .../examples/MorphologyHanReadingsExample.java | 4 ++-- .../rosette/examples/MorphologyLemmasExample.java | 4 ++-- .../examples/MorphologyPartsOfSpeechExample.java | 4 ++-- .../rosette/examples/NameDeduplicationExample.java | 4 ++-- .../examples/NameMultipleTranslationsExample.java | 4 ++-- .../rosette/examples/NameSimilarityExample.java | 4 ++-- .../rosette/examples/NameTranslationExample.java | 4 ++-- .../basistech/rosette/examples/PingExample.java | 4 ++-- .../java/com/basistech/rosette/examples/README.md | 2 +- .../rosette/examples/RecordSimilarityExample.java | 4 ++-- .../rosette/examples/RelationshipsExample.java | 4 ++-- .../rosette/examples/SemanticVectorsExample.java | 4 ++-- .../rosette/examples/SentencesExample.java | 4 ++-- .../rosette/examples/SentimentExample.java | 4 ++-- .../rosette/examples/SimilarTermsExample.java | 4 ++-- .../examples/SyntaxDependenciesExample.java | 6 +++--- .../basistech/rosette/examples/TokensExample.java | 4 ++-- .../basistech/rosette/examples/TopicsExample.java | 4 ++-- .../rosette/examples/TransliterationExample.java | 4 ++-- 30 files changed, 65 insertions(+), 65 deletions(-) diff --git a/examples/src/main/java/com/basistech/rosette/examples/AddressSimilarityExample.java b/examples/src/main/java/com/basistech/rosette/examples/AddressSimilarityExample.java index 718a1583b..9e96746ac 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/AddressSimilarityExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/AddressSimilarityExample.java @@ -57,7 +57,7 @@ private void run() throws IOException { UnfieldedAddress address2 = UnfieldedAddress.builder() .address(addressSimilarityAddress2) .build(); - HttpRosetteAPI rosetteApi = new HttpRosetteAPI.Builder() + HttpRosetteAPI api = new HttpRosetteAPI.Builder() .key(getApiKeyFromSystemProperty()) .url(getAltUrlFromSystemProperty()) .build(); @@ -67,7 +67,7 @@ private void run() throws IOException { .address1(address1) .address2(address2) .build(); - AddressSimilarityResponse response = rosetteApi + AddressSimilarityResponse response = api .perform(ADDRESS_SIMILARITY_SERVICE_PATH, request, AddressSimilarityResponse.class); System.out.println(responseToJson(response)); diff --git a/examples/src/main/java/com/basistech/rosette/examples/CategoriesExample.java b/examples/src/main/java/com/basistech/rosette/examples/CategoriesExample.java index 6e2a937b1..565d8a329 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/CategoriesExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/CategoriesExample.java @@ -43,7 +43,7 @@ public static void main(String[] args) { private void run() throws IOException { String categoriesTextData = "If you are a fan of the British television series Downton Abbey and you are planning to be in New York anytime before April 2nd, there is a perfect stop for you while in town."; - HttpRosetteAPI rosetteApi = new HttpRosetteAPI.Builder() + HttpRosetteAPI api = new HttpRosetteAPI.Builder() .key(getApiKeyFromSystemProperty()) .url(getAltUrlFromSystemProperty()) .build(); @@ -52,7 +52,7 @@ private void run() throws IOException { DocumentRequest request = DocumentRequest.builder() .content(categoriesTextData) .build(); - CategoriesResponse response = rosetteApi.perform(CATEGORIES_SERVICE_PATH, request, CategoriesResponse.class); + CategoriesResponse response = api.perform(CATEGORIES_SERVICE_PATH, request, CategoriesResponse.class); System.out.println(responseToJson(response)); } } diff --git a/examples/src/main/java/com/basistech/rosette/examples/ConcurrencyExample.java b/examples/src/main/java/com/basistech/rosette/examples/ConcurrencyExample.java index eb97bff0c..1596d21af 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/ConcurrencyExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/ConcurrencyExample.java @@ -64,7 +64,7 @@ public static void main(String[] args) { private void run() throws IOException, ExecutionException, InterruptedException { //Setting up the Api int maximumConcurrency = 3; - HttpRosetteAPI rosetteApi = new HttpRosetteAPI.Builder() + HttpRosetteAPI api = new HttpRosetteAPI.Builder() .key(getApiKeyFromSystemProperty()) .url(getAltUrlFromSystemProperty()) .connectionConcurrency(maximumConcurrency) @@ -80,21 +80,21 @@ private void run() throws IOException, ExecutionException, InterruptedException + "In that role, they were jointly responsible for supervising the trial unit at the agency’s Washington D.C. headquarters " + "as well as coordinating with litigators in the SEC’s 11 regional offices around the country."; requests.add( - rosetteApi.createRosetteRequest(ENTITIES_SERVICE_PATH, + api.createRosetteRequest(ENTITIES_SERVICE_PATH, DocumentRequest.builder().content(entitiesTextData).build(), EntitiesResponse.class) ); // Setting up language request String languageData = "Por favor Señorita, says the man."; requests.add( - rosetteApi.createRosetteRequest(LANGUAGE_SERVICE_PATH, + api.createRosetteRequest(LANGUAGE_SERVICE_PATH, DocumentRequest.builder().content(languageData).build(), LanguageResponse.class) ); // Setting up morphology request // No content is given to this request and it will return an error response requests.add( - rosetteApi.createRosetteRequest(MORPHOLOGY_SERVICE_PATH + "/" + MorphologicalFeature.COMPLETE, + api.createRosetteRequest(MORPHOLOGY_SERVICE_PATH + "/" + MorphologicalFeature.COMPLETE, DocumentRequest.builder().build(), MorphologyResponse.class) ); @@ -108,21 +108,21 @@ private void run() throws IOException, ExecutionException, InterruptedException } double threshold = 0.75; requests.add( - rosetteApi.createRosetteRequest(NAME_DEDUPLICATION_SERVICE_PATH, + api.createRosetteRequest(NAME_DEDUPLICATION_SERVICE_PATH, NameDeduplicationRequest.builder().names(names).threshold(threshold).build(), NameDeduplicationResponse.class) ); //Setting up the tokens request String tokensData = "北京大学生物系主任办公室内部会议"; requests.add( - rosetteApi.createRosetteRequest(TOKENS_SERVICE_PATH, + api.createRosetteRequest(TOKENS_SERVICE_PATH, DocumentRequest.builder().content(tokensData).build(), TokensResponse.class) ); //Setting up the transliteration request String transliterationData = "ana r2ye7 el gam3a el sa3a 3 el 3asr"; requests.add( - rosetteApi.createRosetteRequest(TRANSLITERATION_SERVICE_PATH, + api.createRosetteRequest(TRANSLITERATION_SERVICE_PATH, DocumentRequest.builder().content(transliterationData).build(), TransliterationResponse.class) ); diff --git a/examples/src/main/java/com/basistech/rosette/examples/EntitiesExample.java b/examples/src/main/java/com/basistech/rosette/examples/EntitiesExample.java index 283d36d60..b2c870c8b 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/EntitiesExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/EntitiesExample.java @@ -39,14 +39,14 @@ public static void main(String[] args) { private void run() throws IOException { String entitiesTextData = "The Securities and Exchange Commission today announced the leadership of the agency’s trial unit. Bridget Fitzpatrick has been named Chief Litigation Counsel of the SEC and David Gottesman will continue to serve as the agency’s Deputy Chief Litigation Counsel. Since December 2016, Ms. Fitzpatrick and Mr. Gottesman have served as Co-Acting Chief Litigation Counsel. In that role, they were jointly responsible for supervising the trial unit at the agency’s Washington D.C. headquarters as well as coordinating with litigators in the SEC’s 11 regional offices around the country."; - HttpRosetteAPI rosetteApi = new HttpRosetteAPI.Builder() + HttpRosetteAPI api = new HttpRosetteAPI.Builder() .key(getApiKeyFromSystemProperty()) .url(getAltUrlFromSystemProperty()) .build(); DocumentRequest request = DocumentRequest.builder() .content(entitiesTextData) .build(); - EntitiesResponse response = rosetteApi.perform(ENTITIES_SERVICE_PATH, request, EntitiesResponse.class); + EntitiesResponse response = api.perform(ENTITIES_SERVICE_PATH, request, EntitiesResponse.class); System.out.println(responseToJson(response)); } } diff --git a/examples/src/main/java/com/basistech/rosette/examples/EventsExample.java b/examples/src/main/java/com/basistech/rosette/examples/EventsExample.java index 6d05dac81..930677e13 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/EventsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/EventsExample.java @@ -38,7 +38,7 @@ public static void main(String[] args) { private void run() throws Exception { String topicsData = "I am looking for flights to Super Bowl 2022 in Inglewood, LA."; - HttpRosetteAPI rosetteApi = new HttpRosetteAPI.Builder() + HttpRosetteAPI api = new HttpRosetteAPI.Builder() .key(getApiKeyFromSystemProperty()) .url(getAltUrlFromSystemProperty()) .build(); @@ -46,7 +46,7 @@ private void run() throws Exception { .language(LanguageCode.ENGLISH) .content(topicsData) .build(); - EventsResponse resp = rosetteApi.perform(EVENTS_SERVICE_PATH, request, EventsResponse.class); + EventsResponse resp = api.perform(EVENTS_SERVICE_PATH, request, EventsResponse.class); System.out.println(responseToJson(resp)); } } diff --git a/examples/src/main/java/com/basistech/rosette/examples/ExampleBase.java b/examples/src/main/java/com/basistech/rosette/examples/ExampleBase.java index 51c9a8ff8..735ce03bd 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/ExampleBase.java +++ b/examples/src/main/java/com/basistech/rosette/examples/ExampleBase.java @@ -66,7 +66,7 @@ protected static void showUsage(Class commandClass) { /** * Converts a response to JSON string * - * @param response {@link com.basistech.rosette.apimodel.Response Response} from RosetteAPI + * @param response {@link com.basistech.rosette.apimodel.Response Response} from Analytics API * @return the json string. * @throws JsonProcessingException if the Jackson library throws an error serializing. */ diff --git a/examples/src/main/java/com/basistech/rosette/examples/InfoExample.java b/examples/src/main/java/com/basistech/rosette/examples/InfoExample.java index 2c6b5c6f1..f2782b34f 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/InfoExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/InfoExample.java @@ -35,13 +35,13 @@ public static void main(String[] args) { } private void run() throws IOException { - HttpRosetteAPI rosetteApi = new HttpRosetteAPI.Builder() + HttpRosetteAPI api = new HttpRosetteAPI.Builder() .key(getApiKeyFromSystemProperty()) .url(getAltUrlFromSystemProperty()) .build(); //The api object creates an http client, but to provide your own: //api.httpClient(CloseableHttpClient) - InfoResponse response = rosetteApi.info(); + InfoResponse response = api.info(); System.out.println(responseToJson(response)); } } diff --git a/examples/src/main/java/com/basistech/rosette/examples/LanguageExample.java b/examples/src/main/java/com/basistech/rosette/examples/LanguageExample.java index 9690034cd..dca3fc9e4 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/LanguageExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/LanguageExample.java @@ -41,7 +41,7 @@ public static void main(String[] args) { private void run() throws IOException { String languageData = "Por favor Señorita, says the man."; - HttpRosetteAPI rosetteApi = new HttpRosetteAPI.Builder() + HttpRosetteAPI api = new HttpRosetteAPI.Builder() .key(getApiKeyFromSystemProperty()) .url(getAltUrlFromSystemProperty()) .build(); @@ -50,7 +50,7 @@ private void run() throws IOException { DocumentRequest request = DocumentRequest.builder() .content(languageData) .build(); - LanguageResponse response = rosetteApi.perform(LANGUAGE_SERVICE_PATH, request, LanguageResponse.class); + LanguageResponse response = api.perform(LANGUAGE_SERVICE_PATH, request, LanguageResponse.class); System.out.println(responseToJson(response)); } } diff --git a/examples/src/main/java/com/basistech/rosette/examples/LanguageMultilingualExample.java b/examples/src/main/java/com/basistech/rosette/examples/LanguageMultilingualExample.java index 7fbe724d3..4a63f3b38 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/LanguageMultilingualExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/LanguageMultilingualExample.java @@ -41,12 +41,12 @@ public static void main(String[] args) { private void run() throws IOException { String languageMultilingualData = "On Thursday, as protesters gathered in Washington D.C., the United States Federal Communications Commission under Chairman Ajit Pai voted 3-2 to overturn a 2015 decision, commonly called Net Neutrality, that forbade Internet service providers (ISPs) such as Verizon, Comcast, and AT&T from blocking individual websites or charging websites or customers more for faster load times. Quatre femmes ont été nommées au Conseil de rédaction de la loi du Qatar. Jeudi, le décret royal du Qatar a annoncé que 28 nouveaux membres ont été nommés pour le Conseil de la Choura du pays. ذكرت مصادر أمنية يونانية، أن 9 موقوفين من منظمة \"د هـ ك ب ج\" الذين كانت قد أوقفتهم الشرطة اليونانية في وقت سابق كانوا يخططون لاغتيال الرئيس التركي رجب طيب أردوغان."; - HttpRosetteAPI rosetteApi = new HttpRosetteAPI.Builder() + HttpRosetteAPI api = new HttpRosetteAPI.Builder() .key(getApiKeyFromSystemProperty()) .url(getAltUrlFromSystemProperty()) .build(); //The api object creates an http client, but to provide your own: - //rosetteApi.httpClient(CloseableHttpClient) + //api.httpClient(CloseableHttpClient) LanguageOptions options = LanguageOptions.builder().multilingual(true).build(); @@ -54,7 +54,7 @@ private void run() throws IOException { .content(languageMultilingualData) .options(options) .build(); - LanguageResponse response = rosetteApi.perform(LANGUAGE_SERVICE_PATH, request, LanguageResponse.class); + LanguageResponse response = api.perform(LANGUAGE_SERVICE_PATH, request, LanguageResponse.class); System.out.println(responseToJson(response)); } } diff --git a/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompleteExample.java b/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompleteExample.java index a60fea15e..660eba9a8 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompleteExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompleteExample.java @@ -42,14 +42,14 @@ public static void main(String[] args) { private void run() throws IOException { String morphologyCompleteData = "The quick brown fox jumped over the lazy dog. 👍🏾 Yes he did. B)"; - HttpRosetteAPI rosetteApi = new HttpRosetteAPI.Builder() + HttpRosetteAPI api = new HttpRosetteAPI.Builder() .key(getApiKeyFromSystemProperty()) .url(getAltUrlFromSystemProperty()) .build(); DocumentRequest request = DocumentRequest.builder().content(morphologyCompleteData).build(); //The api object creates an http client, but to provide your own: //api.httpClient(CloseableHttpClient) - MorphologyResponse response = rosetteApi.perform(MORPHOLOGY_SERVICE_PATH + "/" + MorphologicalFeature.COMPLETE, request, MorphologyResponse.class); + MorphologyResponse response = api.perform(MORPHOLOGY_SERVICE_PATH + "/" + MorphologicalFeature.COMPLETE, request, MorphologyResponse.class); System.out.println(responseToJson(response)); } } diff --git a/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompoundComponentsExample.java b/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompoundComponentsExample.java index 1b0f83e57..40964281d 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompoundComponentsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompoundComponentsExample.java @@ -42,7 +42,7 @@ public static void main(String[] args) { private void run() throws IOException { String morphologyCompoundComponentsData = "Rechtsschutzversicherungsgesellschaften"; - HttpRosetteAPI rosetteApi = new HttpRosetteAPI.Builder() + HttpRosetteAPI api = new HttpRosetteAPI.Builder() .key(getApiKeyFromSystemProperty()) .url(getAltUrlFromSystemProperty()) .build(); @@ -51,7 +51,7 @@ private void run() throws IOException { DocumentRequest request = DocumentRequest.builder().content(morphologyCompoundComponentsData) .language(LanguageCode.GERMAN) // example of specifying the language. .build(); - MorphologyResponse response = rosetteApi.perform(MORPHOLOGY_SERVICE_PATH + "/" + MorphologicalFeature.COMPOUND_COMPONENTS, + MorphologyResponse response = api.perform(MORPHOLOGY_SERVICE_PATH + "/" + MorphologicalFeature.COMPOUND_COMPONENTS, request, MorphologyResponse.class); System.out.println(responseToJson(response)); diff --git a/examples/src/main/java/com/basistech/rosette/examples/MorphologyHanReadingsExample.java b/examples/src/main/java/com/basistech/rosette/examples/MorphologyHanReadingsExample.java index 4e43b98ef..383e61aa7 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/MorphologyHanReadingsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/MorphologyHanReadingsExample.java @@ -41,13 +41,13 @@ public static void main(String[] args) { private void run() throws IOException { String morphologyHanReadingsData = "北京大学生物系主任办公室内部会议"; - HttpRosetteAPI rosetteApi = new HttpRosetteAPI.Builder() + HttpRosetteAPI api = new HttpRosetteAPI.Builder() .key(getApiKeyFromSystemProperty()) .url(getAltUrlFromSystemProperty()) .build(); DocumentRequest request = DocumentRequest.builder().content(morphologyHanReadingsData) .build(); - MorphologyResponse response = rosetteApi.perform(MORPHOLOGY_SERVICE_PATH + "/" + MorphologicalFeature.HAN_READINGS, + MorphologyResponse response = api.perform(MORPHOLOGY_SERVICE_PATH + "/" + MorphologicalFeature.HAN_READINGS, request, MorphologyResponse.class); System.out.println(responseToJson(response)); } diff --git a/examples/src/main/java/com/basistech/rosette/examples/MorphologyLemmasExample.java b/examples/src/main/java/com/basistech/rosette/examples/MorphologyLemmasExample.java index 78f87352b..2d9dfcb73 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/MorphologyLemmasExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/MorphologyLemmasExample.java @@ -41,13 +41,13 @@ public static void main(String[] args) { private void run() throws IOException { String morphologyLemmasData = "The fact is that the geese just went back to get a rest and I'm not banking on their return soon"; - HttpRosetteAPI rosetteApi = new HttpRosetteAPI.Builder() + HttpRosetteAPI api = new HttpRosetteAPI.Builder() .key(getApiKeyFromSystemProperty()) .url(getAltUrlFromSystemProperty()) .build(); DocumentRequest request = DocumentRequest.builder().content(morphologyLemmasData) .build(); - MorphologyResponse response = rosetteApi.perform(MORPHOLOGY_SERVICE_PATH + "/" + MorphologicalFeature.LEMMAS, + MorphologyResponse response = api.perform(MORPHOLOGY_SERVICE_PATH + "/" + MorphologicalFeature.LEMMAS, request, MorphologyResponse.class); System.out.println(responseToJson(response)); } diff --git a/examples/src/main/java/com/basistech/rosette/examples/MorphologyPartsOfSpeechExample.java b/examples/src/main/java/com/basistech/rosette/examples/MorphologyPartsOfSpeechExample.java index 36a7b40be..a6d1d8dc5 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/MorphologyPartsOfSpeechExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/MorphologyPartsOfSpeechExample.java @@ -42,13 +42,13 @@ public static void main(String[] args) { private void run() throws IOException { String morphologyPartsOfSpeechData = "The fact is that the geese just went back to get a rest and I'm not banking on their return soon"; - HttpRosetteAPI rosetteApi = new HttpRosetteAPI.Builder() + HttpRosetteAPI api = new HttpRosetteAPI.Builder() .key(getApiKeyFromSystemProperty()) .url(getAltUrlFromSystemProperty()) .build(); DocumentRequest request = DocumentRequest.builder().content(morphologyPartsOfSpeechData) .build(); - MorphologyResponse response = rosetteApi.perform(MORPHOLOGY_SERVICE_PATH + "/" + MorphologicalFeature.PARTS_OF_SPEECH, + MorphologyResponse response = api.perform(MORPHOLOGY_SERVICE_PATH + "/" + MorphologicalFeature.PARTS_OF_SPEECH, request, MorphologyResponse.class); System.out.println(responseToJson(response)); } diff --git a/examples/src/main/java/com/basistech/rosette/examples/NameDeduplicationExample.java b/examples/src/main/java/com/basistech/rosette/examples/NameDeduplicationExample.java index bfb1d3e4f..e1d166a94 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/NameDeduplicationExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/NameDeduplicationExample.java @@ -51,14 +51,14 @@ private void run() throws IOException { } double threshold = 0.75; - HttpRosetteAPI rosetteApi = new HttpRosetteAPI.Builder() + HttpRosetteAPI api = new HttpRosetteAPI.Builder() .key(getApiKeyFromSystemProperty()) .url(getAltUrlFromSystemProperty()) .build(); //The api object creates an http client, but to provide your own: //api.httpClient(CloseableHttpClient) NameDeduplicationRequest request = NameDeduplicationRequest.builder().names(names).threshold(threshold).build(); - NameDeduplicationResponse response = rosetteApi.perform(NAME_DEDUPLICATION_SERVICE_PATH, request, + NameDeduplicationResponse response = api.perform(NAME_DEDUPLICATION_SERVICE_PATH, request, NameDeduplicationResponse.class); System.out.println(responseToJson(response)); } diff --git a/examples/src/main/java/com/basistech/rosette/examples/NameMultipleTranslationsExample.java b/examples/src/main/java/com/basistech/rosette/examples/NameMultipleTranslationsExample.java index bec2e62df..e048f183d 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/NameMultipleTranslationsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/NameMultipleTranslationsExample.java @@ -46,13 +46,13 @@ private void run() throws IOException { .maximumResults(10) .build(); - HttpRosetteAPI rosetteApi = new HttpRosetteAPI.Builder() + HttpRosetteAPI api = new HttpRosetteAPI.Builder() .key(getApiKeyFromSystemProperty()) .url(getAltUrlFromSystemProperty()) .build(); //The api object creates an http client, but to provide your own: //api.httpClient(CloseableHttpClient) - NameTranslationResponse response = rosetteApi.perform(NAME_TRANSLATION_SERVICE_PATH, request, NameTranslationResponse.class); + NameTranslationResponse response = api.perform(NAME_TRANSLATION_SERVICE_PATH, request, NameTranslationResponse.class); System.out.println(responseToJson(response)); } } diff --git a/examples/src/main/java/com/basistech/rosette/examples/NameSimilarityExample.java b/examples/src/main/java/com/basistech/rosette/examples/NameSimilarityExample.java index 684bf53c7..ac3cca480 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/NameSimilarityExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/NameSimilarityExample.java @@ -49,14 +49,14 @@ private void run() throws IOException { .language(LanguageCode.ENGLISH) .build(); Name name2 = Name.builder().text(matchedNameData2).build(); - HttpRosetteAPI rosetteApi = new HttpRosetteAPI.Builder() + HttpRosetteAPI api = new HttpRosetteAPI.Builder() .key(getApiKeyFromSystemProperty()) .url(getAltUrlFromSystemProperty()) .build(); //The api object creates an http client, but to provide your own: //api.httpClient(CloseableHttpClient) NameSimilarityRequest request = NameSimilarityRequest.builder().name1(name1).name2(name2).build(); - NameSimilarityResponse response = rosetteApi.perform(NAME_SIMILARITY_SERVICE_PATH, request, NameSimilarityResponse.class); + NameSimilarityResponse response = api.perform(NAME_SIMILARITY_SERVICE_PATH, request, NameSimilarityResponse.class); System.out.println(responseToJson(response)); } } diff --git a/examples/src/main/java/com/basistech/rosette/examples/NameTranslationExample.java b/examples/src/main/java/com/basistech/rosette/examples/NameTranslationExample.java index f695dfcec..a018e1349 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/NameTranslationExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/NameTranslationExample.java @@ -45,13 +45,13 @@ private void run() throws IOException { .targetLanguage(LanguageCode.ENGLISH) .build(); - HttpRosetteAPI rosetteApi = new HttpRosetteAPI.Builder() + HttpRosetteAPI api = new HttpRosetteAPI.Builder() .key(getApiKeyFromSystemProperty()) .url(getAltUrlFromSystemProperty()) .build(); //The api object creates an http client, but to provide your own: //api.httpClient(CloseableHttpClient) - NameTranslationResponse response = rosetteApi.perform(NAME_TRANSLATION_SERVICE_PATH, request, NameTranslationResponse.class); + NameTranslationResponse response = api.perform(NAME_TRANSLATION_SERVICE_PATH, request, NameTranslationResponse.class); System.out.println(responseToJson(response)); } } diff --git a/examples/src/main/java/com/basistech/rosette/examples/PingExample.java b/examples/src/main/java/com/basistech/rosette/examples/PingExample.java index 1e357e691..86f007c84 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/PingExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/PingExample.java @@ -35,8 +35,8 @@ public static void main(String[] args) { } private void run() throws IOException { - HttpRosetteAPI rosetteApi = new HttpRosetteAPI.Builder().key(getApiKeyFromSystemProperty()).url(getAltUrlFromSystemProperty()).build(); - PingResponse response = rosetteApi.ping(); + HttpRosetteAPI api = new HttpRosetteAPI.Builder().key(getApiKeyFromSystemProperty()).url(getAltUrlFromSystemProperty()).build(); + PingResponse response = api.ping(); System.out.println(responseToJson(response)); } } diff --git a/examples/src/main/java/com/basistech/rosette/examples/README.md b/examples/src/main/java/com/basistech/rosette/examples/README.md index 3099836ad..3f08d8850 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/README.md +++ b/examples/src/main/java/com/basistech/rosette/examples/README.md @@ -4,7 +4,7 @@ Each example file demonstrates one of the capabilities of the Analytics Platform Here are some methods for running the examples. Each example will also accept an optional `-Drosette.api.altUrl` parameter for overriding the default URL. -A note on prerequisites. Rosette API only supports TLS 1.2 so ensure your toolchain also supports it. +A note on prerequisites. Analytics API only supports TLS 1.2 so ensure your toolchain also supports it. #### Running from Local Source diff --git a/examples/src/main/java/com/basistech/rosette/examples/RecordSimilarityExample.java b/examples/src/main/java/com/basistech/rosette/examples/RecordSimilarityExample.java index 86bfb703a..4a3fd5e71 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/RecordSimilarityExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/RecordSimilarityExample.java @@ -96,13 +96,13 @@ private void run() throws IOException { ).build() ).build(); - HttpRosetteAPI rosetteAPI = new HttpRosetteAPI.Builder() + HttpRosetteAPI api = new HttpRosetteAPI.Builder() .key(getApiKeyFromSystemProperty()) .url(getAltUrlFromSystemProperty()) .build(); //The api object creates an http client, but to provide your own: //api.httpClient(CloseableHttpClient) - RecordSimilarityResponse response = rosetteAPI.perform(RECORD_SIMILARITY_SERVICE_PATH, request, RecordSimilarityResponse.class); + RecordSimilarityResponse response = api.perform(RECORD_SIMILARITY_SERVICE_PATH, request, RecordSimilarityResponse.class); System.out.println(responseToJson(response)); } } diff --git a/examples/src/main/java/com/basistech/rosette/examples/RelationshipsExample.java b/examples/src/main/java/com/basistech/rosette/examples/RelationshipsExample.java index 6cd5dcdff..d1b34c2ef 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/RelationshipsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/RelationshipsExample.java @@ -41,14 +41,14 @@ public static void main(String[] args) { private void run() throws IOException { String relationshipsTextData = "FLIR Systems is headquartered in Oregon and produces thermal imaging, night vision, and infrared cameras and sensor systems. According to the SEC’s order instituting a settled administrative proceeding, FLIR entered into a multi-million dollar contract to provide thermal binoculars to the Saudi government in November 2008. Timms and Ramahi were the primary sales employees responsible for the contract, and also were involved in negotiations to sell FLIR’s security cameras to the same government officials. At the time, Timms was the head of FLIR’s Middle East office in Dubai."; - HttpRosetteAPI rosetteApi = new HttpRosetteAPI.Builder() + HttpRosetteAPI api = new HttpRosetteAPI.Builder() .key(getApiKeyFromSystemProperty()) .url(getAltUrlFromSystemProperty()) .build(); //The api object creates an http client, but to provide your own: //api.httpClient(CloseableHttpClient) DocumentRequest request = DocumentRequest.builder().content(relationshipsTextData).build(); - RelationshipsResponse response = rosetteApi.perform(RELATIONSHIPS_SERVICE_PATH, request, RelationshipsResponse.class); + RelationshipsResponse response = api.perform(RELATIONSHIPS_SERVICE_PATH, request, RelationshipsResponse.class); System.out.println(responseToJson(response)); } } diff --git a/examples/src/main/java/com/basistech/rosette/examples/SemanticVectorsExample.java b/examples/src/main/java/com/basistech/rosette/examples/SemanticVectorsExample.java index 821813748..bbf82ae5f 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/SemanticVectorsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/SemanticVectorsExample.java @@ -42,7 +42,7 @@ public static void main(String[] args) { private void run() throws IOException { String semanticVectorsData = "Cambridge, Massachusetts"; - HttpRosetteAPI rosetteApi = new HttpRosetteAPI.Builder() + HttpRosetteAPI api = new HttpRosetteAPI.Builder() .key(getApiKeyFromSystemProperty()) .url(getAltUrlFromSystemProperty()) .build(); @@ -55,7 +55,7 @@ private void run() throws IOException { .embeddingsMode(EmbeddingsMode.GEN_1) .build()) .build(); - SemanticVectorsResponse response = rosetteApi.perform(SEMANTIC_VECTORS_SERVICE_PATH, request, SemanticVectorsResponse.class); + SemanticVectorsResponse response = api.perform(SEMANTIC_VECTORS_SERVICE_PATH, request, SemanticVectorsResponse.class); System.out.println(responseToJson(response)); } } diff --git a/examples/src/main/java/com/basistech/rosette/examples/SentencesExample.java b/examples/src/main/java/com/basistech/rosette/examples/SentencesExample.java index b5441c00e..53d9d460c 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/SentencesExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/SentencesExample.java @@ -40,7 +40,7 @@ public static void main(String[] args) { private void run() throws IOException { String sentencesData = "This land is your land. This land is my land, from California to the New York island; from the red wood forest to the Gulf Stream waters. This land was made for you and Me. As I was walking that ribbon of highway, I saw above me that endless skyway: I saw below me that golden valley: This land was made for you and me."; - HttpRosetteAPI rosetteApi = new HttpRosetteAPI.Builder() + HttpRosetteAPI api = new HttpRosetteAPI.Builder() .key(getApiKeyFromSystemProperty()) .url(getAltUrlFromSystemProperty()) .build(); @@ -48,7 +48,7 @@ private void run() throws IOException { //api.httpClient(CloseableHttpClient) // When no options, use . DocumentRequest request = DocumentRequest.builder().content(sentencesData).build(); - SentencesResponse response = rosetteApi.perform(SENTENCES_SERVICE_PATH, request, SentencesResponse.class); + SentencesResponse response = api.perform(SENTENCES_SERVICE_PATH, request, SentencesResponse.class); System.out.println(responseToJson(response)); } } diff --git a/examples/src/main/java/com/basistech/rosette/examples/SentimentExample.java b/examples/src/main/java/com/basistech/rosette/examples/SentimentExample.java index 1f7cf7770..43014028b 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/SentimentExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/SentimentExample.java @@ -47,7 +47,7 @@ private void run() throws IOException { // the temp file substitutes for an actual disk file. String sentimentFileData = "New Ghostbusters Film

    Original Ghostbuster Dan Aykroyd, who also co-wrote the 1984 Ghostbusters film, couldn’t be more pleased with the new all-female Ghostbusters cast, telling The Hollywood Reporter, “The Aykroyd family is delighted by this inheritance of the Ghostbusters torch by these most magnificent women in comedy.”

    "; try (InputStream inputStream = Files.newInputStream(createTempDataFile(sentimentFileData))) { - HttpRosetteAPI rosetteApi = new HttpRosetteAPI.Builder() + HttpRosetteAPI api = new HttpRosetteAPI.Builder() .key(getApiKeyFromSystemProperty()) .url(getAltUrlFromSystemProperty()) .build(); @@ -55,7 +55,7 @@ private void run() throws IOException { //api.httpClient(CloseableHttpClient) // When no options, use . DocumentRequest request = DocumentRequest.builder().content(inputStream, "text/html").build(); - SentimentResponse response = rosetteApi.perform(SENTIMENT_SERVICE_PATH, request, SentimentResponse.class); + SentimentResponse response = api.perform(SENTIMENT_SERVICE_PATH, request, SentimentResponse.class); System.out.println(responseToJson(response)); } diff --git a/examples/src/main/java/com/basistech/rosette/examples/SimilarTermsExample.java b/examples/src/main/java/com/basistech/rosette/examples/SimilarTermsExample.java index 9e441916b..a8bdf484a 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/SimilarTermsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/SimilarTermsExample.java @@ -45,7 +45,7 @@ public static void main(String[] args) { private void run() throws IOException { String similarTermsData = "spy"; - HttpRosetteAPI rosetteApi = new HttpRosetteAPI.Builder() + HttpRosetteAPI api = new HttpRosetteAPI.Builder() .key(getApiKeyFromSystemProperty()) .url(getAltUrlFromSystemProperty()) .build(); @@ -59,7 +59,7 @@ private void run() throws IOException { .resultLanguages(Lists.newArrayList(LanguageCode.SPANISH, LanguageCode.GERMAN, LanguageCode.JAPANESE)) .build()) .build(); - SimilarTermsResponse response = rosetteApi.perform(SIMILAR_TERMS_SERVICE_PATH, request, SimilarTermsResponse.class); + SimilarTermsResponse response = api.perform(SIMILAR_TERMS_SERVICE_PATH, request, SimilarTermsResponse.class); System.out.println(responseToJson(response)); } } diff --git a/examples/src/main/java/com/basistech/rosette/examples/SyntaxDependenciesExample.java b/examples/src/main/java/com/basistech/rosette/examples/SyntaxDependenciesExample.java index b0866ae47..1e597cd7f 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/SyntaxDependenciesExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/SyntaxDependenciesExample.java @@ -24,7 +24,7 @@ import static com.basistech.rosette.api.common.AbstractRosetteAPI.SYNTAX_DEPENDENCIES_SERVICE_PATH; /** - * Example which demonstrates the syntax dependencies endpoint of the Rosette api. + * Example which demonstrates the syntax dependencies endpoint of the Analytics api. */ @SuppressWarnings({"java:S1166", "java:S2221", "java:S106"}) public final class SyntaxDependenciesExample extends ExampleBase { @@ -39,14 +39,14 @@ public static void main(String[] args) { private void run() throws IOException { String syntaxDependenciesData = "Yoshinori Ohsumi, a Japanese cell biologist, was awarded the Nobel Prize in Physiology or Medicine on Monday."; - HttpRosetteAPI rosetteApi = new HttpRosetteAPI.Builder() + HttpRosetteAPI api = new HttpRosetteAPI.Builder() .key(getApiKeyFromSystemProperty()) .url(getAltUrlFromSystemProperty()) .build(); //The api object creates an http client, but to provide your own: //api.httpClient(CloseableHttpClient) DocumentRequest request = DocumentRequest.builder().content(syntaxDependenciesData).build(); - SyntaxDependenciesResponse response = rosetteApi.perform(SYNTAX_DEPENDENCIES_SERVICE_PATH, request, SyntaxDependenciesResponse.class); + SyntaxDependenciesResponse response = api.perform(SYNTAX_DEPENDENCIES_SERVICE_PATH, request, SyntaxDependenciesResponse.class); System.out.println(responseToJson(response)); } } diff --git a/examples/src/main/java/com/basistech/rosette/examples/TokensExample.java b/examples/src/main/java/com/basistech/rosette/examples/TokensExample.java index 168f4cf0f..287d59f2e 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/TokensExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/TokensExample.java @@ -40,7 +40,7 @@ public static void main(String[] args) { private void run() throws IOException { String tokensData = "北京大学生物系主任办公室内部会议"; - HttpRosetteAPI rosetteApi = new HttpRosetteAPI.Builder() + HttpRosetteAPI api = new HttpRosetteAPI.Builder() .key(getApiKeyFromSystemProperty()) .url(getAltUrlFromSystemProperty()) .build(); @@ -48,7 +48,7 @@ private void run() throws IOException { //api.httpClient(CloseableHttpClient) // When no options, use . DocumentRequest request = DocumentRequest.builder().content(tokensData).build(); - TokensResponse response = rosetteApi.perform(TOKENS_SERVICE_PATH, request, TokensResponse.class); + TokensResponse response = api.perform(TOKENS_SERVICE_PATH, request, TokensResponse.class); System.out.println(responseToJson(response)); } } diff --git a/examples/src/main/java/com/basistech/rosette/examples/TopicsExample.java b/examples/src/main/java/com/basistech/rosette/examples/TopicsExample.java index d8dd35730..878c83aec 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/TopicsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/TopicsExample.java @@ -38,7 +38,7 @@ public static void main(String[] args) { private void run() throws Exception { String topicsData = "Lily Collins is in talks to join Nicholas Hoult in Chernin Entertainment and Fox Searchlight's J.R.R. Tolkien biopic Tolkien. Anthony Boyle, known for playing Scorpius Malfoy in the British play Harry Potter and the Cursed Child, also has signed on for the film centered on the famed author. In Tolkien, Hoult will play the author of the Hobbit and Lord of the Rings book series that were later adapted into two Hollywood trilogies from Peter Jackson. Dome Karukoski is directing the project."; - HttpRosetteAPI rosetteApi = new HttpRosetteAPI.Builder() + HttpRosetteAPI api = new HttpRosetteAPI.Builder() .key(getApiKeyFromSystemProperty()) .url(getAltUrlFromSystemProperty()) .build(); @@ -46,7 +46,7 @@ private void run() throws Exception { .language(LanguageCode.ENGLISH) .content(topicsData) .build(); - TopicsResponse resp = rosetteApi.perform(TOPICS_SERVICE_PATH, request, TopicsResponse.class); + TopicsResponse resp = api.perform(TOPICS_SERVICE_PATH, request, TopicsResponse.class); System.out.println(responseToJson(resp)); } } diff --git a/examples/src/main/java/com/basistech/rosette/examples/TransliterationExample.java b/examples/src/main/java/com/basistech/rosette/examples/TransliterationExample.java index 2db569266..aa9e24ccb 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/TransliterationExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/TransliterationExample.java @@ -41,7 +41,7 @@ public static void main(String[] args) { private void run() throws IOException { String transliterationData = "ana r2ye7 el gam3a el sa3a 3 el 3asr"; - HttpRosetteAPI rosetteApi = new HttpRosetteAPI.Builder() + HttpRosetteAPI api = new HttpRosetteAPI.Builder() .key(getApiKeyFromSystemProperty()) .url(getAltUrlFromSystemProperty()) .build(); @@ -51,7 +51,7 @@ private void run() throws IOException { .content(transliterationData) .language(LanguageCode.ARABIC) .build(); - TransliterationResponse response = rosetteApi.perform(TRANSLITERATION_SERVICE_PATH, request, TransliterationResponse.class); + TransliterationResponse response = api.perform(TRANSLITERATION_SERVICE_PATH, request, TransliterationResponse.class); System.out.println(responseToJson(response)); } } From 84e70dc097f7d6cd03cfbdb0017a87aa6f6c2655 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Fri, 25 Oct 2024 17:02:19 +0200 Subject: [PATCH 359/415] WS-3314: copyright years --- api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java | 2 +- .../java/com/basistech/rosette/api/MorphologicalFeature.java | 2 +- .../com/basistech/rosette/api/common/AbstractRosetteAPI.java | 2 +- .../basistech/rosette/examples/AddressSimilarityExample.java | 2 +- .../java/com/basistech/rosette/examples/CategoriesExample.java | 2 +- .../java/com/basistech/rosette/examples/ConcurrencyExample.java | 2 +- .../java/com/basistech/rosette/examples/EntitiesExample.java | 2 +- .../main/java/com/basistech/rosette/examples/EventsExample.java | 2 +- .../main/java/com/basistech/rosette/examples/ExampleBase.java | 2 +- .../main/java/com/basistech/rosette/examples/InfoExample.java | 2 +- .../java/com/basistech/rosette/examples/LanguageExample.java | 2 +- .../basistech/rosette/examples/LanguageMultilingualExample.java | 2 +- .../basistech/rosette/examples/MorphologyCompleteExample.java | 2 +- .../rosette/examples/MorphologyCompoundComponentsExample.java | 2 +- .../rosette/examples/MorphologyHanReadingsExample.java | 2 +- .../com/basistech/rosette/examples/MorphologyLemmasExample.java | 2 +- .../rosette/examples/MorphologyPartsOfSpeechExample.java | 2 +- .../basistech/rosette/examples/NameDeduplicationExample.java | 2 +- .../com/basistech/rosette/examples/NameSimilarityExample.java | 2 +- .../com/basistech/rosette/examples/NameTranslationExample.java | 2 +- .../main/java/com/basistech/rosette/examples/PingExample.java | 2 +- .../com/basistech/rosette/examples/RelationshipsExample.java | 2 +- .../com/basistech/rosette/examples/SemanticVectorsExample.java | 2 +- .../java/com/basistech/rosette/examples/SentencesExample.java | 2 +- .../java/com/basistech/rosette/examples/SentimentExample.java | 2 +- .../com/basistech/rosette/examples/SimilarTermsExample.java | 2 +- .../basistech/rosette/examples/SyntaxDependenciesExample.java | 2 +- .../main/java/com/basistech/rosette/examples/TokensExample.java | 2 +- .../main/java/com/basistech/rosette/examples/TopicsExample.java | 2 +- .../com/basistech/rosette/examples/TransliterationExample.java | 2 +- .../main/java/com/basistech/rosette/apimodel/AccuracyMode.java | 2 +- .../basistech/rosette/apimodel/CommonRosetteAPIException.java | 2 +- .../java/com/basistech/rosette/apimodel/ConstantsResponse.java | 2 +- .../java/com/basistech/rosette/apimodel/DocumentRequest.java | 2 +- .../main/java/com/basistech/rosette/apimodel/ErrorResponse.java | 2 +- .../main/java/com/basistech/rosette/apimodel/InfoResponse.java | 2 +- .../java/com/basistech/rosette/apimodel/batch/BatchRequest.java | 2 +- .../main/java/com/basistech/rosette/apimodel/package-info.java | 2 +- 38 files changed, 38 insertions(+), 38 deletions(-) diff --git a/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java b/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java index 41bd24e55..e2613af46 100644 --- a/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java +++ b/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java @@ -1,5 +1,5 @@ /* -* Copyright 2022 Basis Technology Corp. +* Copyright 2022-2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/api/src/main/java/com/basistech/rosette/api/MorphologicalFeature.java b/api/src/main/java/com/basistech/rosette/api/MorphologicalFeature.java index 7edc43785..cc0722d1c 100644 --- a/api/src/main/java/com/basistech/rosette/api/MorphologicalFeature.java +++ b/api/src/main/java/com/basistech/rosette/api/MorphologicalFeature.java @@ -1,5 +1,5 @@ /* -* Copyright 2014 Basis Technology Corp. +* Copyright 2014-2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/common/src/main/java/com/basistech/rosette/api/common/AbstractRosetteAPI.java b/common/src/main/java/com/basistech/rosette/api/common/AbstractRosetteAPI.java index 1ea31110a..11c1478c4 100644 --- a/common/src/main/java/com/basistech/rosette/api/common/AbstractRosetteAPI.java +++ b/common/src/main/java/com/basistech/rosette/api/common/AbstractRosetteAPI.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/AddressSimilarityExample.java b/examples/src/main/java/com/basistech/rosette/examples/AddressSimilarityExample.java index 9e96746ac..16cb5d1dc 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/AddressSimilarityExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/AddressSimilarityExample.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Basis Technology Corp. + * Copyright 2022-2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/CategoriesExample.java b/examples/src/main/java/com/basistech/rosette/examples/CategoriesExample.java index 565d8a329..3ee16af9f 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/CategoriesExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/CategoriesExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2022 Basis Technology Corp. +* Copyright 2022-2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/ConcurrencyExample.java b/examples/src/main/java/com/basistech/rosette/examples/ConcurrencyExample.java index 1596d21af..8c2f255b4 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/ConcurrencyExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/ConcurrencyExample.java @@ -1,5 +1,5 @@ /* - * Copyright 2023 Basis Technology Corp. + * Copyright 2023-2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/EntitiesExample.java b/examples/src/main/java/com/basistech/rosette/examples/EntitiesExample.java index b2c870c8b..481c1ad18 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/EntitiesExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/EntitiesExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2022 Basis Technology Corp. +* Copyright 2022-2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/EventsExample.java b/examples/src/main/java/com/basistech/rosette/examples/EventsExample.java index 930677e13..3a3eeb544 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/EventsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/EventsExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2022 Basis Technology Corp. +* Copyright 2022-2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/ExampleBase.java b/examples/src/main/java/com/basistech/rosette/examples/ExampleBase.java index 735ce03bd..b3239fdc3 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/ExampleBase.java +++ b/examples/src/main/java/com/basistech/rosette/examples/ExampleBase.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/InfoExample.java b/examples/src/main/java/com/basistech/rosette/examples/InfoExample.java index f2782b34f..2a1e5a88c 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/InfoExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/InfoExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/LanguageExample.java b/examples/src/main/java/com/basistech/rosette/examples/LanguageExample.java index dca3fc9e4..743165afa 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/LanguageExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/LanguageExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2022 Basis Technology Corp. +* Copyright 2022-2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/LanguageMultilingualExample.java b/examples/src/main/java/com/basistech/rosette/examples/LanguageMultilingualExample.java index 4a63f3b38..31ef0cb76 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/LanguageMultilingualExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/LanguageMultilingualExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2022 Basis Technology Corp. +* Copyright 2022-2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompleteExample.java b/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompleteExample.java index 660eba9a8..2e6d6660a 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompleteExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompleteExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2022 Basis Technology Corp. +* Copyright 2022-2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompoundComponentsExample.java b/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompoundComponentsExample.java index 40964281d..ec16b4385 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompoundComponentsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompoundComponentsExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2022 Basis Technology Corp. +* Copyright 2022-2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/MorphologyHanReadingsExample.java b/examples/src/main/java/com/basistech/rosette/examples/MorphologyHanReadingsExample.java index 383e61aa7..a4b29c0a9 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/MorphologyHanReadingsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/MorphologyHanReadingsExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2022 Basis Technology Corp. +* Copyright 2022-2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/MorphologyLemmasExample.java b/examples/src/main/java/com/basistech/rosette/examples/MorphologyLemmasExample.java index 2d9dfcb73..08df5fd80 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/MorphologyLemmasExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/MorphologyLemmasExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2022 Basis Technology Corp. +* Copyright 2022-2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/MorphologyPartsOfSpeechExample.java b/examples/src/main/java/com/basistech/rosette/examples/MorphologyPartsOfSpeechExample.java index a6d1d8dc5..7eaa67c6c 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/MorphologyPartsOfSpeechExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/MorphologyPartsOfSpeechExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2022 Basis Technology Corp. +* Copyright 2022-2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/NameDeduplicationExample.java b/examples/src/main/java/com/basistech/rosette/examples/NameDeduplicationExample.java index e1d166a94..77aa31758 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/NameDeduplicationExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/NameDeduplicationExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2022 Basis Technology Corp. +* Copyright 2022-2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/NameSimilarityExample.java b/examples/src/main/java/com/basistech/rosette/examples/NameSimilarityExample.java index ac3cca480..6fd683a06 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/NameSimilarityExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/NameSimilarityExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2022 Basis Technology Corp. +* Copyright 2022-2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/NameTranslationExample.java b/examples/src/main/java/com/basistech/rosette/examples/NameTranslationExample.java index a018e1349..dae89ed28 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/NameTranslationExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/NameTranslationExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2022 Basis Technology Corp. +* Copyright 2022-2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/PingExample.java b/examples/src/main/java/com/basistech/rosette/examples/PingExample.java index 86f007c84..eace18a0b 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/PingExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/PingExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/RelationshipsExample.java b/examples/src/main/java/com/basistech/rosette/examples/RelationshipsExample.java index d1b34c2ef..9fec85e55 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/RelationshipsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/RelationshipsExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2022 Basis Technology Corp. +* Copyright 2022-2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/SemanticVectorsExample.java b/examples/src/main/java/com/basistech/rosette/examples/SemanticVectorsExample.java index bbf82ae5f..42966496e 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/SemanticVectorsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/SemanticVectorsExample.java @@ -1,5 +1,5 @@ /* - * Copyright 2023 Basis Technology Corp. + * Copyright 2023-2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/SentencesExample.java b/examples/src/main/java/com/basistech/rosette/examples/SentencesExample.java index 53d9d460c..0d8e7dcdb 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/SentencesExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/SentencesExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2022 Basis Technology Corp. +* Copyright 2022-2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/SentimentExample.java b/examples/src/main/java/com/basistech/rosette/examples/SentimentExample.java index 43014028b..49325a8bd 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/SentimentExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/SentimentExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2022 Basis Technology Corp. +* Copyright 2022-2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/SimilarTermsExample.java b/examples/src/main/java/com/basistech/rosette/examples/SimilarTermsExample.java index a8bdf484a..99cd2aba7 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/SimilarTermsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/SimilarTermsExample.java @@ -1,5 +1,5 @@ /* - * Copyright 2023 Basis Technology Corp. + * Copyright 2023-2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/SyntaxDependenciesExample.java b/examples/src/main/java/com/basistech/rosette/examples/SyntaxDependenciesExample.java index 1e597cd7f..05917249a 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/SyntaxDependenciesExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/SyntaxDependenciesExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2022 Basis Technology Corp. +* Copyright 2022-2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/TokensExample.java b/examples/src/main/java/com/basistech/rosette/examples/TokensExample.java index 287d59f2e..72328f616 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/TokensExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/TokensExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2022 Basis Technology Corp. +* Copyright 2022-2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/TopicsExample.java b/examples/src/main/java/com/basistech/rosette/examples/TopicsExample.java index 878c83aec..ba36596ee 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/TopicsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/TopicsExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2022 Basis Technology Corp. +* Copyright 2022-2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/TransliterationExample.java b/examples/src/main/java/com/basistech/rosette/examples/TransliterationExample.java index aa9e24ccb..46da3e306 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/TransliterationExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/TransliterationExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2022 Basis Technology Corp. +* Copyright 2022-2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/model/src/main/java/com/basistech/rosette/apimodel/AccuracyMode.java b/model/src/main/java/com/basistech/rosette/apimodel/AccuracyMode.java index 6526aebe5..a46a56c53 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/AccuracyMode.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/AccuracyMode.java @@ -1,5 +1,5 @@ /* -* Copyright 2014 Basis Technology Corp. +* Copyright 2014-2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/model/src/main/java/com/basistech/rosette/apimodel/CommonRosetteAPIException.java b/model/src/main/java/com/basistech/rosette/apimodel/CommonRosetteAPIException.java index 04ffc7eff..8c1a300d7 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/CommonRosetteAPIException.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/CommonRosetteAPIException.java @@ -1,5 +1,5 @@ /* -* Copyright 2016 Basis Technology Corp. +* Copyright 2016-2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/model/src/main/java/com/basistech/rosette/apimodel/ConstantsResponse.java b/model/src/main/java/com/basistech/rosette/apimodel/ConstantsResponse.java index 081eea980..4a1f2c210 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/ConstantsResponse.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/ConstantsResponse.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/model/src/main/java/com/basistech/rosette/apimodel/DocumentRequest.java b/model/src/main/java/com/basistech/rosette/apimodel/DocumentRequest.java index abf6acc7c..c330fc7b7 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/DocumentRequest.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/DocumentRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Basis Technology Corp. + * Copyright 2017-2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/model/src/main/java/com/basistech/rosette/apimodel/ErrorResponse.java b/model/src/main/java/com/basistech/rosette/apimodel/ErrorResponse.java index 084be0436..305c099ab 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/ErrorResponse.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/ErrorResponse.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/model/src/main/java/com/basistech/rosette/apimodel/InfoResponse.java b/model/src/main/java/com/basistech/rosette/apimodel/InfoResponse.java index 673944048..09e70cc3b 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/InfoResponse.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/InfoResponse.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/model/src/main/java/com/basistech/rosette/apimodel/batch/BatchRequest.java b/model/src/main/java/com/basistech/rosette/apimodel/batch/BatchRequest.java index 4d610d05b..00a895e68 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/batch/BatchRequest.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/batch/BatchRequest.java @@ -1,5 +1,5 @@ /* -* Copyright 2017 Basis Technology Corp. +* Copyright 2017-2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/model/src/main/java/com/basistech/rosette/apimodel/package-info.java b/model/src/main/java/com/basistech/rosette/apimodel/package-info.java index 0cdb9afa3..0c96170a9 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/package-info.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/package-info.java @@ -1,5 +1,5 @@ /* -* Copyright 2014 Basis Technology Corp. +* Copyright 2014-2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From c78be19031ba91e88d7b4b7cf93758daee965e51 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Mon, 28 Oct 2024 12:56:06 +0100 Subject: [PATCH 360/415] WS-3314: Update package descriptions --- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index 74374e018..8059bf0ca 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -23,7 +23,7 @@ rosette-api-annotations rosette-api-annotations - Rosette API Annotations + Babel Street Analytics API Annotations com.fasterxml.jackson.core diff --git a/api/pom.xml b/api/pom.xml index eef944814..3759ada21 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -23,7 +23,7 @@ rosette-api rosette-api - Rosette API Communications + Babel Street Analytics API Communications false diff --git a/common/pom.xml b/common/pom.xml index db7208e08..865713257 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -23,7 +23,7 @@ rosette-api-common rosette-api-common - Rosette API Common + Babel Street Analytics API Common com.basistech.rosette diff --git a/json/pom.xml b/json/pom.xml index acedca052..952227860 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -24,7 +24,7 @@ rosette-api-json rosette-api-json - Rosette API JSON module + Babel Street Analytics API JSON module com.fasterxml.jackson.core diff --git a/model/pom.xml b/model/pom.xml index 4c5a6c595..e3956b47c 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -23,7 +23,7 @@ rosette-api-model rosette-api-model - Rosette API data models + Babel Street Analytics API data models ${project.build.directory}/delombok diff --git a/pom.xml b/pom.xml index b5e0f06ab..e7ace39f4 100644 --- a/pom.xml +++ b/pom.xml @@ -33,7 +33,7 @@ scm:git:git@github.com:rosette-api/java.git rosette-api-java-binding-1.31.101 - This is the Java binding for the Rosette API. The classes in here help Java applications to communicate with the Rosette API. + This is the Java binding for the Babel Street Analytics API. The classes in here help Java applications to communicate with the Analytics API. site From 796d386a364c2d0b2ecf391f1b567ba812d6aebd Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Mon, 28 Oct 2024 16:30:39 +0100 Subject: [PATCH 361/415] WS-3314: Copyright years --- api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java | 2 +- .../java/com/basistech/rosette/api/MorphologicalFeature.java | 2 +- .../com/basistech/rosette/api/common/AbstractRosetteAPI.java | 2 +- .../basistech/rosette/examples/AddressSimilarityExample.java | 2 +- .../java/com/basistech/rosette/examples/CategoriesExample.java | 2 +- .../java/com/basistech/rosette/examples/ConcurrencyExample.java | 2 +- .../java/com/basistech/rosette/examples/EntitiesExample.java | 2 +- .../main/java/com/basistech/rosette/examples/EventsExample.java | 2 +- .../main/java/com/basistech/rosette/examples/ExampleBase.java | 2 +- .../main/java/com/basistech/rosette/examples/InfoExample.java | 2 +- .../java/com/basistech/rosette/examples/LanguageExample.java | 2 +- .../basistech/rosette/examples/LanguageMultilingualExample.java | 2 +- .../basistech/rosette/examples/MorphologyCompleteExample.java | 2 +- .../rosette/examples/MorphologyCompoundComponentsExample.java | 2 +- .../rosette/examples/MorphologyHanReadingsExample.java | 2 +- .../com/basistech/rosette/examples/MorphologyLemmasExample.java | 2 +- .../rosette/examples/MorphologyPartsOfSpeechExample.java | 2 +- .../basistech/rosette/examples/NameDeduplicationExample.java | 2 +- .../com/basistech/rosette/examples/NameSimilarityExample.java | 2 +- .../com/basistech/rosette/examples/NameTranslationExample.java | 2 +- .../main/java/com/basistech/rosette/examples/PingExample.java | 2 +- .../com/basistech/rosette/examples/RelationshipsExample.java | 2 +- .../com/basistech/rosette/examples/SemanticVectorsExample.java | 2 +- .../java/com/basistech/rosette/examples/SentencesExample.java | 2 +- .../java/com/basistech/rosette/examples/SentimentExample.java | 2 +- .../com/basistech/rosette/examples/SimilarTermsExample.java | 2 +- .../basistech/rosette/examples/SyntaxDependenciesExample.java | 2 +- .../main/java/com/basistech/rosette/examples/TokensExample.java | 2 +- .../main/java/com/basistech/rosette/examples/TopicsExample.java | 2 +- .../com/basistech/rosette/examples/TransliterationExample.java | 2 +- .../main/java/com/basistech/rosette/apimodel/AccuracyMode.java | 2 +- .../basistech/rosette/apimodel/CommonRosetteAPIException.java | 2 +- .../java/com/basistech/rosette/apimodel/ConstantsResponse.java | 2 +- .../java/com/basistech/rosette/apimodel/DocumentRequest.java | 2 +- .../main/java/com/basistech/rosette/apimodel/ErrorResponse.java | 2 +- .../main/java/com/basistech/rosette/apimodel/InfoResponse.java | 2 +- .../java/com/basistech/rosette/apimodel/batch/BatchRequest.java | 2 +- .../main/java/com/basistech/rosette/apimodel/package-info.java | 2 +- 38 files changed, 38 insertions(+), 38 deletions(-) diff --git a/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java b/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java index e2613af46..529ad7f51 100644 --- a/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java +++ b/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 Basis Technology Corp. +* Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/api/src/main/java/com/basistech/rosette/api/MorphologicalFeature.java b/api/src/main/java/com/basistech/rosette/api/MorphologicalFeature.java index cc0722d1c..243169659 100644 --- a/api/src/main/java/com/basistech/rosette/api/MorphologicalFeature.java +++ b/api/src/main/java/com/basistech/rosette/api/MorphologicalFeature.java @@ -1,5 +1,5 @@ /* -* Copyright 2014-2024 Basis Technology Corp. +* Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/common/src/main/java/com/basistech/rosette/api/common/AbstractRosetteAPI.java b/common/src/main/java/com/basistech/rosette/api/common/AbstractRosetteAPI.java index 11c1478c4..8bba230e8 100644 --- a/common/src/main/java/com/basistech/rosette/api/common/AbstractRosetteAPI.java +++ b/common/src/main/java/com/basistech/rosette/api/common/AbstractRosetteAPI.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2024 Basis Technology Corp. +* Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/AddressSimilarityExample.java b/examples/src/main/java/com/basistech/rosette/examples/AddressSimilarityExample.java index 16cb5d1dc..f0503ecd7 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/AddressSimilarityExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/AddressSimilarityExample.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 Basis Technology Corp. + * Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/CategoriesExample.java b/examples/src/main/java/com/basistech/rosette/examples/CategoriesExample.java index 3ee16af9f..50a410278 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/CategoriesExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/CategoriesExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 Basis Technology Corp. +* Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/ConcurrencyExample.java b/examples/src/main/java/com/basistech/rosette/examples/ConcurrencyExample.java index 8c2f255b4..da25929c7 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/ConcurrencyExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/ConcurrencyExample.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 Basis Technology Corp. + * Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/EntitiesExample.java b/examples/src/main/java/com/basistech/rosette/examples/EntitiesExample.java index 481c1ad18..325c9fdd9 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/EntitiesExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/EntitiesExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 Basis Technology Corp. +* Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/EventsExample.java b/examples/src/main/java/com/basistech/rosette/examples/EventsExample.java index 3a3eeb544..03c9c7a0e 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/EventsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/EventsExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 Basis Technology Corp. +* Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/ExampleBase.java b/examples/src/main/java/com/basistech/rosette/examples/ExampleBase.java index b3239fdc3..cd2d73695 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/ExampleBase.java +++ b/examples/src/main/java/com/basistech/rosette/examples/ExampleBase.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2024 Basis Technology Corp. +* Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/InfoExample.java b/examples/src/main/java/com/basistech/rosette/examples/InfoExample.java index 2a1e5a88c..5af149173 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/InfoExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/InfoExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2024 Basis Technology Corp. +* Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/LanguageExample.java b/examples/src/main/java/com/basistech/rosette/examples/LanguageExample.java index 743165afa..5e0d97d77 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/LanguageExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/LanguageExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 Basis Technology Corp. +* Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/LanguageMultilingualExample.java b/examples/src/main/java/com/basistech/rosette/examples/LanguageMultilingualExample.java index 31ef0cb76..3ad0deae2 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/LanguageMultilingualExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/LanguageMultilingualExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 Basis Technology Corp. +* Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompleteExample.java b/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompleteExample.java index 2e6d6660a..929df5e92 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompleteExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompleteExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 Basis Technology Corp. +* Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompoundComponentsExample.java b/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompoundComponentsExample.java index ec16b4385..1be489bca 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompoundComponentsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/MorphologyCompoundComponentsExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 Basis Technology Corp. +* Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/MorphologyHanReadingsExample.java b/examples/src/main/java/com/basistech/rosette/examples/MorphologyHanReadingsExample.java index a4b29c0a9..061fd2fb0 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/MorphologyHanReadingsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/MorphologyHanReadingsExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 Basis Technology Corp. +* Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/MorphologyLemmasExample.java b/examples/src/main/java/com/basistech/rosette/examples/MorphologyLemmasExample.java index 08df5fd80..bf981918d 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/MorphologyLemmasExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/MorphologyLemmasExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 Basis Technology Corp. +* Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/MorphologyPartsOfSpeechExample.java b/examples/src/main/java/com/basistech/rosette/examples/MorphologyPartsOfSpeechExample.java index 7eaa67c6c..08a14001c 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/MorphologyPartsOfSpeechExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/MorphologyPartsOfSpeechExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 Basis Technology Corp. +* Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/NameDeduplicationExample.java b/examples/src/main/java/com/basistech/rosette/examples/NameDeduplicationExample.java index 77aa31758..6b7ae2246 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/NameDeduplicationExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/NameDeduplicationExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 Basis Technology Corp. +* Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/NameSimilarityExample.java b/examples/src/main/java/com/basistech/rosette/examples/NameSimilarityExample.java index 6fd683a06..7bbedb6c1 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/NameSimilarityExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/NameSimilarityExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 Basis Technology Corp. +* Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/NameTranslationExample.java b/examples/src/main/java/com/basistech/rosette/examples/NameTranslationExample.java index dae89ed28..095c516e9 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/NameTranslationExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/NameTranslationExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 Basis Technology Corp. +* Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/PingExample.java b/examples/src/main/java/com/basistech/rosette/examples/PingExample.java index eace18a0b..50c7ce5f7 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/PingExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/PingExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2024 Basis Technology Corp. +* Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/RelationshipsExample.java b/examples/src/main/java/com/basistech/rosette/examples/RelationshipsExample.java index 9fec85e55..73bcb061a 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/RelationshipsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/RelationshipsExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 Basis Technology Corp. +* Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/SemanticVectorsExample.java b/examples/src/main/java/com/basistech/rosette/examples/SemanticVectorsExample.java index 42966496e..dfee51d29 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/SemanticVectorsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/SemanticVectorsExample.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 Basis Technology Corp. + * Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/SentencesExample.java b/examples/src/main/java/com/basistech/rosette/examples/SentencesExample.java index 0d8e7dcdb..bdbce99d3 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/SentencesExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/SentencesExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 Basis Technology Corp. +* Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/SentimentExample.java b/examples/src/main/java/com/basistech/rosette/examples/SentimentExample.java index 49325a8bd..9549d3132 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/SentimentExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/SentimentExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 Basis Technology Corp. +* Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/SimilarTermsExample.java b/examples/src/main/java/com/basistech/rosette/examples/SimilarTermsExample.java index 99cd2aba7..4289da127 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/SimilarTermsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/SimilarTermsExample.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 Basis Technology Corp. + * Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/SyntaxDependenciesExample.java b/examples/src/main/java/com/basistech/rosette/examples/SyntaxDependenciesExample.java index 05917249a..25710f2db 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/SyntaxDependenciesExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/SyntaxDependenciesExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 Basis Technology Corp. +* Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/TokensExample.java b/examples/src/main/java/com/basistech/rosette/examples/TokensExample.java index 72328f616..be21f6abb 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/TokensExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/TokensExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 Basis Technology Corp. +* Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/TopicsExample.java b/examples/src/main/java/com/basistech/rosette/examples/TopicsExample.java index ba36596ee..70d235672 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/TopicsExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/TopicsExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 Basis Technology Corp. +* Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/src/main/java/com/basistech/rosette/examples/TransliterationExample.java b/examples/src/main/java/com/basistech/rosette/examples/TransliterationExample.java index 46da3e306..e1363819f 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/TransliterationExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/TransliterationExample.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 Basis Technology Corp. +* Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/model/src/main/java/com/basistech/rosette/apimodel/AccuracyMode.java b/model/src/main/java/com/basistech/rosette/apimodel/AccuracyMode.java index a46a56c53..374dc4963 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/AccuracyMode.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/AccuracyMode.java @@ -1,5 +1,5 @@ /* -* Copyright 2014-2024 Basis Technology Corp. +* Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/model/src/main/java/com/basistech/rosette/apimodel/CommonRosetteAPIException.java b/model/src/main/java/com/basistech/rosette/apimodel/CommonRosetteAPIException.java index 8c1a300d7..78cf49966 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/CommonRosetteAPIException.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/CommonRosetteAPIException.java @@ -1,5 +1,5 @@ /* -* Copyright 2016-2024 Basis Technology Corp. +* Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/model/src/main/java/com/basistech/rosette/apimodel/ConstantsResponse.java b/model/src/main/java/com/basistech/rosette/apimodel/ConstantsResponse.java index 4a1f2c210..398f12420 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/ConstantsResponse.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/ConstantsResponse.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2024 Basis Technology Corp. +* Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/model/src/main/java/com/basistech/rosette/apimodel/DocumentRequest.java b/model/src/main/java/com/basistech/rosette/apimodel/DocumentRequest.java index c330fc7b7..811c84adb 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/DocumentRequest.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/DocumentRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 Basis Technology Corp. + * Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/model/src/main/java/com/basistech/rosette/apimodel/ErrorResponse.java b/model/src/main/java/com/basistech/rosette/apimodel/ErrorResponse.java index 305c099ab..f24905ae1 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/ErrorResponse.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/ErrorResponse.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2024 Basis Technology Corp. +* Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/model/src/main/java/com/basistech/rosette/apimodel/InfoResponse.java b/model/src/main/java/com/basistech/rosette/apimodel/InfoResponse.java index 09e70cc3b..705772b7d 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/InfoResponse.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/InfoResponse.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2024 Basis Technology Corp. +* Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/model/src/main/java/com/basistech/rosette/apimodel/batch/BatchRequest.java b/model/src/main/java/com/basistech/rosette/apimodel/batch/BatchRequest.java index 00a895e68..2546ffa0d 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/batch/BatchRequest.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/batch/BatchRequest.java @@ -1,5 +1,5 @@ /* -* Copyright 2017-2024 Basis Technology Corp. +* Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/model/src/main/java/com/basistech/rosette/apimodel/package-info.java b/model/src/main/java/com/basistech/rosette/apimodel/package-info.java index 0c96170a9..a755e02ec 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/package-info.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/package-info.java @@ -1,5 +1,5 @@ /* -* Copyright 2014-2024 Basis Technology Corp. +* Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From 4867d3d72a43d238d5fc3de5cdb8616ca55e5e80 Mon Sep 17 00:00:00 2001 From: Katsuya Tomioka Date: Tue, 29 Oct 2024 13:33:44 +0000 Subject: [PATCH 362/415] update pom --- all/pom.xml | 2 +- pom.xml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/all/pom.xml b/all/pom.xml index 8c83db90e..b02f7cc8e 100644 --- a/all/pom.xml +++ b/all/pom.xml @@ -23,7 +23,7 @@ rosette-api-all rosette-api-all - Rosette API Communications + Rosette API all modules combined false diff --git a/pom.xml b/pom.xml index b5e0f06ab..367a3d7e5 100644 --- a/pom.xml +++ b/pom.xml @@ -57,6 +57,7 @@ json common api + all examples release From 6c91d5bdb62d9b461396c93520c85e2e28f22ca7 Mon Sep 17 00:00:00 2001 From: Katsuya Tomioka Date: Tue, 29 Oct 2024 13:36:46 +0000 Subject: [PATCH 363/415] update pom --- all/pom.xml | 3 --- 1 file changed, 3 deletions(-) diff --git a/all/pom.xml b/all/pom.xml index b02f7cc8e..a7fddd98e 100644 --- a/all/pom.xml +++ b/all/pom.xml @@ -24,9 +24,6 @@ rosette-api-all rosette-api-all Rosette API all modules combined - - false - com.basistech From d4fc96303319c77cbdb678b22a9d1474099333d5 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Tue, 29 Oct 2024 16:14:08 +0100 Subject: [PATCH 364/415] WS-3314: update example runner and "all package" description --- all/pom.xml | 2 +- release/src/scripts/run_all_examples.sh | 19 +++++++++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/all/pom.xml b/all/pom.xml index a7fddd98e..e26ab74f4 100644 --- a/all/pom.xml +++ b/all/pom.xml @@ -23,7 +23,7 @@ rosette-api-all rosette-api-all - Rosette API all modules combined + Analytics API all modules combined com.basistech diff --git a/release/src/scripts/run_all_examples.sh b/release/src/scripts/run_all_examples.sh index 8fb39bc71..c6e5ddb66 100644 --- a/release/src/scripts/run_all_examples.sh +++ b/release/src/scripts/run_all_examples.sh @@ -8,27 +8,42 @@ fi key=$1 read -d '' examples < Date: Tue, 29 Oct 2024 17:18:41 +0100 Subject: [PATCH 365/415] WS-3314: update example runner usage info --- release/src/scripts/run_all_examples.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/src/scripts/run_all_examples.sh b/release/src/scripts/run_all_examples.sh index c6e5ddb66..db674afbf 100644 --- a/release/src/scripts/run_all_examples.sh +++ b/release/src/scripts/run_all_examples.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash if [ $# -eq 0 ]; then - echo "Usage: $0 API_KEY" 1>&2 + echo "Usage: $0 API_KEY [ALT_URL]" 1>&2 exit 1 fi From f5caf786189e2d83dbfbc6c510cc703b4c7e5f56 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Fri, 1 Nov 2024 18:34:40 -0500 Subject: [PATCH 366/415] WS-3314: Duplicate a few more headers. Add extra properties to samples. --- README.md | 2 +- all/pom.xml | 2 +- .../basistech/rosette/api/HttpRosetteAPI.java | 32 ++++++++++++++++--- .../com/basistech/rosette/api/BasicTest.java | 8 ++--- .../rosette/api/InvalidErrorTest.java | 6 ++-- .../basistech/rosette/api/RosetteAPITest.java | 10 +++--- .../rosette/api/RosetteRequestTest.java | 4 +-- api/src/test/mock-data/mockgen.py | 2 +- .../rosette/examples/ExampleBase.java | 18 +++++++---- 9 files changed, 57 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 71c43c29b..a15ed7735 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ Versions, of the form `x.y.z`, where `z` is greater than or equal to `100`, are them without consultation with Babel Street. #### Examples -View small example programs for each Rosette endpoint in the +View small example programs for each Analytics endpoint in the [examples](examples/src/main/java/com/basistech/rosette/examples) directory. #### Documentation & Support diff --git a/all/pom.xml b/all/pom.xml index e26ab74f4..0c4100050 100644 --- a/all/pom.xml +++ b/all/pom.xml @@ -23,7 +23,7 @@ rosette-api-all rosette-api-all - Analytics API all modules combined + Babel Street Analytics API all modules combined com.basistech diff --git a/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java b/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java index 529ad7f51..b0e997b90 100644 --- a/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java +++ b/api/src/main/java/com/basistech/rosette/api/HttpRosetteAPI.java @@ -84,12 +84,12 @@ public class HttpRosetteAPI extends AbstractRosetteAPI { public static final String DEFAULT_URL_BASE = "https://analytics.babelstreet.com/rest/v1"; - public static final String SERVICE_NAME = "RosetteAPI"; + public static final String SERVICE_NAME = "Babel-Street-Analytics-API"; public static final String BINDING_VERSION = getVersion(); public static final String USER_AGENT_STR = SERVICE_NAME + "-Java/" + BINDING_VERSION + "/" + System.getProperty("java.version"); private static final Logger LOG = LoggerFactory.getLogger(HttpRosetteAPI.class); - private static final String IO_EXCEPTION_MESSAGE = "IO Exception communicating with the Rosette API"; + private static final String IO_EXCEPTION_MESSAGE = "IO Exception communicating with the Babel Street Analytics API"; private static final Pattern TRAILING_SLASHES = Pattern.compile("/+$"); private String urlBase = DEFAULT_URL_BASE; private int failureRetries = 1; @@ -198,6 +198,9 @@ private void initHeaders(String key, List
    additionalHeaders) { this.additionalHeaders.add(new BasicHeader(HttpHeaders.ACCEPT_ENCODING, "gzip")); if (key != null) { this.additionalHeaders.add(new BasicHeader("X-BabelStreetAPI-Key", key)); + this.additionalHeaders.add(new BasicHeader("X-BabelStreetAPI-Binding", "java")); + this.additionalHeaders.add(new BasicHeader("X-BabelStreetAPI-Binding-Version", BINDING_VERSION)); + // TODO: Remove in a future release. this.additionalHeaders.add(new BasicHeader("X-RosetteAPI-Binding", "java")); this.additionalHeaders.add(new BasicHeader("X-RosetteAPI-Binding-Version", BINDING_VERSION)); } @@ -401,10 +404,15 @@ private T sendPostRequest(Object request, String urlStr, Class clazz) while (numRetries-- > 0) { try (CloseableHttpResponse response = httpClient.execute(post)) { T resp = getResponse(response, clazz); + // TODO: Remove in a future release Header ridHeader = response.getFirstHeader("X-RosetteAPI-DocumentRequest-Id"); if (ridHeader != null && ridHeader.getValue() != null) { LOG.debug("DocumentRequest ID {}", ridHeader.getValue()); } + Header bsidHeader = response.getFirstHeader("X-BabelStreetAPI-DocumentRequest-Id"); + if (bsidHeader != null && bsidHeader.getValue() != null) { + LOG.debug("DocumentRequest ID {}", bsidHeader.getValue()); + } if (resp instanceof Response) { responseHeadersToExtendedInformation((Response)resp, response); } @@ -556,15 +564,31 @@ private T getResponse(HttpResponse httpResponse, Class cla InputStream stream = httpResponse.getEntity().getContent(); InputStream inputStream = "gzip".equalsIgnoreCase(encoding) ? new GZIPInputStream(stream) : stream) { String ridHeader = headerValueOrNull(httpResponse.getFirstHeader("X-RosetteAPI-DocumentRequest-Id")); + String bsidHeader = headerValueOrNull(httpResponse.getFirstHeader("X-BabelStreetAPI-DocumentRequest-Id")); if (HTTP_OK != status) { - String ecHeader = headerValueOrNull(httpResponse.getFirstHeader("X-RosetteAPI-Status-Code")); - String emHeader = headerValueOrNull(httpResponse.getFirstHeader("X-RosetteAPI-Status-Message")); + String ecHeader; + if (headerValueOrNull(httpResponse.getFirstHeader("X-BabelStreetAPI-Status-Code")) != null) { + ecHeader = headerValueOrNull(httpResponse.getFirstHeader("X-BabelStreetAPI-Status-Code")); + } else { + // TODO: Remove in a future release + ecHeader = headerValueOrNull(httpResponse.getFirstHeader("X-RosetteAPI-Status-Code")); + } + String emHeader; + if (headerValueOrNull(httpResponse.getFirstHeader("X-BabelStreetAPI-Status-Message")) != null) { + emHeader = headerValueOrNull(httpResponse.getFirstHeader("X-BabelStreetAPI-Status-Message")); + } else { + // TODO: Remove in a future release + emHeader = headerValueOrNull(httpResponse.getFirstHeader("X-RosetteAPI-Status-Message")); + } String responseContentType = headerValueOrNull(httpResponse.getFirstHeader(HttpHeaders.CONTENT_TYPE)); if ("application/json".equals(responseContentType)) { ErrorResponse errorResponse = mapper.readValue(inputStream, ErrorResponse.class); if (ridHeader != null) { LOG.debug("DocumentRequest ID {}", ridHeader); } + if (bsidHeader != null) { + LOG.debug("DocumentRequest ID {}", bsidHeader); + } if (ecHeader != null) { errorResponse.setCode(ecHeader); } diff --git a/api/src/test/java/com/basistech/rosette/api/BasicTest.java b/api/src/test/java/com/basistech/rosette/api/BasicTest.java index da775e76f..b06047a03 100644 --- a/api/src/test/java/com/basistech/rosette/api/BasicTest.java +++ b/api/src/test/java/com/basistech/rosette/api/BasicTest.java @@ -1,5 +1,5 @@ /* -* Copyright 2022 Basis Technology Corp. +* Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -138,7 +138,7 @@ void testHeaders() throws Exception { .withHeader(HttpHeaders.USER_AGENT, HttpRosetteAPI.USER_AGENT_STR)) .respond(HttpResponse.response() .withHeader("Content-Type", "application/json") - .withHeader("X-RosetteAPI-Concurrency", "5") + .withHeader("X-BabelStreetAPI-Concurrency", "5") .withStatusCode(200) .withBody("{\"message\":\"Rosette API at your service\",\"time\":1461788498633}", StandardCharsets.UTF_8)); @@ -148,7 +148,7 @@ void testHeaders() throws Exception { .additionalHeader("X-Foo", "Bar") .build(); var resp = api.ping(); - assertEquals("5", resp.getExtendedInformation().get("X-RosetteAPI-Concurrency")); + assertEquals("5", resp.getExtendedInformation().get("X-BabelStreetAPI-Concurrency")); } @Test @@ -185,7 +185,7 @@ void testExtendedInfo() throws Exception { .withHeader("Content-Type", "application/json") .withHeader("X-Foo", "Bar") .withHeader("X-FooMulti", "Bar1", "Bar2") - .withHeader("X-RosetteAPI-Concurrency", "5") + .withHeader("X-BabelStreetAPI-Concurrency", "5") .withBody("{\"message\":\"Rosette API at your service\",\"time\":1461788498633}", StandardCharsets.UTF_8)); api = new HttpRosetteAPI.Builder() .key("foo-key") diff --git a/api/src/test/java/com/basistech/rosette/api/InvalidErrorTest.java b/api/src/test/java/com/basistech/rosette/api/InvalidErrorTest.java index 42b2f425a..045291788 100644 --- a/api/src/test/java/com/basistech/rosette/api/InvalidErrorTest.java +++ b/api/src/test/java/com/basistech/rosette/api/InvalidErrorTest.java @@ -1,5 +1,5 @@ /* -* Copyright 2022 Basis Technology Corp. +* Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,7 +50,7 @@ void notJsonError() throws Exception { mockServer.when(HttpRequest.request().withPath(".*/{2,}.*")) .respond(HttpResponse.response() .withBody("Invalid path; '//'") - .withHeader("X-RosetteAPI-Concurrency", "5") + .withHeader("X-BabelStreetAPI-Concurrency", "5") .withStatusCode(HTTP_NOT_FOUND)); mockServer.when(HttpRequest.request() .withMethod("GET") @@ -59,7 +59,7 @@ void notJsonError() throws Exception { .respond(HttpResponse.response() .withBody("{\"message\":\"Rosette API at your service\",\"time\":1461788498633}", StandardCharsets.UTF_8) .withStatusCode(HTTP_OK) - .withHeader("X-RosetteAPI-Concurrency", "5")); + .withHeader("X-BabelStreetAPI-Concurrency", "5")); String mockServiceUrl = "http://localhost:" + mockServer.getPort() + "/rest//v1"; boolean exceptional = false; try { diff --git a/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java b/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java index e84c99067..d5ac9e058 100644 --- a/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java +++ b/api/src/test/java/com/basistech/rosette/api/RosetteAPITest.java @@ -1,5 +1,5 @@ /* -* Copyright 2022 Basis Technology Corp. +* Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -100,14 +100,14 @@ public void setUp(MockServerClient mockServer) { .withBody("{\"message\":\"Rosette API at your service\",\"time\":1461788498633}", StandardCharsets.UTF_8) .withStatusCode(HTTP_OK) - .withHeader("X-RosetteAPI-Concurrency", "5")); + .withHeader("X-BabelStreetAPI-Concurrency", "5")); this.mockServer.when(HttpRequest.request() .withPath("/info")) .respond(HttpResponse.response() .withStatusCode(HTTP_OK) .withHeader("Content-Type", "application/json") - .withHeader("X-RosetteAPI-Concurrency", "5") + .withHeader("X-BabelStreetAPI-Concurrency", "5") .withBody(INFO_RESPONSE, StandardCharsets.UTF_8)); api = new HttpRosetteAPI.Builder() @@ -145,14 +145,14 @@ private void setStatusCodeResponse(String responseStr, int statusCode) throws IO .respond(HttpResponse.response() .withHeader("Content-Type", "application/json") .withHeader("Content-Encoding", "gzip") - .withHeader("X-RosetteAPI-Concurrency", "5") + .withHeader("X-BabelStreetAPI-Concurrency", "5") .withStatusCode(statusCode).withBody(gzip(responseStr))); } else { mockServer.when(HttpRequest.request().withPath("^(?!/info).+")) .respond(HttpResponse.response() .withHeader("Content-Type", "application/json") - .withHeader("X-RosetteAPI-Concurrency", "5") + .withHeader("X-BabelStreetAPI-Concurrency", "5") .withStatusCode(statusCode).withBody(responseStr, StandardCharsets.UTF_8)); } diff --git a/api/src/test/java/com/basistech/rosette/api/RosetteRequestTest.java b/api/src/test/java/com/basistech/rosette/api/RosetteRequestTest.java index af7b1259a..f57027b10 100644 --- a/api/src/test/java/com/basistech/rosette/api/RosetteRequestTest.java +++ b/api/src/test/java/com/basistech/rosette/api/RosetteRequestTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2023 Basis Technology Corp. + * Copyright 2024 Basis Technology Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -61,7 +61,7 @@ private void setupResponse(String requestPath, String responseString, int status this.mockServer.when(HttpRequest.request().withPath(requestPath), Times.exactly(requestTimes)) .respond(HttpResponse.response() .withHeader("Content-Type", "application/json") - .withHeader("X-RosetteAPI-Concurrency", "5") + .withHeader("X-BabelStreetAPI-Concurrency", "5") .withStatusCode(statusCode) .withBody(responseString) .withDelay(TimeUnit.MILLISECONDS, delayMillis)); diff --git a/api/src/test/mock-data/mockgen.py b/api/src/test/mock-data/mockgen.py index b9bad89d7..9cf79248c 100755 --- a/api/src/test/mock-data/mockgen.py +++ b/api/src/test/mock-data/mockgen.py @@ -50,7 +50,7 @@ def capture(req, endpoints, filename_prefix): headers = {"Content-Type": "application/json"} if args.api_key: - headers['X-RosetteAPI-Key'] = args.api_key + headers['X-BabelStreetAPI-Key'] = args.api_key # prep & clean up for folder in ["request", "response"]: diff --git a/examples/src/main/java/com/basistech/rosette/examples/ExampleBase.java b/examples/src/main/java/com/basistech/rosette/examples/ExampleBase.java index cd2d73695..1b6371506 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/ExampleBase.java +++ b/examples/src/main/java/com/basistech/rosette/examples/ExampleBase.java @@ -27,8 +27,10 @@ */ @SuppressWarnings("java:S106") public abstract class ExampleBase { - private static final String KEY_PROP_NAME = "rosette.api.key"; - private static final String URL_PROP_NAME = "rosette.api.altUrl"; + private static final String KEY_PROP_NAME = "analytics.api.key"; + private static final String URL_PROP_NAME = "analytics.api.altUrl"; + private static final String LEGACY_KEY_PROP_NAME = "rosette.api.key"; + private static final String LEGACY_URL_PROP_NAME = "rosette.api.altUrl"; private static final String USAGE_STR = "Usage: java -cp rosette-api-examples.jar:lib/rosette-api-manifest.jar " + "-D" + KEY_PROP_NAME + "= " + "-D" + URL_PROP_NAME + "= "; @@ -36,8 +38,10 @@ public abstract class ExampleBase { * @return api key using system property {@value com.basistech.rosette.examples.ExampleBase#KEY_PROP_NAME} */ protected String getApiKeyFromSystemProperty() { - String apiKeyStr = System.getProperty(KEY_PROP_NAME); - if (apiKeyStr == null || apiKeyStr.trim().length() < 1) { + String apiKeyStr = System.getProperty(KEY_PROP_NAME) != null + ? System.getProperty(KEY_PROP_NAME) + : System.getProperty(LEGACY_KEY_PROP_NAME); + if (apiKeyStr == null || apiKeyStr.trim().isEmpty()) { showUsage(getClass()); System.exit(1); } @@ -48,8 +52,10 @@ protected String getApiKeyFromSystemProperty() { * @return alternate url using system property {@value com.basistech.rosette.examples.ExampleBase#URL_PROP_NAME} */ protected String getAltUrlFromSystemProperty() { - String altUrlStr = System.getProperty(URL_PROP_NAME); - if (altUrlStr == null || altUrlStr.trim().length() < 1) { + String altUrlStr = System.getProperty(URL_PROP_NAME) != null + ? System.getProperty(URL_PROP_NAME) + : System.getProperty(LEGACY_URL_PROP_NAME); + if (altUrlStr == null || altUrlStr.trim().isEmpty()) { altUrlStr = "https://analytics.babelstreet.com/rest/v1"; } return altUrlStr.trim(); From bf374059b1e0f7e4022abcf6e48285fe009f4803 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Mon, 4 Nov 2024 12:00:44 +0100 Subject: [PATCH 367/415] WS-3314: fix example runner --- release/src/scripts/run_all_examples.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/release/src/scripts/run_all_examples.sh b/release/src/scripts/run_all_examples.sh index db674afbf..4cbe11838 100644 --- a/release/src/scripts/run_all_examples.sh +++ b/release/src/scripts/run_all_examples.sh @@ -44,6 +44,10 @@ if [ -n "$2" ]; then fi for example in $examples; do - java -Drosette.api.key=$key "$OPTS" -cp rosette-api-examples.jar:lib/* $example + if [ -n "$2" ]; then + java -Drosette.api.key=$key -Drosette.api.altUrl=$2 -cp rosette-api-examples.jar:lib/* $example + else + java -Drosette.api.key=$key -cp rosette-api-examples.jar:lib/* $example + fi done From 17021f53fe52d2d414645ebb13f95ec1770c705b Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Tue, 5 Nov 2024 17:02:55 -0600 Subject: [PATCH 368/415] Few more rebranding updates. --- .../src/main/java/com/basistech/rosette/examples/README.md | 2 +- release/src/scripts/run_all_examples.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) mode change 100644 => 100755 release/src/scripts/run_all_examples.sh diff --git a/examples/src/main/java/com/basistech/rosette/examples/README.md b/examples/src/main/java/com/basistech/rosette/examples/README.md index 3f08d8850..94db89978 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/README.md +++ b/examples/src/main/java/com/basistech/rosette/examples/README.md @@ -13,5 +13,5 @@ git clone git@github.com:rosette-api/java.git cd java mvn install cd examples -mvn exec:java -Dexec.mainClass="com.basistech.rosette.examples.PingExample" -Drosette.api.key=$API_KEY +mvn exec:java -Dexec.mainClass="com.basistech.rosette.examples.PingExample" -Danalytics.api.key=$API_KEY ``` diff --git a/release/src/scripts/run_all_examples.sh b/release/src/scripts/run_all_examples.sh old mode 100644 new mode 100755 index 4cbe11838..1fb38168f --- a/release/src/scripts/run_all_examples.sh +++ b/release/src/scripts/run_all_examples.sh @@ -40,14 +40,14 @@ EOF OPTS="" if [ -n "$2" ]; then - OPTS="-Drosette.api.altUrl=$2" + OPTS="-Danalytics.api.altUrl=$2" fi for example in $examples; do if [ -n "$2" ]; then - java -Drosette.api.key=$key -Drosette.api.altUrl=$2 -cp rosette-api-examples.jar:lib/* $example + java -Danalytics.api.key=$key -Danalytics.api.altUrl=$2 -cp rosette-api-examples.jar:lib/* $example else - java -Drosette.api.key=$key -cp rosette-api-examples.jar:lib/* $example + java -Danalytics.api.key=$key -cp rosette-api-examples.jar:lib/* $example fi done From 036383b0817dc2896fe30d0df1d84f26f9d95ce3 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Tue, 5 Nov 2024 17:04:53 -0600 Subject: [PATCH 369/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.30.1 --- all/pom.xml | 2 +- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/all/pom.xml b/all/pom.xml index 0c4100050..cf69f5290 100644 --- a/all/pom.xml +++ b/all/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.0-SNAPSHOT + 1.30.1 rosette-api-all rosette-api-all diff --git a/annotations/pom.xml b/annotations/pom.xml index 8059bf0ca..f2728f95e 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.0-SNAPSHOT + 1.30.1 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 3759ada21..502caa19a 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.0-SNAPSHOT + 1.30.1 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 865713257..93f9ca4d0 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.0-SNAPSHOT + 1.30.1 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index c9769c9be..b3af7cb4f 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.0-SNAPSHOT + 1.30.1 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 952227860..1a9b45d3a 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.0-SNAPSHOT + 1.30.1 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index e3956b47c..e9bf5429c 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.0-SNAPSHOT + 1.30.1 rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index dc7311aa6..21f4a18d1 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.31.0-SNAPSHOT + 1.30.1 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.31.101 + rosette-api-java-binding-1.30.1 This is the Java binding for the Babel Street Analytics API. The classes in here help Java applications to communicate with the Analytics API. diff --git a/release/pom.xml b/release/pom.xml index 94157e093..94b7ae99f 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.0-SNAPSHOT + 1.30.1 com.basistech.rosette rosette-api-release From 3aaba67048abd3c7e1cf07e778dc0447b7f672de Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Tue, 5 Nov 2024 17:19:00 -0600 Subject: [PATCH 370/415] [maven-release-plugin] prepare for next development iteration --- all/pom.xml | 2 +- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 2 +- release/pom.xml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/all/pom.xml b/all/pom.xml index cf69f5290..0c4100050 100644 --- a/all/pom.xml +++ b/all/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.1 + 1.31.0-SNAPSHOT rosette-api-all rosette-api-all diff --git a/annotations/pom.xml b/annotations/pom.xml index f2728f95e..8059bf0ca 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.1 + 1.31.0-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 502caa19a..3759ada21 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.1 + 1.31.0-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 93f9ca4d0..865713257 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.1 + 1.31.0-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index b3af7cb4f..c9769c9be 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.1 + 1.31.0-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 1a9b45d3a..952227860 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.1 + 1.31.0-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index e9bf5429c..e3956b47c 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.1 + 1.31.0-SNAPSHOT rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 21f4a18d1..d0fda127f 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.30.1 + 1.31.0-SNAPSHOT open-source-parent com.basistech diff --git a/release/pom.xml b/release/pom.xml index 94b7ae99f..94157e093 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.30.1 + 1.31.0-SNAPSHOT com.basistech.rosette rosette-api-release From 5a124b06bb77dec297bcec1689a0bfdae481aed9 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Tue, 5 Nov 2024 17:34:58 -0600 Subject: [PATCH 371/415] [maven-release-plugin] rollback the release of rosette-api-java-binding-1.30.1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d0fda127f..dc7311aa6 100644 --- a/pom.xml +++ b/pom.xml @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.30.1 + rosette-api-java-binding-1.31.101 This is the Java binding for the Babel Street Analytics API. The classes in here help Java applications to communicate with the Analytics API. From 4f3ff804becc112831ed746e6f57abe8225f457b Mon Sep 17 00:00:00 2001 From: Katsuya Tomioka Date: Wed, 6 Nov 2024 19:02:23 +0000 Subject: [PATCH 372/415] fix "all" to generate source and javadoc jars --- all/pom.xml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/all/pom.xml b/all/pom.xml index 0c4100050..9e1986c60 100644 --- a/all/pom.xml +++ b/all/pom.xml @@ -45,6 +45,39 @@ + + org.codehaus.mojo + build-helper-maven-plugin + + + add-source + package + + add-source + + + + ../model/target/delombok + ../api/src/main/java + ../annotations/src/main/java + + + + + + + maven-javadoc-plugin + + ../model/target/delombok;../api/src/main/java + + + com.basistech.rosette + rosette-api-annotations + ${project.version} + + + + org.apache.maven.plugins maven-shade-plugin From b09b62679e841ab59ec26fe6c208db593484c6d8 Mon Sep 17 00:00:00 2001 From: Julien Cherry <6952800+juliencherry@users.noreply.github.com> Date: Wed, 30 Oct 2024 15:20:42 -0400 Subject: [PATCH 373/415] COMN-341: Update the parent POM to version 21.0.0 --- model/pom.xml | 7 +++++++ pom.xml | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/model/pom.xml b/model/pom.xml index 4c5a6c595..ce9453525 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -82,6 +82,13 @@ org.projectlombok lombok-maven-plugin ${lombok-maven-plugin.version} + + + org.projectlombok + lombok + ${lombok.version} + + generate-sources diff --git a/pom.xml b/pom.xml index 367a3d7e5..0dc87cc76 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ open-source-parent com.basistech - 20.0.0 + 21.0.0 pom From effcea1941f53a6cffef4848ddfa613e9afb8212 Mon Sep 17 00:00:00 2001 From: Katsuya Tomioka Date: Wed, 6 Nov 2024 19:04:22 +0000 Subject: [PATCH 374/415] WS-3314: fix missing javadoc and sources jar for "all" --- all/pom.xml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/all/pom.xml b/all/pom.xml index 0c4100050..9e1986c60 100644 --- a/all/pom.xml +++ b/all/pom.xml @@ -45,6 +45,39 @@ + + org.codehaus.mojo + build-helper-maven-plugin + + + add-source + package + + add-source + + + + ../model/target/delombok + ../api/src/main/java + ../annotations/src/main/java + + + + + + + maven-javadoc-plugin + + ../model/target/delombok;../api/src/main/java + + + com.basistech.rosette + rosette-api-annotations + ${project.version} + + + + org.apache.maven.plugins maven-shade-plugin From ad31d76fc8b570510b48f1239e508891a7b3deb8 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Fri, 15 Nov 2024 11:50:16 -0600 Subject: [PATCH 375/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.31.0 --- all/pom.xml | 2 +- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/all/pom.xml b/all/pom.xml index 9e1986c60..6f4ff4088 100644 --- a/all/pom.xml +++ b/all/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.0-SNAPSHOT + 1.31.0 rosette-api-all rosette-api-all diff --git a/annotations/pom.xml b/annotations/pom.xml index 8059bf0ca..a9d82d892 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.0-SNAPSHOT + 1.31.0 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 3759ada21..6648e6075 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.0-SNAPSHOT + 1.31.0 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 865713257..4440e1b42 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.0-SNAPSHOT + 1.31.0 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index c9769c9be..5aa7c9900 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.0-SNAPSHOT + 1.31.0 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 952227860..4cc6b8009 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.0-SNAPSHOT + 1.31.0 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index e3956b47c..bb4200b8a 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.0-SNAPSHOT + 1.31.0 rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index dc7311aa6..19f1bb399 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.31.0-SNAPSHOT + 1.31.0 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.31.101 + rosette-api-java-binding-1.31.0 This is the Java binding for the Babel Street Analytics API. The classes in here help Java applications to communicate with the Analytics API. diff --git a/release/pom.xml b/release/pom.xml index 94157e093..2d5bdc192 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.0-SNAPSHOT + 1.31.0 com.basistech.rosette rosette-api-release From f09ccc6498c794dcd5bffd9c190762684c75f530 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Fri, 15 Nov 2024 11:50:19 -0600 Subject: [PATCH 376/415] [maven-release-plugin] prepare for next development iteration --- all/pom.xml | 2 +- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/all/pom.xml b/all/pom.xml index 6f4ff4088..ddb5a865c 100644 --- a/all/pom.xml +++ b/all/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.0 + 1.31.1-SNAPSHOT rosette-api-all rosette-api-all diff --git a/annotations/pom.xml b/annotations/pom.xml index a9d82d892..ea6458874 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.0 + 1.31.1-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 6648e6075..0f316b113 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.0 + 1.31.1-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 4440e1b42..8b34950c3 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.0 + 1.31.1-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 5aa7c9900..298d6c8d9 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.0 + 1.31.1-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 4cc6b8009..3841c79ea 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.0 + 1.31.1-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index bb4200b8a..f6c31911b 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.0 + 1.31.1-SNAPSHOT rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 19f1bb399..1f55455a1 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.31.0 + 1.31.1-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.31.0 + rosette-api-java-binding-1.31.101 This is the Java binding for the Babel Street Analytics API. The classes in here help Java applications to communicate with the Analytics API. diff --git a/release/pom.xml b/release/pom.xml index 2d5bdc192..8a4415fcb 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.0 + 1.31.1-SNAPSHOT com.basistech.rosette rosette-api-release From 2c916135ad8e180f02cf65db13a29d3844cd918a Mon Sep 17 00:00:00 2001 From: seth-mg Date: Tue, 3 Dec 2024 15:50:26 -0600 Subject: [PATCH 377/415] Change Docker image to 21-jdk-noble --- CI.Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CI.Jenkinsfile b/CI.Jenkinsfile index b79b1cfdc..21c1a5d37 100644 --- a/CI.Jenkinsfile +++ b/CI.Jenkinsfile @@ -28,7 +28,7 @@ node ("docker-light") { --pull always \ --volume ${sourceDir}:/source \ --volume /opt/maven-basis:/opt/maven-basis \ - eclipse-temurin:17-jdk-focal \ + eclipse-temurin:21-jdk-noble \ bash -c \"apt-get update && \ apt-get install -y git && \ pushd /source && \ From 98e506c49696e425c89d0d7b5ce5ae1268f77cd4 Mon Sep 17 00:00:00 2001 From: seth-mg Date: Tue, 3 Dec 2024 15:54:34 -0600 Subject: [PATCH 378/415] Set JAVA_HOME and PATH --- CI.Jenkinsfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CI.Jenkinsfile b/CI.Jenkinsfile index 21c1a5d37..8d0d3cd33 100644 --- a/CI.Jenkinsfile +++ b/CI.Jenkinsfile @@ -1,6 +1,8 @@ node ("docker-light") { def sourceDir = pwd() try { + env.JAVA_HOME = "${tool 'java21'}" + env.PATH = "${env.JAVA_HOME}/bin:${env.PATH}" def mavenLocalRepo = "$JENKINS_HOME/maven-local-repositories/executor-$EXECUTOR_NUMBER" stage("Clean up") { step([$class: 'WsCleanup']) From 9d40a1e27521e20a3097dd8201e71cb617490546 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Tue, 3 Dec 2024 22:10:28 +0000 Subject: [PATCH 379/415] NO-JIRA: Add lombok to javadoc plugin additional dependencies. --- all/pom.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/all/pom.xml b/all/pom.xml index ddb5a865c..5003a3dc9 100644 --- a/all/pom.xml +++ b/all/pom.xml @@ -75,6 +75,11 @@ rosette-api-annotations ${project.version} + + org.projectlombok + lombok + ${lombok.version} + From 1e1a1c777cf405d0d625c1dfea594373c778a241 Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Tue, 3 Dec 2024 22:12:10 +0000 Subject: [PATCH 380/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.32.100 --- all/pom.xml | 2 +- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/all/pom.xml b/all/pom.xml index 5003a3dc9..e14ccceee 100644 --- a/all/pom.xml +++ b/all/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.1-SNAPSHOT + 1.32.100 rosette-api-all rosette-api-all diff --git a/annotations/pom.xml b/annotations/pom.xml index ea6458874..8d574a0d8 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.1-SNAPSHOT + 1.32.100 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 0f316b113..0beeae577 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.1-SNAPSHOT + 1.32.100 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 8b34950c3..dd07d0f32 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.1-SNAPSHOT + 1.32.100 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 298d6c8d9..502ce4ffe 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.1-SNAPSHOT + 1.32.100 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 3841c79ea..ff8d29f4f 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.1-SNAPSHOT + 1.32.100 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 099150bda..06031b4ff 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.1-SNAPSHOT + 1.32.100 rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 9caf891a2..3912cd16b 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.31.1-SNAPSHOT + 1.32.100 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.31.101 + rosette-api-java-binding-1.32.100 This is the Java binding for the Babel Street Analytics API. The classes in here help Java applications to communicate with the Analytics API. diff --git a/release/pom.xml b/release/pom.xml index 8a4415fcb..46854fcc1 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.31.1-SNAPSHOT + 1.32.100 com.basistech.rosette rosette-api-release From 92d8162e9fc41fcb6916ccb0e936bdb2983e304d Mon Sep 17 00:00:00 2001 From: Seth Gransky Date: Tue, 3 Dec 2024 22:13:27 +0000 Subject: [PATCH 381/415] [maven-release-plugin] prepare for next development iteration --- all/pom.xml | 2 +- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/all/pom.xml b/all/pom.xml index e14ccceee..2b3cd3430 100644 --- a/all/pom.xml +++ b/all/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.32.100 + 1.32.101-SNAPSHOT rosette-api-all rosette-api-all diff --git a/annotations/pom.xml b/annotations/pom.xml index 8d574a0d8..cd880a059 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.32.100 + 1.32.101-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 0beeae577..9a6285a68 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.32.100 + 1.32.101-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index dd07d0f32..15c0cc20a 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.32.100 + 1.32.101-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 502ce4ffe..a21cb315e 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.32.100 + 1.32.101-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index ff8d29f4f..c8a1ec7af 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.32.100 + 1.32.101-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 06031b4ff..19e542903 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.32.100 + 1.32.101-SNAPSHOT rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 3912cd16b..18198f518 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.32.100 + 1.32.101-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.32.100 + rosette-api-java-binding-1.31.101 This is the Java binding for the Babel Street Analytics API. The classes in here help Java applications to communicate with the Analytics API. diff --git a/release/pom.xml b/release/pom.xml index 46854fcc1..e02ccb4ad 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.32.100 + 1.32.101-SNAPSHOT com.basistech.rosette rosette-api-release From 6927ce779de38c2e1fc9c0c054c0f0e59646e79e Mon Sep 17 00:00:00 2001 From: seth-mg Date: Tue, 3 Dec 2024 16:24:28 -0600 Subject: [PATCH 382/415] Allow file permission mismatch. --- CI.Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/CI.Jenkinsfile b/CI.Jenkinsfile index 8d0d3cd33..6d669cfba 100644 --- a/CI.Jenkinsfile +++ b/CI.Jenkinsfile @@ -34,6 +34,7 @@ node ("docker-light") { bash -c \"apt-get update && \ apt-get install -y git && \ pushd /source && \ + git config --global --add safe.directory /source && \ /opt/maven-basis/bin/mvn --batch-mode clean install sonar:sonar $mySonarOpts; \ maven_ret=\\\$?; \ echo && \ From 704474e9ab2a8527500f35d48b626c43681e85c8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 19:52:54 +0000 Subject: [PATCH 383/415] Bump org.projectlombok:lombok in the minor-and-patch group Bumps the minor-and-patch group with 1 update: [org.projectlombok:lombok](https://github.com/projectlombok/lombok). Updates `org.projectlombok:lombok` from 1.18.34 to 1.18.36 - [Changelog](https://github.com/projectlombok/lombok/blob/master/doc/changelog.markdown) - [Commits](https://github.com/projectlombok/lombok/compare/v1.18.34...v1.18.36) --- updated-dependencies: - dependency-name: org.projectlombok:lombok dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 18198f518..6db14962f 100644 --- a/pom.xml +++ b/pom.xml @@ -46,7 +46,7 @@ 3.1.0 1.13.0 5.11.3 - 1.18.34 + 1.18.36 1.18.20.0 5.15.0 0.10.2 From d78e114c76566f7f4894b66bb476309cf8aebb6c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Dec 2024 19:09:38 +0000 Subject: [PATCH 384/415] Bump the minor-and-patch group with 3 updates Bumps the minor-and-patch group with 3 updates: [org.junit.jupiter:junit-jupiter-api](https://github.com/junit-team/junit5), [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit5) and [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5). Updates `org.junit.jupiter:junit-jupiter-api` from 5.11.3 to 5.11.4 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.11.3...r5.11.4) Updates `org.junit.jupiter:junit-jupiter-params` from 5.11.3 to 5.11.4 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.11.3...r5.11.4) Updates `org.junit.jupiter:junit-jupiter` from 5.11.3 to 5.11.4 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.11.3...r5.11.4) Updates `org.junit.jupiter:junit-jupiter-params` from 5.11.3 to 5.11.4 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.11.3...r5.11.4) Updates `org.junit.jupiter:junit-jupiter` from 5.11.3 to 5.11.4 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.11.3...r5.11.4) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-api dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter-params dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter-params dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6db14962f..da5eceddf 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,7 @@ 1.17.1 3.1.0 1.13.0 - 5.11.3 + 5.11.4 1.18.36 1.18.20.0 5.15.0 From 9cb86f5691e004d03799a833dfb2d11a0a9f4aad Mon Sep 17 00:00:00 2001 From: seth-mg Date: Tue, 7 Jan 2025 14:51:20 -0600 Subject: [PATCH 385/415] Force Java 21 --- Jenkinsfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index a029425b5..5777d9641 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,6 +1,8 @@ node ("docker-light") { def SOURCEDIR = pwd() try { + env.JAVA_HOME = "${tool 'java21'}" + env.PATH = "${env.JAVA_HOME}/bin:${env.PATH}" def mavenLocalRepo = "$JENKINS_HOME/maven-local-repositories/executor-$EXECUTOR_NUMBER" stage("Clean up") { step([$class: 'WsCleanup']) From f29fde1331db3fd413e3f5e05c604552e155c9f7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 19:28:38 +0000 Subject: [PATCH 386/415] Bump commons-codec:commons-codec in the minor-and-patch group Bumps the minor-and-patch group with 1 update: [commons-codec:commons-codec](https://github.com/apache/commons-codec). Updates `commons-codec:commons-codec` from 1.17.1 to 1.17.2 - [Changelog](https://github.com/apache/commons-codec/blob/master/RELEASE-NOTES.txt) - [Commits](https://github.com/apache/commons-codec/compare/rel/commons-codec-1.17.1...rel/commons-codec-1.17.2) --- updated-dependencies: - dependency-name: commons-codec:commons-codec dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index da5eceddf..818804f2c 100644 --- a/pom.xml +++ b/pom.xml @@ -42,7 +42,7 @@ 3.6.0 - 1.17.1 + 1.17.2 3.1.0 1.13.0 5.11.4 From 282b42b26663ea2ca136a630380ab7e8d8653a65 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Wed, 15 Jan 2025 14:34:45 +0100 Subject: [PATCH 387/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.32.0 --- all/pom.xml | 2 +- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/all/pom.xml b/all/pom.xml index 2b3cd3430..321be7fe8 100644 --- a/all/pom.xml +++ b/all/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.32.101-SNAPSHOT + 1.32.0 rosette-api-all rosette-api-all diff --git a/annotations/pom.xml b/annotations/pom.xml index cd880a059..80d1db996 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.32.101-SNAPSHOT + 1.32.0 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 9a6285a68..a4dd1f0d9 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.32.101-SNAPSHOT + 1.32.0 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 15c0cc20a..390bbeefc 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.32.101-SNAPSHOT + 1.32.0 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index a21cb315e..0b834b007 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.32.101-SNAPSHOT + 1.32.0 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index c8a1ec7af..435ad3f76 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.32.101-SNAPSHOT + 1.32.0 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 19e542903..70fbc2fb9 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.32.101-SNAPSHOT + 1.32.0 rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 818804f2c..f1cd681e4 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.32.101-SNAPSHOT + 1.32.0 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.31.101 + rosette-api-java-binding-1.32.0 This is the Java binding for the Babel Street Analytics API. The classes in here help Java applications to communicate with the Analytics API. diff --git a/release/pom.xml b/release/pom.xml index e02ccb4ad..810afe455 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.32.101-SNAPSHOT + 1.32.0 com.basistech.rosette rosette-api-release From 48428fc17e7b6455e79ae4a5ab6769208940d51f Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Wed, 15 Jan 2025 14:35:01 +0100 Subject: [PATCH 388/415] [maven-release-plugin] prepare for next development iteration --- all/pom.xml | 2 +- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/all/pom.xml b/all/pom.xml index 321be7fe8..307e8260b 100644 --- a/all/pom.xml +++ b/all/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.32.0 + 1.33.0-SNAPSHOT rosette-api-all rosette-api-all diff --git a/annotations/pom.xml b/annotations/pom.xml index 80d1db996..1de5065f3 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.32.0 + 1.33.0-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index a4dd1f0d9..132119ba0 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.32.0 + 1.33.0-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 390bbeefc..4dd876f80 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.32.0 + 1.33.0-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 0b834b007..f56a873a9 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.32.0 + 1.33.0-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 435ad3f76..5c3fd7f09 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.32.0 + 1.33.0-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 70fbc2fb9..8b6d3fccd 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.32.0 + 1.33.0-SNAPSHOT rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index f1cd681e4..26c6d56a0 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.32.0 + 1.33.0-SNAPSHOT open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.32.0 + rosette-api-java-binding-1.31.101 This is the Java binding for the Babel Street Analytics API. The classes in here help Java applications to communicate with the Analytics API. diff --git a/release/pom.xml b/release/pom.xml index 810afe455..ccb057a2d 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.32.0 + 1.33.0-SNAPSHOT com.basistech.rosette rosette-api-release From a27a8a03d7187fc0de308775baab14710ea8a3c8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 19:27:21 +0000 Subject: [PATCH 389/415] Bump commons-codec:commons-codec in the minor-and-patch group Bumps the minor-and-patch group with 1 update: [commons-codec:commons-codec](https://github.com/apache/commons-codec). Updates `commons-codec:commons-codec` from 1.17.2 to 1.18.0 - [Changelog](https://github.com/apache/commons-codec/blob/master/RELEASE-NOTES.txt) - [Commits](https://github.com/apache/commons-codec/compare/rel/commons-codec-1.17.2...rel/commons-codec-1.18.0) --- updated-dependencies: - dependency-name: commons-codec:commons-codec dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 26c6d56a0..5a0a514d2 100644 --- a/pom.xml +++ b/pom.xml @@ -42,7 +42,7 @@ 3.6.0 - 1.17.2 + 1.18.0 3.1.0 1.13.0 5.11.4 From 42786ecce4337b09700ceda5acf507c6a57255af Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Feb 2025 19:34:31 +0000 Subject: [PATCH 390/415] Bump jakarta.validation:jakarta.validation-api Bumps the minor-and-patch group with 1 update: [jakarta.validation:jakarta.validation-api](https://github.com/jakartaee/validation). Updates `jakarta.validation:jakarta.validation-api` from 3.1.0 to 3.1.1 - [Release notes](https://github.com/jakartaee/validation/releases) - [Commits](https://github.com/jakartaee/validation/compare/3.1.0...3.1.1) --- updated-dependencies: - dependency-name: jakarta.validation:jakarta.validation-api dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5a0a514d2..f58637979 100644 --- a/pom.xml +++ b/pom.xml @@ -43,7 +43,7 @@ 3.6.0 1.18.0 - 3.1.0 + 3.1.1 1.13.0 5.11.4 1.18.36 From f5990ed7b931ebdb7ea16259477c040396cb4923 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Feb 2025 20:05:13 +0000 Subject: [PATCH 391/415] Bump com.basistech:open-source-parent from 21.0.0 to 22.0.0 Bumps [com.basistech:open-source-parent](https://github.com/basis-technology-corp/open-source-parent) from 21.0.0 to 22.0.0. - [Changelog](https://github.com/basis-technology-corp/open-source-parent/blob/master/RELEASE-NOTES.md) - [Commits](https://github.com/basis-technology-corp/open-source-parent/compare/open-source-parent-21.0.0...open-source-parent-22.0.0) --- updated-dependencies: - dependency-name: com.basistech:open-source-parent dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f58637979..d0c6cfbcc 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ open-source-parent com.basistech - 21.0.0 + 22.0.0 pom From 8d1b3e3d5ba0fcc109f8ffee335e12cabf90a802 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 20:20:58 +0000 Subject: [PATCH 392/415] Bump the minor-and-patch group with 3 updates Bumps the minor-and-patch group with 3 updates: [org.junit.jupiter:junit-jupiter-api](https://github.com/junit-team/junit5), [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit5) and [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5). Updates `org.junit.jupiter:junit-jupiter-api` from 5.11.4 to 5.12.0 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.11.4...r5.12.0) Updates `org.junit.jupiter:junit-jupiter-params` from 5.11.4 to 5.12.0 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.11.4...r5.12.0) Updates `org.junit.jupiter:junit-jupiter` from 5.11.4 to 5.12.0 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.11.4...r5.12.0) Updates `org.junit.jupiter:junit-jupiter-params` from 5.11.4 to 5.12.0 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.11.4...r5.12.0) Updates `org.junit.jupiter:junit-jupiter` from 5.11.4 to 5.12.0 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.11.4...r5.12.0) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-api dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter-params dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter-params dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d0c6cfbcc..feea7cbad 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,7 @@ 1.18.0 3.1.1 1.13.0 - 5.11.4 + 5.12.0 1.18.36 1.18.20.0 5.15.0 From ce96c71a423df5b1ab9a0748f6c59e12de11fd6b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Mar 2025 20:01:07 +0000 Subject: [PATCH 393/415] Bump the minor-and-patch group with 3 updates Bumps the minor-and-patch group with 3 updates: [org.junit.jupiter:junit-jupiter-api](https://github.com/junit-team/junit5), [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit5) and [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5). Updates `org.junit.jupiter:junit-jupiter-api` from 5.12.0 to 5.12.1 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.12.0...r5.12.1) Updates `org.junit.jupiter:junit-jupiter-params` from 5.12.0 to 5.12.1 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.12.0...r5.12.1) Updates `org.junit.jupiter:junit-jupiter` from 5.12.0 to 5.12.1 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.12.0...r5.12.1) Updates `org.junit.jupiter:junit-jupiter-params` from 5.12.0 to 5.12.1 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.12.0...r5.12.1) Updates `org.junit.jupiter:junit-jupiter` from 5.12.0 to 5.12.1 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.12.0...r5.12.1) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-api dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter-params dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter-params dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index feea7cbad..7b2beb44f 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,7 @@ 1.18.0 3.1.1 1.13.0 - 5.12.0 + 5.12.1 1.18.36 1.18.20.0 5.15.0 From 14fb656edc1cee48f14ceec3c5008d58f73cc20c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Mar 2025 19:51:02 +0000 Subject: [PATCH 394/415] Bump org.projectlombok:lombok in the minor-and-patch group Bumps the minor-and-patch group with 1 update: [org.projectlombok:lombok](https://github.com/projectlombok/lombok). Updates `org.projectlombok:lombok` from 1.18.36 to 1.18.38 - [Changelog](https://github.com/projectlombok/lombok/blob/master/doc/changelog.markdown) - [Commits](https://github.com/projectlombok/lombok/compare/v1.18.36...v1.18.38) --- updated-dependencies: - dependency-name: org.projectlombok:lombok dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7b2beb44f..c49ba0ff3 100644 --- a/pom.xml +++ b/pom.xml @@ -46,7 +46,7 @@ 3.1.1 1.13.0 5.12.1 - 1.18.36 + 1.18.38 1.18.20.0 5.15.0 0.10.2 From f91bdef0be778ab573b22c590cda1ed932db8015 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Wed, 2 Apr 2025 14:51:34 +0200 Subject: [PATCH 395/415] WS-3466: deserialize name translation response extended information --- .../apimodel/NameTranslationResponse.java | 26 +++++++++++++++++++ .../basistech/rosette/apimodel/Response.java | 6 +++++ 2 files changed, 32 insertions(+) diff --git a/model/src/main/java/com/basistech/rosette/apimodel/NameTranslationResponse.java b/model/src/main/java/com/basistech/rosette/apimodel/NameTranslationResponse.java index 57f71c30b..67899b4a5 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/NameTranslationResponse.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/NameTranslationResponse.java @@ -17,6 +17,7 @@ package com.basistech.rosette.apimodel; import java.util.List; +import java.util.Map; import com.basistech.rosette.annotations.JacksonMixin; import com.basistech.util.ISO15924; @@ -79,4 +80,29 @@ public class NameTranslationResponse extends Response { * @return the translation */ private final List translations; + + public static class NameTranslationResponseBuilder { + protected Map extendedInformation; + + public NameTranslationResponseBuilder extendedInformation(Map extendedInformation) { + this.extendedInformation = extendedInformation; + return this; + } + + + public NameTranslationResponse build() { + NameTranslationResponse response = new NameTranslationResponse( + this.sourceScript, + this.sourceLanguageOfOrigin, + this.sourceLanguageOfUse, + this.targetLanguage, + this.targetScript, + this.targetScheme, + this.translation, + this.confidence, + this.translations); + response.addExtendedInformation(extendedInformation); + return response; + } + } } diff --git a/model/src/main/java/com/basistech/rosette/apimodel/Response.java b/model/src/main/java/com/basistech/rosette/apimodel/Response.java index 073dec5bc..97a1f54e9 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/Response.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/Response.java @@ -45,4 +45,10 @@ public void addExtendedInformation(String key, Object value) { } extendedInformation.put(key, value); } + + public void addExtendedInformation(Map extendedInformation) { + for (Map.Entry entry : extendedInformation.entrySet()) { + addExtendedInformation(entry.getKey(), entry.getValue()); + } + } } From f0612eff004796231041998ec3a448ae061b53da Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Thu, 3 Apr 2025 10:27:28 +0200 Subject: [PATCH 396/415] WS-3466: null check --- .../src/main/java/com/basistech/rosette/apimodel/Response.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/model/src/main/java/com/basistech/rosette/apimodel/Response.java b/model/src/main/java/com/basistech/rosette/apimodel/Response.java index 97a1f54e9..f15062f24 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/Response.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/Response.java @@ -47,6 +47,9 @@ public void addExtendedInformation(String key, Object value) { } public void addExtendedInformation(Map extendedInformation) { + if (extendedInformation == null || extendedInformation.isEmpty()) { + return; + } for (Map.Entry entry : extendedInformation.entrySet()) { addExtendedInformation(entry.getKey(), entry.getValue()); } From 671c51bcbccc8bd79e851f2b6cb9ccb1af0edf91 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Apr 2025 20:16:32 +0000 Subject: [PATCH 397/415] Bump the minor-and-patch group with 3 updates Bumps the minor-and-patch group with 3 updates: [org.junit.jupiter:junit-jupiter-api](https://github.com/junit-team/junit5), [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit5) and [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5). Updates `org.junit.jupiter:junit-jupiter-api` from 5.12.1 to 5.12.2 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.12.1...r5.12.2) Updates `org.junit.jupiter:junit-jupiter-params` from 5.12.1 to 5.12.2 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.12.1...r5.12.2) Updates `org.junit.jupiter:junit-jupiter` from 5.12.1 to 5.12.2 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.12.1...r5.12.2) Updates `org.junit.jupiter:junit-jupiter-params` from 5.12.1 to 5.12.2 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.12.1...r5.12.2) Updates `org.junit.jupiter:junit-jupiter` from 5.12.1 to 5.12.2 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.12.1...r5.12.2) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-api dependency-version: 5.12.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter-params dependency-version: 5.12.2 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter dependency-version: 5.12.2 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter-params dependency-version: 5.12.2 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter dependency-version: 5.12.2 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c49ba0ff3..ce3afc7c3 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,7 @@ 1.18.0 3.1.1 1.13.0 - 5.12.1 + 5.12.2 1.18.38 1.18.20.0 5.15.0 From 634c67accef3f9dfb9aaf7a8c01ba3dfa9a1803d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 May 2025 19:42:43 +0000 Subject: [PATCH 398/415] Bump com.basistech:open-source-parent from 22.0.0 to 23.0.1 Bumps [com.basistech:open-source-parent](https://github.com/basis-technology-corp/open-source-parent) from 22.0.0 to 23.0.1. - [Changelog](https://github.com/basis-technology-corp/open-source-parent/blob/master/RELEASE-NOTES.md) - [Commits](https://github.com/basis-technology-corp/open-source-parent/compare/open-source-parent-22.0.0...open-source-parent-23.0.1) --- updated-dependencies: - dependency-name: com.basistech:open-source-parent dependency-version: 23.0.1 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ce3afc7c3..810676597 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ open-source-parent com.basistech - 22.0.0 + 23.0.1 pom From bc8a880567ad9e6a3cb330590ac7ef98265a9a13 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Jun 2025 19:33:45 +0000 Subject: [PATCH 399/415] Bump the minor-and-patch group with 3 updates Bumps the minor-and-patch group with 3 updates: [org.junit.jupiter:junit-jupiter-api](https://github.com/junit-team/junit5), [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit5) and [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5). Updates `org.junit.jupiter:junit-jupiter-api` from 5.12.2 to 5.13.0 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.12.2...r5.13.0) Updates `org.junit.jupiter:junit-jupiter-params` from 5.12.2 to 5.13.0 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.12.2...r5.13.0) Updates `org.junit.jupiter:junit-jupiter` from 5.12.2 to 5.13.0 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.12.2...r5.13.0) Updates `org.junit.jupiter:junit-jupiter-params` from 5.12.2 to 5.13.0 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.12.2...r5.13.0) Updates `org.junit.jupiter:junit-jupiter` from 5.12.2 to 5.13.0 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.12.2...r5.13.0) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-api dependency-version: 5.13.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter-params dependency-version: 5.13.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter dependency-version: 5.13.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter-params dependency-version: 5.13.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter dependency-version: 5.13.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 810676597..f38583949 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,7 @@ 1.18.0 3.1.1 1.13.0 - 5.12.2 + 5.13.0 1.18.38 1.18.20.0 5.15.0 From ab5860cb5a8e4926898d3dfd5d4d53664afde802 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Jun 2025 19:50:23 +0000 Subject: [PATCH 400/415] Bump the minor-and-patch group with 4 updates Bumps the minor-and-patch group with 4 updates: [org.codehaus.mojo:build-helper-maven-plugin](https://github.com/mojohaus/build-helper-maven-plugin), [org.junit.jupiter:junit-jupiter-api](https://github.com/junit-team/junit5), [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit5) and [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5). Updates `org.codehaus.mojo:build-helper-maven-plugin` from 3.6.0 to 3.6.1 - [Release notes](https://github.com/mojohaus/build-helper-maven-plugin/releases) - [Commits](https://github.com/mojohaus/build-helper-maven-plugin/compare/3.6.0...3.6.1) Updates `org.junit.jupiter:junit-jupiter-api` from 5.13.0 to 5.13.1 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.13.0...r5.13.1) Updates `org.junit.jupiter:junit-jupiter-params` from 5.13.0 to 5.13.1 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.13.0...r5.13.1) Updates `org.junit.jupiter:junit-jupiter` from 5.13.0 to 5.13.1 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.13.0...r5.13.1) Updates `org.junit.jupiter:junit-jupiter-params` from 5.13.0 to 5.13.1 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.13.0...r5.13.1) Updates `org.junit.jupiter:junit-jupiter` from 5.13.0 to 5.13.1 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.13.0...r5.13.1) --- updated-dependencies: - dependency-name: org.codehaus.mojo:build-helper-maven-plugin dependency-version: 3.6.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter-api dependency-version: 5.13.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter-params dependency-version: 5.13.1 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter dependency-version: 5.13.1 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter-params dependency-version: 5.13.1 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter dependency-version: 5.13.1 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index f38583949..551538dc6 100644 --- a/pom.xml +++ b/pom.xml @@ -41,11 +41,11 @@ - 3.6.0 + 3.6.1 1.18.0 3.1.1 1.13.0 - 5.13.0 + 5.13.1 1.18.38 1.18.20.0 5.15.0 From 8cbe007f5a9a7c9c21392f3ff0d6ca636034b74c Mon Sep 17 00:00:00 2001 From: Julien Cherry <6952800+juliencherry@users.noreply.github.com> Date: Thu, 12 Jun 2025 13:54:03 -0400 Subject: [PATCH 401/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.34.0 --- all/pom.xml | 2 +- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/all/pom.xml b/all/pom.xml index 307e8260b..44ed761ef 100644 --- a/all/pom.xml +++ b/all/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.33.0-SNAPSHOT + 1.34.0 rosette-api-all rosette-api-all diff --git a/annotations/pom.xml b/annotations/pom.xml index 1de5065f3..9e3d24dba 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.33.0-SNAPSHOT + 1.34.0 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 132119ba0..6d6af0b55 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.33.0-SNAPSHOT + 1.34.0 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 4dd876f80..259d0654c 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.33.0-SNAPSHOT + 1.34.0 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index f56a873a9..8497c269a 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.33.0-SNAPSHOT + 1.34.0 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index 5c3fd7f09..fd4c707d2 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.33.0-SNAPSHOT + 1.34.0 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 8b6d3fccd..9ff383d97 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.33.0-SNAPSHOT + 1.34.0 rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 551538dc6..8986ac41b 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.33.0-SNAPSHOT + 1.34.0 open-source-parent com.basistech @@ -31,7 +31,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.31.101 + rosette-api-java-binding-1.34.0 This is the Java binding for the Babel Street Analytics API. The classes in here help Java applications to communicate with the Analytics API. diff --git a/release/pom.xml b/release/pom.xml index ccb057a2d..232252e6f 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.33.0-SNAPSHOT + 1.34.0 com.basistech.rosette rosette-api-release From 25de12233c681d3b512662b61de02bde912d80eb Mon Sep 17 00:00:00 2001 From: Julien Cherry <6952800+juliencherry@users.noreply.github.com> Date: Thu, 12 Jun 2025 13:54:46 -0400 Subject: [PATCH 402/415] [maven-release-plugin] prepare for next development iteration --- all/pom.xml | 2 +- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 2 +- release/pom.xml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/all/pom.xml b/all/pom.xml index 44ed761ef..245155f82 100644 --- a/all/pom.xml +++ b/all/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.34.0 + 1.34.1-SNAPSHOT rosette-api-all rosette-api-all diff --git a/annotations/pom.xml b/annotations/pom.xml index 9e3d24dba..595b66c77 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.34.0 + 1.34.1-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 6d6af0b55..88da02332 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.34.0 + 1.34.1-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 259d0654c..c037cf82b 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.34.0 + 1.34.1-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 8497c269a..028307397 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.34.0 + 1.34.1-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index fd4c707d2..c5c51a1d5 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.34.0 + 1.34.1-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 9ff383d97..b261626c4 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.34.0 + 1.34.1-SNAPSHOT rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 8986ac41b..d837d70f1 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.34.0 + 1.34.1-SNAPSHOT open-source-parent com.basistech diff --git a/release/pom.xml b/release/pom.xml index 232252e6f..1f461b403 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.34.0 + 1.34.1-SNAPSHOT com.basistech.rosette rosette-api-release From 53c67fb208c8e1affe0cb7163e5892c0f0c31632 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 23:01:10 +0000 Subject: [PATCH 403/415] Bump the minor-and-patch group with 3 updates Bumps the minor-and-patch group with 3 updates: [org.junit.jupiter:junit-jupiter-api](https://github.com/junit-team/junit-framework), [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit-framework) and [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit-framework). Updates `org.junit.jupiter:junit-jupiter-api` from 5.13.1 to 5.13.2 - [Release notes](https://github.com/junit-team/junit-framework/releases) - [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.1...r5.13.2) Updates `org.junit.jupiter:junit-jupiter-params` from 5.13.1 to 5.13.2 - [Release notes](https://github.com/junit-team/junit-framework/releases) - [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.1...r5.13.2) Updates `org.junit.jupiter:junit-jupiter` from 5.13.1 to 5.13.2 - [Release notes](https://github.com/junit-team/junit-framework/releases) - [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.1...r5.13.2) Updates `org.junit.jupiter:junit-jupiter-params` from 5.13.1 to 5.13.2 - [Release notes](https://github.com/junit-team/junit-framework/releases) - [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.1...r5.13.2) Updates `org.junit.jupiter:junit-jupiter` from 5.13.1 to 5.13.2 - [Release notes](https://github.com/junit-team/junit-framework/releases) - [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.1...r5.13.2) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-api dependency-version: 5.13.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter-params dependency-version: 5.13.2 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter dependency-version: 5.13.2 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter-params dependency-version: 5.13.2 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter dependency-version: 5.13.2 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d837d70f1..b61401b19 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,7 @@ 1.18.0 3.1.1 1.13.0 - 5.13.1 + 5.13.2 1.18.38 1.18.20.0 5.15.0 From 123bde2fb8bec4c847983143dadf8821e9367ef7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Aug 2025 01:56:36 +0000 Subject: [PATCH 404/415] Bump the minor-and-patch group with 4 updates Bumps the minor-and-patch group with 4 updates: [org.junit.jupiter:junit-jupiter-api](https://github.com/junit-team/junit-framework), [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit-framework), [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit-framework) and [commons-codec:commons-codec](https://github.com/apache/commons-codec). Updates `org.junit.jupiter:junit-jupiter-api` from 5.13.2 to 5.13.4 - [Release notes](https://github.com/junit-team/junit-framework/releases) - [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.2...r5.13.4) Updates `org.junit.jupiter:junit-jupiter-params` from 5.13.2 to 5.13.4 - [Release notes](https://github.com/junit-team/junit-framework/releases) - [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.2...r5.13.4) Updates `org.junit.jupiter:junit-jupiter` from 5.13.2 to 5.13.4 - [Release notes](https://github.com/junit-team/junit-framework/releases) - [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.2...r5.13.4) Updates `org.junit.jupiter:junit-jupiter-params` from 5.13.2 to 5.13.4 - [Release notes](https://github.com/junit-team/junit-framework/releases) - [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.2...r5.13.4) Updates `commons-codec:commons-codec` from 1.18.0 to 1.19.0 - [Changelog](https://github.com/apache/commons-codec/blob/master/RELEASE-NOTES.txt) - [Commits](https://github.com/apache/commons-codec/compare/rel/commons-codec-1.18.0...rel/commons-codec-1.19.0) Updates `org.junit.jupiter:junit-jupiter` from 5.13.2 to 5.13.4 - [Release notes](https://github.com/junit-team/junit-framework/releases) - [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.2...r5.13.4) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-api dependency-version: 5.13.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter-params dependency-version: 5.13.4 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter dependency-version: 5.13.4 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter-params dependency-version: 5.13.4 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: commons-codec:commons-codec dependency-version: 1.19.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: org.junit.jupiter:junit-jupiter dependency-version: 5.13.4 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index b61401b19..64b483841 100644 --- a/pom.xml +++ b/pom.xml @@ -42,10 +42,10 @@ 3.6.1 - 1.18.0 + 1.19.0 3.1.1 1.13.0 - 5.13.2 + 5.13.4 1.18.38 1.18.20.0 5.15.0 From 22b6f68224120c4d7857bc4b2e5d5885d4f4cfde Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Aug 2025 13:09:45 +0000 Subject: [PATCH 405/415] Bump com.basistech:open-source-parent from 23.0.1 to 24.0.1 Bumps [com.basistech:open-source-parent](https://github.com/basis-technology-corp/open-source-parent) from 23.0.1 to 24.0.1. - [Changelog](https://github.com/basis-technology-corp/open-source-parent/blob/master/RELEASE-NOTES.md) - [Commits](https://github.com/basis-technology-corp/open-source-parent/compare/open-source-parent-23.0.1...open-source-parent-24.0.1) --- updated-dependencies: - dependency-name: com.basistech:open-source-parent dependency-version: 24.0.1 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 64b483841..b350bb2ca 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ open-source-parent com.basistech - 23.0.1 + 24.0.1 pom From 7380f650b6f697accabb0794a1663a8568095838 Mon Sep 17 00:00:00 2001 From: Ian Redpath Date: Mon, 27 Oct 2025 18:00:52 -0400 Subject: [PATCH 406/415] RLPNC-8316: add support for generic string/number/boolean types in record matching --- .../examples/RecordSimilarityExample.java | 26 +++++-- ...RecordSimilarityDeserializerUtilities.java | 15 ++++ .../apimodel/RecordSimilarityRequestTest.java | 69 ++++++++++++++----- .../RecordSimilarityResponseTest.java | 28 ++++++-- .../records/BooleanField.java | 30 ++++++++ .../recordsimilarity/records/NumberField.java | 30 ++++++++ .../records/RecordFieldType.java | 5 ++ .../recordsimilarity/records/StringField.java | 30 ++++++++ 8 files changed, 203 insertions(+), 30 deletions(-) create mode 100644 model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/BooleanField.java create mode 100644 model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/NumberField.java create mode 100644 model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/StringField.java diff --git a/examples/src/main/java/com/basistech/rosette/examples/RecordSimilarityExample.java b/examples/src/main/java/com/basistech/rosette/examples/RecordSimilarityExample.java index 4a3fd5e71..a3191ce3c 100644 --- a/examples/src/main/java/com/basistech/rosette/examples/RecordSimilarityExample.java +++ b/examples/src/main/java/com/basistech/rosette/examples/RecordSimilarityExample.java @@ -22,9 +22,12 @@ import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityRequest; import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityResponse; import com.basistech.rosette.apimodel.recordsimilarity.records.AddressField; +import com.basistech.rosette.apimodel.recordsimilarity.records.BooleanField; import com.basistech.rosette.apimodel.recordsimilarity.records.DateField; import com.basistech.rosette.apimodel.recordsimilarity.records.NameField; +import com.basistech.rosette.apimodel.recordsimilarity.records.NumberField; import com.basistech.rosette.apimodel.recordsimilarity.records.RecordFieldType; +import com.basistech.rosette.apimodel.recordsimilarity.records.StringField; import com.basistech.util.ISO15924; import com.basistech.util.LanguageCode; @@ -53,13 +56,19 @@ private void run() throws IOException { String dobField = "dob"; String dob2Field = "dob2"; String addrField = "addr"; + String strField = "jobTitle"; + String numberField = "age"; + String boolField = "isRetired"; String dobHyphen = "1993-04-16"; RecordSimilarityRequest request = RecordSimilarityRequest.builder() .fields(Map.of( primaryNameField, RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_NAME).weight(0.5).build(), dobField, RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_DATE).weight(0.2).build(), dob2Field, RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_DATE).weight(0.1).build(), - addrField, RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_ADDRESS).weight(0.5).build())) + addrField, RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_ADDRESS).weight(0.5).build(), + strField, RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_STRING).weight(0.2).build(), + numberField, RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_NUMBER).weight(0.4).build(), + boolField, RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_BOOLEAN).weight(0.05).build())) .properties(RecordSimilarityProperties.builder().threshold(0.7).includeExplainInfo(true).build()) .records(RecordSimilarityRecords.builder() .left( @@ -73,24 +82,31 @@ private void run() throws IOException { .build(), dobField, DateField.UnfieldedDate.builder().date(dobHyphen).build(), dob2Field, DateField.FieldedDate.builder().date("04161993").format("MMddyyyy").build(), - addrField, AddressField.UnfieldedAddress.builder().address("123 Roadlane Ave").build() + addrField, AddressField.UnfieldedAddress.builder().address("123 Roadlane Ave").build(), + strField, StringField.builder().data("software engineer").build() ), Map.of( primaryNameField, NameField.FieldedName.builder().text("Evan R").build(), - dobField, DateField.FieldedDate.builder().date(dobHyphen).build() + dobField, DateField.FieldedDate.builder().date(dobHyphen).build(), + numberField, NumberField.builder().data(47).build(), + boolField, BooleanField.builder().data(false).build() ) ) ).right( List.of( Map.of( primaryNameField, NameField.FieldedName.builder().text("Seth R").language(LanguageCode.ENGLISH).build(), - dobField, DateField.FieldedDate.builder().date(dobHyphen).build() + dobField, DateField.FieldedDate.builder().date(dobHyphen).build(), + strField, StringField.builder().data("manager").build(), + boolField, BooleanField.builder().data(true).build() ), Map.of( primaryNameField, NameField.UnfieldedName.builder().text("Ivan R").build(), dobField, DateField.FieldedDate.builder().date(dobHyphen).build(), dob2Field, DateField.FieldedDate.builder().date("1993/04/16").build(), - addrField, AddressField.FieldedAddress.builder().houseNumber("123").road("Roadlane Ave").build() + addrField, AddressField.FieldedAddress.builder().houseNumber("123").road("Roadlane Ave").build(), + numberField, NumberField.builder().data(72).build(), + boolField, BooleanField.builder().data(true).build() ) ) ).build() diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java index 9c5e07983..2618938e8 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java @@ -36,10 +36,13 @@ import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityFieldInfo; import com.basistech.rosette.apimodel.recordsimilarity.records.AddressField; +import com.basistech.rosette.apimodel.recordsimilarity.records.BooleanField; import com.basistech.rosette.apimodel.recordsimilarity.records.DateField; import com.basistech.rosette.apimodel.recordsimilarity.records.NameField; +import com.basistech.rosette.apimodel.recordsimilarity.records.NumberField; import com.basistech.rosette.apimodel.recordsimilarity.records.RecordFieldType; import com.basistech.rosette.apimodel.recordsimilarity.records.RecordSimilarityField; +import com.basistech.rosette.apimodel.recordsimilarity.records.StringField; import com.basistech.rosette.apimodel.recordsimilarity.records.UnknownField; final class RecordSimilarityDeserializerUtilities { @@ -124,6 +127,18 @@ static Map parseRecord( case RecordFieldType.RNI_ADDRESS: fieldData = fieldValue.traverse(jsonParser.getCodec()).readValueAs(AddressField.class); break; + case RecordFieldType.RNI_STRING: + fieldData = StringField.builder().data(fieldValue.textValue()).build(); + break; + case RecordFieldType.RNI_NUMBER: + fieldData = NumberField.builder().data(fieldValue.numberValue()).build(); + break; + case RecordFieldType.RNI_BOOLEAN: + // Be sure not to accidentally convert non-boolean values to 'false' + fieldData = BooleanField.builder() + .data(fieldValue.isBoolean() ? fieldValue.booleanValue() : null) + .build(); + break; default: fieldData = fieldValue.traverse(jsonParser.getCodec()).readValueAs(UnknownField.class); } diff --git a/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java b/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java index 5e5fcd9fb..254a60998 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/RecordSimilarityRequestTest.java @@ -22,9 +22,12 @@ import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityRecords; import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityRequest; import com.basistech.rosette.apimodel.recordsimilarity.records.AddressField; +import com.basistech.rosette.apimodel.recordsimilarity.records.BooleanField; import com.basistech.rosette.apimodel.recordsimilarity.records.DateField; import com.basistech.rosette.apimodel.recordsimilarity.records.NameField; +import com.basistech.rosette.apimodel.recordsimilarity.records.NumberField; import com.basistech.rosette.apimodel.recordsimilarity.records.RecordFieldType; +import com.basistech.rosette.apimodel.recordsimilarity.records.StringField; import com.basistech.util.ISO15924; import com.basistech.util.LanguageCode; import com.fasterxml.jackson.core.JsonProcessingException; @@ -41,16 +44,19 @@ class RecordSimilarityRequestTest { private static final ObjectMapper MAPPER = ApiModelMixinModule.setupObjectMapper(new ObjectMapper()); - private static final String EXPECTED_JSON = "{\"fields\":{\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"addr\":{\"type\":\"rni_address\",\"weight\":0.5,\"scoreIfNull\":0.8}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true},\"records\":{\"left\":[{\"dob2\":{\"date\":\"1993/04/16\",\"format\":\"yyyy/MM/dd\"},\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"dob\":\"1993-04-16\",\"addr\":\"123 Roadlane Ave\"},{\"primaryName\":{\"text\":\"Evan R\"},\"dob\":{\"date\":\"1993-04-16\"}}],\"right\":[{\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"},\"dob\":{\"date\":\"1993-04-16\"}},{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":\"Ivan R\",\"dob\":{\"date\":\"1993-04-16\"},\"addr\":{\"houseNumber\":\"123\",\"road\":\"Roadlane Ave\"}}]}}"; - private static final String EXPECTED_JSON_WITH_PARAMS = "{\"fields\":{\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"addr\":{\"type\":\"rni_address\",\"weight\":0.5}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true,\"parameters\":{\"timeDistanceWeight\":\"0.8\",\"stringDistanceWeight\":\"0.1\"}},\"records\":{\"left\":[{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"dob\":\"1993-04-16\",\"addr\":\"123 Roadlane Ave\"},{\"primaryName\":{\"text\":\"Evan R\"},\"dob\":{\"date\":\"1993-04-16\"}}],\"right\":[{\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"},\"dob\":{\"date\":\"1993-04-16\"}},{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":\"Ivan R\",\"dob\":{\"date\":\"1993-04-16\"},\"addr\":{\"houseNumber\":\"123\",\"road\":\"Roadlane Ave\"}}]}}"; - private static final String EXPECTED_JSON_WITH_UNIVERSE = "{\"fields\":{\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"addr\":{\"type\":\"rni_address\",\"weight\":0.5}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true,\"parameterUniverse\":\"myParameterUniverse\"},\"records\":{\"left\":[{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"dob\":\"1993-04-16\",\"addr\":\"123 Roadlane Ave\"},{\"primaryName\":{\"text\":\"Evan R\"},\"dob\":{\"date\":\"1993-04-16\"}}],\"right\":[{\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"},\"dob\":{\"date\":\"1993-04-16\"}},{\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":\"Ivan R\",\"dob\":{\"date\":\"1993-04-16\"},\"addr\":{\"houseNumber\":\"123\",\"road\":\"Roadlane Ave\"}}]}}"; + private static final String EXPECTED_JSON = "{\"fields\":{\"num\":{\"type\":\"rni_number\",\"weight\":0.25},\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1},\"bool\":{\"type\":\"rni_boolean\",\"weight\":0.05},\"addr\":{\"type\":\"rni_address\",\"weight\":0.5,\"scoreIfNull\":0.8},\"str\":{\"type\":\"rni_string\",\"weight\":0.8},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true},\"records\":{\"left\":[{\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"num\":42.0,\"dob\":\"1993-04-16\",\"dob2\":{\"date\":\"1993/04/16\",\"format\":\"yyyy/MM/dd\"},\"addr\":\"123 Roadlane Ave\"},{\"primaryName\":{\"text\":\"Evan R\"},\"dob\":{\"date\":\"1993-04-16\"},\"str\":\"some string\",\"bool\":false}],\"right\":[{\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"},\"num\":74301945813095,\"dob\":{\"date\":\"1993-04-16\"},\"bool\":true},{\"addr\":{\"houseNumber\":\"123\",\"road\":\"Roadlane Ave\"},\"str\":\"some other string\",\"dob2\":{\"date\":\"1993/04/16\"},\"primaryName\":\"Ivan R\",\"bool\":true,\"dob\":{\"date\":\"1993-04-16\"}}]}}"; + private static final String EXPECTED_JSON_WITH_PARAMS = "{\"fields\":{\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5},\"str\":{\"type\":\"rni_string\",\"weight\":0.8},\"addr\":{\"type\":\"rni_address\",\"weight\":0.5},\"bool\":{\"type\":\"rni_boolean\",\"weight\":0.05},\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1},\"num\":{\"type\":\"rni_number\",\"weight\":0.25}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true,\"parameters\":{\"stringDistanceWeight\":\"0.1\",\"timeDistanceWeight\":\"0.8\"}},\"records\":{\"left\":[{\"addr\":\"123 Roadlane Ave\",\"dob2\":{\"date\":\"1993/04/16\"},\"dob\":\"1993-04-16\",\"num\":42.0,\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"}},{\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"text\":\"Evan R\"},\"bool\":false,\"str\":\"some string\"}],\"right\":[{\"dob\":{\"date\":\"1993-04-16\"},\"num\":74301945813095,\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"},\"bool\":true},{\"primaryName\":\"Ivan R\",\"dob2\":{\"date\":\"1993/04/16\"},\"str\":\"some other string\",\"addr\":{\"houseNumber\":\"123\",\"road\":\"Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"bool\":true}]}}"; + private static final String EXPECTED_JSON_WITH_UNIVERSE = "{\"fields\":{\"num\":{\"type\":\"rni_number\",\"weight\":0.25},\"primaryName\":{\"type\":\"rni_name\",\"weight\":0.5},\"dob\":{\"type\":\"rni_date\",\"weight\":0.2},\"str\":{\"type\":\"rni_string\",\"weight\":0.8},\"addr\":{\"type\":\"rni_address\",\"weight\":0.5},\"bool\":{\"type\":\"rni_boolean\",\"weight\":0.05},\"dob2\":{\"type\":\"rni_date\",\"weight\":0.1}},\"properties\":{\"threshold\":0.7,\"includeExplainInfo\":true,\"parameterUniverse\":\"myParameterUniverse\"},\"records\":{\"left\":[{\"num\":42.0,\"primaryName\":{\"text\":\"Ethan R\",\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\"},\"addr\":\"123 Roadlane Ave\",\"dob2\":{\"date\":\"1993/04/16\"},\"dob\":\"1993-04-16\"},{\"primaryName\":{\"text\":\"Evan R\"},\"bool\":false,\"str\":\"some string\",\"dob\":{\"date\":\"1993-04-16\"}}],\"right\":[{\"primaryName\":{\"text\":\"Seth R\",\"language\":\"eng\"},\"bool\":true,\"dob\":{\"date\":\"1993-04-16\"},\"num\":74301945813095},{\"addr\":{\"houseNumber\":\"123\",\"road\":\"Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"bool\":true,\"primaryName\":\"Ivan R\",\"dob2\":{\"date\":\"1993/04/16\"},\"str\":\"some other string\"}]}}"; private static final RecordSimilarityRequest EXPECTED_REQUEST = RecordSimilarityRequest.builder() .fields(Map.of( "addr", RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_ADDRESS).weight(0.5).scoreIfNull(0.8).build(), "dob2", RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_DATE).weight(0.1).scoreIfNull(null).build(), "primaryName", RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_NAME).weight(0.5).build(), - "dob", RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_DATE).weight(0.2).build())) + "dob", RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_DATE).weight(0.2).build(), + "str", RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_STRING).weight(0.8).build(), + "num", RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_NUMBER).weight(0.25).build(), + "bool", RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_BOOLEAN).weight(0.05).build())) .properties(RecordSimilarityProperties.builder().threshold(0.7).includeExplainInfo(true).build()) .records(RecordSimilarityRecords.builder() .left( @@ -64,24 +70,31 @@ class RecordSimilarityRequestTest { .build(), "dob", DateField.UnfieldedDate.builder().date("1993-04-16").build(), "dob2", DateField.FieldedDate.builder().date("1993/04/16").format("yyyy/MM/dd").build(), - "addr", AddressField.UnfieldedAddress.builder().address("123 Roadlane Ave").build() + "addr", AddressField.UnfieldedAddress.builder().address("123 Roadlane Ave").build(), + "num", NumberField.builder().data(42.0).build() ), Map.of( "primaryName", NameField.FieldedName.builder().text("Evan R").build(), - "dob", DateField.FieldedDate.builder().date("1993-04-16").build() + "dob", DateField.FieldedDate.builder().date("1993-04-16").build(), + "str", StringField.builder().data("some string").build(), + "bool", BooleanField.builder().data(false).build() ) ) ).right( List.of( Map.of( "primaryName", NameField.FieldedName.builder().text("Seth R").language(LanguageCode.ENGLISH).build(), - "dob", DateField.FieldedDate.builder().date("1993-04-16").build() + "dob", DateField.FieldedDate.builder().date("1993-04-16").build(), + "num", NumberField.builder().data(74301945813095L).build(), + "bool", BooleanField.builder().data(true).build() ), Map.of( "primaryName", NameField.UnfieldedName.builder().text("Ivan R").build(), "dob", DateField.FieldedDate.builder().date("1993-04-16").build(), "dob2", DateField.FieldedDate.builder().date("1993/04/16").build(), - "addr", AddressField.FieldedAddress.builder().houseNumber("123").road("Roadlane Ave").build() + "addr", AddressField.FieldedAddress.builder().houseNumber("123").road("Roadlane Ave").build(), + "str", StringField.builder().data("some other string").build(), + "bool", BooleanField.builder().data(true).build() ) ) ).build() @@ -92,7 +105,10 @@ class RecordSimilarityRequestTest { "dob2", RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_DATE).weight(0.1).build(), "primaryName", RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_NAME).weight(0.5).build(), "dob", RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_DATE).weight(0.2).build(), - "addr", RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_ADDRESS).weight(0.5).build())) + "addr", RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_ADDRESS).weight(0.5).build(), + "str", RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_STRING).weight(0.8).build(), + "num", RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_NUMBER).weight(0.25).build(), + "bool", RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_BOOLEAN).weight(0.05).build())) .properties(RecordSimilarityProperties.builder() .threshold(0.7) .includeExplainInfo(true) @@ -115,24 +131,31 @@ class RecordSimilarityRequestTest { .build(), "dob", DateField.UnfieldedDate.builder().date("1993-04-16").build(), "dob2", DateField.FieldedDate.builder().date("1993/04/16").build(), - "addr", AddressField.UnfieldedAddress.builder().address("123 Roadlane Ave").build() + "addr", AddressField.UnfieldedAddress.builder().address("123 Roadlane Ave").build(), + "num", NumberField.builder().data(42.0).build() ), Map.of( "primaryName", NameField.FieldedName.builder().text("Evan R").build(), - "dob", DateField.FieldedDate.builder().date("1993-04-16").build() + "dob", DateField.FieldedDate.builder().date("1993-04-16").build(), + "str", StringField.builder().data("some string").build(), + "bool", BooleanField.builder().data(false).build() ) ) ).right( List.of( Map.of( "primaryName", NameField.FieldedName.builder().text("Seth R").language(LanguageCode.ENGLISH).build(), - "dob", DateField.FieldedDate.builder().date("1993-04-16").build() + "dob", DateField.FieldedDate.builder().date("1993-04-16").build(), + "num", NumberField.builder().data(74301945813095L).build(), + "bool", BooleanField.builder().data(true).build() ), Map.of( "primaryName", NameField.UnfieldedName.builder().text("Ivan R").build(), "dob", DateField.FieldedDate.builder().date("1993-04-16").build(), "dob2", DateField.FieldedDate.builder().date("1993/04/16").build(), - "addr", AddressField.FieldedAddress.builder().houseNumber("123").road("Roadlane Ave").build() + "addr", AddressField.FieldedAddress.builder().houseNumber("123").road("Roadlane Ave").build(), + "str", StringField.builder().data("some other string").build(), + "bool", BooleanField.builder().data(true).build() ) ) ).build() @@ -143,7 +166,10 @@ class RecordSimilarityRequestTest { "dob", RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_DATE).weight(0.2).build(), "primaryName", RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_NAME).weight(0.5).build(), "dob2", RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_DATE).weight(0.1).build(), - "addr", RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_ADDRESS).weight(0.5).build())) + "addr", RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_ADDRESS).weight(0.5).build(), + "str", RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_STRING).weight(0.8).build(), + "num", RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_NUMBER).weight(0.25).build(), + "bool", RecordSimilarityFieldInfo.builder().type(RecordFieldType.RNI_BOOLEAN).weight(0.05).build())) .properties(RecordSimilarityProperties.builder() .threshold(0.7) .includeExplainInfo(true) @@ -161,24 +187,31 @@ class RecordSimilarityRequestTest { .build(), "dob", DateField.UnfieldedDate.builder().date("1993-04-16").build(), "dob2", DateField.FieldedDate.builder().date("1993/04/16").build(), - "addr", AddressField.UnfieldedAddress.builder().address("123 Roadlane Ave").build() + "addr", AddressField.UnfieldedAddress.builder().address("123 Roadlane Ave").build(), + "num", NumberField.builder().data(42.0).build() ), Map.of( "primaryName", NameField.FieldedName.builder().text("Evan R").build(), - "dob", DateField.FieldedDate.builder().date("1993-04-16").build() + "dob", DateField.FieldedDate.builder().date("1993-04-16").build(), + "str", StringField.builder().data("some string").build(), + "bool", BooleanField.builder().data(false).build() ) ) ).right( List.of( Map.of( "primaryName", NameField.FieldedName.builder().text("Seth R").language(LanguageCode.ENGLISH).build(), - "dob", DateField.FieldedDate.builder().date("1993-04-16").build() + "dob", DateField.FieldedDate.builder().date("1993-04-16").build(), + "num", NumberField.builder().data(74301945813095L).build(), + "bool", BooleanField.builder().data(true).build() ), Map.of( "primaryName", NameField.UnfieldedName.builder().text("Ivan R").build(), "dob", DateField.FieldedDate.builder().date("1993-04-16").build(), "dob2", DateField.FieldedDate.builder().date("1993/04/16").build(), - "addr", AddressField.FieldedAddress.builder().houseNumber("123").road("Roadlane Ave").build() + "addr", AddressField.FieldedAddress.builder().houseNumber("123").road("Roadlane Ave").build(), + "str", StringField.builder().data("some other string").build(), + "bool", BooleanField.builder().data(true).build() ) ) ).build() diff --git a/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java b/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java index 7e7dbae98..f09b09056 100644 --- a/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java +++ b/json/src/test/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponseTest.java @@ -18,8 +18,11 @@ import com.basistech.rosette.apimodel.jackson.ApiModelMixinModule; import com.basistech.rosette.apimodel.recordsimilarity.records.AddressField; +import com.basistech.rosette.apimodel.recordsimilarity.records.BooleanField; import com.basistech.rosette.apimodel.recordsimilarity.records.DateField; import com.basistech.rosette.apimodel.recordsimilarity.records.NameField; +import com.basistech.rosette.apimodel.recordsimilarity.records.NumberField; +import com.basistech.rosette.apimodel.recordsimilarity.records.StringField; import com.basistech.util.ISO15924; import com.basistech.util.LanguageCode; import com.basistech.util.NEConstants; @@ -29,7 +32,6 @@ import com.fasterxml.jackson.databind.SerializationFeature; import org.junit.jupiter.api.Test; -import java.util.Arrays; import java.util.List; import java.util.Map; @@ -38,7 +40,7 @@ public class RecordSimilarityResponseTest { private static final ObjectMapper MAPPER = ApiModelMixinModule.setupObjectMapper(new ObjectMapper()); - private static final String EXPECTED_JSON = "{\"info\":[\"Field threshold not found in properties! Defaulting to 0.0\",\"Field weight not found in fields! Defaulting to 1.0 for all entries\"],\"results\":[{\"explainInfo\":{\"leftOnlyFields\":[\"addr\"],\"scoredFields\":{\"dob\":{\"calculatedWeight\":0.2857142857142857,\"finalScore\":0.74,\"rawScore\":0.8,\"weight\":0.5},\"primaryName\":{\"calculatedWeight\":0.7142857142857143,\"details\":\"any details\",\"finalScore\":0.85,\"rawScore\":0.99,\"weight\":0.5}}},\"left\":{\"addr\":{\"houseNumber\":\"123\",\"road\":\"Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}},\"score\":0.87},{\"error\":[\"Field foo not found in field mapping\"],\"info\":[\"Some info message\",\"Some other info message\"],\"left\":{\"addr\":{\"houseNumber\":\"123\",\"road\":\"Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}}}]}"; + private static final String EXPECTED_JSON = "{\"info\":[\"Field threshold not found in properties! Defaulting to 0.0\",\"Field weight not found in fields! Defaulting to 1.0 for all entries\"],\"results\":[{\"explainInfo\":{\"leftOnlyFields\":[\"addr\"],\"rightOnlyFields\":[\"bool\"],\"scoredFields\":{\"dob\":{\"calculatedWeight\":0.2857142857142857,\"finalScore\":0.74,\"rawScore\":0.8,\"weight\":0.33},\"primaryName\":{\"calculatedWeight\":0.7142857142857143,\"details\":\"any details\",\"finalScore\":0.85,\"rawScore\":0.99,\"weight\":0.33},\"str\":{\"calculatedWeight\":0.0,\"finalScore\":0.5,\"rawScore\":0.5,\"weight\":0.33}}},\"left\":{\"addr\":{\"houseNumber\":\"123\",\"road\":\"Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"num\":2342.15,\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"},\"str\":\"some string\"},\"right\":{\"bool\":false,\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"},\"str\":\"some other string\"},\"score\":0.87},{\"error\":[\"Field foo not found in field mapping\"],\"info\":[\"Some info message\",\"Some other info message\"],\"left\":{\"addr\":{\"houseNumber\":\"123\",\"road\":\"Roadlane Ave\"},\"dob\":{\"date\":\"1993-04-16\"},\"primaryName\":{\"entityType\":\"PERSON\",\"language\":\"eng\",\"languageOfOrigin\":\"eng\",\"script\":\"Latn\",\"text\":\"Ethan R\"}},\"right\":{\"dob\":\"1993-04-16\",\"primaryName\":{\"text\":\"Seth R\"}}}]}"; private static final RecordSimilarityResponse EXPECTED_RESPONSE; @@ -60,28 +62,40 @@ public class RecordSimilarityResponseTest { .build(), "addr", AddressField.FieldedAddress.builder() .houseNumber("123").road("Roadlane Ave") - .build())) + .build(), + "str", StringField.builder().data("some string").build(), + "num", NumberField.builder().data(2342.15).build())) .right(Map.of("primaryName", NameField.FieldedName.builder() .text("Seth R") .build(), "dob", DateField.UnfieldedDate.builder() .date("1993-04-16") - .build())) + .build(), + "str", StringField.builder().data("some other string").build(), + "bool", BooleanField.builder().data(false).build())) .explainInfo(RecordSimilarityExplainInfo.builder() .leftOnlyFields(List.of("addr")) + .rightOnlyFields(List.of("bool")) .scoredFields(Map.of("dob", RecordSimilarityFieldExplainInfo.builder() - .weight(0.5) + .weight(0.33) .calculatedWeight(0.2857142857142857) .rawScore(0.8) .finalScore(0.74) .build(), "primaryName", RecordSimilarityFieldExplainInfo.builder() - .weight(0.5) + .weight(0.33) .calculatedWeight(0.7142857142857143) .rawScore(0.99) .finalScore(0.85) .details(MAPPER.readTree("\"any details\"")) + .build(), + "str", + RecordSimilarityFieldExplainInfo.builder() + .weight(0.33) + .calculatedWeight(0.0) + .rawScore(0.5) + .finalScore(0.5) .build() )) .build()) @@ -106,7 +120,7 @@ public class RecordSimilarityResponseTest { "dob", DateField.UnfieldedDate.builder() .date("1993-04-16") .build())) - .error(Arrays.asList("Field foo not found in field mapping")) + .error(List.of("Field foo not found in field mapping")) .info(List.of("Some info message", "Some other info message")) .build())) .info(List.of( diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/BooleanField.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/BooleanField.java new file mode 100644 index 000000000..84fdfb3e9 --- /dev/null +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/BooleanField.java @@ -0,0 +1,30 @@ +/* + * Copyright 2025 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.basistech.rosette.apimodel.recordsimilarity.records; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonValue; +import jakarta.validation.constraints.NotNull; +import lombok.Value; +import lombok.experimental.SuperBuilder; +import lombok.extern.jackson.Jacksonized; + +@SuperBuilder +@Value +@Jacksonized +public class BooleanField implements RecordSimilarityField { + @JsonValue @JsonInclude @NotNull Boolean data; +} diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/NumberField.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/NumberField.java new file mode 100644 index 000000000..247aa935c --- /dev/null +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/NumberField.java @@ -0,0 +1,30 @@ +/* + * Copyright 2025 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.basistech.rosette.apimodel.recordsimilarity.records; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonValue; +import jakarta.validation.constraints.NotNull; +import lombok.Value; +import lombok.experimental.SuperBuilder; +import lombok.extern.jackson.Jacksonized; + +@SuperBuilder +@Value +@Jacksonized +public class NumberField implements RecordSimilarityField { + @NotNull @JsonValue @JsonInclude Number data; +} diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/RecordFieldType.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/RecordFieldType.java index b3835b7b3..66ab6b705 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/RecordFieldType.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/RecordFieldType.java @@ -21,5 +21,10 @@ public final class RecordFieldType { public static final String RNI_DATE = "rni_date"; public static final String RNI_ADDRESS = "rni_address"; + // Generic types + public static final String RNI_STRING = "rni_string"; + public static final String RNI_NUMBER = "rni_number"; + public static final String RNI_BOOLEAN = "rni_boolean"; + private RecordFieldType() { } } diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/StringField.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/StringField.java new file mode 100644 index 000000000..83f25f9b6 --- /dev/null +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/StringField.java @@ -0,0 +1,30 @@ +/* + * Copyright 2025 Basis Technology Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.basistech.rosette.apimodel.recordsimilarity.records; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonValue; +import jakarta.validation.constraints.NotBlank; +import lombok.Value; +import lombok.experimental.SuperBuilder; +import lombok.extern.jackson.Jacksonized; + +@SuperBuilder +@Value +@Jacksonized +public class StringField implements RecordSimilarityField { + @NotBlank @JsonValue @JsonInclude String data; +} From 75a00ba442e3c79ee92c3cef1deea3a8678e4de1 Mon Sep 17 00:00:00 2001 From: Ian Redpath Date: Tue, 28 Oct 2025 10:31:39 -0400 Subject: [PATCH 407/415] RLPNC-8316: set version to 1.35.100 ahead of release --- all/pom.xml | 2 +- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 2 +- release/pom.xml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/all/pom.xml b/all/pom.xml index 245155f82..d8b18c5d9 100644 --- a/all/pom.xml +++ b/all/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.34.1-SNAPSHOT + 1.35.100 rosette-api-all rosette-api-all diff --git a/annotations/pom.xml b/annotations/pom.xml index 595b66c77..40462fd41 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.34.1-SNAPSHOT + 1.35.100 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 88da02332..b30d144b3 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.34.1-SNAPSHOT + 1.35.100 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index c037cf82b..dc782f79d 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.34.1-SNAPSHOT + 1.35.100 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 028307397..4975e8b82 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.34.1-SNAPSHOT + 1.35.100 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index c5c51a1d5..a1c88bd2f 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.34.1-SNAPSHOT + 1.35.100 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index b261626c4..c10b1359f 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.34.1-SNAPSHOT + 1.35.100 rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 64b483841..914d76307 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.34.1-SNAPSHOT + 1.35.100 open-source-parent com.basistech diff --git a/release/pom.xml b/release/pom.xml index 1f461b403..706c1a114 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.34.1-SNAPSHOT + 1.35.100 com.basistech.rosette rosette-api-release From 772b63e3b0b2b3cb9cc03d47a42533be890b92ab Mon Sep 17 00:00:00 2001 From: Ian Redpath Date: Tue, 28 Oct 2025 10:32:17 -0400 Subject: [PATCH 408/415] RLPNC-8316: bump version post-release --- all/pom.xml | 2 +- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 2 +- release/pom.xml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/all/pom.xml b/all/pom.xml index d8b18c5d9..958e12c5e 100644 --- a/all/pom.xml +++ b/all/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.35.100 + 1.35.101-SNAPSHOT rosette-api-all rosette-api-all diff --git a/annotations/pom.xml b/annotations/pom.xml index 40462fd41..a5b8ec3ad 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.35.100 + 1.35.101-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index b30d144b3..6ed97efa5 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.35.100 + 1.35.101-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index dc782f79d..6311f3622 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.35.100 + 1.35.101-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 4975e8b82..6330d32d7 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.35.100 + 1.35.101-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index a1c88bd2f..fc4101266 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.35.100 + 1.35.101-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index c10b1359f..f70b79cfd 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.35.100 + 1.35.101-SNAPSHOT rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 914d76307..9a4c62891 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding - 1.35.100 + 1.35.101-SNAPSHOT open-source-parent com.basistech diff --git a/release/pom.xml b/release/pom.xml index 706c1a114..f2f979b9b 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.35.100 + 1.35.101-SNAPSHOT com.basistech.rosette rosette-api-release From 6896bee4163aa7fddc5a1a9a72a7f2aeda5c3061 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Nov 2025 19:32:33 +0000 Subject: [PATCH 409/415] Bump org.projectlombok:lombok in the minor-and-patch group Bumps the minor-and-patch group with 1 update: [org.projectlombok:lombok](https://github.com/projectlombok/lombok). Updates `org.projectlombok:lombok` from 1.18.38 to 1.18.40 - [Changelog](https://github.com/projectlombok/lombok/blob/master/doc/changelog.markdown) - [Commits](https://github.com/projectlombok/lombok/compare/v1.18.38...v1.18.40) --- updated-dependencies: - dependency-name: org.projectlombok:lombok dependency-version: 1.18.40 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9a4c62891..63e98ec82 100644 --- a/pom.xml +++ b/pom.xml @@ -46,7 +46,7 @@ 3.1.1 1.13.0 5.13.4 - 1.18.38 + 1.18.42 1.18.20.0 5.15.0 0.10.2 From 61581f7ad9ee6de914023b35bda3ea881de9b2d0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Nov 2025 16:09:18 +0000 Subject: [PATCH 410/415] Bump com.basistech:open-source-parent from 24.0.1 to 25.0.0 Bumps [com.basistech:open-source-parent](https://github.com/basis-technology-corp/open-source-parent) from 24.0.1 to 25.0.0. - [Changelog](https://github.com/basis-technology-corp/open-source-parent/blob/master/RELEASE-NOTES.md) - [Commits](https://github.com/basis-technology-corp/open-source-parent/compare/open-source-parent-24.0.1...open-source-parent-25.0.0) --- updated-dependencies: - dependency-name: com.basistech:open-source-parent dependency-version: 25.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d0d7d3baf..97548ea97 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ open-source-parent com.basistech - 24.0.1 + 25.0.0 pom From 1718df7c90509b1fb5309c03374213f20e80cfd6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Nov 2025 16:09:39 +0000 Subject: [PATCH 411/415] Bump junit.version from 5.13.4 to 6.0.1 Bumps `junit.version` from 5.13.4 to 6.0.1. Updates `org.junit.jupiter:junit-jupiter-api` from 5.13.4 to 6.0.1 - [Release notes](https://github.com/junit-team/junit-framework/releases) - [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.4...r6.0.1) Updates `org.junit.jupiter:junit-jupiter-params` from 5.13.4 to 6.0.1 - [Release notes](https://github.com/junit-team/junit-framework/releases) - [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.4...r6.0.1) Updates `org.junit.jupiter:junit-jupiter` from 5.13.4 to 6.0.1 - [Release notes](https://github.com/junit-team/junit-framework/releases) - [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.4...r6.0.1) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-api dependency-version: 6.0.1 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: org.junit.jupiter:junit-jupiter-params dependency-version: 6.0.1 dependency-type: direct:development update-type: version-update:semver-major - dependency-name: org.junit.jupiter:junit-jupiter dependency-version: 6.0.1 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d0d7d3baf..a35e49104 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,7 @@ 1.19.0 3.1.1 1.13.0 - 5.13.4 + 6.0.1 1.18.42 1.18.20.0 5.15.0 From f050a52c839e896ba239dbbaf299189300724484 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Nov 2025 19:12:00 +0000 Subject: [PATCH 412/415] Bump commons-codec:commons-codec in the minor-and-patch group Bumps the minor-and-patch group with 1 update: [commons-codec:commons-codec](https://github.com/apache/commons-codec). Updates `commons-codec:commons-codec` from 1.19.0 to 1.20.0 - [Changelog](https://github.com/apache/commons-codec/blob/master/RELEASE-NOTES.txt) - [Commits](https://github.com/apache/commons-codec/compare/rel/commons-codec-1.19.0...rel/commons-codec-1.20.0) --- updated-dependencies: - dependency-name: commons-codec:commons-codec dependency-version: 1.20.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9f19dab84..cb29fa7e6 100644 --- a/pom.xml +++ b/pom.xml @@ -42,7 +42,7 @@ 3.6.1 - 1.19.0 + 1.20.0 3.1.1 1.13.0 6.0.1 From 86f43518642a9f966bed89821d1ddd333842e0e3 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Tue, 16 Dec 2025 17:00:29 +0000 Subject: [PATCH 413/415] WS-3698: add name to project --- pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/pom.xml b/pom.xml index cb29fa7e6..58d09f2ef 100644 --- a/pom.xml +++ b/pom.xml @@ -18,6 +18,7 @@ 4.0.0 com.basistech.rosette rosette-api-java-binding + rosette-api-java-binding 1.35.101-SNAPSHOT open-source-parent From 1a658037139871c4c93248fbf77ba17181048e07 Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Tue, 16 Dec 2025 17:02:13 +0000 Subject: [PATCH 414/415] [maven-release-plugin] prepare release rosette-api-java-binding-1.36.0 --- all/pom.xml | 2 +- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/all/pom.xml b/all/pom.xml index 958e12c5e..561d543a1 100644 --- a/all/pom.xml +++ b/all/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.35.101-SNAPSHOT + 1.36.0 rosette-api-all rosette-api-all diff --git a/annotations/pom.xml b/annotations/pom.xml index a5b8ec3ad..d30de2b82 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.35.101-SNAPSHOT + 1.36.0 rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 6ed97efa5..99dea4de7 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.35.101-SNAPSHOT + 1.36.0 rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 6311f3622..286c49f52 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.35.101-SNAPSHOT + 1.36.0 rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 6330d32d7..83f1685df 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.35.101-SNAPSHOT + 1.36.0 com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index fc4101266..c68e92eea 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.35.101-SNAPSHOT + 1.36.0 rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index f70b79cfd..0d421b059 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.35.101-SNAPSHOT + 1.36.0 rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 58d09f2ef..06c654b87 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding rosette-api-java-binding - 1.35.101-SNAPSHOT + 1.36.0 open-source-parent com.basistech @@ -32,7 +32,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.34.0 + rosette-api-java-binding-1.36.0 This is the Java binding for the Babel Street Analytics API. The classes in here help Java applications to communicate with the Analytics API. diff --git a/release/pom.xml b/release/pom.xml index f2f979b9b..13a713c76 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.35.101-SNAPSHOT + 1.36.0 com.basistech.rosette rosette-api-release From a038261c4db00fc616f4cd5c398a522ccf29befe Mon Sep 17 00:00:00 2001 From: Adam Soos Date: Tue, 16 Dec 2025 17:02:14 +0000 Subject: [PATCH 415/415] [maven-release-plugin] prepare for next development iteration --- all/pom.xml | 2 +- annotations/pom.xml | 2 +- api/pom.xml | 2 +- common/pom.xml | 2 +- examples/pom.xml | 2 +- json/pom.xml | 2 +- model/pom.xml | 2 +- pom.xml | 4 ++-- release/pom.xml | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/all/pom.xml b/all/pom.xml index 561d543a1..430805806 100644 --- a/all/pom.xml +++ b/all/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.36.0 + 1.36.1-SNAPSHOT rosette-api-all rosette-api-all diff --git a/annotations/pom.xml b/annotations/pom.xml index d30de2b82..4b06d860d 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.36.0 + 1.36.1-SNAPSHOT rosette-api-annotations rosette-api-annotations diff --git a/api/pom.xml b/api/pom.xml index 99dea4de7..245ac1cdc 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.36.0 + 1.36.1-SNAPSHOT rosette-api rosette-api diff --git a/common/pom.xml b/common/pom.xml index 286c49f52..ecd1861c4 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.36.0 + 1.36.1-SNAPSHOT rosette-api-common rosette-api-common diff --git a/examples/pom.xml b/examples/pom.xml index 83f1685df..34d99e2de 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.36.0 + 1.36.1-SNAPSHOT com.basistech.rosette rosette-api-examples diff --git a/json/pom.xml b/json/pom.xml index c68e92eea..65a02897a 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -20,7 +20,7 @@ com.basistech.rosette rosette-api-java-binding - 1.36.0 + 1.36.1-SNAPSHOT rosette-api-json rosette-api-json diff --git a/model/pom.xml b/model/pom.xml index 0d421b059..6992e0cfb 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.36.0 + 1.36.1-SNAPSHOT rosette-api-model rosette-api-model diff --git a/pom.xml b/pom.xml index 06c654b87..c1f8030e9 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding rosette-api-java-binding - 1.36.0 + 1.36.1-SNAPSHOT open-source-parent com.basistech @@ -32,7 +32,7 @@ scm:git:git@github.com:rosette-api/java.git scm:git:git@github.com:rosette-api/java.git - rosette-api-java-binding-1.36.0 + rosette-api-java-binding-1.34.0 This is the Java binding for the Babel Street Analytics API. The classes in here help Java applications to communicate with the Analytics API. diff --git a/release/pom.xml b/release/pom.xml index 13a713c76..7c39985a9 100644 --- a/release/pom.xml +++ b/release/pom.xml @@ -19,7 +19,7 @@ com.basistech.rosette rosette-api-java-binding - 1.36.0 + 1.36.1-SNAPSHOT com.basistech.rosette rosette-api-release