2019-03-22 15:18:23 +01:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
2019-10-23 16:55:48 +02:00
|
|
|
package org.gcube.informationsystem.base.reference;
|
|
|
|
|
|
|
|
import java.io.Serializable;
|
2023-04-27 16:30:10 +02:00
|
|
|
import java.util.List;
|
2019-03-22 15:18:23 +01:00
|
|
|
|
2023-04-27 16:30:10 +02:00
|
|
|
import org.gcube.com.fasterxml.jackson.annotation.JsonGetter;
|
2023-04-27 10:59:20 +02:00
|
|
|
import org.gcube.com.fasterxml.jackson.annotation.JsonIgnore;
|
2023-04-27 16:30:10 +02:00
|
|
|
import org.gcube.com.fasterxml.jackson.annotation.JsonInclude;
|
|
|
|
import org.gcube.com.fasterxml.jackson.annotation.JsonInclude.Include;
|
|
|
|
import org.gcube.com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
2020-07-07 17:04:25 +02:00
|
|
|
import org.gcube.com.fasterxml.jackson.annotation.JsonTypeInfo;
|
2019-03-22 15:18:23 +01:00
|
|
|
import org.gcube.informationsystem.types.annotations.Abstract;
|
2020-12-15 11:28:34 +01:00
|
|
|
import org.gcube.informationsystem.types.reference.Change;
|
|
|
|
import org.gcube.informationsystem.types.reference.TypeMetadata;
|
2021-10-21 10:11:45 +02:00
|
|
|
import org.gcube.informationsystem.utils.Version;
|
2019-03-22 15:18:23 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @author Luca Frosini (ISTI - CNR)
|
|
|
|
*/
|
|
|
|
@Abstract
|
2023-04-27 16:30:10 +02:00
|
|
|
@JsonPropertyOrder({ Element.TYPE_PROPERTY, Element.SUPERTYPES_PROPERTY })
|
2023-04-27 10:40:36 +02:00
|
|
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = Element.TYPE_PROPERTY)
|
2020-07-02 18:05:15 +02:00
|
|
|
// @JsonTypeIdResolver(ElementTypeIdResolver.class)
|
2023-04-26 21:39:57 +02:00
|
|
|
@TypeMetadata(name = Element.NAME, description = "This is the base type for Element", version = Version.MINIMAL_VERSION_STRING)
|
2021-10-21 10:11:45 +02:00
|
|
|
@Change(version = Version.MINIMAL_VERSION_STRING, description = Version.MINIMAL_VERSION_DESCRIPTION)
|
2020-01-30 10:26:43 +01:00
|
|
|
public interface Element extends Serializable {
|
2019-03-22 15:18:23 +01:00
|
|
|
|
2020-01-30 10:26:43 +01:00
|
|
|
public static final String NAME = "Element"; //Element.class.getSimpleName();
|
2019-03-22 15:18:23 +01:00
|
|
|
|
2023-04-27 10:40:36 +02:00
|
|
|
public static final String TYPE_PROPERTY = "type";
|
2019-03-22 15:18:23 +01:00
|
|
|
|
2023-04-27 10:40:36 +02:00
|
|
|
public static final String SUPERTYPES_PROPERTY = "supertypes";
|
2019-03-22 15:18:23 +01:00
|
|
|
|
2020-02-04 09:44:10 +01:00
|
|
|
/**
|
|
|
|
* DateTime Pattern to be used to serialize Dates in every element
|
|
|
|
*/
|
|
|
|
public static final String DATETIME_PATTERN = "yyyy-MM-dd HH:mm:ss.SSS Z";
|
|
|
|
|
2023-04-27 10:59:20 +02:00
|
|
|
@JsonIgnore
|
2023-04-27 10:50:37 +02:00
|
|
|
public String getTypeName();
|
|
|
|
|
2023-04-28 15:18:52 +02:00
|
|
|
@JsonInclude(Include.NON_EMPTY)
|
2023-04-27 16:30:10 +02:00
|
|
|
@JsonGetter(value = SUPERTYPES_PROPERTY)
|
|
|
|
public List<String> getSupertypes();
|
|
|
|
|
2019-03-22 15:18:23 +01:00
|
|
|
}
|