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 ;
2023-04-20 11:09:22 +02:00
import java.util.UUID ;
2019-10-30 09:57:14 +01:00
2023-04-20 11:09:22 +02:00
import org.gcube.com.fasterxml.jackson.annotation.JsonGetter ;
2020-07-07 17:04:25 +02:00
import org.gcube.com.fasterxml.jackson.annotation.JsonIgnoreProperties ;
2023-04-20 11:09:22 +02:00
import org.gcube.com.fasterxml.jackson.annotation.JsonSetter ;
2020-07-07 17:04:25 +02:00
import org.gcube.com.fasterxml.jackson.databind.annotation.JsonDeserialize ;
2020-01-30 10:26:43 +01:00
import org.gcube.informationsystem.base.reference.properties.PropertyElement ;
2023-04-18 17:51:23 +02:00
import org.gcube.informationsystem.model.reference.properties.Metadata ;
2023-01-24 19:52:18 +01:00
import org.gcube.informationsystem.types.annotations.Final ;
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-12-15 17:38:06 +01:00
import org.gcube.informationsystem.types.reference.Change ;
2020-02-03 10:51:29 +01:00
import org.gcube.informationsystem.types.reference.Type ;
2020-12-15 17:38:06 +01:00
import org.gcube.informationsystem.types.reference.TypeMetadata ;
2021-10-21 10:11:45 +02:00
import org.gcube.informationsystem.utils.Version ;
2019-10-24 11:26:49 +02:00
2021-01-20 17:03:02 +01:00
/ * *
* @author Luca Frosini ( ISTI - CNR )
* /
2019-10-24 15:03:14 +02:00
@JsonIgnoreProperties ( ignoreUnknown = true )
2020-01-30 10:26:43 +01:00
@JsonDeserialize ( as = PropertyTypeImpl . class )
2023-04-26 21:39:57 +02:00
@TypeMetadata ( name = PropertyType . NAME , description = " This type provides information for any PropertyType " , version = Version . MINIMAL_VERSION_STRING )
2021-10-21 10:11:45 +02:00
@Change ( version = Version . MINIMAL_VERSION_STRING , description = Version . MINIMAL_VERSION_DESCRIPTION )
2023-01-24 19:52:18 +01:00
@Final
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
2023-04-20 11:09:22 +02:00
public static final String NAME = " PropertyType " ; // PropertyType.class.getSimpleName();
2019-10-24 11:26:49 +02:00
2023-04-28 11:33:29 +02:00
@JsonGetter ( value = ID_PROPERTY )
@ISProperty ( name = ID_PROPERTY , description = " This UUID is be used to identify the instance univocally. " , readonly = true , mandatory = true , nullable = false )
2023-04-20 11:09:22 +02:00
@Override
2023-04-28 11:33:29 +02:00
public UUID getID ( ) ;
2023-04-20 11:09:22 +02:00
2023-04-28 11:33:29 +02:00
@JsonSetter ( value = ID_PROPERTY )
2023-04-20 11:09:22 +02:00
@Override
2023-04-28 11:33:29 +02:00
public void setID ( UUID uuid ) ;
2023-04-20 11:09:22 +02:00
@JsonGetter ( value = METADATA_PROPERTY )
@ISProperty ( name = METADATA_PROPERTY , mandatory = true , nullable = false , description = " Metadata associated with the instance that is automatically created/updated by the system. " )
@Override
2023-04-18 17:51:23 +02:00
public Metadata getMetadata ( ) ;
2019-11-05 18:42:02 +01:00
2023-04-20 11:09:22 +02:00
@JsonSetter ( value = METADATA_PROPERTY )
@Override
2023-04-18 17:51:23 +02:00
public void setMetadata ( Metadata metadata ) ;
2019-11-05 18:42:02 +01:00
2023-04-20 11:16:26 +02:00
/* Type is just a Java useful class. The type is not created in the IS. Hence the fields must be redefined */
2019-10-30 09:57:14 +01:00
@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
2023-04-27 11:14:35 +02:00
@ISProperty ( name = Type . TYPE_SUPER_TYPES_PROPERTY , readonly = true , mandatory = true , nullable = false )
public Set < String > getTypeSuperTypes ( ) ;
2020-01-20 10:24:55 +01:00
2020-02-03 10:57:41 +01:00
@ISProperty ( name = Type . PROPERTIES_PROPERTY , readonly = false , mandatory = true , nullable = false )
2019-10-30 09:57:14 +01:00
public Set < PropertyDefinition > getProperties ( ) ;
2023-04-20 11:09:22 +02:00
/*Type is just a Java useful class. The type is not created in the IS. Hence the fields must be redefined */
2021-02-11 22:09:02 +01:00
2019-10-24 11:26:49 +02:00
}