Class Serialization
- java.lang.Object
-
- org.gcube.application.cms.serialization.Serialization
-
public class Serialization extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static DateTimeFormatterFULL_FORMATTERstatic com.fasterxml.jackson.databind.ObjectMappermapper
-
Constructor Summary
Constructors Constructor Description Serialization()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.bson.DocumentasDocument(Object obj)static org.bson.DocumentasDocumentWithId(org.gcube.application.geoportal.common.model.document.Project doc)static <T> Tconvert(Object d, Class<T> clazz)static <T> TconvertAcceptStringAsNull(Object d, Class<T> clazz)static org.gcube.application.geoportal.common.model.rest.QueryRequestparseQuery(String queryString)static <T> Tread(String jsonString, Class<T> clazz)static <T> Iterator<T>readCollection(String jsonString, Class<T> clazz)static Stringwrite(Object toWrite)
-
-
-
Field Detail
-
FULL_FORMATTER
public static final DateTimeFormatter FULL_FORMATTER
-
mapper
public static com.fasterxml.jackson.databind.ObjectMapper mapper
-
-
Method Detail
-
read
public static <T> T read(String jsonString, Class<T> clazz) throws com.fasterxml.jackson.core.JsonProcessingException, IOException
- Throws:
com.fasterxml.jackson.core.JsonProcessingExceptionIOException
-
readCollection
public static <T> Iterator<T> readCollection(String jsonString, Class<T> clazz) throws IOException
- Throws:
IOException
-
write
public static String write(Object toWrite) throws com.fasterxml.jackson.core.JsonProcessingException
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
parseQuery
public static org.gcube.application.geoportal.common.model.rest.QueryRequest parseQuery(String queryString) throws IOException
- Throws:
IOException
-
convertAcceptStringAsNull
public static final <T> T convertAcceptStringAsNull(Object d, Class<T> clazz)
-
asDocument
public static final org.bson.Document asDocument(Object obj) throws com.fasterxml.jackson.core.JsonProcessingException
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
asDocumentWithId
public static final org.bson.Document asDocumentWithId(org.gcube.application.geoportal.common.model.document.Project doc) throws com.fasterxml.jackson.core.JsonProcessingException- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-