61 lines
2.7 KiB
Java
61 lines
2.7 KiB
Java
package org.gcube.informationsystem.types.reference.properties;
|
|
|
|
import java.util.Set;
|
|
|
|
import org.gcube.com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
|
import org.gcube.com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
|
import org.gcube.informationsystem.base.reference.AccessType;
|
|
import org.gcube.informationsystem.base.reference.IdentifiableElement;
|
|
import org.gcube.informationsystem.base.reference.properties.PropertyElement;
|
|
import org.gcube.informationsystem.model.reference.properties.Header;
|
|
import org.gcube.informationsystem.types.annotations.ISProperty;
|
|
import org.gcube.informationsystem.types.impl.properties.PropertyTypeImpl;
|
|
import org.gcube.informationsystem.types.reference.Change;
|
|
import org.gcube.informationsystem.types.reference.Type;
|
|
import org.gcube.informationsystem.types.reference.TypeMetadata;
|
|
import org.gcube.informationsystem.utils.TypeVersion;
|
|
|
|
/**
|
|
* @author Luca Frosini (ISTI - CNR)
|
|
*/
|
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
|
@JsonDeserialize(as = PropertyTypeImpl.class)
|
|
@TypeMetadata(name = PropertyType.NAME, description = "This class provides information for any PropertyType", version = TypeVersion.MINIMAL_VERSION_STRING)
|
|
@Change(version = TypeVersion.MINIMAL_VERSION_STRING, description = TypeVersion.MINIMAL_VERSION_DESCRIPTION)
|
|
public interface PropertyType<P extends PropertyElement> extends PropertyElement, Type {
|
|
|
|
public static final String NAME = "PropertyType"; // PropertyTypeDefinition.class.getSimpleName();
|
|
|
|
@ISProperty(name=IdentifiableElement.HEADER_PROPERTY, mandatory=true, nullable=false)
|
|
public Header getHeader();
|
|
|
|
public void setHeader(Header header);
|
|
|
|
/* TypeDefinition is just a Java useful class. The type is not created in the IS. Hence the fields must be redefined */
|
|
|
|
@Override
|
|
@ISProperty(name = Type.NAME_PROPERTY, readonly = true, mandatory = true, nullable = false)
|
|
public String getName();
|
|
|
|
@Override
|
|
@ISProperty(name = Type.DESCRIPTION_PROPERTY, readonly = false, mandatory = true, nullable = false)
|
|
public String getDescription();
|
|
|
|
@Override
|
|
@ISProperty(name = Type.ABSTRACT_PROPERTY, readonly = true, mandatory = true, nullable = false)
|
|
public boolean isAbstract();
|
|
|
|
@Override
|
|
@ISProperty(name = Type.TYPE_SUPERCLASSES_PROPERTY, readonly = true, mandatory = true, nullable = false)
|
|
public Set<String> getSuperClasses();
|
|
|
|
@ISProperty(name = Type.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 */
|
|
@Override
|
|
public default AccessType getAccessType() {
|
|
return AccessType.PROPERTY_ELEMENT;
|
|
}
|
|
}
|