2020-02-03 10:51:29 +01:00
|
|
|
package org.gcube.informationsystem.types.reference;
|
|
|
|
|
2020-12-11 17:28:56 +01:00
|
|
|
import java.util.Map;
|
2020-02-03 10:51:29 +01:00
|
|
|
import java.util.Set;
|
|
|
|
|
2021-01-07 11:16:40 +01:00
|
|
|
import org.gcube.com.fasterxml.jackson.annotation.JsonGetter;
|
|
|
|
import org.gcube.com.fasterxml.jackson.annotation.JsonIgnore;
|
2020-07-07 17:04:25 +02:00
|
|
|
import org.gcube.com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
2021-02-11 17:24:22 +01:00
|
|
|
import org.gcube.informationsystem.base.reference.AccessType;
|
2020-02-03 10:51:29 +01:00
|
|
|
import org.gcube.informationsystem.base.reference.IdentifiableElement;
|
|
|
|
import org.gcube.informationsystem.types.annotations.Abstract;
|
2020-02-03 10:57:41 +01:00
|
|
|
import org.gcube.informationsystem.types.reference.properties.PropertyDefinition;
|
2020-12-11 13:09:02 +01:00
|
|
|
import org.gcube.informationsystem.utils.TypeVersion;
|
2020-02-03 10:51:29 +01:00
|
|
|
|
2021-01-20 17:03:02 +01:00
|
|
|
/**
|
|
|
|
* @author Luca Frosini (ISTI - CNR)
|
|
|
|
*/
|
2020-02-03 10:51:29 +01:00
|
|
|
@Abstract
|
|
|
|
@JsonIgnoreProperties(ignoreUnknown=true)
|
2020-12-23 10:08:38 +01:00
|
|
|
@TypeMetadata(name = Type.NAME, description = "This is the base class to define any Type", version = TypeVersion.MINIMAL_VERSION_STRING)
|
|
|
|
@Change(version = TypeVersion.MINIMAL_VERSION_STRING, description = TypeVersion.MINIMAL_VERSION_DESCRIPTION)
|
2020-02-03 10:51:29 +01:00
|
|
|
//@JsonDeserialize(as=TypeImpl.class) Do not uncomment to manage subclasses
|
2020-02-03 10:57:41 +01:00
|
|
|
public interface Type extends IdentifiableElement {
|
2020-02-03 10:51:29 +01:00
|
|
|
|
|
|
|
public static final String NAME = "Type"; //Type.class.getSimpleName();
|
|
|
|
|
|
|
|
public static final String NAME_PROPERTY = "name";
|
|
|
|
public static final String DESCRIPTION_PROPERTY = "description";
|
2020-12-11 09:47:14 +01:00
|
|
|
public static final String VERSION_PROPERTY = "version";
|
2020-12-11 17:28:56 +01:00
|
|
|
public static final String CHANGELOG_PROPERTY = "changelog";
|
2020-02-03 10:51:29 +01:00
|
|
|
public static final String ABSTRACT_PROPERTY = "abstract";
|
|
|
|
public static final String TYPE_SUPERCLASSES_PROPERTY = "superClasses";
|
2020-02-03 10:57:41 +01:00
|
|
|
public static final String PROPERTIES_PROPERTY = "properties";
|
2020-02-03 10:51:29 +01:00
|
|
|
|
|
|
|
public String getName();
|
|
|
|
|
|
|
|
public String getDescription();
|
2020-12-11 13:09:02 +01:00
|
|
|
|
2021-01-07 11:16:40 +01:00
|
|
|
@JsonIgnore
|
2020-12-11 13:09:02 +01:00
|
|
|
public TypeVersion getVersion();
|
2020-12-11 09:47:14 +01:00
|
|
|
|
2021-01-07 11:16:40 +01:00
|
|
|
@JsonGetter(value = VERSION_PROPERTY)
|
|
|
|
public String getVersionAsString();
|
|
|
|
|
|
|
|
@JsonIgnore
|
2020-12-11 17:28:56 +01:00
|
|
|
public Map<TypeVersion, String> getChangelog();
|
|
|
|
|
2021-01-07 11:16:40 +01:00
|
|
|
@JsonGetter(value = CHANGELOG_PROPERTY)
|
2021-01-15 17:57:06 +01:00
|
|
|
public Map<String, String> getChangelogWithVersionAsString();
|
2021-01-07 11:16:40 +01:00
|
|
|
|
2020-02-03 10:51:29 +01:00
|
|
|
public boolean isAbstract();
|
|
|
|
|
|
|
|
public Set<String> getSuperClasses();
|
|
|
|
|
2020-02-03 10:57:41 +01:00
|
|
|
public Set<PropertyDefinition> getProperties();
|
2021-02-11 17:24:22 +01:00
|
|
|
|
|
|
|
@JsonIgnore
|
|
|
|
public default AccessType getAccessType() {
|
|
|
|
return null;
|
|
|
|
}
|
2020-02-03 10:57:41 +01:00
|
|
|
|
2020-02-03 10:51:29 +01:00
|
|
|
}
|