2019-10-24 11:26:49 +02:00
|
|
|
package org.gcube.informationsystem.types.reference.properties;
|
|
|
|
|
2019-10-30 09:57:14 +01:00
|
|
|
import java.util.Set;
|
|
|
|
|
2020-02-03 10:51:29 +01:00
|
|
|
import org.gcube.informationsystem.base.reference.IdentifiableElement;
|
2020-01-30 10:26:43 +01:00
|
|
|
import org.gcube.informationsystem.base.reference.properties.PropertyElement;
|
2020-01-20 10:24:55 +01:00
|
|
|
import org.gcube.informationsystem.model.reference.properties.Header;
|
2019-10-30 09:57:14 +01:00
|
|
|
import org.gcube.informationsystem.types.annotations.ISProperty;
|
2020-01-30 10:26:43 +01:00
|
|
|
import org.gcube.informationsystem.types.impl.properties.PropertyTypeImpl;
|
2020-02-03 10:51:29 +01:00
|
|
|
import org.gcube.informationsystem.types.reference.Type;
|
|
|
|
import org.gcube.informationsystem.types.reference.TypeWithProperties;
|
2019-10-24 11:26:49 +02:00
|
|
|
|
2019-10-24 15:03:14 +02:00
|
|
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
|
|
|
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
2019-10-24 11:26:49 +02:00
|
|
|
|
2019-10-24 15:03:14 +02:00
|
|
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
2020-01-30 10:26:43 +01:00
|
|
|
@JsonDeserialize(as = PropertyTypeImpl.class)
|
2020-02-03 10:51:29 +01:00
|
|
|
public interface PropertyType<P extends PropertyElement> extends PropertyElement, Type {
|
2019-10-24 11:26:49 +02:00
|
|
|
|
2020-01-30 10:26:43 +01:00
|
|
|
public static final String NAME = "PropertyType"; // PropertyTypeDefinition.class.getSimpleName();
|
2019-10-24 11:26:49 +02:00
|
|
|
|
2020-02-03 10:51:29 +01:00
|
|
|
@ISProperty(name=IdentifiableElement.HEADER_PROPERTY, mandatory=true, nullable=false)
|
2019-11-05 18:42:02 +01:00
|
|
|
public Header getHeader();
|
|
|
|
|
|
|
|
public void setHeader(Header header);
|
|
|
|
|
2019-10-30 09:57:14 +01:00
|
|
|
/* TypeDefinition is just a Java useful class. The type is not created in the IS. Hence the fields must be redefined */
|
|
|
|
|
|
|
|
@Override
|
2020-02-03 10:51:29 +01:00
|
|
|
@ISProperty(name = Type.NAME_PROPERTY, readonly = true, mandatory = true, nullable = false)
|
2019-10-30 09:57:14 +01:00
|
|
|
public String getName();
|
|
|
|
|
|
|
|
@Override
|
2020-02-03 10:51:29 +01:00
|
|
|
@ISProperty(name = Type.DESCRIPTION_PROPERTY, readonly = false, mandatory = true, nullable = false)
|
2019-10-30 09:57:14 +01:00
|
|
|
public String getDescription();
|
|
|
|
|
|
|
|
@Override
|
2020-02-03 10:51:29 +01:00
|
|
|
@ISProperty(name = Type.ABSTRACT_PROPERTY, readonly = true, mandatory = true, nullable = false)
|
2019-10-30 09:57:14 +01:00
|
|
|
public boolean isAbstract();
|
|
|
|
|
|
|
|
@Override
|
2020-02-03 10:51:29 +01:00
|
|
|
@ISProperty(name = Type.TYPE_SUPERCLASSES_PROPERTY, readonly = true, mandatory = true, nullable = false)
|
2019-10-30 09:57:14 +01:00
|
|
|
public Set<String> getSuperClasses();
|
2020-01-20 10:24:55 +01:00
|
|
|
|
2020-02-03 10:51:29 +01:00
|
|
|
@ISProperty(name = TypeWithProperties.PROPERTIES_PROPERTY, readonly = false, mandatory = true, nullable = false)
|
2019-10-30 09:57:14 +01:00
|
|
|
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 */
|
|
|
|
|
2019-10-24 11:26:49 +02:00
|
|
|
}
|