From 223e2c93f589c6105f58f66e192c3503026728fb Mon Sep 17 00:00:00 2001 From: "rahel.arnold" Date: Tue, 3 May 2022 13:31:45 +0200 Subject: [PATCH] refactored post handler to match its function and rebuilt OpenApiSpecs --- .../java/org/vitrivr/cineast/api/APIEndpoint.java | 8 ++++---- ...java => FindFeaturesByCategoryPostHandler.java} | 2 +- ...r.java => FindFeaturesByEntityPostHandler.java} | 2 +- docs/openapi.json | 14 +++++++------- 4 files changed, 13 insertions(+), 13 deletions(-) rename cineast-api/src/main/java/org/vitrivr/cineast/api/rest/handlers/actions/feature/{FindFeaturesByCategoryGetHandler.java => FindFeaturesByCategoryPostHandler.java} (94%) rename cineast-api/src/main/java/org/vitrivr/cineast/api/rest/handlers/actions/feature/{FindFeaturesByEntityGetHandler.java => FindFeaturesByEntityPostHandler.java} (94%) diff --git a/cineast-api/src/main/java/org/vitrivr/cineast/api/APIEndpoint.java b/cineast-api/src/main/java/org/vitrivr/cineast/api/APIEndpoint.java index 83b6fc963..a4914565f 100644 --- a/cineast-api/src/main/java/org/vitrivr/cineast/api/APIEndpoint.java +++ b/cineast-api/src/main/java/org/vitrivr/cineast/api/APIEndpoint.java @@ -20,8 +20,8 @@ import org.vitrivr.cineast.api.rest.handlers.actions.StatusInvocationHandler; import org.vitrivr.cineast.api.rest.handlers.actions.bool.FindDistinctElementsByColumnPostHandler; import org.vitrivr.cineast.api.rest.handlers.actions.bool.SelectFromTablePostHandler; -import org.vitrivr.cineast.api.rest.handlers.actions.feature.FindFeaturesByCategoryGetHandler; -import org.vitrivr.cineast.api.rest.handlers.actions.feature.FindFeaturesByEntityGetHandler; +import org.vitrivr.cineast.api.rest.handlers.actions.feature.FindFeaturesByCategoryPostHandler; +import org.vitrivr.cineast.api.rest.handlers.actions.feature.FindFeaturesByEntityPostHandler; import org.vitrivr.cineast.api.rest.handlers.actions.feature.FindSegmentFeaturesGetHandler; import org.vitrivr.cineast.api.rest.handlers.actions.feature.FindSegmentTextGetHandler; import org.vitrivr.cineast.api.rest.handlers.actions.feature.FindTagsForElementGetHandler; @@ -412,8 +412,8 @@ private void registerRestOperations() { new FindSegmentSimilarStagedPostHandler(retrievalLogic), new FindSegmentSimilarTemporalPostHandler(retrievalLogic), new FindSegmentFeaturesGetHandler(), - new FindFeaturesByCategoryGetHandler(), - new FindFeaturesByEntityGetHandler(), + new FindFeaturesByCategoryPostHandler(), + new FindFeaturesByEntityPostHandler(), new FindSegmentTextGetHandler(), /* Tags */ new FindTagsAllGetHandler(), diff --git a/cineast-api/src/main/java/org/vitrivr/cineast/api/rest/handlers/actions/feature/FindFeaturesByCategoryGetHandler.java b/cineast-api/src/main/java/org/vitrivr/cineast/api/rest/handlers/actions/feature/FindFeaturesByCategoryPostHandler.java similarity index 94% rename from cineast-api/src/main/java/org/vitrivr/cineast/api/rest/handlers/actions/feature/FindFeaturesByCategoryGetHandler.java rename to cineast-api/src/main/java/org/vitrivr/cineast/api/rest/handlers/actions/feature/FindFeaturesByCategoryPostHandler.java index fe7db6c42..a972fa0ae 100644 --- a/cineast-api/src/main/java/org/vitrivr/cineast/api/rest/handlers/actions/feature/FindFeaturesByCategoryGetHandler.java +++ b/cineast-api/src/main/java/org/vitrivr/cineast/api/rest/handlers/actions/feature/FindFeaturesByCategoryPostHandler.java @@ -15,7 +15,7 @@ /** * Handler for the API call to retrieve all features for all objects for a given category. */ -public class FindFeaturesByCategoryGetHandler implements ParsingPostRestHandler { +public class FindFeaturesByCategoryPostHandler implements ParsingPostRestHandler { public static final String ROUTE = "find/feature/all/by/category/{" + CATEGORY_NAME + "}"; diff --git a/cineast-api/src/main/java/org/vitrivr/cineast/api/rest/handlers/actions/feature/FindFeaturesByEntityGetHandler.java b/cineast-api/src/main/java/org/vitrivr/cineast/api/rest/handlers/actions/feature/FindFeaturesByEntityPostHandler.java similarity index 94% rename from cineast-api/src/main/java/org/vitrivr/cineast/api/rest/handlers/actions/feature/FindFeaturesByEntityGetHandler.java rename to cineast-api/src/main/java/org/vitrivr/cineast/api/rest/handlers/actions/feature/FindFeaturesByEntityPostHandler.java index a02a2604a..1cbcf7f11 100644 --- a/cineast-api/src/main/java/org/vitrivr/cineast/api/rest/handlers/actions/feature/FindFeaturesByEntityGetHandler.java +++ b/cineast-api/src/main/java/org/vitrivr/cineast/api/rest/handlers/actions/feature/FindFeaturesByEntityPostHandler.java @@ -15,7 +15,7 @@ /** * Handler for the API call to retrieve all features for all objects for a given table/entity name. */ -public class FindFeaturesByEntityGetHandler implements ParsingPostRestHandler { +public class FindFeaturesByEntityPostHandler implements ParsingPostRestHandler { public static final String ROUTE = "find/feature/all/by/entity/{" + ENTITY_NAME + "}"; diff --git a/docs/openapi.json b/docs/openapi.json index 6e09facea..574f49641 100644 --- a/docs/openapi.json +++ b/docs/openapi.json @@ -1629,10 +1629,6 @@ "type" : "string", "enum" : [ "PING", "Q_SIM", "Q_MLT", "Q_NESEG", "Q_SEG", "M_LOOKUP", "Q_TEMPORAL", "SESSION_START", "QR_START", "QR_END", "QR_ERROR", "QR_OBJECT", "QR_METADATA_O", "QR_METADATA_S", "QR_SEGMENT", "QR_SIMILARITY", "QR_TEMPORAL" ] }, - "maxLength" : { - "type" : "number", - "format" : "float" - }, "timeDistances" : { "type" : "array", "items" : { @@ -1642,6 +1638,10 @@ }, "temporalQueryConfig" : { "$ref" : "#/components/schemas/TemporalQueryConfig" + }, + "maxLength" : { + "type" : "number", + "format" : "float" } } }, @@ -1846,9 +1846,6 @@ "Tag" : { "type" : "object", "properties" : { - "description" : { - "type" : "string" - }, "name" : { "type" : "string" }, @@ -1858,6 +1855,9 @@ }, "id" : { "type" : "string" + }, + "description" : { + "type" : "string" } } },