Fixed named convenient interface

This commit is contained in:
Luca Frosini 2020-12-15 18:52:42 +01:00
parent d2ab04cfe6
commit 68dbf33af6
4 changed files with 13 additions and 12 deletions

View File

@ -5,21 +5,19 @@ package org.gcube.resourcemanagement.model.impl.entities.facets;
import org.gcube.com.fasterxml.jackson.annotation.JsonTypeName; import org.gcube.com.fasterxml.jackson.annotation.JsonTypeName;
import org.gcube.informationsystem.model.impl.entities.FacetImpl; import org.gcube.informationsystem.model.impl.entities.FacetImpl;
import org.gcube.resourcemanagement.model.reference.entities.facets.NameProperty;
import org.gcube.resourcemanagement.model.reference.entities.facets.SoftwareFacet; import org.gcube.resourcemanagement.model.reference.entities.facets.SoftwareFacet;
/** /**
* @author Luca Frosini (ISTI - CNR) * @author Luca Frosini (ISTI - CNR)
*/ */
@JsonTypeName(value=SoftwareFacet.NAME) @JsonTypeName(value=SoftwareFacet.NAME)
public class SoftwareFacetImpl extends FacetImpl implements SoftwareFacet, NameProperty { public class SoftwareFacetImpl extends FacetImpl implements SoftwareFacet {
/** /**
* Generated Serial version UID * Generated Serial version UID
*/ */
private static final long serialVersionUID = 1062768788238515868L; private static final long serialVersionUID = 1062768788238515868L;
protected String name; protected String name;
protected String group; protected String group;
protected String version; protected String version;

View File

@ -8,11 +8,13 @@ import org.gcube.informationsystem.types.reference.TypeMetadata;
import org.gcube.informationsystem.utils.TypeVersion; import org.gcube.informationsystem.utils.TypeVersion;
import org.gcube.resourcemanagement.model.impl.entities.facets.ActionFacetImpl; import org.gcube.resourcemanagement.model.impl.entities.facets.ActionFacetImpl;
import org.gcube.resourcemanagement.model.reference.properties.EnumStringProperty; import org.gcube.resourcemanagement.model.reference.properties.EnumStringProperty;
import org.gcube.resourcemanagement.model.reference.properties.utilities.Named;
/** /**
* This facet is expected to capture information on how to instantiate a {@link SoftwareFacet}.
* *
* @author Manuele Simi (ISTI-CNR) * @author Manuele Simi (ISTI - CNR)
* @author Luca Frosini (ISTI - CNR)
*
* https://wiki.gcube-system.org/gcube/Facet_Based_Resource_Model#Action_Facet * https://wiki.gcube-system.org/gcube/Facet_Based_Resource_Model#Action_Facet
*/ */
@JsonDeserialize(as=ActionFacetImpl.class) @JsonDeserialize(as=ActionFacetImpl.class)
@ -22,7 +24,7 @@ import org.gcube.resourcemanagement.model.reference.properties.EnumStringPropert
version = TypeVersion.MINIMAL_VERSION_STRING version = TypeVersion.MINIMAL_VERSION_STRING
) )
@Change(version = TypeVersion.MINIMAL_VERSION_STRING, description = TypeVersion.MINIMAL_VERSION_DESCRIPTION) @Change(version = TypeVersion.MINIMAL_VERSION_STRING, description = TypeVersion.MINIMAL_VERSION_DESCRIPTION)
public interface ActionFacet extends Facet, NameProperty { public interface ActionFacet extends Facet, Named {
public static final String NAME = "ActionFacet"; // ActionFacet.class.getSimpleName(); public static final String NAME = "ActionFacet"; // ActionFacet.class.getSimpleName();

View File

@ -10,6 +10,7 @@ import org.gcube.informationsystem.types.reference.Change;
import org.gcube.informationsystem.types.reference.TypeMetadata; import org.gcube.informationsystem.types.reference.TypeMetadata;
import org.gcube.informationsystem.utils.TypeVersion; import org.gcube.informationsystem.utils.TypeVersion;
import org.gcube.resourcemanagement.model.impl.entities.facets.SoftwareFacetImpl; import org.gcube.resourcemanagement.model.impl.entities.facets.SoftwareFacetImpl;
import org.gcube.resourcemanagement.model.reference.properties.utilities.Named;
/** /**
* @author Luca Frosini (ISTI - CNR) * @author Luca Frosini (ISTI - CNR)
@ -22,7 +23,7 @@ import org.gcube.resourcemanagement.model.impl.entities.facets.SoftwareFacetImpl
version = TypeVersion.MINIMAL_VERSION_STRING version = TypeVersion.MINIMAL_VERSION_STRING
) )
@Change(version = TypeVersion.MINIMAL_VERSION_STRING, description = TypeVersion.MINIMAL_VERSION_DESCRIPTION) @Change(version = TypeVersion.MINIMAL_VERSION_STRING, description = TypeVersion.MINIMAL_VERSION_DESCRIPTION)
public interface SoftwareFacet extends Facet, NameProperty { public interface SoftwareFacet extends Facet, Named {
public static final String NAME = "SoftwareFacet"; // SoftwareFacet.class.getSimpleName(); public static final String NAME = "SoftwareFacet"; // SoftwareFacet.class.getSimpleName();

View File

@ -1,14 +1,14 @@
package org.gcube.resourcemanagement.model.reference.entities.facets; package org.gcube.resourcemanagement.model.reference.properties.utilities;
import org.gcube.informationsystem.model.reference.entities.Facet;
import org.gcube.informationsystem.types.annotations.ISProperty; import org.gcube.informationsystem.types.annotations.ISProperty;
/** /**
* A name property for a {@link Facet}. * A convenient interface for any type having a name
* *
* @author Manuele Simi (ISTI CNR) * @author Manuele Simi (ISTI - CNR)
* @author Luca Frosini (ISTI - CNR)
* *
*/ */
public interface NameProperty { public interface Named {
public static final String NAME_PROPERTY = "name"; public static final String NAME_PROPERTY = "name";