From 408cfb9686695af6fb2a7742ee7cccfb0a437e84 Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Wed, 23 Oct 2019 16:55:48 +0200 Subject: [PATCH] Adding and additional level to allow to define TypeDefinition and PropertyDefinition --- .../{model => base}/impl/ERImpl.java | 11 ++++-- .../base/impl/ISManageableImpl.java | 22 ++++++++++++ .../impl/entities}/BaseEntityImpl.java | 7 ++-- .../base/impl/entities/EImpl.java | 5 +++ .../base/impl/relations/BaseRelationImpl.java | 24 +++++++++++++ .../impl/relations/RImpl.java} | 34 ++++++++----------- .../{model => base}/reference/AccessType.java | 4 +-- .../{model => base}/reference/ER.java | 4 +-- .../reference/ISConstants.java | 2 +- .../reference/ISManageable.java | 6 ++-- .../reference/entities}/BaseEntity.java | 6 ++-- .../base/reference/entities/E.java | 15 ++++++++ .../reference/properties/Header.java | 4 +-- .../reference/properties/Property.java | 10 +++--- .../reference/relations/BaseRelation.java | 12 +++++++ .../reference/relations/R.java} | 18 ++++------ .../context/impl/entities/ContextImpl.java | 6 ++-- .../impl/relations/IsParentOfImpl.java | 13 ++++--- .../context/reference/entities/Context.java | 2 +- .../reference/relations/IsParentOf.java | 8 ++--- .../model/impl/ISManageableImpl.java | 17 ---------- .../model/impl/entities/EntityImpl.java | 2 +- .../model/impl/entities/FacetImpl.java | 4 +-- .../model/impl/properties/DummyProperty.java | 2 +- .../model/impl/properties/HeaderImpl.java | 2 +- .../model/impl/properties/PropertyImpl.java | 6 ++-- .../model/impl/relations/ConsistsOfImpl.java | 5 +++ .../model/impl/relations/DummyConsistsOf.java | 5 +++ .../impl/relations/DummyIsRelatedTo.java | 5 +++ .../impl/relations/IsIdentifiedByImpl.java | 5 +++ .../model/impl/relations/IsRelatedToImpl.java | 5 +++ .../model/impl/relations/RelationImpl.java | 19 +++++++---- .../model/reference/entities/Entity.java | 4 +-- .../model/reference/properties/Encrypted.java | 1 + .../properties/PropagationConstraint.java | 1 + .../model/reference/relations/Relation.java | 4 ++- .../gcube/informationsystem/types/Type.java | 2 +- .../informationsystem/types/TypeBinder.java | 4 +-- .../utils/AdditionalPropertiesSerializer.java | 2 +- .../utils/ERDeserializer.java | 4 +-- .../informationsystem/utils/ISMapper.java | 4 +-- .../utils/ObjectMappingERAction.java | 2 +- .../informationsystem/utils/Utility.java | 2 +- .../utils/discovery/ISMDiscovery.java | 4 +-- .../utils/discovery/ReflectionUtility.java | 1 - .../utils/discovery/SchemaAction.java | 2 +- .../model/impl/properties/EncryptedTest.java | 2 +- .../model/impl/properties/HeaderTest.java | 2 +- .../types/EntitySchemaDefinition.java | 6 ++-- 49 files changed, 214 insertions(+), 123 deletions(-) rename src/main/java/org/gcube/informationsystem/{model => base}/impl/ERImpl.java (59%) create mode 100644 src/main/java/org/gcube/informationsystem/base/impl/ISManageableImpl.java rename src/main/java/org/gcube/informationsystem/{model/impl => base/impl/entities}/BaseEntityImpl.java (80%) create mode 100644 src/main/java/org/gcube/informationsystem/base/impl/entities/EImpl.java create mode 100644 src/main/java/org/gcube/informationsystem/base/impl/relations/BaseRelationImpl.java rename src/main/java/org/gcube/informationsystem/{model/impl/BaseRelationImpl.java => base/impl/relations/RImpl.java} (52%) rename src/main/java/org/gcube/informationsystem/{model => base}/reference/AccessType.java (97%) rename src/main/java/org/gcube/informationsystem/{model => base}/reference/ER.java (81%) rename src/main/java/org/gcube/informationsystem/{model => base}/reference/ISConstants.java (63%) rename src/main/java/org/gcube/informationsystem/{model => base}/reference/ISManageable.java (79%) rename src/main/java/org/gcube/informationsystem/{model/reference => base/reference/entities}/BaseEntity.java (71%) create mode 100644 src/main/java/org/gcube/informationsystem/base/reference/entities/E.java rename src/main/java/org/gcube/informationsystem/{model => base}/reference/properties/Header.java (93%) rename src/main/java/org/gcube/informationsystem/{model => base}/reference/properties/Property.java (73%) create mode 100644 src/main/java/org/gcube/informationsystem/base/reference/relations/BaseRelation.java rename src/main/java/org/gcube/informationsystem/{model/reference/BaseRelation.java => base/reference/relations/R.java} (54%) delete mode 100644 src/main/java/org/gcube/informationsystem/model/impl/ISManageableImpl.java diff --git a/src/main/java/org/gcube/informationsystem/model/impl/ERImpl.java b/src/main/java/org/gcube/informationsystem/base/impl/ERImpl.java similarity index 59% rename from src/main/java/org/gcube/informationsystem/model/impl/ERImpl.java rename to src/main/java/org/gcube/informationsystem/base/impl/ERImpl.java index 13bb903..2c77a02 100644 --- a/src/main/java/org/gcube/informationsystem/model/impl/ERImpl.java +++ b/src/main/java/org/gcube/informationsystem/base/impl/ERImpl.java @@ -1,10 +1,10 @@ /** * */ -package org.gcube.informationsystem.model.impl; +package org.gcube.informationsystem.base.impl; -import org.gcube.informationsystem.model.reference.ER; -import org.gcube.informationsystem.model.reference.properties.Header; +import org.gcube.informationsystem.base.reference.ER; +import org.gcube.informationsystem.base.reference.properties.Header; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -14,6 +14,11 @@ import com.fasterxml.jackson.annotation.JsonTypeName; @JsonTypeName(value=ER.NAME) public abstract class ERImpl extends ISManageableImpl implements ER { + /** + * Generated Serial Version UID + */ + private static final long serialVersionUID = -494123926950181618L; + protected Header header; public ERImpl(){ diff --git a/src/main/java/org/gcube/informationsystem/base/impl/ISManageableImpl.java b/src/main/java/org/gcube/informationsystem/base/impl/ISManageableImpl.java new file mode 100644 index 0000000..c77a558 --- /dev/null +++ b/src/main/java/org/gcube/informationsystem/base/impl/ISManageableImpl.java @@ -0,0 +1,22 @@ +/** + * + */ +package org.gcube.informationsystem.base.impl; + +import org.gcube.informationsystem.base.reference.ISManageable; + +/** + * @author Luca Frosini (ISTI - CNR) + * + */ +public class ISManageableImpl implements ISManageable { + + /** + * + */ + private static final long serialVersionUID = 7338083489551084860L; + + public ISManageableImpl(){ + + } +} diff --git a/src/main/java/org/gcube/informationsystem/model/impl/BaseEntityImpl.java b/src/main/java/org/gcube/informationsystem/base/impl/entities/BaseEntityImpl.java similarity index 80% rename from src/main/java/org/gcube/informationsystem/model/impl/BaseEntityImpl.java rename to src/main/java/org/gcube/informationsystem/base/impl/entities/BaseEntityImpl.java index 4cd001d..2c5240e 100644 --- a/src/main/java/org/gcube/informationsystem/model/impl/BaseEntityImpl.java +++ b/src/main/java/org/gcube/informationsystem/base/impl/entities/BaseEntityImpl.java @@ -1,10 +1,11 @@ -package org.gcube.informationsystem.model.impl; +package org.gcube.informationsystem.base.impl.entities; import java.io.StringWriter; -import org.gcube.informationsystem.model.reference.BaseEntity; +import org.gcube.informationsystem.base.impl.ERImpl; +import org.gcube.informationsystem.base.reference.entities.BaseEntity; +import org.gcube.informationsystem.base.reference.properties.Header; import org.gcube.informationsystem.model.reference.entities.Entity; -import org.gcube.informationsystem.model.reference.properties.Header; import org.gcube.informationsystem.utils.ISMapper; import com.fasterxml.jackson.annotation.JsonTypeName; diff --git a/src/main/java/org/gcube/informationsystem/base/impl/entities/EImpl.java b/src/main/java/org/gcube/informationsystem/base/impl/entities/EImpl.java new file mode 100644 index 0000000..ffd9b2d --- /dev/null +++ b/src/main/java/org/gcube/informationsystem/base/impl/entities/EImpl.java @@ -0,0 +1,5 @@ +package org.gcube.informationsystem.base.impl.entities; + +public class EImpl { + +} diff --git a/src/main/java/org/gcube/informationsystem/base/impl/relations/BaseRelationImpl.java b/src/main/java/org/gcube/informationsystem/base/impl/relations/BaseRelationImpl.java new file mode 100644 index 0000000..6db82f5 --- /dev/null +++ b/src/main/java/org/gcube/informationsystem/base/impl/relations/BaseRelationImpl.java @@ -0,0 +1,24 @@ +package org.gcube.informationsystem.base.impl.relations; + +import org.gcube.informationsystem.base.reference.entities.BaseEntity; +import org.gcube.informationsystem.base.reference.relations.BaseRelation; + +public abstract class BaseRelationImpl extends RImpl implements BaseRelation { + + /** + * Generated Serial Version UID + */ + private static final long serialVersionUID = 5789078326714392972L; + + protected Out source; + protected In target; + + protected BaseRelationImpl() { + super(); + } + + protected BaseRelationImpl(Out source, In target) { + super(source, target); + } + +} \ No newline at end of file diff --git a/src/main/java/org/gcube/informationsystem/model/impl/BaseRelationImpl.java b/src/main/java/org/gcube/informationsystem/base/impl/relations/RImpl.java similarity index 52% rename from src/main/java/org/gcube/informationsystem/model/impl/BaseRelationImpl.java rename to src/main/java/org/gcube/informationsystem/base/impl/relations/RImpl.java index fc595c1..c3a8b45 100644 --- a/src/main/java/org/gcube/informationsystem/model/impl/BaseRelationImpl.java +++ b/src/main/java/org/gcube/informationsystem/base/impl/relations/RImpl.java @@ -1,30 +1,30 @@ -package org.gcube.informationsystem.model.impl; +package org.gcube.informationsystem.base.impl.relations; import java.io.StringWriter; -import org.gcube.informationsystem.model.reference.BaseEntity; -import org.gcube.informationsystem.model.reference.BaseRelation; -import org.gcube.informationsystem.model.reference.properties.PropagationConstraint; +import org.gcube.informationsystem.base.impl.ERImpl; +import org.gcube.informationsystem.base.reference.entities.E; +import org.gcube.informationsystem.base.reference.relations.R; import org.gcube.informationsystem.utils.ISMapper; -public abstract class BaseRelationImpl extends ERImpl implements BaseRelation { - +public abstract class RImpl extends ERImpl implements R { + + /** + * Generated Serial Version UID + */ + private static final long serialVersionUID = 28704968813390512L; + protected Out source; protected In target; - protected PropagationConstraint propagationConstraint; - - - protected BaseRelationImpl() { + protected RImpl() { super(); } - protected BaseRelationImpl(Out source, In target, - PropagationConstraint propagationConstraint) { + protected RImpl(Out source, In target) { this(); this.source = source; this.target = target; - this.propagationConstraint = propagationConstraint; } @Override @@ -47,11 +47,6 @@ public abstract class BaseRelationImpl extends R { + + public static final String NAME = "BaseRelation"; // BaseRelation.class.getSimpleName(); + +} \ No newline at end of file diff --git a/src/main/java/org/gcube/informationsystem/model/reference/BaseRelation.java b/src/main/java/org/gcube/informationsystem/base/reference/relations/R.java similarity index 54% rename from src/main/java/org/gcube/informationsystem/model/reference/BaseRelation.java rename to src/main/java/org/gcube/informationsystem/base/reference/relations/R.java index 0a7de7e..f8ec19e 100644 --- a/src/main/java/org/gcube/informationsystem/model/reference/BaseRelation.java +++ b/src/main/java/org/gcube/informationsystem/base/reference/relations/R.java @@ -1,7 +1,8 @@ -package org.gcube.informationsystem.model.reference; +package org.gcube.informationsystem.base.reference.relations; -import org.gcube.informationsystem.model.reference.properties.Header; -import org.gcube.informationsystem.model.reference.properties.PropagationConstraint; +import org.gcube.informationsystem.base.reference.ER; +import org.gcube.informationsystem.base.reference.entities.E; +import org.gcube.informationsystem.base.reference.properties.Header; import org.gcube.informationsystem.types.annotations.Abstract; import org.gcube.informationsystem.types.annotations.ISProperty; @@ -9,16 +10,14 @@ import com.fasterxml.jackson.annotation.JsonGetter; import com.fasterxml.jackson.annotation.JsonIgnore; @Abstract -//@JsonDeserialize(as=BaseRelationImpl.class) Do not uncomment to manage subclasses -public interface BaseRelation extends ER { +//@JsonDeserialize(as=RImpl.class) Do not uncomment to manage subclasses +public interface R extends ER { - public static final String NAME = "BaseRelation"; // BaseRelation.class.getSimpleName(); + public static final String NAME = "R"; // R.class.getSimpleName(); public static final String SOURCE_PROPERTY = "source"; public static final String TARGET_PROPERTY = "target"; - public static final String PROPAGATION_CONSTRAINT = "propagationConstraint"; - /* Overriding getHeader method to create Header property in type */ @ISProperty(name = HEADER_PROPERTY, mandatory = true, nullable = false) @Override @@ -36,7 +35,4 @@ public interface BaseRelation ext @JsonIgnore public void setTarget(In target); - @ISProperty(name=PROPAGATION_CONSTRAINT) - public PropagationConstraint getPropagationConstraint(); - } \ No newline at end of file diff --git a/src/main/java/org/gcube/informationsystem/context/impl/entities/ContextImpl.java b/src/main/java/org/gcube/informationsystem/context/impl/entities/ContextImpl.java index 38dd6d6..26bc1dc 100644 --- a/src/main/java/org/gcube/informationsystem/context/impl/entities/ContextImpl.java +++ b/src/main/java/org/gcube/informationsystem/context/impl/entities/ContextImpl.java @@ -7,10 +7,10 @@ import java.util.ArrayList; import java.util.List; import java.util.UUID; +import org.gcube.informationsystem.base.impl.entities.BaseEntityImpl; import org.gcube.informationsystem.context.impl.relations.IsParentOfImpl; import org.gcube.informationsystem.context.reference.entities.Context; import org.gcube.informationsystem.context.reference.relations.IsParentOf; -import org.gcube.informationsystem.model.impl.BaseEntityImpl; import org.gcube.informationsystem.model.impl.properties.HeaderImpl; import com.fasterxml.jackson.annotation.JsonSetter; @@ -83,7 +83,7 @@ public class ContextImpl extends BaseEntityImpl implements Context { public void setParent(Context context) { IsParentOf isParentOf = null; if(context!=null) { - isParentOf = new IsParentOfImpl(context, this, null); + isParentOf = new IsParentOfImpl(context, this); } setParent(isParentOf); } @@ -129,7 +129,7 @@ public class ContextImpl extends BaseEntityImpl implements Context { @Override public void addChild(Context child) { - IsParentOf isParentOf = new IsParentOfImpl(this, child, null); + IsParentOf isParentOf = new IsParentOfImpl(this, child); this.addChild(isParentOf); } diff --git a/src/main/java/org/gcube/informationsystem/context/impl/relations/IsParentOfImpl.java b/src/main/java/org/gcube/informationsystem/context/impl/relations/IsParentOfImpl.java index 7135c20..d42cee2 100644 --- a/src/main/java/org/gcube/informationsystem/context/impl/relations/IsParentOfImpl.java +++ b/src/main/java/org/gcube/informationsystem/context/impl/relations/IsParentOfImpl.java @@ -3,10 +3,9 @@ */ package org.gcube.informationsystem.context.impl.relations; +import org.gcube.informationsystem.base.impl.relations.BaseRelationImpl; import org.gcube.informationsystem.context.reference.entities.Context; import org.gcube.informationsystem.context.reference.relations.IsParentOf; -import org.gcube.informationsystem.model.impl.BaseRelationImpl; -import org.gcube.informationsystem.model.reference.properties.PropagationConstraint; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -17,13 +16,17 @@ import com.fasterxml.jackson.annotation.JsonTypeName; public class IsParentOfImpl extends BaseRelationImpl implements IsParentOf { + /** + * + */ + private static final long serialVersionUID = 246200525751824393L; + protected IsParentOfImpl(){ super(); } - public IsParentOfImpl(Out source, In target, - PropagationConstraint propagationConstraint) { - super(source, target, propagationConstraint); + public IsParentOfImpl(Out source, In target) { + super(source, target); } } diff --git a/src/main/java/org/gcube/informationsystem/context/reference/entities/Context.java b/src/main/java/org/gcube/informationsystem/context/reference/entities/Context.java index c5c903d..19d1de7 100644 --- a/src/main/java/org/gcube/informationsystem/context/reference/entities/Context.java +++ b/src/main/java/org/gcube/informationsystem/context/reference/entities/Context.java @@ -6,9 +6,9 @@ package org.gcube.informationsystem.context.reference.entities; import java.util.List; import java.util.UUID; +import org.gcube.informationsystem.base.reference.entities.BaseEntity; import org.gcube.informationsystem.context.impl.entities.ContextImpl; import org.gcube.informationsystem.context.reference.relations.IsParentOf; -import org.gcube.informationsystem.model.reference.BaseEntity; import org.gcube.informationsystem.model.reference.relations.Relation; import org.gcube.informationsystem.types.annotations.ISProperty; diff --git a/src/main/java/org/gcube/informationsystem/context/reference/relations/IsParentOf.java b/src/main/java/org/gcube/informationsystem/context/reference/relations/IsParentOf.java index 711c329..3fe7bc4 100644 --- a/src/main/java/org/gcube/informationsystem/context/reference/relations/IsParentOf.java +++ b/src/main/java/org/gcube/informationsystem/context/reference/relations/IsParentOf.java @@ -3,11 +3,10 @@ */ package org.gcube.informationsystem.context.reference.relations; +import org.gcube.informationsystem.base.reference.properties.Header; +import org.gcube.informationsystem.base.reference.relations.BaseRelation; import org.gcube.informationsystem.context.impl.relations.IsParentOfImpl; import org.gcube.informationsystem.context.reference.entities.Context; -import org.gcube.informationsystem.model.reference.BaseRelation; -import org.gcube.informationsystem.model.reference.properties.Header; -import org.gcube.informationsystem.model.reference.properties.PropagationConstraint; import org.gcube.informationsystem.types.annotations.ISProperty; import com.fasterxml.jackson.annotation.JsonGetter; @@ -43,7 +42,4 @@ public interface IsParentOf extends Bas @JsonIgnore public void setTarget(In target); - @ISProperty(name = PROPAGATION_CONSTRAINT) - public PropagationConstraint getPropagationConstraint(); - } diff --git a/src/main/java/org/gcube/informationsystem/model/impl/ISManageableImpl.java b/src/main/java/org/gcube/informationsystem/model/impl/ISManageableImpl.java deleted file mode 100644 index 229dcc9..0000000 --- a/src/main/java/org/gcube/informationsystem/model/impl/ISManageableImpl.java +++ /dev/null @@ -1,17 +0,0 @@ -/** - * - */ -package org.gcube.informationsystem.model.impl; - -import org.gcube.informationsystem.model.reference.ISManageable; - -/** - * @author Luca Frosini (ISTI - CNR) - * - */ -public class ISManageableImpl implements ISManageable { - - public ISManageableImpl(){ - - } -} diff --git a/src/main/java/org/gcube/informationsystem/model/impl/entities/EntityImpl.java b/src/main/java/org/gcube/informationsystem/model/impl/entities/EntityImpl.java index 8938bb1..f659176 100644 --- a/src/main/java/org/gcube/informationsystem/model/impl/entities/EntityImpl.java +++ b/src/main/java/org/gcube/informationsystem/model/impl/entities/EntityImpl.java @@ -5,7 +5,7 @@ package org.gcube.informationsystem.model.impl.entities; import java.io.StringWriter; -import org.gcube.informationsystem.model.impl.BaseEntityImpl; +import org.gcube.informationsystem.base.impl.entities.BaseEntityImpl; import org.gcube.informationsystem.model.reference.entities.Entity; import org.gcube.informationsystem.utils.ISMapper; diff --git a/src/main/java/org/gcube/informationsystem/model/impl/entities/FacetImpl.java b/src/main/java/org/gcube/informationsystem/model/impl/entities/FacetImpl.java index 70b8b70..076da25 100644 --- a/src/main/java/org/gcube/informationsystem/model/impl/entities/FacetImpl.java +++ b/src/main/java/org/gcube/informationsystem/model/impl/entities/FacetImpl.java @@ -8,9 +8,9 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; -import org.gcube.informationsystem.model.reference.ISManageable; +import org.gcube.informationsystem.base.reference.ISManageable; +import org.gcube.informationsystem.base.reference.properties.Property; import org.gcube.informationsystem.model.reference.entities.Facet; -import org.gcube.informationsystem.model.reference.properties.Property; import org.gcube.informationsystem.utils.ISMapper; import com.fasterxml.jackson.annotation.JsonIgnore; diff --git a/src/main/java/org/gcube/informationsystem/model/impl/properties/DummyProperty.java b/src/main/java/org/gcube/informationsystem/model/impl/properties/DummyProperty.java index 000dcd0..ee4ba54 100644 --- a/src/main/java/org/gcube/informationsystem/model/impl/properties/DummyProperty.java +++ b/src/main/java/org/gcube/informationsystem/model/impl/properties/DummyProperty.java @@ -3,7 +3,7 @@ */ package org.gcube.informationsystem.model.impl.properties; -import org.gcube.informationsystem.model.reference.properties.Property; +import org.gcube.informationsystem.base.reference.properties.Property; /** * @author Luca Frosini (ISTI - CNR) diff --git a/src/main/java/org/gcube/informationsystem/model/impl/properties/HeaderImpl.java b/src/main/java/org/gcube/informationsystem/model/impl/properties/HeaderImpl.java index fa46064..9950d42 100644 --- a/src/main/java/org/gcube/informationsystem/model/impl/properties/HeaderImpl.java +++ b/src/main/java/org/gcube/informationsystem/model/impl/properties/HeaderImpl.java @@ -6,7 +6,7 @@ package org.gcube.informationsystem.model.impl.properties; import java.util.Date; import java.util.UUID; -import org.gcube.informationsystem.model.reference.properties.Header; +import org.gcube.informationsystem.base.reference.properties.Header; import com.fasterxml.jackson.annotation.JsonTypeName; diff --git a/src/main/java/org/gcube/informationsystem/model/impl/properties/PropertyImpl.java b/src/main/java/org/gcube/informationsystem/model/impl/properties/PropertyImpl.java index 39b4274..7d10527 100644 --- a/src/main/java/org/gcube/informationsystem/model/impl/properties/PropertyImpl.java +++ b/src/main/java/org/gcube/informationsystem/model/impl/properties/PropertyImpl.java @@ -3,14 +3,13 @@ */ package org.gcube.informationsystem.model.impl.properties; -import org.gcube.informationsystem.model.impl.ISManageableImpl; -import org.gcube.informationsystem.model.reference.properties.Property; +import org.gcube.informationsystem.base.impl.ISManageableImpl; +import org.gcube.informationsystem.base.reference.properties.Property; import com.fasterxml.jackson.annotation.JsonTypeName; /** * @author Luca Frosini (ISTI - CNR) - * */ @JsonTypeName(value=Property.NAME) public class PropertyImpl extends ISManageableImpl implements Property { @@ -23,4 +22,5 @@ public class PropertyImpl extends ISManageableImpl implements Property { public PropertyImpl() { super(); } + } diff --git a/src/main/java/org/gcube/informationsystem/model/impl/relations/ConsistsOfImpl.java b/src/main/java/org/gcube/informationsystem/model/impl/relations/ConsistsOfImpl.java index b7520a2..00e933d 100644 --- a/src/main/java/org/gcube/informationsystem/model/impl/relations/ConsistsOfImpl.java +++ b/src/main/java/org/gcube/informationsystem/model/impl/relations/ConsistsOfImpl.java @@ -17,6 +17,11 @@ import com.fasterxml.jackson.annotation.JsonTypeName; public class ConsistsOfImpl extends RelationImpl implements ConsistsOf { + /** + * Generated Serial Version UID + */ + private static final long serialVersionUID = -4903629726765659155L; + protected ConsistsOfImpl(){ super(); } diff --git a/src/main/java/org/gcube/informationsystem/model/impl/relations/DummyConsistsOf.java b/src/main/java/org/gcube/informationsystem/model/impl/relations/DummyConsistsOf.java index aa5d80e..c0d6788 100644 --- a/src/main/java/org/gcube/informationsystem/model/impl/relations/DummyConsistsOf.java +++ b/src/main/java/org/gcube/informationsystem/model/impl/relations/DummyConsistsOf.java @@ -17,6 +17,11 @@ import com.fasterxml.jackson.annotation.JsonTypeName; public class DummyConsistsOf extends ConsistsOfImpl implements ConsistsOf { + /** + * Generated Serial Version UID + */ + private static final long serialVersionUID = -8195862723295398163L; + public DummyConsistsOf(){ super(); } diff --git a/src/main/java/org/gcube/informationsystem/model/impl/relations/DummyIsRelatedTo.java b/src/main/java/org/gcube/informationsystem/model/impl/relations/DummyIsRelatedTo.java index 4ccf041..302b5e6 100644 --- a/src/main/java/org/gcube/informationsystem/model/impl/relations/DummyIsRelatedTo.java +++ b/src/main/java/org/gcube/informationsystem/model/impl/relations/DummyIsRelatedTo.java @@ -16,6 +16,11 @@ import com.fasterxml.jackson.annotation.JsonTypeName; public class DummyIsRelatedTo extends IsRelatedToImpl implements IsRelatedTo{ + /** + * Generated Serial Version UID + */ + private static final long serialVersionUID = 3522865762953929379L; + public DummyIsRelatedTo(){ super(); } diff --git a/src/main/java/org/gcube/informationsystem/model/impl/relations/IsIdentifiedByImpl.java b/src/main/java/org/gcube/informationsystem/model/impl/relations/IsIdentifiedByImpl.java index 28ae9c4..c2d3e12 100644 --- a/src/main/java/org/gcube/informationsystem/model/impl/relations/IsIdentifiedByImpl.java +++ b/src/main/java/org/gcube/informationsystem/model/impl/relations/IsIdentifiedByImpl.java @@ -17,6 +17,11 @@ import com.fasterxml.jackson.annotation.JsonTypeName; public class IsIdentifiedByImpl extends ConsistsOfImpl implements IsIdentifiedBy { + /** + * Generated Serial Version UID + */ + private static final long serialVersionUID = 8043666054054911145L; + protected IsIdentifiedByImpl(){ super(); } diff --git a/src/main/java/org/gcube/informationsystem/model/impl/relations/IsRelatedToImpl.java b/src/main/java/org/gcube/informationsystem/model/impl/relations/IsRelatedToImpl.java index 82d4818..a3656f5 100644 --- a/src/main/java/org/gcube/informationsystem/model/impl/relations/IsRelatedToImpl.java +++ b/src/main/java/org/gcube/informationsystem/model/impl/relations/IsRelatedToImpl.java @@ -16,6 +16,11 @@ import com.fasterxml.jackson.annotation.JsonTypeName; public class IsRelatedToImpl extends RelationImpl implements IsRelatedTo { + /** + * Generated Serial Version UID + */ + private static final long serialVersionUID = 5119376559964300102L; + protected IsRelatedToImpl(){ super(); } diff --git a/src/main/java/org/gcube/informationsystem/model/impl/relations/RelationImpl.java b/src/main/java/org/gcube/informationsystem/model/impl/relations/RelationImpl.java index c42f27f..b8739ab 100644 --- a/src/main/java/org/gcube/informationsystem/model/impl/relations/RelationImpl.java +++ b/src/main/java/org/gcube/informationsystem/model/impl/relations/RelationImpl.java @@ -8,11 +8,11 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; -import org.gcube.informationsystem.model.impl.BaseRelationImpl; -import org.gcube.informationsystem.model.reference.ISManageable; +import org.gcube.informationsystem.base.impl.relations.BaseRelationImpl; +import org.gcube.informationsystem.base.reference.ISManageable; +import org.gcube.informationsystem.base.reference.properties.Property; import org.gcube.informationsystem.model.reference.entities.Entity; import org.gcube.informationsystem.model.reference.properties.PropagationConstraint; -import org.gcube.informationsystem.model.reference.properties.Property; import org.gcube.informationsystem.model.reference.relations.Relation; import org.gcube.informationsystem.utils.ISMapper; @@ -26,9 +26,11 @@ import com.fasterxml.jackson.annotation.JsonTypeName; public abstract class RelationImpl extends BaseRelationImpl implements Relation { - protected Out source; - protected In target; - + /** + * + */ + private static final long serialVersionUID = -6249979476879235053L; + protected PropagationConstraint propagationConstraint; @JsonIgnore @@ -54,6 +56,11 @@ public abstract class RelationImpl this.propagationConstraint = propagationConstraint; } + @Override + public PropagationConstraint getPropagationConstraint() { + return this.propagationConstraint; + } + @Override public Map getAdditionalProperties() { return additionalProperties; diff --git a/src/main/java/org/gcube/informationsystem/model/reference/entities/Entity.java b/src/main/java/org/gcube/informationsystem/model/reference/entities/Entity.java index 2afcd4d..6374a5a 100644 --- a/src/main/java/org/gcube/informationsystem/model/reference/entities/Entity.java +++ b/src/main/java/org/gcube/informationsystem/model/reference/entities/Entity.java @@ -3,8 +3,8 @@ */ package org.gcube.informationsystem.model.reference.entities; -import org.gcube.informationsystem.model.reference.BaseEntity; -import org.gcube.informationsystem.model.reference.properties.Header; +import org.gcube.informationsystem.base.reference.entities.BaseEntity; +import org.gcube.informationsystem.base.reference.properties.Header; import org.gcube.informationsystem.types.annotations.Abstract; import org.gcube.informationsystem.types.annotations.ISProperty; diff --git a/src/main/java/org/gcube/informationsystem/model/reference/properties/Encrypted.java b/src/main/java/org/gcube/informationsystem/model/reference/properties/Encrypted.java index dae66d7..0a9a639 100644 --- a/src/main/java/org/gcube/informationsystem/model/reference/properties/Encrypted.java +++ b/src/main/java/org/gcube/informationsystem/model/reference/properties/Encrypted.java @@ -1,5 +1,6 @@ package org.gcube.informationsystem.model.reference.properties; +import org.gcube.informationsystem.base.reference.properties.Property; import org.gcube.informationsystem.model.impl.properties.EncryptedImpl; import org.gcube.informationsystem.types.annotations.ISProperty; diff --git a/src/main/java/org/gcube/informationsystem/model/reference/properties/PropagationConstraint.java b/src/main/java/org/gcube/informationsystem/model/reference/properties/PropagationConstraint.java index 005b826..1655003 100644 --- a/src/main/java/org/gcube/informationsystem/model/reference/properties/PropagationConstraint.java +++ b/src/main/java/org/gcube/informationsystem/model/reference/properties/PropagationConstraint.java @@ -3,6 +3,7 @@ */ package org.gcube.informationsystem.model.reference.properties; +import org.gcube.informationsystem.base.reference.properties.Property; import org.gcube.informationsystem.model.impl.properties.PropagationConstraintImpl; import org.gcube.informationsystem.types.annotations.ISProperty; diff --git a/src/main/java/org/gcube/informationsystem/model/reference/relations/Relation.java b/src/main/java/org/gcube/informationsystem/model/reference/relations/Relation.java index c8d49fb..d506e8c 100644 --- a/src/main/java/org/gcube/informationsystem/model/reference/relations/Relation.java +++ b/src/main/java/org/gcube/informationsystem/model/reference/relations/Relation.java @@ -5,7 +5,7 @@ package org.gcube.informationsystem.model.reference.relations; import java.util.Map; -import org.gcube.informationsystem.model.reference.BaseRelation; +import org.gcube.informationsystem.base.reference.relations.BaseRelation; import org.gcube.informationsystem.model.reference.entities.Entity; import org.gcube.informationsystem.model.reference.entities.Resource; import org.gcube.informationsystem.model.reference.properties.PropagationConstraint; @@ -30,6 +30,8 @@ public interface Relation extends BaseRel public static final String NAME = "Relation"; //Relation.class.getSimpleName(); + public static final String PROPAGATION_CONSTRAINT = "propagationConstraint"; + @JsonIgnoreProperties({Resource.CONSISTS_OF_PROPERTY, Resource.IS_RELATED_TO_PROPERTY}) @JsonGetter(value = SOURCE_PROPERTY) public Out getSource(); diff --git a/src/main/java/org/gcube/informationsystem/types/Type.java b/src/main/java/org/gcube/informationsystem/types/Type.java index 2eb1d6d..4b3c978 100644 --- a/src/main/java/org/gcube/informationsystem/types/Type.java +++ b/src/main/java/org/gcube/informationsystem/types/Type.java @@ -30,7 +30,7 @@ import java.util.Map; import java.util.Set; import java.util.UUID; -import org.gcube.informationsystem.model.reference.properties.Property; +import org.gcube.informationsystem.base.reference.properties.Property; /** diff --git a/src/main/java/org/gcube/informationsystem/types/TypeBinder.java b/src/main/java/org/gcube/informationsystem/types/TypeBinder.java index 27f24b2..08939f3 100644 --- a/src/main/java/org/gcube/informationsystem/types/TypeBinder.java +++ b/src/main/java/org/gcube/informationsystem/types/TypeBinder.java @@ -12,11 +12,11 @@ import java.util.List; import java.util.Set; import java.util.UUID; -import org.gcube.informationsystem.model.reference.ISManageable; +import org.gcube.informationsystem.base.reference.ISManageable; +import org.gcube.informationsystem.base.reference.properties.Property; import org.gcube.informationsystem.model.reference.entities.Entity; import org.gcube.informationsystem.model.reference.entities.Facet; import org.gcube.informationsystem.model.reference.entities.Resource; -import org.gcube.informationsystem.model.reference.properties.Property; import org.gcube.informationsystem.model.reference.relations.ConsistsOf; import org.gcube.informationsystem.model.reference.relations.IsRelatedTo; import org.gcube.informationsystem.model.reference.relations.Relation; diff --git a/src/main/java/org/gcube/informationsystem/utils/AdditionalPropertiesSerializer.java b/src/main/java/org/gcube/informationsystem/utils/AdditionalPropertiesSerializer.java index e76f63b..6a3f203 100644 --- a/src/main/java/org/gcube/informationsystem/utils/AdditionalPropertiesSerializer.java +++ b/src/main/java/org/gcube/informationsystem/utils/AdditionalPropertiesSerializer.java @@ -3,7 +3,7 @@ package org.gcube.informationsystem.utils; import java.io.IOException; import java.util.Map; -import org.gcube.informationsystem.model.reference.properties.Property; +import org.gcube.informationsystem.base.reference.properties.Property; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.SerializerProvider; diff --git a/src/main/java/org/gcube/informationsystem/utils/ERDeserializer.java b/src/main/java/org/gcube/informationsystem/utils/ERDeserializer.java index 02210a5..76bc262 100644 --- a/src/main/java/org/gcube/informationsystem/utils/ERDeserializer.java +++ b/src/main/java/org/gcube/informationsystem/utils/ERDeserializer.java @@ -7,8 +7,8 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; -import org.gcube.informationsystem.model.reference.AccessType; -import org.gcube.informationsystem.model.reference.ISManageable; +import org.gcube.informationsystem.base.reference.AccessType; +import org.gcube.informationsystem.base.reference.ISManageable; import com.fasterxml.jackson.core.JsonFactory; import com.fasterxml.jackson.core.JsonParser; diff --git a/src/main/java/org/gcube/informationsystem/utils/ISMapper.java b/src/main/java/org/gcube/informationsystem/utils/ISMapper.java index 0f18652..7a257c6 100644 --- a/src/main/java/org/gcube/informationsystem/utils/ISMapper.java +++ b/src/main/java/org/gcube/informationsystem/utils/ISMapper.java @@ -9,8 +9,8 @@ import java.util.ArrayList; import java.util.List; import java.util.ServiceLoader; -import org.gcube.informationsystem.model.reference.AccessType; -import org.gcube.informationsystem.model.reference.ISManageable; +import org.gcube.informationsystem.base.reference.AccessType; +import org.gcube.informationsystem.base.reference.ISManageable; import org.gcube.informationsystem.utils.discovery.ISMDiscovery; import org.gcube.informationsystem.utils.discovery.RegistrationProvider; import org.gcube.informationsystem.utils.discovery.SchemaAction; diff --git a/src/main/java/org/gcube/informationsystem/utils/ObjectMappingERAction.java b/src/main/java/org/gcube/informationsystem/utils/ObjectMappingERAction.java index 9a64d26..ce16b54 100644 --- a/src/main/java/org/gcube/informationsystem/utils/ObjectMappingERAction.java +++ b/src/main/java/org/gcube/informationsystem/utils/ObjectMappingERAction.java @@ -3,8 +3,8 @@ */ package org.gcube.informationsystem.utils; +import org.gcube.informationsystem.base.reference.properties.Property; import org.gcube.informationsystem.model.reference.entities.Entity; -import org.gcube.informationsystem.model.reference.properties.Property; import org.gcube.informationsystem.model.reference.relations.Relation; import org.gcube.informationsystem.utils.discovery.SchemaAction; diff --git a/src/main/java/org/gcube/informationsystem/utils/Utility.java b/src/main/java/org/gcube/informationsystem/utils/Utility.java index 984a8b3..ee16a11 100644 --- a/src/main/java/org/gcube/informationsystem/utils/Utility.java +++ b/src/main/java/org/gcube/informationsystem/utils/Utility.java @@ -6,8 +6,8 @@ package org.gcube.informationsystem.utils; import java.io.IOException; import java.util.UUID; +import org.gcube.informationsystem.base.reference.properties.Header; import org.gcube.informationsystem.model.reference.entities.Entity; -import org.gcube.informationsystem.model.reference.properties.Header; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/org/gcube/informationsystem/utils/discovery/ISMDiscovery.java b/src/main/java/org/gcube/informationsystem/utils/discovery/ISMDiscovery.java index 143dc15..a73560d 100644 --- a/src/main/java/org/gcube/informationsystem/utils/discovery/ISMDiscovery.java +++ b/src/main/java/org/gcube/informationsystem/utils/discovery/ISMDiscovery.java @@ -9,9 +9,9 @@ import java.util.Arrays; import java.util.List; import java.util.Objects; -import org.gcube.informationsystem.model.reference.ISManageable; +import org.gcube.informationsystem.base.reference.ISManageable; +import org.gcube.informationsystem.base.reference.properties.Property; import org.gcube.informationsystem.model.reference.entities.Entity; -import org.gcube.informationsystem.model.reference.properties.Property; import org.gcube.informationsystem.model.reference.relations.Relation; import org.gcube.informationsystem.types.annotations.ISProperty; import org.slf4j.Logger; diff --git a/src/main/java/org/gcube/informationsystem/utils/discovery/ReflectionUtility.java b/src/main/java/org/gcube/informationsystem/utils/discovery/ReflectionUtility.java index c5fece7..86153f9 100644 --- a/src/main/java/org/gcube/informationsystem/utils/discovery/ReflectionUtility.java +++ b/src/main/java/org/gcube/informationsystem/utils/discovery/ReflectionUtility.java @@ -139,7 +139,6 @@ public class ReflectionUtility { * @throws ClassNotFoundException * if something went wrong */ - @SuppressWarnings("restriction") public static List> getClassesForPackage(String pckgname) throws ClassNotFoundException { final List> classes = new ArrayList>(); diff --git a/src/main/java/org/gcube/informationsystem/utils/discovery/SchemaAction.java b/src/main/java/org/gcube/informationsystem/utils/discovery/SchemaAction.java index f5ea503..3ca158f 100644 --- a/src/main/java/org/gcube/informationsystem/utils/discovery/SchemaAction.java +++ b/src/main/java/org/gcube/informationsystem/utils/discovery/SchemaAction.java @@ -3,8 +3,8 @@ */ package org.gcube.informationsystem.utils.discovery; +import org.gcube.informationsystem.base.reference.properties.Property; import org.gcube.informationsystem.model.reference.entities.Entity; -import org.gcube.informationsystem.model.reference.properties.Property; import org.gcube.informationsystem.model.reference.relations.Relation; /** diff --git a/src/test/java/org/gcube/informationsystem/model/impl/properties/EncryptedTest.java b/src/test/java/org/gcube/informationsystem/model/impl/properties/EncryptedTest.java index 7ef6162..653b3e7 100644 --- a/src/test/java/org/gcube/informationsystem/model/impl/properties/EncryptedTest.java +++ b/src/test/java/org/gcube/informationsystem/model/impl/properties/EncryptedTest.java @@ -5,10 +5,10 @@ import java.security.SecureRandom; import javax.crypto.KeyGenerator; +import org.gcube.informationsystem.base.reference.properties.Property; import org.gcube.informationsystem.model.ContextTest; import org.gcube.informationsystem.model.impl.properties.EncryptedImpl; import org.gcube.informationsystem.model.reference.properties.Encrypted; -import org.gcube.informationsystem.model.reference.properties.Property; import org.gcube.informationsystem.types.TypeBinder; import org.gcube.informationsystem.utils.ISMapper; import org.junit.Assert; diff --git a/src/test/java/org/gcube/informationsystem/model/impl/properties/HeaderTest.java b/src/test/java/org/gcube/informationsystem/model/impl/properties/HeaderTest.java index 73e1f51..9863e52 100644 --- a/src/test/java/org/gcube/informationsystem/model/impl/properties/HeaderTest.java +++ b/src/test/java/org/gcube/informationsystem/model/impl/properties/HeaderTest.java @@ -4,8 +4,8 @@ import java.util.Calendar; import java.util.Date; import java.util.UUID; +import org.gcube.informationsystem.base.reference.properties.Header; import org.gcube.informationsystem.model.impl.properties.HeaderImpl; -import org.gcube.informationsystem.model.reference.properties.Header; import org.gcube.informationsystem.utils.ISMapper; import org.junit.Assert; import org.junit.Test; diff --git a/src/test/java/org/gcube/informationsystem/types/EntitySchemaDefinition.java b/src/test/java/org/gcube/informationsystem/types/EntitySchemaDefinition.java index f21d8c6..7caa135 100644 --- a/src/test/java/org/gcube/informationsystem/types/EntitySchemaDefinition.java +++ b/src/test/java/org/gcube/informationsystem/types/EntitySchemaDefinition.java @@ -3,10 +3,10 @@ */ package org.gcube.informationsystem.types; -import org.gcube.informationsystem.model.reference.ISManageable; +import org.gcube.informationsystem.base.reference.ISManageable; +import org.gcube.informationsystem.base.reference.properties.Header; +import org.gcube.informationsystem.base.reference.properties.Property; import org.gcube.informationsystem.model.reference.entities.Resource; -import org.gcube.informationsystem.model.reference.properties.Header; -import org.gcube.informationsystem.model.reference.properties.Property; import org.gcube.informationsystem.model.reference.relations.IsRelatedTo; import org.junit.Test; import org.slf4j.Logger;