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

44 lines
1.8 KiB
Java

package org.gcube.informationsystem.types.reference.properties;
import java.util.Set;
import org.gcube.informationsystem.base.reference.properties.BaseProperty;
import org.gcube.informationsystem.types.annotations.ISProperty;
import org.gcube.informationsystem.types.impl.properties.PropertyTypeDefinitionImpl;
import org.gcube.informationsystem.types.reference.TypeDefinition;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonDeserialize(as = PropertyTypeDefinitionImpl.class)
public interface PropertyTypeDefinition<P extends BaseProperty> extends TypeDefinition, BaseProperty {
public static final String NAME = "PropertyTypeDefinition"; // PropertyTypeDefinition.class.getSimpleName();
/* TypeDefinition is just a Java useful class. The type is not created in the IS. Hence the fields must be redefined */
@Override
@ISProperty(name = TypeDefinition.NAME_PROPERTY, readonly = true, mandatory = true, nullable = false)
public String getName();
@Override
@ISProperty(name = TypeDefinition.DESCRIPTION_PROPERTY, readonly = false, mandatory = true, nullable = false)
public String getDescription();
@Override
@ISProperty(name = TypeDefinition.ABSTRACT_PROPERTY, readonly = true, mandatory = true, nullable = false)
public boolean isAbstract();
@Override
@ISProperty(name = TypeDefinition.TYPE_SUPERCLASSES_PROPERTY, readonly = true, mandatory = true, nullable = false)
public Set<String> getSuperClasses();
@Override
@ISProperty(name = TypeDefinition.PROPERTIES_PROPERTY, readonly = false, mandatory = true, nullable = false)
public Set<PropertyDefinition> getProperties();
/* TypeDefinition is just a Java useful class. The type is not created in the IS. Hence the fields must be redefined */
}