diff --git a/pom.xml b/pom.xml index f5f2b45..f9c3be3 100644 --- a/pom.xml +++ b/pom.xml @@ -47,17 +47,18 @@ - com.fasterxml.jackson.core - jackson-databind + org.gcube.common + gcube-jackson-databind - com.fasterxml.jackson.core - jackson-annotations + org.gcube.common + gcube-jackson-annotations - com.fasterxml.jackson.core - jackson-core + org.gcube.common + gcube-jackson-core + org.gcube.core common-encryption diff --git a/src/main/java/org/gcube/informationsystem/base/impl/ElementImpl.java b/src/main/java/org/gcube/informationsystem/base/impl/ElementImpl.java index 9747f30..f9a5c17 100644 --- a/src/main/java/org/gcube/informationsystem/base/impl/ElementImpl.java +++ b/src/main/java/org/gcube/informationsystem/base/impl/ElementImpl.java @@ -5,11 +5,10 @@ package org.gcube.informationsystem.base.impl; import java.io.StringWriter; +import org.gcube.com.fasterxml.jackson.annotation.JsonTypeName; import org.gcube.informationsystem.base.reference.Element; import org.gcube.informationsystem.utils.ElementMapper; -import com.fasterxml.jackson.annotation.JsonTypeName; - /** * @author Luca Frosini (ISTI - CNR) */ diff --git a/src/main/java/org/gcube/informationsystem/base/impl/entities/EntityElementImpl.java b/src/main/java/org/gcube/informationsystem/base/impl/entities/EntityElementImpl.java index 77ebaaf..f292e85 100644 --- a/src/main/java/org/gcube/informationsystem/base/impl/entities/EntityElementImpl.java +++ b/src/main/java/org/gcube/informationsystem/base/impl/entities/EntityElementImpl.java @@ -2,13 +2,12 @@ package org.gcube.informationsystem.base.impl.entities; import java.io.StringWriter; +import org.gcube.com.fasterxml.jackson.annotation.JsonTypeName; import org.gcube.informationsystem.base.impl.ElementImpl; import org.gcube.informationsystem.base.reference.entities.EntityElement; import org.gcube.informationsystem.model.reference.properties.Header; import org.gcube.informationsystem.utils.ElementMapper; -import com.fasterxml.jackson.annotation.JsonTypeName; - @JsonTypeName(value=EntityElement.NAME) public abstract class EntityElementImpl extends ElementImpl implements EntityElement { diff --git a/src/main/java/org/gcube/informationsystem/base/impl/properties/PropertyElementImpl.java b/src/main/java/org/gcube/informationsystem/base/impl/properties/PropertyElementImpl.java index 31cfbbd..46eed07 100644 --- a/src/main/java/org/gcube/informationsystem/base/impl/properties/PropertyElementImpl.java +++ b/src/main/java/org/gcube/informationsystem/base/impl/properties/PropertyElementImpl.java @@ -1,11 +1,10 @@ package org.gcube.informationsystem.base.impl.properties; +import org.gcube.com.fasterxml.jackson.annotation.JsonTypeName; import org.gcube.informationsystem.base.impl.ElementImpl; import org.gcube.informationsystem.base.reference.properties.PropertyElement; import org.gcube.informationsystem.model.reference.properties.Property; -import com.fasterxml.jackson.annotation.JsonTypeName; - /** * @author Luca Frosini (ISTI - CNR) */ diff --git a/src/main/java/org/gcube/informationsystem/base/impl/relations/RelationElementImpl.java b/src/main/java/org/gcube/informationsystem/base/impl/relations/RelationElementImpl.java index 6553cd7..a1237c2 100644 --- a/src/main/java/org/gcube/informationsystem/base/impl/relations/RelationElementImpl.java +++ b/src/main/java/org/gcube/informationsystem/base/impl/relations/RelationElementImpl.java @@ -1,12 +1,11 @@ package org.gcube.informationsystem.base.impl.relations; +import org.gcube.com.fasterxml.jackson.annotation.JsonTypeName; import org.gcube.informationsystem.base.impl.ElementImpl; import org.gcube.informationsystem.base.reference.entities.EntityElement; import org.gcube.informationsystem.base.reference.relations.RelationElement; import org.gcube.informationsystem.model.reference.properties.Header; -import com.fasterxml.jackson.annotation.JsonTypeName; - @JsonTypeName(value=RelationElement.NAME) public abstract class RelationElementImpl extends ElementImpl implements RelationElement { diff --git a/src/main/java/org/gcube/informationsystem/base/reference/Element.java b/src/main/java/org/gcube/informationsystem/base/reference/Element.java index fff4196..65188b6 100644 --- a/src/main/java/org/gcube/informationsystem/base/reference/Element.java +++ b/src/main/java/org/gcube/informationsystem/base/reference/Element.java @@ -5,10 +5,9 @@ package org.gcube.informationsystem.base.reference; import java.io.Serializable; +import org.gcube.com.fasterxml.jackson.annotation.JsonTypeInfo; import org.gcube.informationsystem.types.annotations.Abstract; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - /** * @author Luca Frosini (ISTI - CNR) */ diff --git a/src/main/java/org/gcube/informationsystem/base/reference/entities/EntityElement.java b/src/main/java/org/gcube/informationsystem/base/reference/entities/EntityElement.java index 31d6916..a3e321a 100644 --- a/src/main/java/org/gcube/informationsystem/base/reference/entities/EntityElement.java +++ b/src/main/java/org/gcube/informationsystem/base/reference/entities/EntityElement.java @@ -1,13 +1,12 @@ package org.gcube.informationsystem.base.reference.entities; +import org.gcube.com.fasterxml.jackson.annotation.JsonIgnoreProperties; import org.gcube.informationsystem.base.reference.Element; import org.gcube.informationsystem.base.reference.IdentifiableElement; import org.gcube.informationsystem.model.reference.properties.Header; import org.gcube.informationsystem.types.annotations.Abstract; import org.gcube.informationsystem.types.annotations.ISProperty; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; - @Abstract @JsonIgnoreProperties(ignoreUnknown=true) //@JsonDeserialize(as=EntityElementImpl.class) Do not uncomment to manage subclasses diff --git a/src/main/java/org/gcube/informationsystem/base/reference/properties/PropertyElement.java b/src/main/java/org/gcube/informationsystem/base/reference/properties/PropertyElement.java index dec9d2e..8f756ec 100644 --- a/src/main/java/org/gcube/informationsystem/base/reference/properties/PropertyElement.java +++ b/src/main/java/org/gcube/informationsystem/base/reference/properties/PropertyElement.java @@ -1,10 +1,9 @@ package org.gcube.informationsystem.base.reference.properties; +import org.gcube.com.fasterxml.jackson.databind.annotation.JsonDeserialize; import org.gcube.informationsystem.base.impl.properties.PropertyElementImpl; import org.gcube.informationsystem.base.reference.Element; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; - /** * @author Luca Frosini (ISTI - CNR) * Root Class for Property types. It creates a base common type, which is useful diff --git a/src/main/java/org/gcube/informationsystem/base/reference/relations/RelationElement.java b/src/main/java/org/gcube/informationsystem/base/reference/relations/RelationElement.java index f87f0d7..e467796 100644 --- a/src/main/java/org/gcube/informationsystem/base/reference/relations/RelationElement.java +++ b/src/main/java/org/gcube/informationsystem/base/reference/relations/RelationElement.java @@ -1,5 +1,7 @@ package org.gcube.informationsystem.base.reference.relations; +import org.gcube.com.fasterxml.jackson.annotation.JsonGetter; +import org.gcube.com.fasterxml.jackson.annotation.JsonIgnore; import org.gcube.informationsystem.base.reference.Element; import org.gcube.informationsystem.base.reference.IdentifiableElement; import org.gcube.informationsystem.base.reference.entities.EntityElement; @@ -7,9 +9,6 @@ import org.gcube.informationsystem.model.reference.properties.Header; import org.gcube.informationsystem.types.annotations.Abstract; import org.gcube.informationsystem.types.annotations.ISProperty; -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonIgnore; - @Abstract //@JsonDeserialize(as=RelationElementImpl.class) Do not uncomment to manage subclasses public interface RelationElement extends Element, IdentifiableElement { 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 006d755..f9f01a1 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,16 +7,15 @@ import java.util.ArrayList; import java.util.List; import java.util.UUID; +import org.gcube.com.fasterxml.jackson.annotation.JsonSetter; +import org.gcube.com.fasterxml.jackson.annotation.JsonTypeName; +import org.gcube.com.fasterxml.jackson.core.JsonProcessingException; import org.gcube.informationsystem.base.impl.entities.EntityElementImpl; 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.properties.HeaderImpl; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.core.JsonProcessingException; - /** * @author Luca Frosini (ISTI - CNR) 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 0eb8be0..1856d12 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,12 +3,11 @@ */ package org.gcube.informationsystem.context.impl.relations; +import org.gcube.com.fasterxml.jackson.annotation.JsonTypeName; import org.gcube.informationsystem.base.impl.relations.RelationElementImpl; import org.gcube.informationsystem.context.reference.entities.Context; import org.gcube.informationsystem.context.reference.relations.IsParentOf; -import com.fasterxml.jackson.annotation.JsonTypeName; - /** * @author Luca Frosini (ISTI - CNR) */ 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 e87c5f1..240917e 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,17 +6,16 @@ package org.gcube.informationsystem.context.reference.entities; import java.util.List; import java.util.UUID; +import org.gcube.com.fasterxml.jackson.annotation.JsonGetter; +import org.gcube.com.fasterxml.jackson.annotation.JsonIgnore; +import org.gcube.com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import org.gcube.com.fasterxml.jackson.databind.annotation.JsonDeserialize; import org.gcube.informationsystem.base.reference.entities.EntityElement; import org.gcube.informationsystem.context.impl.entities.ContextImpl; import org.gcube.informationsystem.context.reference.relations.IsParentOf; import org.gcube.informationsystem.model.reference.relations.Relation; import org.gcube.informationsystem.types.annotations.ISProperty; -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; - /** * @author Luca Frosini (ISTI - CNR) This Entity is for internal use only * https://wiki.gcube-system.org/gcube/Facet_Based_Resource_Model#Context 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 d130b4b..4f624e8 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,15 +3,14 @@ */ package org.gcube.informationsystem.context.reference.relations; +import org.gcube.com.fasterxml.jackson.annotation.JsonGetter; +import org.gcube.com.fasterxml.jackson.annotation.JsonIgnore; +import org.gcube.com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import org.gcube.com.fasterxml.jackson.databind.annotation.JsonDeserialize; import org.gcube.informationsystem.base.reference.relations.RelationElement; import org.gcube.informationsystem.context.impl.relations.IsParentOfImpl; import org.gcube.informationsystem.context.reference.entities.Context; -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; - /** * @author Luca Frosini (ISTI - CNR) * https://wiki.gcube-system.org/gcube/Facet_Based_Resource_Model#isParentOf 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 434d96a..677d8b4 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 @@ -3,11 +3,10 @@ */ package org.gcube.informationsystem.model.impl.entities; +import org.gcube.com.fasterxml.jackson.annotation.JsonTypeName; import org.gcube.informationsystem.base.impl.entities.EntityElementImpl; import org.gcube.informationsystem.model.reference.entities.Entity; -import com.fasterxml.jackson.annotation.JsonTypeName; - /** * @author Luca Frosini (ISTI - CNR) */ 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 e86611d..ce5364a 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,14 +8,13 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; +import org.gcube.com.fasterxml.jackson.annotation.JsonIgnore; +import org.gcube.com.fasterxml.jackson.annotation.JsonTypeName; import org.gcube.informationsystem.base.reference.Element; import org.gcube.informationsystem.model.reference.entities.Facet; import org.gcube.informationsystem.model.reference.properties.Property; import org.gcube.informationsystem.utils.ElementMapper; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonTypeName; - /** * @author Luca Frosini (ISTI - CNR) */ diff --git a/src/main/java/org/gcube/informationsystem/model/impl/entities/ResourceImpl.java b/src/main/java/org/gcube/informationsystem/model/impl/entities/ResourceImpl.java index 14567cf..0b8c1ba 100644 --- a/src/main/java/org/gcube/informationsystem/model/impl/entities/ResourceImpl.java +++ b/src/main/java/org/gcube/informationsystem/model/impl/entities/ResourceImpl.java @@ -7,6 +7,7 @@ import java.util.ArrayList; import java.util.List; import java.util.UUID; +import org.gcube.com.fasterxml.jackson.annotation.JsonTypeName; import org.gcube.informationsystem.model.impl.relations.ConsistsOfImpl; import org.gcube.informationsystem.model.reference.entities.Facet; import org.gcube.informationsystem.model.reference.entities.Resource; @@ -15,8 +16,6 @@ import org.gcube.informationsystem.model.reference.relations.IsRelatedTo; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.fasterxml.jackson.annotation.JsonTypeName; - /** * @author Luca Frosini (ISTI - CNR) */ diff --git a/src/main/java/org/gcube/informationsystem/model/impl/properties/EncryptedImpl.java b/src/main/java/org/gcube/informationsystem/model/impl/properties/EncryptedImpl.java index 7522829..54f6983 100644 --- a/src/main/java/org/gcube/informationsystem/model/impl/properties/EncryptedImpl.java +++ b/src/main/java/org/gcube/informationsystem/model/impl/properties/EncryptedImpl.java @@ -5,12 +5,11 @@ package org.gcube.informationsystem.model.impl.properties; import java.security.Key; +import org.gcube.com.fasterxml.jackson.annotation.JsonIgnore; +import org.gcube.com.fasterxml.jackson.annotation.JsonTypeName; import org.gcube.common.encryption.encrypter.StringEncrypter; import org.gcube.informationsystem.model.reference.properties.Encrypted; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonTypeName; - /** * @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 9d4432f..fb8212b 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,10 +6,9 @@ package org.gcube.informationsystem.model.impl.properties; import java.util.Date; import java.util.UUID; +import org.gcube.com.fasterxml.jackson.annotation.JsonTypeName; import org.gcube.informationsystem.model.reference.properties.Header; -import com.fasterxml.jackson.annotation.JsonTypeName; - /** * @author Luca Frosini (ISTI - CNR) */ diff --git a/src/main/java/org/gcube/informationsystem/model/impl/properties/PropagationConstraintImpl.java b/src/main/java/org/gcube/informationsystem/model/impl/properties/PropagationConstraintImpl.java index 68b0d92..550178e 100644 --- a/src/main/java/org/gcube/informationsystem/model/impl/properties/PropagationConstraintImpl.java +++ b/src/main/java/org/gcube/informationsystem/model/impl/properties/PropagationConstraintImpl.java @@ -3,12 +3,11 @@ */ package org.gcube.informationsystem.model.impl.properties; +import org.gcube.com.fasterxml.jackson.annotation.JsonFormat; +import org.gcube.com.fasterxml.jackson.annotation.JsonProperty; +import org.gcube.com.fasterxml.jackson.annotation.JsonTypeName; import org.gcube.informationsystem.model.reference.properties.PropagationConstraint; -import com.fasterxml.jackson.annotation.JsonFormat; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeName; - /** * @author Luca Frosini (ISTI - CNR) */ 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 d53a341..dd79c68 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,11 +3,10 @@ */ package org.gcube.informationsystem.model.impl.properties; +import org.gcube.com.fasterxml.jackson.annotation.JsonTypeName; import org.gcube.informationsystem.base.impl.properties.PropertyElementImpl; import org.gcube.informationsystem.model.reference.properties.Property; -import com.fasterxml.jackson.annotation.JsonTypeName; - /** * @author Luca Frosini (ISTI - CNR) */ 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 c59dd15..c44e4b7 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 @@ -3,13 +3,12 @@ */ package org.gcube.informationsystem.model.impl.relations; +import org.gcube.com.fasterxml.jackson.annotation.JsonTypeName; import org.gcube.informationsystem.model.reference.entities.Facet; import org.gcube.informationsystem.model.reference.entities.Resource; import org.gcube.informationsystem.model.reference.properties.PropagationConstraint; import org.gcube.informationsystem.model.reference.relations.ConsistsOf; -import com.fasterxml.jackson.annotation.JsonTypeName; - /** * @author Luca Frosini (ISTI - CNR) */ 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 ba04deb..f719321 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 @@ -3,12 +3,11 @@ */ package org.gcube.informationsystem.model.impl.relations; +import org.gcube.com.fasterxml.jackson.annotation.JsonTypeName; import org.gcube.informationsystem.model.reference.entities.Resource; import org.gcube.informationsystem.model.reference.properties.PropagationConstraint; import org.gcube.informationsystem.model.reference.relations.IsRelatedTo; -import com.fasterxml.jackson.annotation.JsonTypeName; - /** * @author Luca Frosini (ISTI - CNR) */ 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 723aaf1..b454d4b 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 @@ -3,12 +3,11 @@ */ package org.gcube.informationsystem.model.impl.relations; +import org.gcube.com.fasterxml.jackson.annotation.JsonTypeName; import org.gcube.informationsystem.model.reference.entities.Resource; import org.gcube.informationsystem.model.reference.properties.PropagationConstraint; import org.gcube.informationsystem.model.reference.relations.IsRelatedTo; -import com.fasterxml.jackson.annotation.JsonTypeName; - /** * @author Luca Frosini (ISTI - CNR) */ 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 b31f28a..a378fdc 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,6 +8,8 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; +import org.gcube.com.fasterxml.jackson.annotation.JsonIgnore; +import org.gcube.com.fasterxml.jackson.annotation.JsonTypeName; import org.gcube.informationsystem.base.impl.relations.RelationElementImpl; import org.gcube.informationsystem.base.reference.Element; import org.gcube.informationsystem.model.reference.entities.Entity; @@ -17,9 +19,6 @@ import org.gcube.informationsystem.model.reference.properties.Property; import org.gcube.informationsystem.model.reference.relations.Relation; import org.gcube.informationsystem.utils.ElementMapper; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonTypeName; - /** * @author Luca Frosini (ISTI - CNR) */ diff --git a/src/main/java/org/gcube/informationsystem/model/reference/entities/Facet.java b/src/main/java/org/gcube/informationsystem/model/reference/entities/Facet.java index fb5ce13..87a9b58 100644 --- a/src/main/java/org/gcube/informationsystem/model/reference/entities/Facet.java +++ b/src/main/java/org/gcube/informationsystem/model/reference/entities/Facet.java @@ -2,14 +2,13 @@ package org.gcube.informationsystem.model.reference.entities; import java.util.Map; +import org.gcube.com.fasterxml.jackson.annotation.JsonAnyGetter; +import org.gcube.com.fasterxml.jackson.annotation.JsonAnySetter; +import org.gcube.com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.gcube.informationsystem.base.reference.SchemaMixedElement; import org.gcube.informationsystem.types.annotations.Abstract; import org.gcube.informationsystem.utils.AdditionalPropertiesSerializer; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; - /** * @author Luca Frosini (ISTI - CNR) * https://wiki.gcube-system.org/gcube/Facet_Based_Resource_Model#Facets diff --git a/src/main/java/org/gcube/informationsystem/model/reference/entities/Resource.java b/src/main/java/org/gcube/informationsystem/model/reference/entities/Resource.java index ff39349..22cdac8 100644 --- a/src/main/java/org/gcube/informationsystem/model/reference/entities/Resource.java +++ b/src/main/java/org/gcube/informationsystem/model/reference/entities/Resource.java @@ -6,6 +6,8 @@ package org.gcube.informationsystem.model.reference.entities; import java.util.List; import java.util.UUID; +import org.gcube.com.fasterxml.jackson.annotation.JsonIgnore; +import org.gcube.com.fasterxml.jackson.annotation.JsonIgnoreProperties; import org.gcube.informationsystem.model.reference.relations.ConsistsOf; import org.gcube.informationsystem.model.reference.relations.IsRelatedTo; import org.gcube.informationsystem.types.annotations.Abstract; @@ -13,9 +15,6 @@ import org.gcube.informationsystem.types.annotations.ResourceSchema; import org.gcube.informationsystem.types.annotations.ResourceSchemaEntry; import org.gcube.informationsystem.types.annotations.ResourceSchemaRelatedEntry; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; - /** * @author Luca Frosini (ISTI - CNR) * https://wiki.gcube-system.org/gcube/Facet_Based_Resource_Model#Resources 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..15565b0 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,12 +1,11 @@ package org.gcube.informationsystem.model.reference.properties; +import org.gcube.com.fasterxml.jackson.annotation.JsonGetter; +import org.gcube.com.fasterxml.jackson.annotation.JsonSetter; +import org.gcube.com.fasterxml.jackson.databind.annotation.JsonDeserialize; import org.gcube.informationsystem.model.impl.properties.EncryptedImpl; import org.gcube.informationsystem.types.annotations.ISProperty; -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; - /** * @author Luca Frosini (ISTI - CNR) */ diff --git a/src/main/java/org/gcube/informationsystem/model/reference/properties/Header.java b/src/main/java/org/gcube/informationsystem/model/reference/properties/Header.java index 74786c7..59b27c6 100644 --- a/src/main/java/org/gcube/informationsystem/model/reference/properties/Header.java +++ b/src/main/java/org/gcube/informationsystem/model/reference/properties/Header.java @@ -6,13 +6,12 @@ package org.gcube.informationsystem.model.reference.properties; import java.util.Date; import java.util.UUID; +import org.gcube.com.fasterxml.jackson.annotation.JsonFormat; +import org.gcube.com.fasterxml.jackson.databind.annotation.JsonDeserialize; import org.gcube.informationsystem.base.reference.Element; import org.gcube.informationsystem.model.impl.properties.HeaderImpl; import org.gcube.informationsystem.types.annotations.ISProperty; -import com.fasterxml.jackson.annotation.JsonFormat; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; - /** * @author Luca Frosini (ISTI - CNR) * https://wiki.gcube-system.org/gcube/Facet_Based_Resource_Model#Header 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 11c60cc..e9d0216 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,11 +3,10 @@ */ package org.gcube.informationsystem.model.reference.properties; +import org.gcube.com.fasterxml.jackson.databind.annotation.JsonDeserialize; import org.gcube.informationsystem.model.impl.properties.PropagationConstraintImpl; import org.gcube.informationsystem.types.annotations.ISProperty; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; - /** * @author Luca Frosini (ISTI - CNR) * https://wiki.gcube-system.org/gcube/Facet_Based_Resource_Model#Propagation_Constraint diff --git a/src/main/java/org/gcube/informationsystem/model/reference/properties/Property.java b/src/main/java/org/gcube/informationsystem/model/reference/properties/Property.java index 94b6d7e..a902e64 100644 --- a/src/main/java/org/gcube/informationsystem/model/reference/properties/Property.java +++ b/src/main/java/org/gcube/informationsystem/model/reference/properties/Property.java @@ -3,11 +3,10 @@ */ package org.gcube.informationsystem.model.reference.properties; +import org.gcube.com.fasterxml.jackson.databind.annotation.JsonDeserialize; import org.gcube.informationsystem.base.reference.properties.PropertyElement; import org.gcube.informationsystem.model.impl.properties.PropertyImpl; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; - /** * @author Luca Frosini (ISTI - CNR) * Root Class for Property types. It creates a base common type, which is useful diff --git a/src/main/java/org/gcube/informationsystem/model/reference/relations/ConsistsOf.java b/src/main/java/org/gcube/informationsystem/model/reference/relations/ConsistsOf.java index 3b6763f..9e3f1d1 100644 --- a/src/main/java/org/gcube/informationsystem/model/reference/relations/ConsistsOf.java +++ b/src/main/java/org/gcube/informationsystem/model/reference/relations/ConsistsOf.java @@ -3,12 +3,11 @@ */ package org.gcube.informationsystem.model.reference.relations; +import org.gcube.com.fasterxml.jackson.databind.annotation.JsonDeserialize; import org.gcube.informationsystem.model.impl.relations.ConsistsOfImpl; import org.gcube.informationsystem.model.reference.entities.Facet; import org.gcube.informationsystem.model.reference.entities.Resource; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; - /** * @author Luca Frosini (ISTI - CNR) * https://wiki.gcube-system.org/gcube/Facet_Based_Resource_Model#consistsOf 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 66db264..e407e54 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,6 +5,12 @@ package org.gcube.informationsystem.model.reference.relations; import java.util.Map; +import org.gcube.com.fasterxml.jackson.annotation.JsonAnyGetter; +import org.gcube.com.fasterxml.jackson.annotation.JsonAnySetter; +import org.gcube.com.fasterxml.jackson.annotation.JsonGetter; +import org.gcube.com.fasterxml.jackson.annotation.JsonIgnore; +import org.gcube.com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import org.gcube.com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.gcube.informationsystem.base.reference.SchemaMixedElement; import org.gcube.informationsystem.base.reference.relations.RelationElement; import org.gcube.informationsystem.model.reference.entities.Entity; @@ -14,13 +20,6 @@ import org.gcube.informationsystem.types.annotations.Abstract; import org.gcube.informationsystem.types.annotations.ISProperty; import org.gcube.informationsystem.utils.AdditionalPropertiesSerializer; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; - /** * @author Luca Frosini (ISTI - CNR) * https://wiki.gcube-system.org/gcube/Facet_Based_Resource_Model#Relations diff --git a/src/main/java/org/gcube/informationsystem/types/TypeMapper.java b/src/main/java/org/gcube/informationsystem/types/TypeMapper.java index 26eddde..a2e5ced 100644 --- a/src/main/java/org/gcube/informationsystem/types/TypeMapper.java +++ b/src/main/java/org/gcube/informationsystem/types/TypeMapper.java @@ -4,6 +4,10 @@ import java.lang.reflect.Field; import java.util.ArrayList; import java.util.List; +import org.gcube.com.fasterxml.jackson.annotation.JsonTypeName; +import org.gcube.com.fasterxml.jackson.databind.DeserializationFeature; +import org.gcube.com.fasterxml.jackson.databind.JavaType; +import org.gcube.com.fasterxml.jackson.databind.ObjectMapper; import org.gcube.informationsystem.base.reference.Element; import org.gcube.informationsystem.types.impl.TypeImpl; import org.gcube.informationsystem.types.reference.Type; @@ -17,11 +21,6 @@ import org.gcube.informationsystem.types.reference.relations.ConsistsOfType; import org.gcube.informationsystem.types.reference.relations.IsRelatedToType; import org.gcube.informationsystem.types.reference.relations.RelationType; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.JavaType; -import com.fasterxml.jackson.databind.ObjectMapper; - /** * @author Luca Frosini (ISTI - CNR) */ diff --git a/src/main/java/org/gcube/informationsystem/types/annotations/ResourceSchemaEntry.java b/src/main/java/org/gcube/informationsystem/types/annotations/ResourceSchemaEntry.java index 601a8da..536aa98 100644 --- a/src/main/java/org/gcube/informationsystem/types/annotations/ResourceSchemaEntry.java +++ b/src/main/java/org/gcube/informationsystem/types/annotations/ResourceSchemaEntry.java @@ -5,14 +5,13 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +import org.gcube.com.fasterxml.jackson.annotation.JsonProperty; import org.gcube.informationsystem.model.reference.entities.Entity; import org.gcube.informationsystem.model.reference.entities.Facet; import org.gcube.informationsystem.model.reference.relations.ConsistsOf; import org.gcube.informationsystem.types.TypeMapper; import org.gcube.informationsystem.types.reference.properties.PropertyDefinition; -import com.fasterxml.jackson.annotation.JsonProperty; - /** * @author Luca Frosini (ISTI - CNR) * It is used by {@link TypeMapper} to identify which getter method are diff --git a/src/main/java/org/gcube/informationsystem/types/annotations/ResourceSchemaRelatedEntry.java b/src/main/java/org/gcube/informationsystem/types/annotations/ResourceSchemaRelatedEntry.java index 45866a7..e02c64c 100644 --- a/src/main/java/org/gcube/informationsystem/types/annotations/ResourceSchemaRelatedEntry.java +++ b/src/main/java/org/gcube/informationsystem/types/annotations/ResourceSchemaRelatedEntry.java @@ -5,14 +5,13 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +import org.gcube.com.fasterxml.jackson.annotation.JsonProperty; import org.gcube.informationsystem.model.reference.entities.Entity; import org.gcube.informationsystem.model.reference.entities.Resource; import org.gcube.informationsystem.model.reference.relations.IsRelatedTo; import org.gcube.informationsystem.types.TypeMapper; import org.gcube.informationsystem.types.reference.properties.PropertyDefinition; -import com.fasterxml.jackson.annotation.JsonProperty; - /** * @author Luca Frosini (ISTI - CNR) * It is used by {@link TypeMapper} to identify which getter method are diff --git a/src/main/java/org/gcube/informationsystem/types/impl/TypeImpl.java b/src/main/java/org/gcube/informationsystem/types/impl/TypeImpl.java index 83aa498..cb5a824 100644 --- a/src/main/java/org/gcube/informationsystem/types/impl/TypeImpl.java +++ b/src/main/java/org/gcube/informationsystem/types/impl/TypeImpl.java @@ -6,6 +6,9 @@ import java.lang.reflect.TypeVariable; import java.util.HashSet; import java.util.Set; +import org.gcube.com.fasterxml.jackson.annotation.JsonInclude; +import org.gcube.com.fasterxml.jackson.annotation.JsonInclude.Include; +import org.gcube.com.fasterxml.jackson.annotation.JsonProperty; import org.gcube.informationsystem.base.reference.Element; import org.gcube.informationsystem.base.reference.entities.EntityElement; import org.gcube.informationsystem.base.reference.properties.PropertyElement; @@ -23,10 +26,6 @@ import org.gcube.informationsystem.types.reference.properties.PropertyDefinition import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; - public class TypeImpl implements Type { private static Logger logger = LoggerFactory.getLogger(TypeImpl.class); diff --git a/src/main/java/org/gcube/informationsystem/types/impl/entities/EntityTypeImpl.java b/src/main/java/org/gcube/informationsystem/types/impl/entities/EntityTypeImpl.java index 4a4cef6..7d49f2a 100644 --- a/src/main/java/org/gcube/informationsystem/types/impl/entities/EntityTypeImpl.java +++ b/src/main/java/org/gcube/informationsystem/types/impl/entities/EntityTypeImpl.java @@ -2,6 +2,7 @@ package org.gcube.informationsystem.types.impl.entities; import java.io.StringWriter; +import org.gcube.com.fasterxml.jackson.annotation.JsonTypeName; import org.gcube.informationsystem.base.reference.entities.EntityElement; import org.gcube.informationsystem.context.reference.entities.Context; import org.gcube.informationsystem.model.reference.entities.Facet; @@ -11,8 +12,6 @@ import org.gcube.informationsystem.types.impl.TypeImpl; import org.gcube.informationsystem.types.reference.entities.EntityType; import org.gcube.informationsystem.utils.ElementMapper; -import com.fasterxml.jackson.annotation.JsonTypeName; - /** * @author Luca Frosini (ISTI - CNR) */ diff --git a/src/main/java/org/gcube/informationsystem/types/impl/entities/FacetTypeImpl.java b/src/main/java/org/gcube/informationsystem/types/impl/entities/FacetTypeImpl.java index 128ee3c..20acc52 100644 --- a/src/main/java/org/gcube/informationsystem/types/impl/entities/FacetTypeImpl.java +++ b/src/main/java/org/gcube/informationsystem/types/impl/entities/FacetTypeImpl.java @@ -2,13 +2,12 @@ package org.gcube.informationsystem.types.impl.entities; import java.util.Set; +import org.gcube.com.fasterxml.jackson.annotation.JsonTypeName; import org.gcube.informationsystem.model.reference.entities.Entity; import org.gcube.informationsystem.model.reference.entities.Facet; import org.gcube.informationsystem.types.reference.entities.FacetType; import org.gcube.informationsystem.types.reference.properties.PropertyDefinition; -import com.fasterxml.jackson.annotation.JsonTypeName; - /** * @author Luca Frosini (ISTI - CNR) */ diff --git a/src/main/java/org/gcube/informationsystem/types/impl/entities/ResourceTypeImpl.java b/src/main/java/org/gcube/informationsystem/types/impl/entities/ResourceTypeImpl.java index 54c70bb..c7f0dbe 100644 --- a/src/main/java/org/gcube/informationsystem/types/impl/entities/ResourceTypeImpl.java +++ b/src/main/java/org/gcube/informationsystem/types/impl/entities/ResourceTypeImpl.java @@ -3,6 +3,7 @@ package org.gcube.informationsystem.types.impl.entities; import java.util.ArrayList; import java.util.List; +import org.gcube.com.fasterxml.jackson.annotation.JsonTypeName; import org.gcube.informationsystem.model.reference.entities.Entity; import org.gcube.informationsystem.model.reference.entities.Resource; import org.gcube.informationsystem.types.TypeMapper; @@ -13,8 +14,6 @@ import org.gcube.informationsystem.types.impl.properties.LinkedEntityImpl; import org.gcube.informationsystem.types.reference.entities.ResourceType; import org.gcube.informationsystem.types.reference.properties.LinkedEntity; -import com.fasterxml.jackson.annotation.JsonTypeName; - /** * @author Luca Frosini (ISTI - CNR) */ diff --git a/src/main/java/org/gcube/informationsystem/types/impl/properties/LinkedEntityImpl.java b/src/main/java/org/gcube/informationsystem/types/impl/properties/LinkedEntityImpl.java index eeadef9..7357846 100644 --- a/src/main/java/org/gcube/informationsystem/types/impl/properties/LinkedEntityImpl.java +++ b/src/main/java/org/gcube/informationsystem/types/impl/properties/LinkedEntityImpl.java @@ -3,11 +3,10 @@ */ package org.gcube.informationsystem.types.impl.properties; +import org.gcube.com.fasterxml.jackson.annotation.JsonTypeName; import org.gcube.informationsystem.base.impl.properties.PropertyElementImpl; import org.gcube.informationsystem.types.reference.properties.LinkedEntity; -import com.fasterxml.jackson.annotation.JsonTypeName; - /** * @author Luca Frosini (ISTI - CNR) */ diff --git a/src/main/java/org/gcube/informationsystem/types/impl/properties/PropertyDefinitionImpl.java b/src/main/java/org/gcube/informationsystem/types/impl/properties/PropertyDefinitionImpl.java index cd7a291..eb3c5ca 100644 --- a/src/main/java/org/gcube/informationsystem/types/impl/properties/PropertyDefinitionImpl.java +++ b/src/main/java/org/gcube/informationsystem/types/impl/properties/PropertyDefinitionImpl.java @@ -6,6 +6,8 @@ import java.net.URI; import java.net.URL; import java.util.UUID; +import org.gcube.com.fasterxml.jackson.annotation.JsonIgnore; +import org.gcube.com.fasterxml.jackson.annotation.JsonTypeName; import org.gcube.informationsystem.base.reference.Element; import org.gcube.informationsystem.base.reference.properties.PropertyElement; import org.gcube.informationsystem.types.OrientDBType; @@ -17,9 +19,6 @@ import org.gcube.informationsystem.types.reference.properties.PropertyDefinition import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonTypeName; - // @JsonAutoDetect(fieldVisibility=JsonAutoDetect.Visibility.ANY) @JsonTypeName(value=PropertyDefinition.NAME) public final class PropertyDefinitionImpl implements PropertyDefinition { diff --git a/src/main/java/org/gcube/informationsystem/types/impl/properties/PropertyTypeImpl.java b/src/main/java/org/gcube/informationsystem/types/impl/properties/PropertyTypeImpl.java index f40cb82..8da818f 100644 --- a/src/main/java/org/gcube/informationsystem/types/impl/properties/PropertyTypeImpl.java +++ b/src/main/java/org/gcube/informationsystem/types/impl/properties/PropertyTypeImpl.java @@ -2,13 +2,12 @@ package org.gcube.informationsystem.types.impl.properties; import java.util.Set; +import org.gcube.com.fasterxml.jackson.annotation.JsonTypeName; import org.gcube.informationsystem.base.reference.properties.PropertyElement; import org.gcube.informationsystem.types.impl.TypeImpl; import org.gcube.informationsystem.types.reference.properties.PropertyDefinition; import org.gcube.informationsystem.types.reference.properties.PropertyType; -import com.fasterxml.jackson.annotation.JsonTypeName; - @JsonTypeName(value = PropertyType.NAME) public final class PropertyTypeImpl

extends TypeImpl implements PropertyType

{ diff --git a/src/main/java/org/gcube/informationsystem/types/impl/relations/ConsistsOfTypeImpl.java b/src/main/java/org/gcube/informationsystem/types/impl/relations/ConsistsOfTypeImpl.java index 6a4021e..4c6ee45 100644 --- a/src/main/java/org/gcube/informationsystem/types/impl/relations/ConsistsOfTypeImpl.java +++ b/src/main/java/org/gcube/informationsystem/types/impl/relations/ConsistsOfTypeImpl.java @@ -2,6 +2,7 @@ package org.gcube.informationsystem.types.impl.relations; import java.lang.reflect.Type; +import org.gcube.com.fasterxml.jackson.annotation.JsonTypeName; import org.gcube.informationsystem.model.reference.entities.Facet; import org.gcube.informationsystem.model.reference.entities.Resource; import org.gcube.informationsystem.model.reference.relations.ConsistsOf; @@ -12,8 +13,6 @@ import org.gcube.informationsystem.types.reference.entities.FacetType; import org.gcube.informationsystem.types.reference.entities.ResourceType; import org.gcube.informationsystem.types.reference.relations.ConsistsOfType; -import com.fasterxml.jackson.annotation.JsonTypeName; - /** * @author Luca Frosini (ISTI - CNR) */ diff --git a/src/main/java/org/gcube/informationsystem/types/impl/relations/IsRelatedToTypeImpl.java b/src/main/java/org/gcube/informationsystem/types/impl/relations/IsRelatedToTypeImpl.java index 2d452b0..f2c1f8a 100644 --- a/src/main/java/org/gcube/informationsystem/types/impl/relations/IsRelatedToTypeImpl.java +++ b/src/main/java/org/gcube/informationsystem/types/impl/relations/IsRelatedToTypeImpl.java @@ -2,6 +2,7 @@ package org.gcube.informationsystem.types.impl.relations; import java.lang.reflect.Type; +import org.gcube.com.fasterxml.jackson.annotation.JsonTypeName; import org.gcube.informationsystem.model.reference.entities.Resource; import org.gcube.informationsystem.model.reference.relations.IsRelatedTo; import org.gcube.informationsystem.model.reference.relations.Relation; @@ -9,8 +10,6 @@ import org.gcube.informationsystem.types.impl.entities.ResourceTypeImpl; import org.gcube.informationsystem.types.reference.entities.ResourceType; import org.gcube.informationsystem.types.reference.relations.IsRelatedToType; -import com.fasterxml.jackson.annotation.JsonTypeName; - /** * @author Luca Frosini (ISTI - CNR) */ diff --git a/src/main/java/org/gcube/informationsystem/types/impl/relations/RelationTypeImpl.java b/src/main/java/org/gcube/informationsystem/types/impl/relations/RelationTypeImpl.java index 0f295e1..3a54828 100644 --- a/src/main/java/org/gcube/informationsystem/types/impl/relations/RelationTypeImpl.java +++ b/src/main/java/org/gcube/informationsystem/types/impl/relations/RelationTypeImpl.java @@ -3,6 +3,7 @@ package org.gcube.informationsystem.types.impl.relations; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; +import org.gcube.com.fasterxml.jackson.annotation.JsonTypeName; import org.gcube.informationsystem.base.reference.entities.EntityElement; import org.gcube.informationsystem.base.reference.relations.RelationElement; import org.gcube.informationsystem.context.reference.relations.IsParentOf; @@ -15,8 +16,6 @@ import org.gcube.informationsystem.types.impl.entities.EntityTypeImpl; import org.gcube.informationsystem.types.reference.entities.EntityType; import org.gcube.informationsystem.types.reference.relations.RelationType; -import com.fasterxml.jackson.annotation.JsonTypeName; - @JsonTypeName(value = RelationType.NAME) public class RelationTypeImpl extends TypeImpl implements RelationType { 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 3ba546c..6b8c087 100644 --- a/src/main/java/org/gcube/informationsystem/types/reference/Type.java +++ b/src/main/java/org/gcube/informationsystem/types/reference/Type.java @@ -2,12 +2,11 @@ package org.gcube.informationsystem.types.reference; import java.util.Set; +import org.gcube.com.fasterxml.jackson.annotation.JsonIgnoreProperties; 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 diff --git a/src/main/java/org/gcube/informationsystem/types/reference/entities/EntityType.java b/src/main/java/org/gcube/informationsystem/types/reference/entities/EntityType.java index da3b79c..dc3d907 100644 --- a/src/main/java/org/gcube/informationsystem/types/reference/entities/EntityType.java +++ b/src/main/java/org/gcube/informationsystem/types/reference/entities/EntityType.java @@ -2,14 +2,13 @@ package org.gcube.informationsystem.types.reference.entities; import java.util.Set; +import org.gcube.com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import org.gcube.com.fasterxml.jackson.databind.annotation.JsonDeserialize; import org.gcube.informationsystem.base.reference.entities.EntityElement; import org.gcube.informationsystem.types.annotations.ISProperty; import org.gcube.informationsystem.types.impl.entities.EntityTypeImpl; import org.gcube.informationsystem.types.reference.Type; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; - @JsonIgnoreProperties(ignoreUnknown = true) @JsonDeserialize(as = EntityTypeImpl.class) public interface EntityType extends Type, EntityElement { 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 9e4c6a4..c598ca6 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 @@ -2,14 +2,13 @@ package org.gcube.informationsystem.types.reference.entities; import java.util.Set; +import org.gcube.com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import org.gcube.com.fasterxml.jackson.databind.annotation.JsonDeserialize; import org.gcube.informationsystem.types.annotations.ISProperty; import org.gcube.informationsystem.types.impl.entities.FacetTypeImpl; import org.gcube.informationsystem.types.reference.Type; import org.gcube.informationsystem.types.reference.properties.PropertyDefinition; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; - @JsonIgnoreProperties(ignoreUnknown = true) @JsonDeserialize(as = FacetTypeImpl.class) public interface FacetType extends EntityType { diff --git a/src/main/java/org/gcube/informationsystem/types/reference/entities/ResourceType.java b/src/main/java/org/gcube/informationsystem/types/reference/entities/ResourceType.java index 5a6d3d5..e797ac5 100644 --- a/src/main/java/org/gcube/informationsystem/types/reference/entities/ResourceType.java +++ b/src/main/java/org/gcube/informationsystem/types/reference/entities/ResourceType.java @@ -2,12 +2,11 @@ package org.gcube.informationsystem.types.reference.entities; import java.util.List; +import org.gcube.com.fasterxml.jackson.databind.annotation.JsonDeserialize; import org.gcube.informationsystem.types.annotations.ISProperty; import org.gcube.informationsystem.types.impl.entities.ResourceTypeImpl; import org.gcube.informationsystem.types.reference.properties.LinkedEntity; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; - @JsonDeserialize(as=ResourceTypeImpl.class) public interface ResourceType extends EntityType { diff --git a/src/main/java/org/gcube/informationsystem/types/reference/properties/LinkedEntity.java b/src/main/java/org/gcube/informationsystem/types/reference/properties/LinkedEntity.java index 0e36582..9991466 100644 --- a/src/main/java/org/gcube/informationsystem/types/reference/properties/LinkedEntity.java +++ b/src/main/java/org/gcube/informationsystem/types/reference/properties/LinkedEntity.java @@ -1,11 +1,10 @@ package org.gcube.informationsystem.types.reference.properties; +import org.gcube.com.fasterxml.jackson.databind.annotation.JsonDeserialize; import org.gcube.informationsystem.base.reference.properties.PropertyElement; import org.gcube.informationsystem.types.annotations.ISProperty; import org.gcube.informationsystem.types.impl.properties.LinkedEntityImpl; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; - @JsonDeserialize(as=LinkedEntityImpl.class) public interface LinkedEntity extends PropertyElement { diff --git a/src/main/java/org/gcube/informationsystem/types/reference/properties/PropertyDefinition.java b/src/main/java/org/gcube/informationsystem/types/reference/properties/PropertyDefinition.java index e4e5e50..2b850e4 100644 --- a/src/main/java/org/gcube/informationsystem/types/reference/properties/PropertyDefinition.java +++ b/src/main/java/org/gcube/informationsystem/types/reference/properties/PropertyDefinition.java @@ -1,12 +1,11 @@ package org.gcube.informationsystem.types.reference.properties; +import org.gcube.com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import org.gcube.com.fasterxml.jackson.databind.annotation.JsonDeserialize; import org.gcube.informationsystem.base.reference.properties.PropertyElement; import org.gcube.informationsystem.types.annotations.ISProperty; import org.gcube.informationsystem.types.impl.properties.PropertyDefinitionImpl; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; - /** * @author Luca Frosini (ISTI - CNR) * https://wiki.gcube-system.org/gcube/Facet_Based_Resource_Model#Header 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 210b473..48a03d7 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 @@ -2,6 +2,8 @@ package org.gcube.informationsystem.types.reference.properties; import java.util.Set; +import org.gcube.com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import org.gcube.com.fasterxml.jackson.databind.annotation.JsonDeserialize; import org.gcube.informationsystem.base.reference.IdentifiableElement; import org.gcube.informationsystem.base.reference.properties.PropertyElement; import org.gcube.informationsystem.model.reference.properties.Header; @@ -9,9 +11,6 @@ import org.gcube.informationsystem.types.annotations.ISProperty; import org.gcube.informationsystem.types.impl.properties.PropertyTypeImpl; import org.gcube.informationsystem.types.reference.Type; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; - @JsonIgnoreProperties(ignoreUnknown = true) @JsonDeserialize(as = PropertyTypeImpl.class) public interface PropertyType

extends PropertyElement, Type { diff --git a/src/main/java/org/gcube/informationsystem/types/reference/relations/ConsistsOfType.java b/src/main/java/org/gcube/informationsystem/types/reference/relations/ConsistsOfType.java index e434e79..6783677 100644 --- a/src/main/java/org/gcube/informationsystem/types/reference/relations/ConsistsOfType.java +++ b/src/main/java/org/gcube/informationsystem/types/reference/relations/ConsistsOfType.java @@ -1,11 +1,10 @@ package org.gcube.informationsystem.types.reference.relations; +import org.gcube.com.fasterxml.jackson.databind.annotation.JsonDeserialize; import org.gcube.informationsystem.types.impl.relations.ConsistsOfTypeImpl; import org.gcube.informationsystem.types.reference.entities.FacetType; import org.gcube.informationsystem.types.reference.entities.ResourceType; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; - /** * @author Luca Frosini (ISTI - CNR) */ diff --git a/src/main/java/org/gcube/informationsystem/types/reference/relations/IsRelatedToType.java b/src/main/java/org/gcube/informationsystem/types/reference/relations/IsRelatedToType.java index 8270668..06bf6d7 100644 --- a/src/main/java/org/gcube/informationsystem/types/reference/relations/IsRelatedToType.java +++ b/src/main/java/org/gcube/informationsystem/types/reference/relations/IsRelatedToType.java @@ -1,10 +1,9 @@ package org.gcube.informationsystem.types.reference.relations; +import org.gcube.com.fasterxml.jackson.databind.annotation.JsonDeserialize; import org.gcube.informationsystem.types.impl.relations.IsRelatedToTypeImpl; import org.gcube.informationsystem.types.reference.entities.ResourceType; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; - /** * @author Luca Frosini (ISTI - CNR) */ 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 dfcfe77..86dc654 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 @@ -2,6 +2,8 @@ package org.gcube.informationsystem.types.reference.relations; import java.util.Set; +import org.gcube.com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import org.gcube.com.fasterxml.jackson.databind.annotation.JsonDeserialize; import org.gcube.informationsystem.base.reference.relations.RelationElement; import org.gcube.informationsystem.types.annotations.ISProperty; import org.gcube.informationsystem.types.impl.relations.RelationTypeImpl; @@ -9,9 +11,6 @@ import org.gcube.informationsystem.types.reference.Type; import org.gcube.informationsystem.types.reference.entities.EntityType; import org.gcube.informationsystem.types.reference.properties.PropertyDefinition; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; - @JsonIgnoreProperties(ignoreUnknown = true) @JsonDeserialize(as = RelationTypeImpl.class) public interface RelationType diff --git a/src/main/java/org/gcube/informationsystem/utils/AdditionalPropertiesSerializer.java b/src/main/java/org/gcube/informationsystem/utils/AdditionalPropertiesSerializer.java index e76f63b..d608b71 100644 --- a/src/main/java/org/gcube/informationsystem/utils/AdditionalPropertiesSerializer.java +++ b/src/main/java/org/gcube/informationsystem/utils/AdditionalPropertiesSerializer.java @@ -3,12 +3,11 @@ package org.gcube.informationsystem.utils; import java.io.IOException; import java.util.Map; +import org.gcube.com.fasterxml.jackson.core.JsonGenerator; +import org.gcube.com.fasterxml.jackson.databind.SerializerProvider; +import org.gcube.com.fasterxml.jackson.databind.ser.std.StdSerializer; import org.gcube.informationsystem.model.reference.properties.Property; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; - public class AdditionalPropertiesSerializer extends StdSerializer{ public AdditionalPropertiesSerializer() { diff --git a/src/main/java/org/gcube/informationsystem/utils/ElementDeserializer.java b/src/main/java/org/gcube/informationsystem/utils/ElementDeserializer.java index 7f24eba..2b80672 100644 --- a/src/main/java/org/gcube/informationsystem/utils/ElementDeserializer.java +++ b/src/main/java/org/gcube/informationsystem/utils/ElementDeserializer.java @@ -7,26 +7,25 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; +import org.gcube.com.fasterxml.jackson.core.JsonFactory; +import org.gcube.com.fasterxml.jackson.core.JsonParser; +import org.gcube.com.fasterxml.jackson.core.JsonProcessingException; +import org.gcube.com.fasterxml.jackson.core.TreeNode; +import org.gcube.com.fasterxml.jackson.databind.DeserializationContext; +import org.gcube.com.fasterxml.jackson.databind.JavaType; +import org.gcube.com.fasterxml.jackson.databind.JsonNode; +import org.gcube.com.fasterxml.jackson.databind.ObjectMapper; +import org.gcube.com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import org.gcube.com.fasterxml.jackson.databind.exc.InvalidTypeIdException; +import org.gcube.com.fasterxml.jackson.databind.jsontype.TypeDeserializer; +import org.gcube.com.fasterxml.jackson.databind.node.ArrayNode; +import org.gcube.com.fasterxml.jackson.databind.node.JsonNodeType; +import org.gcube.com.fasterxml.jackson.databind.node.ObjectNode; +import org.gcube.com.fasterxml.jackson.databind.node.TextNode; import org.gcube.informationsystem.base.reference.AccessType; import org.gcube.informationsystem.base.reference.Element; import org.gcube.informationsystem.types.TypeMapper; -import com.fasterxml.jackson.core.JsonFactory; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.TreeNode; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.JavaType; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.exc.InvalidTypeIdException; -import com.fasterxml.jackson.databind.jsontype.TypeDeserializer; -import com.fasterxml.jackson.databind.node.ArrayNode; -import com.fasterxml.jackson.databind.node.JsonNodeType; -import com.fasterxml.jackson.databind.node.ObjectNode; -import com.fasterxml.jackson.databind.node.TextNode; - /** * @author Luca Frosini (ISTI - CNR) * diff --git a/src/main/java/org/gcube/informationsystem/utils/ElementMapper.java b/src/main/java/org/gcube/informationsystem/utils/ElementMapper.java index b82de92..c0935a0 100644 --- a/src/main/java/org/gcube/informationsystem/utils/ElementMapper.java +++ b/src/main/java/org/gcube/informationsystem/utils/ElementMapper.java @@ -12,6 +12,20 @@ import java.util.List; import java.util.Map; import java.util.ServiceLoader; +import org.gcube.com.fasterxml.jackson.core.JsonGenerationException; +import org.gcube.com.fasterxml.jackson.core.JsonParseException; +import org.gcube.com.fasterxml.jackson.core.JsonProcessingException; +import org.gcube.com.fasterxml.jackson.databind.DeserializationFeature; +import org.gcube.com.fasterxml.jackson.databind.JavaType; +import org.gcube.com.fasterxml.jackson.databind.JsonMappingException; +import org.gcube.com.fasterxml.jackson.databind.JsonNode; +import org.gcube.com.fasterxml.jackson.databind.ObjectMapper; +import org.gcube.com.fasterxml.jackson.databind.exc.InvalidTypeIdException; +import org.gcube.com.fasterxml.jackson.databind.module.SimpleModule; +import org.gcube.com.fasterxml.jackson.databind.node.ArrayNode; +import org.gcube.com.fasterxml.jackson.databind.node.JsonNodeType; +import org.gcube.com.fasterxml.jackson.databind.node.ObjectNode; +import org.gcube.com.fasterxml.jackson.databind.node.TextNode; import org.gcube.informationsystem.base.reference.AccessType; import org.gcube.informationsystem.base.reference.Element; import org.gcube.informationsystem.types.TypeMapper; @@ -22,21 +36,6 @@ import org.gcube.informationsystem.utils.discovery.SchemaAction; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.fasterxml.jackson.core.JsonGenerationException; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.JavaType; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.exc.InvalidTypeIdException; -import com.fasterxml.jackson.databind.module.SimpleModule; -import com.fasterxml.jackson.databind.node.ArrayNode; -import com.fasterxml.jackson.databind.node.JsonNodeType; -import com.fasterxml.jackson.databind.node.ObjectNode; -import com.fasterxml.jackson.databind.node.TextNode; - /** * @author Luca Frosini (ISTI - CNR) */ diff --git a/src/main/java/org/gcube/informationsystem/utils/Utility.java b/src/main/java/org/gcube/informationsystem/utils/Utility.java index 984a8b3..9370039 100644 --- a/src/main/java/org/gcube/informationsystem/utils/Utility.java +++ b/src/main/java/org/gcube/informationsystem/utils/Utility.java @@ -6,15 +6,14 @@ package org.gcube.informationsystem.utils; import java.io.IOException; import java.util.UUID; +import org.gcube.com.fasterxml.jackson.core.JsonProcessingException; +import org.gcube.com.fasterxml.jackson.databind.JsonNode; +import org.gcube.com.fasterxml.jackson.databind.ObjectMapper; import org.gcube.informationsystem.model.reference.entities.Entity; import org.gcube.informationsystem.model.reference.properties.Header; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; - /** * @author Luca Frosini (ISTI - CNR) *