Class DiscoveryFacetImpl

  • All Implemented Interfaces:
    Serializable, org.gcube.informationsystem.base.reference.Element, org.gcube.informationsystem.base.reference.entities.EntityElement, org.gcube.informationsystem.base.reference.IdentifiableElement, org.gcube.informationsystem.base.reference.SchemaMixedElement, org.gcube.informationsystem.model.reference.entities.Entity, org.gcube.informationsystem.model.reference.entities.Facet, org.gcube.informationsystem.model.reference.ERElement, org.gcube.informationsystem.model.reference.ModelElement, DiscoveryFacet

    public class DiscoveryFacetImpl
    extends org.gcube.informationsystem.model.impl.entities.FacetImpl
    implements DiscoveryFacet
    Author:
    Luca Frosini (ISTI - CNR)
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected String description
      The discovery description
      protected String group
      The discovery group
      protected int max
      The maximum number of occurrences
      protected int min
      The minimum number of occurrences
      protected org.gcube.com.fasterxml.jackson.databind.node.ArrayNode queries
      The queries associated with the discovery
      protected List<org.gcube.informationsystem.queries.templates.reference.properties.QueryTemplateReference> queryTemplates
      The query templates associated with the discovery
      • Fields inherited from class org.gcube.informationsystem.model.impl.entities.FacetImpl

        additionalProperties, allowedAdditionalKeys
      • Fields inherited from class org.gcube.informationsystem.model.impl.entities.EntityImpl

        contexts, expectedtype, supertypes
      • Fields inherited from class org.gcube.informationsystem.base.impl.entities.EntityElementImpl

        metadata, uuid
      • Fields inherited from interface org.gcube.informationsystem.base.reference.Element

        DATETIME_PATTERN, NAME, TYPE_PROPERTY
      • Fields inherited from interface org.gcube.informationsystem.model.reference.entities.Entity

        NAME
      • Fields inherited from interface org.gcube.informationsystem.base.reference.entities.EntityElement

        NAME
      • Fields inherited from interface org.gcube.informationsystem.model.reference.ERElement

        CONTEXTS_PROPERTY
      • Fields inherited from interface org.gcube.informationsystem.model.reference.entities.Facet

        NAME
      • Fields inherited from interface org.gcube.informationsystem.base.reference.IdentifiableElement

        ID_PROPERTY, METADATA_PROPERTY
      • Fields inherited from interface org.gcube.informationsystem.model.reference.ModelElement

        EXPECTED_TYPE_PROPERTY, SUPERTYPES_PROPERTY
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addQuery​(org.gcube.com.fasterxml.jackson.databind.node.ObjectNode query)
      Adds a JSON query object used to discover resources.
      void addQueryTemplates​(org.gcube.informationsystem.queries.templates.reference.properties.QueryTemplateReference queryTemplates)
      Adds a query template reference with parameters.
      String getDescription()
      Human-readable description displayed to users explaining what type of resources will be discovered in this group
      String getGroup()
      The name identifier of the resource group to discover.
      Integer getMax()
      Maximum number of resources that can be selected from this group.
      int getMin()
      Minimum number of resources that must be selected from this group.
      org.gcube.com.fasterxml.jackson.databind.node.ArrayNode getQueries()
      Array of JSON query objects used to discover resources.
      List<org.gcube.informationsystem.queries.templates.reference.properties.QueryTemplateReference> getQueryTemplates()
      Array of query template references with parameters.
      void setDescription​(String description)
      Sets a human-readable description displayed to users explaining what type of resources will be discovered in this group
      void setGroup​(String group)
      Sets the name identifier of the resource group to discover.
      void setMax​(Integer max)
      Sets the maximum number of resources that can be selected from this group.
      void setMin​(int min)
      Sets the minimum number of resources that must be selected from this group.
      void setQueries​(org.gcube.com.fasterxml.jackson.databind.node.ArrayNode queries)
      Sets the array of JSON query objects used to discover resources.
      void setQueryTemplates​(List<org.gcube.informationsystem.queries.templates.reference.properties.QueryTemplateReference> queryTemplates)
      Sets the array of query template references with parameters.
      • Methods inherited from class org.gcube.informationsystem.model.impl.entities.FacetImpl

        addAllowedAdditionalKey, getAdditionalProperties, getAdditionalProperty, setAdditionalProperties, setAdditionalProperty
      • Methods inherited from class org.gcube.informationsystem.model.impl.entities.EntityImpl

        getContexts, getExpectedtype, getSupertypes, setContexts
      • Methods inherited from class org.gcube.informationsystem.base.impl.entities.EntityElementImpl

        getID, getMetadata, setID, setMetadata
      • Methods inherited from class org.gcube.informationsystem.base.impl.ElementImpl

        getTypeName, toString
      • Methods inherited from interface org.gcube.informationsystem.base.reference.Element

        getTypeName
      • Methods inherited from interface org.gcube.informationsystem.base.reference.entities.EntityElement

        getID, getMetadata, setID, setMetadata
      • Methods inherited from interface org.gcube.informationsystem.model.reference.ERElement

        getContexts
      • Methods inherited from interface org.gcube.informationsystem.model.reference.entities.Facet

        getAdditionalProperties, getAdditionalProperty, setAdditionalProperties, setAdditionalProperty
      • Methods inherited from interface org.gcube.informationsystem.model.reference.ModelElement

        getExpectedtype, getSupertypes
    • Field Detail

      • group

        protected String group
        The discovery group
      • description

        protected String description
        The discovery description
      • min

        protected int min
        The minimum number of occurrences
      • max

        protected int max
        The maximum number of occurrences
      • queries

        protected org.gcube.com.fasterxml.jackson.databind.node.ArrayNode queries
        The queries associated with the discovery
      • queryTemplates

        protected List<org.gcube.informationsystem.queries.templates.reference.properties.QueryTemplateReference> queryTemplates
        The query templates associated with the discovery
    • Constructor Detail

      • DiscoveryFacetImpl

        public DiscoveryFacetImpl()
    • Method Detail

      • getGroup

        public String getGroup()
        Description copied from interface: DiscoveryFacet
        The name identifier of the resource group to discover. This serves as a unique identifier for organizing and categorizing discovered resources.
        Specified by:
        getGroup in interface DiscoveryFacet
        Returns:
        the group name
      • setGroup

        public void setGroup​(String group)
        Description copied from interface: DiscoveryFacet
        Sets the name identifier of the resource group to discover. This serves as a unique identifier for organizing and categorizing discovered resources.
        Specified by:
        setGroup in interface DiscoveryFacet
        Parameters:
        group - the group name
      • getDescription

        public String getDescription()
        Description copied from interface: DiscoveryFacet
        Human-readable description displayed to users explaining what type of resources will be discovered in this group
        Specified by:
        getDescription in interface DiscoveryFacet
        Returns:
        the description
      • setDescription

        public void setDescription​(String description)
        Description copied from interface: DiscoveryFacet
        Sets a human-readable description displayed to users explaining what type of resources will be discovered in this group
        Specified by:
        setDescription in interface DiscoveryFacet
        Parameters:
        description - the description
      • getMin

        public int getMin()
        Description copied from interface: DiscoveryFacet
        Minimum number of resources that must be selected from this group. Default is 0 (optional selection).
        Specified by:
        getMin in interface DiscoveryFacet
        Returns:
        the min
      • setMin

        public void setMin​(int min)
        Description copied from interface: DiscoveryFacet
        Sets the minimum number of resources that must be selected from this group. Default is 0 (optional selection).
        Specified by:
        setMin in interface DiscoveryFacet
        Parameters:
        min - the min
      • getMax

        public Integer getMax()
        Description copied from interface: DiscoveryFacet
        Maximum number of resources that can be selected from this group. Null means unlimited selection.
        Specified by:
        getMax in interface DiscoveryFacet
        Returns:
        the max
      • setMax

        public void setMax​(Integer max)
        Description copied from interface: DiscoveryFacet
        Sets the maximum number of resources that can be selected from this group. Null means unlimited selection.
        Specified by:
        setMax in interface DiscoveryFacet
        Parameters:
        max - the max
      • getQueries

        public org.gcube.com.fasterxml.jackson.databind.node.ArrayNode getQueries()
        Description copied from interface: DiscoveryFacet
        Array of JSON query objects used to discover resources. Each query is executed and results are combined (union of all query results).
        Specified by:
        getQueries in interface DiscoveryFacet
        Returns:
        the queries
      • setQueries

        public void setQueries​(org.gcube.com.fasterxml.jackson.databind.node.ArrayNode queries)
        Description copied from interface: DiscoveryFacet
        Sets the array of JSON query objects used to discover resources. Each query is executed and results are combined (union of all query results).
        Specified by:
        setQueries in interface DiscoveryFacet
        Parameters:
        queries - the queries
      • addQuery

        public void addQuery​(org.gcube.com.fasterxml.jackson.databind.node.ObjectNode query)
        Description copied from interface: DiscoveryFacet
        Adds a JSON query object used to discover resources.
        Specified by:
        addQuery in interface DiscoveryFacet
        Parameters:
        query - the query
      • getQueryTemplates

        public List<org.gcube.informationsystem.queries.templates.reference.properties.QueryTemplateReference> getQueryTemplates()
        Description copied from interface: DiscoveryFacet
        Array of query template references with parameters. These are named, reusable query definitions that can accept variables for dynamic resource discovery.
        Specified by:
        getQueryTemplates in interface DiscoveryFacet
        Returns:
        the query templates
      • setQueryTemplates

        public void setQueryTemplates​(List<org.gcube.informationsystem.queries.templates.reference.properties.QueryTemplateReference> queryTemplates)
        Description copied from interface: DiscoveryFacet
        Sets the array of query template references with parameters. These are named, reusable query definitions that can accept variables for dynamic resource discovery.
        Specified by:
        setQueryTemplates in interface DiscoveryFacet
        Parameters:
        queryTemplates - the query templates
      • addQueryTemplates

        public void addQueryTemplates​(org.gcube.informationsystem.queries.templates.reference.properties.QueryTemplateReference queryTemplates)
        Description copied from interface: DiscoveryFacet
        Adds a query template reference with parameters. These are named, reusable query definitions that can accept variables for dynamic resource discovery.
        Specified by:
        addQueryTemplates in interface DiscoveryFacet
        Parameters:
        queryTemplates - the query template to add