information-system-model/src/main/java/org/gcube/informationsystem/types/reference/Type.java

61 lines
2.1 KiB
Java
Raw Normal View History

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;
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;
2021-10-21 10:11:45 +02:00
import org.gcube.informationsystem.utils.Version;
2020-02-03 10:51:29 +01:00
/**
* @author Luca Frosini (ISTI - CNR)
*/
2020-02-03 10:51:29 +01:00
@Abstract
@JsonIgnoreProperties(ignoreUnknown=true)
2021-10-21 10:11:45 +02:00
@TypeMetadata(name = Type.NAME, description = "This is the base class to define any Type", version = Version.MINIMAL_VERSION_STRING)
@Change(version = Version.MINIMAL_VERSION_STRING, description = Version.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();
2021-01-07 11:16:40 +01:00
@JsonIgnore
2021-10-21 10:11:45 +02:00
public Version 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
2021-10-21 10:11:45 +02:00
public Map<Version, String> getChangelog();
2020-12-11 17:28:56 +01:00
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();
@JsonIgnore
public AccessType getAccessType();
2020-02-03 10:57:41 +01:00
2020-02-03 10:51:29 +01:00
}