Fixed type metadata

This commit is contained in:
Luca Frosini 2024-06-11 16:43:16 +02:00
parent 880e3157a3
commit 5abcb94c52
2 changed files with 14 additions and 5 deletions

View File

@ -6,6 +6,7 @@ import org.gcube.informationsystem.base.reference.properties.PropertyElement;
import org.gcube.informationsystem.queries.templates.impl.properties.TemplateVariableImpl; import org.gcube.informationsystem.queries.templates.impl.properties.TemplateVariableImpl;
import org.gcube.informationsystem.types.annotations.ISProperty; import org.gcube.informationsystem.types.annotations.ISProperty;
import org.gcube.informationsystem.types.reference.Change; import org.gcube.informationsystem.types.reference.Change;
import org.gcube.informationsystem.types.reference.Changelog;
import org.gcube.informationsystem.types.reference.TypeMetadata; import org.gcube.informationsystem.types.reference.TypeMetadata;
import org.gcube.informationsystem.utils.Version; import org.gcube.informationsystem.utils.Version;
@ -13,12 +14,15 @@ import org.gcube.informationsystem.utils.Version;
* @author Luca Frosini (ISTI - CNR) * @author Luca Frosini (ISTI - CNR)
*/ */
@JsonDeserialize(as=TemplateVariableImpl.class) @JsonDeserialize(as=TemplateVariableImpl.class)
@TypeMetadata(name = TemplateVariable.NAME, description = "This is the class used to define the a TemplateVariable", version = Version.MINIMAL_VERSION_STRING) @TypeMetadata(name = TemplateVariable.NAME, description = "This is the class used to define the a TemplateVariable", version = TemplateVariable.VERSION)
@Changelog ({
@Change(version = TemplateVariable.VERSION, description = "The type comply with @link{Attribute} which add 'defaultValue'"),
@Change(version = Version.MINIMAL_VERSION_STRING, description = Version.MINIMAL_VERSION_DESCRIPTION) @Change(version = Version.MINIMAL_VERSION_STRING, description = Version.MINIMAL_VERSION_DESCRIPTION)
})
public interface TemplateVariable extends PropertyElement, Attribute { public interface TemplateVariable extends PropertyElement, Attribute {
public static final String NAME = "TemplateVariable"; // TemplateVariable.class.getSimpleName(); public static final String NAME = "TemplateVariable"; // TemplateVariable.class.getSimpleName();
public static final String VERSION = "1.1.0";
@ISProperty(name = Attribute.NAME_PROPERTY, description = "The name of the Query Template Variable.", readonly = true, mandatory = true, nullable = false) @ISProperty(name = Attribute.NAME_PROPERTY, description = "The name of the Query Template Variable.", readonly = true, mandatory = true, nullable = false)
public String getName(); public String getName();

View File

@ -9,6 +9,7 @@ import org.gcube.informationsystem.types.annotations.Final;
import org.gcube.informationsystem.types.annotations.ISProperty; import org.gcube.informationsystem.types.annotations.ISProperty;
import org.gcube.informationsystem.types.impl.properties.PropertyDefinitionImpl; import org.gcube.informationsystem.types.impl.properties.PropertyDefinitionImpl;
import org.gcube.informationsystem.types.reference.Change; import org.gcube.informationsystem.types.reference.Change;
import org.gcube.informationsystem.types.reference.Changelog;
import org.gcube.informationsystem.types.reference.TypeMetadata; import org.gcube.informationsystem.types.reference.TypeMetadata;
import org.gcube.informationsystem.utils.Version; import org.gcube.informationsystem.utils.Version;
@ -17,12 +18,16 @@ import org.gcube.informationsystem.utils.Version;
*/ */
@JsonIgnoreProperties(ignoreUnknown = true) @JsonIgnoreProperties(ignoreUnknown = true)
@JsonDeserialize(as = PropertyDefinitionImpl.class) @JsonDeserialize(as = PropertyDefinitionImpl.class)
@TypeMetadata(name = PropertyDefinition.NAME, description = "This type provides information for the definition of any properties", version = Version.MINIMAL_VERSION_STRING) @TypeMetadata(name = PropertyDefinition.NAME, description = "This type provides information for the definition of any properties", version = PropertyDefinition.VERSION)
@Changelog ({
@Change(version = PropertyDefinition.VERSION, description = "The type comply with @link{AttributeDefinition} which add 'defaultValue'"),
@Change(version = Version.MINIMAL_VERSION_STRING, description = Version.MINIMAL_VERSION_DESCRIPTION) @Change(version = Version.MINIMAL_VERSION_STRING, description = Version.MINIMAL_VERSION_DESCRIPTION)
})
@Final @Final
public interface PropertyDefinition extends PropertyElement, Comparable<PropertyDefinition>, AttributeDefinition { public interface PropertyDefinition extends PropertyElement, Comparable<PropertyDefinition>, AttributeDefinition {
public static final String NAME = "PropertyDefinition"; // PropertyDefinition.class.getSimpleName(); public static final String NAME = "PropertyDefinition"; // PropertyDefinition.class.getSimpleName();
public static final String VERSION = "1.1.0";
@ISProperty(name = Attribute.NAME_PROPERTY, readonly = true, mandatory = true, nullable = false) @ISProperty(name = Attribute.NAME_PROPERTY, readonly = true, mandatory = true, nullable = false)
public String getName(); public String getName();