From df060fd912741f8a0798dc12aabec69377b59681 Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Mon, 3 Feb 2020 10:57:41 +0100 Subject: [PATCH] Removed uneeded interface --- .../informationsystem/types/reference/Type.java | 6 +++++- .../types/reference/TypeWithProperties.java | 12 ------------ .../types/reference/entities/FacetType.java | 4 ++-- .../types/reference/properties/PropertyType.java | 3 +-- .../types/reference/relations/RelationType.java | 3 +-- 5 files changed, 9 insertions(+), 19 deletions(-) delete mode 100644 src/main/java/org/gcube/informationsystem/types/reference/TypeWithProperties.java diff --git a/src/main/java/org/gcube/informationsystem/types/reference/Type.java b/src/main/java/org/gcube/informationsystem/types/reference/Type.java index b4ab0cd..3ba546c 100644 --- a/src/main/java/org/gcube/informationsystem/types/reference/Type.java +++ b/src/main/java/org/gcube/informationsystem/types/reference/Type.java @@ -4,13 +4,14 @@ import java.util.Set; import org.gcube.informationsystem.base.reference.IdentifiableElement; import org.gcube.informationsystem.types.annotations.Abstract; +import org.gcube.informationsystem.types.reference.properties.PropertyDefinition; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @Abstract @JsonIgnoreProperties(ignoreUnknown=true) //@JsonDeserialize(as=TypeImpl.class) Do not uncomment to manage subclasses -public interface Type extends IdentifiableElement, TypeWithProperties { +public interface Type extends IdentifiableElement { public static final String NAME = "Type"; //Type.class.getSimpleName(); @@ -18,6 +19,7 @@ public interface Type extends IdentifiableElement, TypeWithProperties { public static final String DESCRIPTION_PROPERTY = "description"; public static final String ABSTRACT_PROPERTY = "abstract"; public static final String TYPE_SUPERCLASSES_PROPERTY = "superClasses"; + public static final String PROPERTIES_PROPERTY = "properties"; public String getName(); @@ -27,4 +29,6 @@ public interface Type extends IdentifiableElement, TypeWithProperties { public Set getSuperClasses(); + public Set getProperties(); + } diff --git a/src/main/java/org/gcube/informationsystem/types/reference/TypeWithProperties.java b/src/main/java/org/gcube/informationsystem/types/reference/TypeWithProperties.java deleted file mode 100644 index 6acda50..0000000 --- a/src/main/java/org/gcube/informationsystem/types/reference/TypeWithProperties.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.gcube.informationsystem.types.reference; - -import java.util.Set; - -import org.gcube.informationsystem.types.reference.properties.PropertyDefinition; - -public interface TypeWithProperties { - - public static final String PROPERTIES_PROPERTY = "properties"; - - public Set getProperties(); -} diff --git a/src/main/java/org/gcube/informationsystem/types/reference/entities/FacetType.java b/src/main/java/org/gcube/informationsystem/types/reference/entities/FacetType.java index a400daf..9e4c6a4 100644 --- a/src/main/java/org/gcube/informationsystem/types/reference/entities/FacetType.java +++ b/src/main/java/org/gcube/informationsystem/types/reference/entities/FacetType.java @@ -4,7 +4,7 @@ import java.util.Set; import org.gcube.informationsystem.types.annotations.ISProperty; import org.gcube.informationsystem.types.impl.entities.FacetTypeImpl; -import org.gcube.informationsystem.types.reference.TypeWithProperties; +import org.gcube.informationsystem.types.reference.Type; import org.gcube.informationsystem.types.reference.properties.PropertyDefinition; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -16,7 +16,7 @@ public interface FacetType extends EntityType { public static final String NAME = "FacetType"; //FacetType.class.getSimpleName(); - @ISProperty(name = TypeWithProperties.PROPERTIES_PROPERTY, readonly = false, mandatory = true, nullable = false) + @ISProperty(name = Type.PROPERTIES_PROPERTY, readonly = false, mandatory = true, nullable = false) public Set getProperties(); diff --git a/src/main/java/org/gcube/informationsystem/types/reference/properties/PropertyType.java b/src/main/java/org/gcube/informationsystem/types/reference/properties/PropertyType.java index ca21f60..210b473 100644 --- a/src/main/java/org/gcube/informationsystem/types/reference/properties/PropertyType.java +++ b/src/main/java/org/gcube/informationsystem/types/reference/properties/PropertyType.java @@ -8,7 +8,6 @@ import org.gcube.informationsystem.model.reference.properties.Header; import org.gcube.informationsystem.types.annotations.ISProperty; import org.gcube.informationsystem.types.impl.properties.PropertyTypeImpl; import org.gcube.informationsystem.types.reference.Type; -import org.gcube.informationsystem.types.reference.TypeWithProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; @@ -42,7 +41,7 @@ public interface PropertyType

extends PropertyElement @ISProperty(name = Type.TYPE_SUPERCLASSES_PROPERTY, readonly = true, mandatory = true, nullable = false) public Set getSuperClasses(); - @ISProperty(name = TypeWithProperties.PROPERTIES_PROPERTY, readonly = false, mandatory = true, nullable = false) + @ISProperty(name = Type.PROPERTIES_PROPERTY, readonly = false, mandatory = true, nullable = false) public Set getProperties(); /* TypeDefinition is just a Java useful class. The type is not created in the IS. Hence the fields must be redefined */ diff --git a/src/main/java/org/gcube/informationsystem/types/reference/relations/RelationType.java b/src/main/java/org/gcube/informationsystem/types/reference/relations/RelationType.java index 49df23b..dfcfe77 100644 --- a/src/main/java/org/gcube/informationsystem/types/reference/relations/RelationType.java +++ b/src/main/java/org/gcube/informationsystem/types/reference/relations/RelationType.java @@ -6,7 +6,6 @@ import org.gcube.informationsystem.base.reference.relations.RelationElement; import org.gcube.informationsystem.types.annotations.ISProperty; import org.gcube.informationsystem.types.impl.relations.RelationTypeImpl; import org.gcube.informationsystem.types.reference.Type; -import org.gcube.informationsystem.types.reference.TypeWithProperties; import org.gcube.informationsystem.types.reference.entities.EntityType; import org.gcube.informationsystem.types.reference.properties.PropertyDefinition; @@ -39,7 +38,7 @@ public interface RelationType public Set getSuperClasses(); @Override - @ISProperty(name = TypeWithProperties.PROPERTIES_PROPERTY, readonly = false, mandatory = true, nullable = false) + @ISProperty(name = Type.PROPERTIES_PROPERTY, readonly = false, mandatory = true, nullable = false) public Set getProperties(); @Override