2019-03-22 15:18:23 +01:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
2019-10-24 11:26:49 +02:00
|
|
|
package org.gcube.informationsystem.model.reference.properties;
|
2019-03-22 15:18:23 +01:00
|
|
|
|
2020-11-09 15:46:01 +01:00
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
import org.gcube.com.fasterxml.jackson.annotation.JsonAnyGetter;
|
|
|
|
import org.gcube.com.fasterxml.jackson.annotation.JsonAnySetter;
|
2023-04-28 14:34:29 +02:00
|
|
|
import org.gcube.com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
2020-07-07 17:04:25 +02:00
|
|
|
import org.gcube.com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
2020-11-09 15:46:01 +01:00
|
|
|
import org.gcube.com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
2023-04-28 14:34:29 +02:00
|
|
|
import org.gcube.informationsystem.base.reference.Element;
|
2020-11-09 15:46:01 +01:00
|
|
|
import org.gcube.informationsystem.base.reference.SchemaMixedElement;
|
2020-01-30 10:26:43 +01:00
|
|
|
import org.gcube.informationsystem.base.reference.properties.PropertyElement;
|
2020-07-02 18:05:15 +02:00
|
|
|
import org.gcube.informationsystem.model.impl.properties.PropertyImpl;
|
2023-02-03 14:39:25 +01:00
|
|
|
import org.gcube.informationsystem.serialization.AdditionalPropertiesSerializer;
|
2020-12-15 11:28:34 +01:00
|
|
|
import org.gcube.informationsystem.types.reference.Change;
|
|
|
|
import org.gcube.informationsystem.types.reference.TypeMetadata;
|
2021-10-21 10:11:45 +02:00
|
|
|
import org.gcube.informationsystem.utils.Version;
|
2020-07-02 18:05:15 +02:00
|
|
|
|
2019-03-22 15:18:23 +01:00
|
|
|
/**
|
2021-01-20 17:03:02 +01:00
|
|
|
* Root Class for Property types.
|
|
|
|
* It creates a base common type, which is useful for management purpose.
|
2021-01-20 17:26:13 +01:00
|
|
|
*
|
|
|
|
* @author Luca Frosini (ISTI - CNR)
|
2019-03-22 15:18:23 +01:00
|
|
|
*/
|
2019-10-24 19:50:43 +02:00
|
|
|
// @JsonIgnoreProperties(ignoreUnknown=true)
|
2023-04-28 17:16:31 +02:00
|
|
|
@JsonPropertyOrder({ Element.TYPE_PROPERTY, Element.SUPERTYPES_PROPERTY, Element.EXPECTED_TYPE_PROPERTY })
|
2020-07-02 18:05:15 +02:00
|
|
|
@JsonDeserialize(as=PropertyImpl.class)
|
2023-01-20 11:22:52 +01:00
|
|
|
@TypeMetadata(name = Property.NAME, description = "This is the base type for any Property", version = Version.MINIMAL_VERSION_STRING)
|
2021-10-21 10:11:45 +02:00
|
|
|
@Change(version = Version.MINIMAL_VERSION_STRING, description = Version.MINIMAL_VERSION_DESCRIPTION)
|
2020-11-09 15:46:01 +01:00
|
|
|
public interface Property extends PropertyElement, SchemaMixedElement {
|
2019-03-22 15:18:23 +01:00
|
|
|
|
|
|
|
public static final String NAME = "Property"; //Property.class.getSimpleName();
|
2019-10-23 16:55:48 +02:00
|
|
|
|
2020-11-09 15:46:01 +01:00
|
|
|
@JsonAnyGetter
|
|
|
|
@JsonSerialize(using = AdditionalPropertiesSerializer.class)
|
|
|
|
@Override
|
|
|
|
public Map<String,Object> getAdditionalProperties();
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void setAdditionalProperties(Map<String,Object> additionalProperties);
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public Object getAdditionalProperty(String key);
|
|
|
|
|
|
|
|
@JsonAnySetter
|
|
|
|
@Override
|
|
|
|
public void setAdditionalProperty(String key, Object value);
|
|
|
|
|
2019-03-22 15:18:23 +01:00
|
|
|
}
|