2019-03-22 15:51:44 +01:00
/ * *
*
* /
package org.gcube.resourcemanagement.model.reference.entities.resources ;
2020-07-07 17:12:10 +02:00
import org.gcube.com.fasterxml.jackson.databind.annotation.JsonDeserialize ;
2019-12-05 12:04:31 +01:00
import org.gcube.informationsystem.types.annotations.ResourceSchema ;
import org.gcube.informationsystem.types.annotations.ResourceSchemaEntry ;
2020-01-16 12:44:10 +01:00
import org.gcube.informationsystem.types.annotations.ResourceSchemaRelatedEntry ;
2020-12-15 20:06:58 +01:00
import org.gcube.informationsystem.types.reference.Change ;
import org.gcube.informationsystem.types.reference.TypeMetadata ;
import org.gcube.informationsystem.utils.TypeVersion ;
2019-03-22 15:51:44 +01:00
import org.gcube.resourcemanagement.model.impl.entities.resources.SchemaImpl ;
2019-12-05 12:04:31 +01:00
import org.gcube.resourcemanagement.model.reference.entities.facets.ContactFacet ;
import org.gcube.resourcemanagement.model.reference.entities.facets.DescriptiveMetadataFacet ;
import org.gcube.resourcemanagement.model.reference.entities.facets.JSONSchemaFacet ;
import org.gcube.resourcemanagement.model.reference.entities.facets.SchemaFacet ;
import org.gcube.resourcemanagement.model.reference.entities.facets.SubjectFacet ;
import org.gcube.resourcemanagement.model.reference.entities.facets.XSDSchemaFacet ;
import org.gcube.resourcemanagement.model.reference.relations.consistsof.HasContact ;
import org.gcube.resourcemanagement.model.reference.relations.consistsof.IsIdentifiedBy ;
2020-01-16 12:44:10 +01:00
import org.gcube.resourcemanagement.model.reference.relations.isrelatedto.IsCompliantWith ;
2019-03-22 15:51:44 +01:00
/ * *
* @author Luca Frosini ( ISTI - CNR )
* https : //wiki.gcube-system.org/gcube/Facet_Based_Resource_Model#Schema
* /
@JsonDeserialize ( as = SchemaImpl . class )
2020-01-15 17:26:54 +01:00
@ResourceSchema (
facets = {
@ResourceSchemaEntry ( relation = IsIdentifiedBy . class , facet = SchemaFacet . class , min = 1 ) ,
@ResourceSchemaEntry ( relation = IsIdentifiedBy . class , facet = JSONSchemaFacet . class ) ,
@ResourceSchemaEntry ( relation = IsIdentifiedBy . class , facet = XSDSchemaFacet . class ) ,
@ResourceSchemaEntry ( relation = HasContact . class , facet = ContactFacet . class , min = 1 ) ,
@ResourceSchemaEntry ( facet = DescriptiveMetadataFacet . class ) ,
@ResourceSchemaEntry ( facet = SubjectFacet . class )
2020-01-16 12:44:10 +01:00
} ,
resources = {
@ResourceSchemaRelatedEntry ( source = Dataset . class , relation = IsCompliantWith . class , target = Schema . class , description = " Any schema characterising the content of the dataset, e.g. the schema describing the 'columns' of a CSV-based dataset. " )
2020-01-15 17:26:54 +01:00
}
)
2020-12-15 20:06:58 +01:00
@TypeMetadata (
name = Schema . NAME ,
description = " Any reference schema to be used to specify values compliant with it. Examples include controlled vocabularies, ontologies, etc. " ,
version = TypeVersion . MINIMAL_VERSION_STRING
)
@Change ( version = TypeVersion . MINIMAL_VERSION_STRING , description = TypeVersion . MINIMAL_VERSION_DESCRIPTION )
2019-12-05 12:04:31 +01:00
public interface Schema extends GCubeResource {
2019-03-22 15:51:44 +01:00
public static final String NAME = " Schema " ; // Schema.class.getSimpleName();
2020-12-15 20:06:58 +01:00
2019-03-22 15:51:44 +01:00
}