Added usage of defined property names

This commit is contained in:
Luca Frosini 2022-03-11 10:23:00 +01:00
parent d67cb27fc7
commit 7d7762c13a
1 changed files with 31 additions and 43 deletions

View File

@ -13,18 +13,15 @@ import org.gcube.resourcemanagement.model.impl.entities.facets.SoftwareFacetImpl
import org.gcube.resourcemanagement.model.reference.properties.utilities.Named; import org.gcube.resourcemanagement.model.reference.properties.utilities.Named;
/** /**
* SoftwareFacet captures information on any software associated with the resource. * SoftwareFacet captures information on any software associated with the
* resource.
* *
* https://wiki.gcube-system.org/gcube/GCube_Model#Software_Facet * https://wiki.gcube-system.org/gcube/GCube_Model#Software_Facet
* *
* @author Luca Frosini (ISTI - CNR) * @author Luca Frosini (ISTI - CNR)
*/ */
@JsonDeserialize(as=SoftwareFacetImpl.class) @JsonDeserialize(as = SoftwareFacetImpl.class)
@TypeMetadata( @TypeMetadata(name = SoftwareFacet.NAME, description = "SoftwareFacet captures information on any software associated with the resource.", version = Version.MINIMAL_VERSION_STRING)
name = SoftwareFacet.NAME,
description = "SoftwareFacet captures information on any software associated with the resource.",
version = Version.MINIMAL_VERSION_STRING
)
@Change(version = Version.MINIMAL_VERSION_STRING, description = Version.MINIMAL_VERSION_DESCRIPTION) @Change(version = Version.MINIMAL_VERSION_STRING, description = Version.MINIMAL_VERSION_DESCRIPTION)
public interface SoftwareFacet extends Facet, Named { public interface SoftwareFacet extends Facet, Named {
@ -38,50 +35,41 @@ public interface SoftwareFacet extends Facet, Named {
public static final String OPTIONAL_PROPERTY = "optional"; public static final String OPTIONAL_PROPERTY = "optional";
@Override @Override
@ISProperty(name=NAME_PROPERTY, @ISProperty(name = NAME_PROPERTY, description = "The name of the software artifact being described, "
description = "The name of the software artifact being described, " + "e.g., artifactId in maven coordinates, " + "the software name for retail software "
+ "e.g., artifactId in maven coordinates, " + "such as 'Office' (in Microsoft™ Office 2013-SP2)", mandatory = true, nullable = false)
+ "the software name for retail software "
+ "such as 'Office' (in Microsoft™ Office 2013-SP2)",
mandatory=true, nullable=false)
public String getName(); public String getName();
@Override @Override
public void setName(String name); public void setName(String name);
@ISProperty(name=GROUP_PROPERTY, @ISProperty(name = GROUP_PROPERTY, description = "The name of 'group' the software artifact belongs to, "
description = "The name of 'group' the software artifact belongs to, " + "e.g., groupId in maven coordinates, " + "company name for retail software software "
+ "e.g., groupId in maven coordinates, " + "such as 'Microsoft™' (in Microsoft™ Office 2013-SP2)", mandatory = true, nullable = false)
+ "company name for retail software software "
+ "such as 'Microsoft™' (in Microsoft™ Office 2013-SP2)",
mandatory=true, nullable=false)
public String getGroup(); public String getGroup();
public void setGroup(String group); public void setGroup(String group);
@ISProperty(name=VERSION_PROPERTY, @ISProperty(name = VERSION_PROPERTY, description = "The particular release of the software artifact, "
description = "The particular release of the software artifact, " + "e.g., version in maven coordinates, " + "the software version for retail software "
+ "e.g., version in maven coordinates, " + "such as '2013-SP2' (in Microsoft™ Office 2013-SP2)", mandatory = true, nullable = false)
+ "the software version for retail software "
+ "such as '2013-SP2' (in Microsoft™ Office 2013-SP2)",
mandatory=true, nullable=false)
public String getVersion(); public String getVersion();
public void setVersion(String version); public void setVersion(String version);
@ISProperty(description = "A human oriented description of the software artifact being described") @ISProperty(name = DESCRIPTION_PROPERTY, description = "A human oriented description of the software artifact being described")
public String getDescription(); public String getDescription();
public void setDescription(String description); public void setDescription(String description);
@ISProperty(description = "A qualifier for the software, " @ISProperty(name = QUALIFIER_PROPERTY, description = "A qualifier for the software, "
+ "e.g., packaging or scope in maven coordinates, " + "e.g., packaging or scope in maven coordinates, "
+ "target architecture for retail software such as x86 or amd64") + "target architecture for retail software such as x86 or amd64")
public String getQualifier(); public String getQualifier();
public void setQualifier(String qualifier); public void setQualifier(String qualifier);
@ISProperty(description = "Used to indicate the software optionality," @ISProperty(name = OPTIONAL_PROPERTY, description = "Used to indicate the software optionality,"
+ " e.g., optional in maven coordinates") + " e.g., optional in maven coordinates")
public boolean isOptional(); public boolean isOptional();