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

41 lines
1.6 KiB
Java

package org.gcube.informationsystem.types.reference;
import java.util.Set;
import org.gcube.informationsystem.base.reference.ISManageable;
import org.gcube.informationsystem.types.annotations.Abstract;
import org.gcube.informationsystem.types.annotations.ISProperty;
import org.gcube.informationsystem.types.reference.properties.PropertyDefinition;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
@Abstract
@JsonIgnoreProperties(ignoreUnknown=true)
//@JsonDeserialize(as=TypeDefinitionImpl.class) Do not uncomment to manage subclasses
public interface TypeDefinition extends ISManageable {
public static final String NAME = "TypeDefinition"; //TypeDefinition.class.getSimpleName();
public static final String NAME_PROPERTY = "name";
public static final String DESCRIPTION_PROPERTY = "description";
public static final String ABSTRACT_PROPERTY = "abstract";
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();
@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();
}