information-system-model/src/main/java/org/gcube/informationsystem/base/reference/Element.java

40 lines
1.4 KiB
Java
Raw Normal View History

/**
*
*/
package org.gcube.informationsystem.base.reference;
import java.io.Serializable;
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.JsonPropertyOrder;
2020-07-07 17:04:25 +02:00
import org.gcube.com.fasterxml.jackson.annotation.JsonTypeInfo;
import org.gcube.informationsystem.types.annotations.Abstract;
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;
/**
* @author Luca Frosini (ISTI - CNR)
*/
@Abstract
2023-05-12 17:47:58 +02:00
@JsonPropertyOrder({ Element.TYPE_PROPERTY })
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = Element.TYPE_PROPERTY)
// @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)
public interface Element extends Serializable {
public static final String NAME = "Element"; //Element.class.getSimpleName();
public static final String TYPE_PROPERTY = "type";
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
public String getTypeName();
}