From b132b95af2ce3bb7754539b7f719562e416ea53d Mon Sep 17 00:00:00 2001 From: "luca.frosini" Date: Fri, 30 Dec 2016 16:31:35 +0000 Subject: [PATCH] Reorganizing REST API git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry-api@141437 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../resourceregistry/api/rest/AccessPath.java | 16 +++++++++++++--- .../api/rest/{EntityPath.java => ERPath.java} | 10 ++++++++-- .../resourceregistry/api/rest/SchemaPath.java | 11 ++++++----- 3 files changed, 27 insertions(+), 10 deletions(-) rename src/main/java/org/gcube/informationsystem/resourceregistry/api/rest/{EntityPath.java => ERPath.java} (69%) diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/api/rest/AccessPath.java b/src/main/java/org/gcube/informationsystem/resourceregistry/api/rest/AccessPath.java index 4d9f0be..f5c391b 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/api/rest/AccessPath.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/api/rest/AccessPath.java @@ -16,10 +16,20 @@ public class AccessPath { public static final int DEFAULT_LIMIT = 20; - public static final String FACET_PATH_PART = "facet"; - public static final String RESOURCE_PATH_PART = "resource"; + public static final String FACET_PATH_PART = ERPath.FACET_PATH_PART; + public static final String RESOURCE_PATH_PART = ERPath.RESOURCE_PATH_PART; - public static final String SCHEMA_PATH_PART = "schema"; + public static final String EMBEDDED_PATH_PART = ERPath.EMBEDDED_PATH_PART; + + public static final String CONSISTS_OF_PATH_PART = ERPath.CONSISTS_OF_PATH_PART; + public static final String IS_RELATED_TO_PATH_PART = ERPath.IS_RELATED_TO_PATH_PART; + + public static final String SCHEMA_PATH_PART = SchemaPath.SCHEMA_PATH_PART; public static final String INSTANCE_PATH_PART = "instance"; + public static final String INCLUDE_SUBTYPES_PARAM = "includeSubtypes"; + public static final String INCLUDE_SCHEMA_PARAM = "includeSchema"; + + public static final String POLYMORPHIC_PARAM = "polymorphic"; + } diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/api/rest/EntityPath.java b/src/main/java/org/gcube/informationsystem/resourceregistry/api/rest/ERPath.java similarity index 69% rename from src/main/java/org/gcube/informationsystem/resourceregistry/api/rest/EntityPath.java rename to src/main/java/org/gcube/informationsystem/resourceregistry/api/rest/ERPath.java index fcdcc1f..e65552e 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/api/rest/EntityPath.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/api/rest/ERPath.java @@ -6,13 +6,19 @@ package org.gcube.informationsystem.resourceregistry.api.rest; /** * @author Luca Frosini (ISTI - CNR) */ -public class EntityPath { +public class ERPath { - public static final String ENTITY_PATH_PART = "entity"; + public static final String ER_PATH_PART = "er"; + + protected static final String EMBEDDED_PATH_PART = "embedded"; + + protected static final String ENTITY_PATH_PART = "entity"; public static final String FACET_PATH_PART = "facet"; public static final String RESOURCE_PATH_PART = "resource"; + protected static final String RELATION_PATH_PART = "relation"; + public static final String CONSISTS_OF_PATH_PART = "consistsOf"; public static final String IS_RELATED_TO_PATH_PART = "isRelatedTo"; diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/api/rest/SchemaPath.java b/src/main/java/org/gcube/informationsystem/resourceregistry/api/rest/SchemaPath.java index da99149..28c9798 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/api/rest/SchemaPath.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/api/rest/SchemaPath.java @@ -10,11 +10,12 @@ public class SchemaPath { public static final String SCHEMA_PATH_PART = "schema"; - public static final String FACET_PATH_PART = "facet"; - public static final String RESOURCE_PATH_PART = "resource"; + public static final String FACET_PATH_PART = ERPath.FACET_PATH_PART; + public static final String RESOURCE_PATH_PART = ERPath.RESOURCE_PATH_PART; - public static final String EMBEDDED_PATH_PART = "embedded"; + public static final String EMBEDDED_PATH_PART = ERPath.EMBEDDED_PATH_PART; + + public static final String CONSISTS_OF_PATH_PART = ERPath.CONSISTS_OF_PATH_PART; + public static final String IS_RELATED_TO_PATH_PART = ERPath.IS_RELATED_TO_PATH_PART; - public static final String CONSISTS_OF_PATH_PART = "consistsOf"; - public static final String IS_RELATED_TO_PATH_PART = "isRelatedTo"; }