gcube-model/src/main/java/org/gcube/resourcemanagement/model/reference/entities/facets/IdentifierFacet.java

59 lines
2.2 KiB
Java

/**
*
*/
package org.gcube.resourcemanagement.model.reference.entities.facets;
import org.gcube.com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import org.gcube.informationsystem.model.reference.entities.Facet;
import org.gcube.informationsystem.types.annotations.ISProperty;
import org.gcube.informationsystem.types.reference.Change;
import org.gcube.informationsystem.types.reference.TypeMetadata;
import org.gcube.informationsystem.utils.TypeVersion;
import org.gcube.resourcemanagement.model.impl.entities.facets.IdentifierFacetImpl;
/**
* IdentifierFacet captures information on identifiers (other than the
* ones automatically generated by the system) that can be attached to a resource.
*
* https://wiki.gcube-system.org/gcube/Facet_Based_Resource_Model#Identifier_Facet
*
* Changelog (only model changes are logged here. Not implementation details)
*
* - 1.0.1 Added STRING in IdentificationType enum.
* - 1.0.0 First version
*
* @author Luca Frosini (ISTI - CNR)
*/
@JsonDeserialize(as=IdentifierFacetImpl.class)
@TypeMetadata(
name = IdentifierFacet.NAME,
description = "IdentifierFacet captures information on identifiers (other than the ones "
+ "automatically generated by the system) that can be attached to a resource.",
version = "1.0.1"
)
@Change(version = TypeVersion.MINIMAL_VERSION_STRING, description = TypeVersion.MINIMAL_VERSION_DESCRIPTION)
@Change(version = "1.0.1", description = "Added STRING in IdentificationType enum.")
public interface IdentifierFacet extends Facet {
public static final String NAME = "IdentifierFacet"; // IdentifierFacet.class.getSimpleName();
public enum IdentificationType {
URI, DOI, IRI, URL, URN, UUID, STRING
}
@ISProperty(description = "The identifier", mandatory=true, nullable=false)
public String getValue();
public void setValue(String value);
@ISProperty(description = "The typology of identifier", mandatory=true, nullable=false)
public IdentificationType getType();
public void setType(IdentificationType type);
@ISProperty(description = "To indicate whether the identifier is persistent or not")
public boolean isPersistent();
public void setPersistent(boolean persistent);
}