From e1436a1b1620b92dda006187785a47fc042fee32 Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Tue, 15 Dec 2020 18:44:48 +0100 Subject: [PATCH] Added type annotation to comply with the new way to create type definition --- .../model/reference/properties/AccessPolicy.java | 9 +++++++++ .../model/reference/properties/EnumStringProperty.java | 9 +++++++++ .../model/reference/properties/GCubeProperty.java | 9 +++++++++ .../model/reference/properties/RegexProperty.java | 9 +++++++++ .../model/reference/properties/ValueSchema.java | 9 +++++++++ 5 files changed, 45 insertions(+) diff --git a/src/main/java/org/gcube/resourcemanagement/model/reference/properties/AccessPolicy.java b/src/main/java/org/gcube/resourcemanagement/model/reference/properties/AccessPolicy.java index d7610a0..abe8771 100644 --- a/src/main/java/org/gcube/resourcemanagement/model/reference/properties/AccessPolicy.java +++ b/src/main/java/org/gcube/resourcemanagement/model/reference/properties/AccessPolicy.java @@ -2,12 +2,21 @@ package org.gcube.resourcemanagement.model.reference.properties; import org.gcube.com.fasterxml.jackson.databind.annotation.JsonDeserialize; import org.gcube.informationsystem.types.annotations.ISProperty; +import org.gcube.informationsystem.types.reference.Change; +import org.gcube.informationsystem.types.reference.TypeMetadata; +import org.gcube.informationsystem.utils.TypeVersion; import org.gcube.resourcemanagement.model.impl.properties.AccessPolicyImpl; /** * @author Luca Frosini (ISTI - CNR) */ @JsonDeserialize(as=AccessPolicyImpl.class) +@TypeMetadata( + name = AccessPolicy.NAME, + description = "AccessPolicy information", + version = TypeVersion.MINIMAL_VERSION_STRING +) +@Change(version = TypeVersion.MINIMAL_VERSION_STRING, description = TypeVersion.MINIMAL_VERSION_DESCRIPTION) public interface AccessPolicy extends GCubeProperty { public static final String NAME = "AccessPolicy"; //AccessPolicy.class.getSimpleName(); diff --git a/src/main/java/org/gcube/resourcemanagement/model/reference/properties/EnumStringProperty.java b/src/main/java/org/gcube/resourcemanagement/model/reference/properties/EnumStringProperty.java index bc3cd69..f15865a 100644 --- a/src/main/java/org/gcube/resourcemanagement/model/reference/properties/EnumStringProperty.java +++ b/src/main/java/org/gcube/resourcemanagement/model/reference/properties/EnumStringProperty.java @@ -3,6 +3,9 @@ package org.gcube.resourcemanagement.model.reference.properties; import java.util.Set; import org.gcube.com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.gcube.informationsystem.types.reference.Change; +import org.gcube.informationsystem.types.reference.TypeMetadata; +import org.gcube.informationsystem.utils.TypeVersion; import org.gcube.resourcemanagement.model.impl.properties.EnumStringPropertyImpl; import org.gcube.resourcemanagement.model.reference.properties.utilities.PropertyValidator; import org.gcube.resourcemanagement.model.reference.properties.utilities.ValidatedTypedProperty; @@ -16,6 +19,12 @@ import org.gcube.resourcemanagement.model.reference.properties.utilities.Validat * */ @JsonDeserialize(as=EnumStringPropertyImpl.class) +@TypeMetadata( + name = EnumStringProperty.NAME, + description = "Enum String Property", + version = TypeVersion.MINIMAL_VERSION_STRING +) +@Change(version = TypeVersion.MINIMAL_VERSION_STRING, description = TypeVersion.MINIMAL_VERSION_DESCRIPTION) public interface EnumStringProperty extends GCubeProperty, ValidatedTypedProperty, String> { @Override diff --git a/src/main/java/org/gcube/resourcemanagement/model/reference/properties/GCubeProperty.java b/src/main/java/org/gcube/resourcemanagement/model/reference/properties/GCubeProperty.java index c6fc7c0..b74a197 100644 --- a/src/main/java/org/gcube/resourcemanagement/model/reference/properties/GCubeProperty.java +++ b/src/main/java/org/gcube/resourcemanagement/model/reference/properties/GCubeProperty.java @@ -2,6 +2,9 @@ package org.gcube.resourcemanagement.model.reference.properties; import org.gcube.com.fasterxml.jackson.databind.annotation.JsonDeserialize; import org.gcube.informationsystem.model.reference.properties.Property; +import org.gcube.informationsystem.types.reference.Change; +import org.gcube.informationsystem.types.reference.TypeMetadata; +import org.gcube.informationsystem.utils.TypeVersion; import org.gcube.resourcemanagement.model.impl.properties.GCubePropertyImpl; /** @@ -12,6 +15,12 @@ import org.gcube.resourcemanagement.model.impl.properties.GCubePropertyImpl; * */ @JsonDeserialize(as=GCubePropertyImpl.class) +@TypeMetadata( + name = GCubeProperty.NAME, + description = "The base class for any Property defined in the gCube Model.", + version = TypeVersion.MINIMAL_VERSION_STRING +) +@Change(version = TypeVersion.MINIMAL_VERSION_STRING, description = TypeVersion.MINIMAL_VERSION_DESCRIPTION) public interface GCubeProperty extends Property { public static final String NAME = "GCubeProperty"; //GCubeProperty.class.getSimpleName(); diff --git a/src/main/java/org/gcube/resourcemanagement/model/reference/properties/RegexProperty.java b/src/main/java/org/gcube/resourcemanagement/model/reference/properties/RegexProperty.java index ee78854..a7bff37 100644 --- a/src/main/java/org/gcube/resourcemanagement/model/reference/properties/RegexProperty.java +++ b/src/main/java/org/gcube/resourcemanagement/model/reference/properties/RegexProperty.java @@ -6,6 +6,9 @@ import java.util.regex.Pattern; import org.gcube.com.fasterxml.jackson.databind.annotation.JsonDeserialize; import org.gcube.informationsystem.types.annotations.ISProperty; +import org.gcube.informationsystem.types.reference.Change; +import org.gcube.informationsystem.types.reference.TypeMetadata; +import org.gcube.informationsystem.utils.TypeVersion; import org.gcube.resourcemanagement.model.impl.properties.RegexPropertyImpl; import org.gcube.resourcemanagement.model.reference.properties.utilities.PropertyValidator; import org.gcube.resourcemanagement.model.reference.properties.utilities.ValidatedTypedProperty; @@ -18,6 +21,12 @@ import org.gcube.resourcemanagement.model.reference.properties.utilities.Validat * */ @JsonDeserialize(as=RegexPropertyImpl.class) +@TypeMetadata( + name = RegexProperty.NAME, + description = "A property validated by a regex", + version = TypeVersion.MINIMAL_VERSION_STRING +) +@Change(version = TypeVersion.MINIMAL_VERSION_STRING, description = TypeVersion.MINIMAL_VERSION_DESCRIPTION) public interface RegexProperty extends GCubeProperty, ValidatedTypedProperty { public static final String NAME = "RegexProperty"; // RegexProperty.class.getSimpleName(); diff --git a/src/main/java/org/gcube/resourcemanagement/model/reference/properties/ValueSchema.java b/src/main/java/org/gcube/resourcemanagement/model/reference/properties/ValueSchema.java index 82dd438..3eb8542 100644 --- a/src/main/java/org/gcube/resourcemanagement/model/reference/properties/ValueSchema.java +++ b/src/main/java/org/gcube/resourcemanagement/model/reference/properties/ValueSchema.java @@ -4,6 +4,9 @@ import java.net.URI; import org.gcube.com.fasterxml.jackson.databind.annotation.JsonDeserialize; import org.gcube.informationsystem.types.annotations.ISProperty; +import org.gcube.informationsystem.types.reference.Change; +import org.gcube.informationsystem.types.reference.TypeMetadata; +import org.gcube.informationsystem.utils.TypeVersion; import org.gcube.resourcemanagement.model.impl.properties.ValueSchemaImpl; import org.gcube.resourcemanagement.model.reference.properties.utilities.PropertyValidator; import org.gcube.resourcemanagement.model.reference.properties.utilities.ValidatedTypedProperty; @@ -14,6 +17,12 @@ import org.gcube.resourcemanagement.model.reference.properties.utilities.Validat * @author Luca Frosini (ISTI - CNR) */ @JsonDeserialize(as=ValueSchemaImpl.class) +@TypeMetadata( + name = ValueSchema.NAME, + description = "This property type capture any property which can be described by a value-schema couple.", + version = TypeVersion.MINIMAL_VERSION_STRING +) +@Change(version = TypeVersion.MINIMAL_VERSION_STRING, description = TypeVersion.MINIMAL_VERSION_DESCRIPTION) public interface ValueSchema extends GCubeProperty, ValidatedTypedProperty { public static final String NAME = "ValueSchema"; //ValueSchema.class.getSimpleName();