61 lines
2.1 KiB
Java
61 lines
2.1 KiB
Java
package org.gcube.informationsystem.types.reference;
|
|
|
|
import java.util.Map;
|
|
import java.util.Set;
|
|
|
|
import org.gcube.com.fasterxml.jackson.annotation.JsonGetter;
|
|
import org.gcube.com.fasterxml.jackson.annotation.JsonIgnore;
|
|
import org.gcube.com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
|
import org.gcube.informationsystem.base.reference.AccessType;
|
|
import org.gcube.informationsystem.base.reference.IdentifiableElement;
|
|
import org.gcube.informationsystem.types.annotations.Abstract;
|
|
import org.gcube.informationsystem.types.reference.properties.PropertyDefinition;
|
|
import org.gcube.informationsystem.utils.Version;
|
|
|
|
/**
|
|
* @author Luca Frosini (ISTI - CNR)
|
|
*/
|
|
@Abstract
|
|
@JsonIgnoreProperties(ignoreUnknown=true)
|
|
@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)
|
|
//@JsonDeserialize(as=TypeImpl.class) Do not uncomment to manage subclasses
|
|
public interface Type extends IdentifiableElement {
|
|
|
|
public static final String NAME = "Type"; //Type.class.getSimpleName();
|
|
|
|
public static final String NAME_PROPERTY = "name";
|
|
public static final String DESCRIPTION_PROPERTY = "description";
|
|
public static final String VERSION_PROPERTY = "version";
|
|
public static final String CHANGELOG_PROPERTY = "changelog";
|
|
public static final String ABSTRACT_PROPERTY = "abstract";
|
|
public static final String TYPE_SUPERCLASSES_PROPERTY = "superClasses";
|
|
public static final String PROPERTIES_PROPERTY = "properties";
|
|
|
|
public String getName();
|
|
|
|
public String getDescription();
|
|
|
|
@JsonIgnore
|
|
public Version getVersion();
|
|
|
|
@JsonGetter(value = VERSION_PROPERTY)
|
|
public String getVersionAsString();
|
|
|
|
@JsonIgnore
|
|
public Map<Version, String> getChangelog();
|
|
|
|
@JsonGetter(value = CHANGELOG_PROPERTY)
|
|
public Map<String, String> getChangelogWithVersionAsString();
|
|
|
|
public boolean isAbstract();
|
|
|
|
public Set<String> getSuperClasses();
|
|
|
|
public Set<PropertyDefinition> getProperties();
|
|
|
|
@JsonIgnore
|
|
public AccessType getAccessType();
|
|
|
|
}
|