gcube-model/src/main/java/org/gcube/resourcemanagement/model/reference/entities/resources/Actor.java

43 lines
2.1 KiB
Java
Raw Normal View History

/**
*
*/
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;
import org.gcube.informationsystem.types.annotations.Abstract;
import org.gcube.informationsystem.types.annotations.ResourceSchema;
import org.gcube.informationsystem.types.annotations.ResourceSchemaEntry;
import org.gcube.informationsystem.types.annotations.ResourceSchemaRelatedEntry;
import org.gcube.resourcemanagement.model.impl.entities.resources.ActorImpl;
import org.gcube.resourcemanagement.model.reference.entities.facets.ContactFacet;
import org.gcube.resourcemanagement.model.reference.entities.facets.ContactReferenceFacet;
import org.gcube.resourcemanagement.model.reference.relations.consistsof.HasContact;
import org.gcube.resourcemanagement.model.reference.relations.consistsof.IsIdentifiedBy;
import org.gcube.resourcemanagement.model.reference.relations.isrelatedto.Involves;
import org.gcube.resourcemanagement.model.reference.relations.isrelatedto.IsOwnedBy;
/**
* @author Luca Frosini (ISTI - CNR)
* https://wiki.gcube-system.org/gcube/Facet_Based_Resource_Model#Actor
*/
@Abstract
@JsonDeserialize(as=ActorImpl.class)
2020-01-15 17:26:54 +01:00
@ResourceSchema(
facets={
@ResourceSchemaEntry(relation=IsIdentifiedBy.class, facet=ContactFacet.class, min=1, description=" An Actor has at least a Contact Facet which permit to identify the Actor per se. "),
@ResourceSchemaEntry(relation=HasContact.class, facet=ContactFacet.class, description=" An Actor can have other Contact Facets which provide secondary contact information. "),
@ResourceSchemaEntry(facet=ContactReferenceFacet.class)
},
resources= {
@ResourceSchemaRelatedEntry(source=Dataset.class, relation=Involves.class, target=Actor.class),
@ResourceSchemaRelatedEntry(source=Site.class, relation=IsOwnedBy.class, target=Actor.class)
2020-01-15 17:26:54 +01:00
}
)
public interface Actor extends GCubeResource {
public static final String NAME = "Actor"; // Actor.class.getSimpleName();
public static final String DESCRIPTION = "Any entity (human or machine) playing an active role.";
public static final String VERSION = "1.0.0";
}