package org.gcube.informationsystem.model.reference.entities; import java.util.Map; import org.gcube.informationsystem.types.annotations.Abstract; import org.gcube.informationsystem.utils.AdditionalPropertiesSerializer; import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; import com.fasterxml.jackson.databind.annotation.JsonSerialize; /** * @author Luca Frosini (ISTI - CNR) * https://wiki.gcube-system.org/gcube/Facet_Based_Resource_Model#Facets */ @Abstract // @JsonDeserialize(as=FacetImpl.class) Do not uncomment to manage subclasses public interface Facet extends Entity { public static final String NAME = "Facet"; //Facet.class.getSimpleName(); public static final String DESCRIPTION = "This is the base class for Facets"; public static final String VERSION = "1.0.0"; /** * Return all properties. The returned Map is a copy of * the internal representation. Any modification to the returned Map MUST * not affect the object * @return a Map containing the properties */ @JsonAnyGetter @JsonSerialize(using = AdditionalPropertiesSerializer.class) public Map getAdditionalProperties(); /** * Set all properties, replacing existing ones */ public void setAdditionalProperties(Map additionalProperties); /** * Return the value of the given property. * @param key the key of the requested property * @return the value of the given property */ public Object getAdditionalProperty(String key); /** * Set the value of the given property. * @param key the key of the requested property * @param value the value of the given resource property */ @JsonAnySetter public void setAdditionalProperty(String key, Object value); }