diff --git a/record-api-model/src/main/java/eu/europeana/api/record/io/RecordIOConfig.java b/record-api-model/src/main/java/eu/europeana/api/record/io/RecordIOConfig.java index 6db3b1a..fd0475a 100644 --- a/record-api-model/src/main/java/eu/europeana/api/record/io/RecordIOConfig.java +++ b/record-api-model/src/main/java/eu/europeana/api/record/io/RecordIOConfig.java @@ -1,6 +1,5 @@ package eu.europeana.api.record.io; - import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.module.SimpleModule; diff --git a/record-api-model/src/main/java/eu/europeana/api/record/io/json/CompactSerializer.java b/record-api-model/src/main/java/eu/europeana/api/record/io/json/CompactSerializer.java index f877a23..7a058fa 100755 --- a/record-api-model/src/main/java/eu/europeana/api/record/io/json/CompactSerializer.java +++ b/record-api-model/src/main/java/eu/europeana/api/record/io/json/CompactSerializer.java @@ -1,6 +1,3 @@ -/** - * - */ package eu.europeana.api.record.io.json; import com.fasterxml.jackson.core.JsonGenerator; @@ -20,8 +17,6 @@ */ public class CompactSerializer extends JsonSerializer { - public static final CompactSerializer INSTANCE = new CompactSerializer(); - public boolean isEmpty(SerializerProvider provider, Object value) { if (value == null ) { return true; } if ( value instanceof Collection ) { return ((Collection)value).isEmpty(); } diff --git a/record-api-model/src/main/java/eu/europeana/api/record/io/json/Context.java b/record-api-model/src/main/java/eu/europeana/api/record/io/json/Context.java index 7e35d3c..98a337e 100755 --- a/record-api-model/src/main/java/eu/europeana/api/record/io/json/Context.java +++ b/record-api-model/src/main/java/eu/europeana/api/record/io/json/Context.java @@ -1,14 +1,10 @@ -/** - * - */ package eu.europeana.api.record.io.json; /** * @author Hugo * @since 15 Sep 2023 */ -public class Context -{ +public class Context { private String base; public Context(String uri) { base = uri; } diff --git a/record-api-model/src/main/java/eu/europeana/api/record/io/json/ContextSerializer.java b/record-api-model/src/main/java/eu/europeana/api/record/io/json/ContextSerializer.java index 6127bfd..4a38a45 100755 --- a/record-api-model/src/main/java/eu/europeana/api/record/io/json/ContextSerializer.java +++ b/record-api-model/src/main/java/eu/europeana/api/record/io/json/ContextSerializer.java @@ -1,6 +1,3 @@ -/** - * - */ package eu.europeana.api.record.io.json; import com.fasterxml.jackson.core.JsonGenerator; diff --git a/record-api-model/src/main/java/eu/europeana/api/record/io/json/DatatypeSerializer.java b/record-api-model/src/main/java/eu/europeana/api/record/io/json/DatatypeSerializer.java index 1395492..76961e5 100755 --- a/record-api-model/src/main/java/eu/europeana/api/record/io/json/DatatypeSerializer.java +++ b/record-api-model/src/main/java/eu/europeana/api/record/io/json/DatatypeSerializer.java @@ -1,6 +1,3 @@ -/** - * - */ package eu.europeana.api.record.io.json; import com.fasterxml.jackson.core.JsonGenerator; diff --git a/record-api-model/src/main/java/eu/europeana/api/record/io/json/EDMClassReferenceSerializer.java b/record-api-model/src/main/java/eu/europeana/api/record/io/json/EDMClassReferenceSerializer.java index 592d6d9..26ae9a1 100755 --- a/record-api-model/src/main/java/eu/europeana/api/record/io/json/EDMClassReferenceSerializer.java +++ b/record-api-model/src/main/java/eu/europeana/api/record/io/json/EDMClassReferenceSerializer.java @@ -1,6 +1,3 @@ -/** - * - */ package eu.europeana.api.record.io.json; import com.fasterxml.jackson.core.JsonGenerator; diff --git a/record-api-model/src/main/java/eu/europeana/api/record/io/json/FullTextResourceSerializer.java b/record-api-model/src/main/java/eu/europeana/api/record/io/json/FullTextResourceSerializer.java index 2357a4b..3920e86 100755 --- a/record-api-model/src/main/java/eu/europeana/api/record/io/json/FullTextResourceSerializer.java +++ b/record-api-model/src/main/java/eu/europeana/api/record/io/json/FullTextResourceSerializer.java @@ -1,6 +1,3 @@ -/** - * - */ package eu.europeana.api.record.io.json; import com.fasterxml.jackson.core.JsonGenerator; diff --git a/record-api-model/src/main/java/eu/europeana/api/record/io/json/LanguageMapArraySerializer.java b/record-api-model/src/main/java/eu/europeana/api/record/io/json/LanguageMapArraySerializer.java index 60072ae..6834ade 100755 --- a/record-api-model/src/main/java/eu/europeana/api/record/io/json/LanguageMapArraySerializer.java +++ b/record-api-model/src/main/java/eu/europeana/api/record/io/json/LanguageMapArraySerializer.java @@ -1,6 +1,3 @@ -/** - * - */ package eu.europeana.api.record.io.json; import com.fasterxml.jackson.core.JsonGenerator; diff --git a/record-api-model/src/main/java/eu/europeana/api/record/io/json/LanguageMapSerializer.java b/record-api-model/src/main/java/eu/europeana/api/record/io/json/LanguageMapSerializer.java index 85f22b8..38c2b74 100755 --- a/record-api-model/src/main/java/eu/europeana/api/record/io/json/LanguageMapSerializer.java +++ b/record-api-model/src/main/java/eu/europeana/api/record/io/json/LanguageMapSerializer.java @@ -1,6 +1,3 @@ -/** - * - */ package eu.europeana.api.record.io.json; import com.fasterxml.jackson.core.JsonGenerator; diff --git a/record-api-model/src/main/java/eu/europeana/api/record/io/json/ObjectReferenceSerializer.java b/record-api-model/src/main/java/eu/europeana/api/record/io/json/ObjectReferenceSerializer.java index 468446c..a2d128c 100755 --- a/record-api-model/src/main/java/eu/europeana/api/record/io/json/ObjectReferenceSerializer.java +++ b/record-api-model/src/main/java/eu/europeana/api/record/io/json/ObjectReferenceSerializer.java @@ -1,6 +1,3 @@ -/** - * - */ package eu.europeana.api.record.io.json; import com.fasterxml.jackson.core.JsonGenerator; diff --git a/record-api-web/src/main/java/eu/europeana/api/record/config/JsonLdSerializationConfig.java b/record-api-web/src/main/java/eu/europeana/api/record/config/JsonLdSerializationConfig.java deleted file mode 100644 index 7ea6500..0000000 --- a/record-api-web/src/main/java/eu/europeana/api/record/config/JsonLdSerializationConfig.java +++ /dev/null @@ -1,52 +0,0 @@ -package eu.europeana.api.record.config; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule; -import eu.europeana.api.config.AppConfigConstants; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.Primary; -import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder; - -import java.text.DateFormat; -import java.text.SimpleDateFormat; - -@Configuration -public class JsonLdSerializationConfig { - - private final DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXX"); -// -// @Primary -// @Bean(AppConfigConstants.BEAN_JSON_MAPPER) -// public ObjectMapper mapper() { -// ObjectMapper mapper = -// new Jackson2ObjectMapperBuilder() -// .defaultUseWrapper(false) -// .dateFormat(dateFormat) -// .featuresToEnable(DeserializationFeature.UNWRAP_SINGLE_VALUE_ARRAYS) -// .serializationInclusion(JsonInclude.Include.NON_NULL) -// .build(); -// -// mapper.setVisibility( -// mapper.getVisibilityChecker() -// .withCreatorVisibility(NONE) -// .withFieldVisibility(NONE) -// .withGetterVisibility(NONE) -// .withIsGetterVisibility(NONE) -// .withSetterVisibility(NONE)); -// mapper.findAndRegisterModules(); -// -// return mapper; -// } -// -// -// @Bean -// public com.fasterxml.jackson.databind.Module jaxbAnnotationModule() { -// return new JaxbAnnotationModule(); -// } - - -}