Switching to gcube-jackson
This commit is contained in:
parent
181e7b1a83
commit
b319ea8e8e
|
@ -0,0 +1,2 @@
|
||||||
|
/org.eclipse.core.resources.prefs
|
||||||
|
/org.eclipse.jdt.core.prefs
|
8
pom.xml
8
pom.xml
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
<groupId>org.gcube.data.publishing</groupId>
|
<groupId>org.gcube.data.publishing</groupId>
|
||||||
<artifactId>document-store-lib</artifactId>
|
<artifactId>document-store-lib</artifactId>
|
||||||
<version>2.5.1-SNAPSHOT</version>
|
<version>3.0.0-SNAPSHOT</version>
|
||||||
<name>Document Store Library</name>
|
<name>Document Store Library</name>
|
||||||
<description>
|
<description>
|
||||||
Document Store Library:
|
Document Store Library:
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.distribution</groupId>
|
<groupId>org.gcube.distribution</groupId>
|
||||||
<artifactId>gcube-bom</artifactId>
|
<artifactId>gcube-bom</artifactId>
|
||||||
<version>1.4.0</version>
|
<version>2.0.0-SNAPSHOT</version>
|
||||||
<type>pom</type>
|
<type>pom</type>
|
||||||
<scope>import</scope>
|
<scope>import</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
@ -52,8 +52,8 @@
|
||||||
<artifactId>slf4j-api</artifactId>
|
<artifactId>slf4j-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.fasterxml.jackson.core</groupId>
|
<groupId>org.gcube.common</groupId>
|
||||||
<artifactId>jackson-databind</artifactId>
|
<artifactId>gcube-jackson-databind</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- Test Dependencies -->
|
<!-- Test Dependencies -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -81,10 +81,10 @@ public class ExecutorUtils {
|
||||||
//shutdown the persitentBackendRediscoveryThread
|
//shutdown the persitentBackendRediscoveryThread
|
||||||
pool.shutdown();
|
pool.shutdown();
|
||||||
try {
|
try {
|
||||||
if(!pool.awaitTermination(100, TimeUnit.MILLISECONDS)) {
|
if(!pool.awaitTermination(1000, TimeUnit.MILLISECONDS)) {
|
||||||
pool.shutdownNow(); // Cancel currently executing tasks
|
pool.shutdownNow(); // Cancel currently executing tasks
|
||||||
// Wait a while for tasks to respond to being cancelled
|
// Wait a while for tasks to respond to being cancelled
|
||||||
if (!pool.awaitTermination(100, TimeUnit.MILLISECONDS)) {
|
if (!pool.awaitTermination(1000, TimeUnit.MILLISECONDS)) {
|
||||||
logger.error("Unable to shutdown the pool {}", pool);
|
logger.error("Unable to shutdown the pool {}", pool);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -176,6 +176,7 @@ public abstract class PersistenceBackendFactory {
|
||||||
persistence = persistenceBackends.get(context);
|
persistence = persistenceBackends.get(context);
|
||||||
logger.trace("{} in context {} is {}", PersistenceBackend.class.getSimpleName(), context, persistence);
|
logger.trace("{} in context {} is {}", PersistenceBackend.class.getSimpleName(), context, persistence);
|
||||||
if(persistence==null){
|
if(persistence==null){
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Setting FallbackPersistence and unlocking.
|
* Setting FallbackPersistence and unlocking.
|
||||||
* There will be another thread which will try to discover the
|
* There will be another thread which will try to discover the
|
||||||
|
|
|
@ -6,6 +6,7 @@ package org.gcube.documentstore.records;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
import org.gcube.com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import org.gcube.documentstore.exception.InvalidValueException;
|
import org.gcube.documentstore.exception.InvalidValueException;
|
||||||
import org.gcube.documentstore.exception.NotAggregatableRecordsExceptions;
|
import org.gcube.documentstore.exception.NotAggregatableRecordsExceptions;
|
||||||
import org.gcube.documentstore.records.implementation.AggregatedField;
|
import org.gcube.documentstore.records.implementation.AggregatedField;
|
||||||
|
@ -14,8 +15,6 @@ import org.gcube.documentstore.records.implementation.validations.annotations.Va
|
||||||
import org.gcube.documentstore.records.implementation.validations.annotations.ValidInteger;
|
import org.gcube.documentstore.records.implementation.validations.annotations.ValidInteger;
|
||||||
import org.gcube.documentstore.records.implementation.validations.annotations.ValidLong;
|
import org.gcube.documentstore.records.implementation.validations.annotations.ValidLong;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR)
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
|
|
|
@ -7,17 +7,16 @@ import java.io.Reader;
|
||||||
import java.io.Writer;
|
import java.io.Writer;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
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.documentstore.records.implementation.AbstractRecord;
|
import org.gcube.documentstore.records.implementation.AbstractRecord;
|
||||||
|
|
||||||
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;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR)
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -2,8 +2,8 @@ package org.gcube.documentstore.records;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.deser.std.StringDeserializer;
|
import org.gcube.com.fasterxml.jackson.databind.deser.std.StringDeserializer;
|
||||||
import com.fasterxml.jackson.databind.module.SimpleModule;
|
import org.gcube.com.fasterxml.jackson.databind.module.SimpleModule;
|
||||||
|
|
||||||
public class IdentifiableDeserializableModule extends SimpleModule {
|
public class IdentifiableDeserializableModule extends SimpleModule {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -9,14 +9,13 @@ import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.SortedSet;
|
import java.util.SortedSet;
|
||||||
|
|
||||||
|
import org.gcube.com.fasterxml.jackson.annotation.JsonAnyGetter;
|
||||||
|
import org.gcube.com.fasterxml.jackson.annotation.JsonAnySetter;
|
||||||
|
import org.gcube.com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
import org.gcube.com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import org.gcube.documentstore.exception.InvalidValueException;
|
import org.gcube.documentstore.exception.InvalidValueException;
|
||||||
import org.gcube.documentstore.records.implementation.RequiredField;
|
import org.gcube.documentstore.records.implementation.RequiredField;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonAnyGetter;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR)
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*
|
*
|
||||||
|
|
|
@ -12,12 +12,11 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
import org.gcube.com.fasterxml.jackson.databind.JsonNode;
|
||||||
import org.gcube.documentstore.exception.InvalidValueException;
|
import org.gcube.documentstore.exception.InvalidValueException;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR)
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -19,6 +19,7 @@ import java.util.SortedSet;
|
||||||
import java.util.TreeSet;
|
import java.util.TreeSet;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
import org.gcube.com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import org.gcube.documentstore.exception.InvalidValueException;
|
import org.gcube.documentstore.exception.InvalidValueException;
|
||||||
import org.gcube.documentstore.records.AggregatedRecord;
|
import org.gcube.documentstore.records.AggregatedRecord;
|
||||||
import org.gcube.documentstore.records.Record;
|
import org.gcube.documentstore.records.Record;
|
||||||
|
@ -28,8 +29,6 @@ import org.gcube.documentstore.records.implementation.validations.validators.Val
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR)
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
|
|
Loading…
Reference in New Issue