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

41 lines
1.6 KiB
Java
Raw Normal View History

package org.gcube.informationsystem.types.reference;
import java.util.Set;
2019-10-24 11:26:49 +02:00
import org.gcube.informationsystem.base.reference.ISManageable;
2019-10-24 15:03:14 +02:00
import org.gcube.informationsystem.types.annotations.Abstract;
import org.gcube.informationsystem.types.annotations.ISProperty;
import org.gcube.informationsystem.types.reference.properties.PropertyDefinition;
2019-10-24 15:03:14 +02:00
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
@Abstract
@JsonIgnoreProperties(ignoreUnknown=true)
//@JsonDeserialize(as=TypeDefinitionImpl.class) Do not uncomment to manage subclasses
2019-11-04 18:06:46 +01:00
public interface TypeDefinition extends ISManageable {
public static final String NAME = "TypeDefinition"; //TypeDefinition.class.getSimpleName();
2019-10-24 15:03:14 +02:00
public static final String NAME_PROPERTY = "name";
public static final String DESCRIPTION_PROPERTY = "description";
public static final String ABSTRACT_PROPERTY = "abstract";
2019-10-30 09:57:14 +01:00
public static final String TYPE_SUPERCLASSES_PROPERTY = "superClasses";
public static final String PROPERTIES_PROPERTY = "properties";
@ISProperty(name = NAME_PROPERTY, readonly = true, mandatory = true, nullable = false)
public String getName();
@ISProperty(name = DESCRIPTION_PROPERTY, readonly = false, mandatory = true, nullable = false)
public String getDescription();
@ISProperty(name = ABSTRACT_PROPERTY, readonly = true, mandatory = true, nullable = false)
public boolean isAbstract();
2019-10-30 09:57:14 +01:00
@ISProperty(name = TYPE_SUPERCLASSES_PROPERTY, readonly = true, mandatory = true, nullable = false)
public Set<String> getSuperClasses();
@ISProperty(name = PROPERTIES_PROPERTY, readonly = false, mandatory = true, nullable = false)
public Set<PropertyDefinition> getProperties();
}