Class DiscoveryFacetImpl
- java.lang.Object
-
- org.gcube.informationsystem.base.impl.ElementImpl
-
- org.gcube.informationsystem.base.impl.entities.EntityElementImpl
-
- org.gcube.informationsystem.model.impl.entities.EntityImpl
-
- org.gcube.informationsystem.model.impl.entities.FacetImpl
-
- org.gcube.resourcemanagement.model.impl.entities.facets.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 StringdescriptionThe discovery descriptionprotected StringgroupThe discovery groupprotected intmaxThe maximum number of occurrencesprotected intminThe minimum number of occurrencesprotected org.gcube.com.fasterxml.jackson.databind.node.ArrayNodequeriesThe queries associated with the discoveryprotected List<org.gcube.informationsystem.queries.templates.reference.properties.QueryTemplateReference>queryTemplatesThe 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.resourcemanagement.model.reference.entities.facets.DiscoveryFacet
DESCRIPTION_PROPERTY, GROUP_PROPERTY, MAX_PROPERTY, MIN_PROPERTY, NAME, QUERIES_PROPERTY, QUERY_TEMPLATES_PROPERTY
-
Fields inherited from interface org.gcube.informationsystem.base.reference.Element
DATETIME_PATTERN, NAME, TYPE_PROPERTY
-
Fields inherited from interface org.gcube.informationsystem.base.reference.entities.EntityElement
NAME
-
Fields inherited from interface org.gcube.informationsystem.model.reference.ERElement
CONTEXTS_PROPERTY
-
-
Constructor Summary
Constructors Constructor Description DiscoveryFacetImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddQuery(org.gcube.com.fasterxml.jackson.databind.node.ObjectNode query)Adds a JSON query object used to discover resources.voidaddQueryTemplates(org.gcube.informationsystem.queries.templates.reference.properties.QueryTemplateReference queryTemplates)Adds a query template reference with parameters.StringgetDescription()Human-readable description displayed to users explaining what type of resources will be discovered in this groupStringgetGroup()The name identifier of the resource group to discover.IntegergetMax()Maximum number of resources that can be selected from this group.intgetMin()Minimum number of resources that must be selected from this group.org.gcube.com.fasterxml.jackson.databind.node.ArrayNodegetQueries()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.voidsetDescription(String description)Sets a human-readable description displayed to users explaining what type of resources will be discovered in this groupvoidsetGroup(String group)Sets the name identifier of the resource group to discover.voidsetMax(Integer max)Sets the maximum number of resources that can be selected from this group.voidsetMin(int min)Sets the minimum number of resources that must be selected from this group.voidsetQueries(org.gcube.com.fasterxml.jackson.databind.node.ArrayNode queries)Sets the array of JSON query objects used to discover resources.voidsetQueryTemplates(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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.gcube.informationsystem.base.reference.entities.EntityElement
getID, getMetadata, setID, setMetadata
-
-
-
-
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
-
-
Method Detail
-
getGroup
public String getGroup()
Description copied from interface:DiscoveryFacetThe name identifier of the resource group to discover. This serves as a unique identifier for organizing and categorizing discovered resources.- Specified by:
getGroupin interfaceDiscoveryFacet- Returns:
- the group name
-
setGroup
public void setGroup(String group)
Description copied from interface:DiscoveryFacetSets the name identifier of the resource group to discover. This serves as a unique identifier for organizing and categorizing discovered resources.- Specified by:
setGroupin interfaceDiscoveryFacet- Parameters:
group- the group name
-
getDescription
public String getDescription()
Description copied from interface:DiscoveryFacetHuman-readable description displayed to users explaining what type of resources will be discovered in this group- Specified by:
getDescriptionin interfaceDiscoveryFacet- Returns:
- the description
-
setDescription
public void setDescription(String description)
Description copied from interface:DiscoveryFacetSets a human-readable description displayed to users explaining what type of resources will be discovered in this group- Specified by:
setDescriptionin interfaceDiscoveryFacet- Parameters:
description- the description
-
getMin
public int getMin()
Description copied from interface:DiscoveryFacetMinimum number of resources that must be selected from this group. Default is 0 (optional selection).- Specified by:
getMinin interfaceDiscoveryFacet- Returns:
- the min
-
setMin
public void setMin(int min)
Description copied from interface:DiscoveryFacetSets the minimum number of resources that must be selected from this group. Default is 0 (optional selection).- Specified by:
setMinin interfaceDiscoveryFacet- Parameters:
min- the min
-
getMax
public Integer getMax()
Description copied from interface:DiscoveryFacetMaximum number of resources that can be selected from this group. Null means unlimited selection.- Specified by:
getMaxin interfaceDiscoveryFacet- Returns:
- the max
-
setMax
public void setMax(Integer max)
Description copied from interface:DiscoveryFacetSets the maximum number of resources that can be selected from this group. Null means unlimited selection.- Specified by:
setMaxin interfaceDiscoveryFacet- Parameters:
max- the max
-
getQueries
public org.gcube.com.fasterxml.jackson.databind.node.ArrayNode getQueries()
Description copied from interface:DiscoveryFacetArray of JSON query objects used to discover resources. Each query is executed and results are combined (union of all query results).- Specified by:
getQueriesin interfaceDiscoveryFacet- Returns:
- the queries
-
setQueries
public void setQueries(org.gcube.com.fasterxml.jackson.databind.node.ArrayNode queries)
Description copied from interface:DiscoveryFacetSets 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:
setQueriesin interfaceDiscoveryFacet- Parameters:
queries- the queries
-
addQuery
public void addQuery(org.gcube.com.fasterxml.jackson.databind.node.ObjectNode query)
Description copied from interface:DiscoveryFacetAdds a JSON query object used to discover resources.- Specified by:
addQueryin interfaceDiscoveryFacet- Parameters:
query- the query
-
getQueryTemplates
public List<org.gcube.informationsystem.queries.templates.reference.properties.QueryTemplateReference> getQueryTemplates()
Description copied from interface:DiscoveryFacetArray of query template references with parameters. These are named, reusable query definitions that can accept variables for dynamic resource discovery.- Specified by:
getQueryTemplatesin interfaceDiscoveryFacet- Returns:
- the query templates
-
setQueryTemplates
public void setQueryTemplates(List<org.gcube.informationsystem.queries.templates.reference.properties.QueryTemplateReference> queryTemplates)
Description copied from interface:DiscoveryFacetSets the array of query template references with parameters. These are named, reusable query definitions that can accept variables for dynamic resource discovery.- Specified by:
setQueryTemplatesin interfaceDiscoveryFacet- Parameters:
queryTemplates- the query templates
-
addQueryTemplates
public void addQueryTemplates(org.gcube.informationsystem.queries.templates.reference.properties.QueryTemplateReference queryTemplates)
Description copied from interface:DiscoveryFacetAdds a query template reference with parameters. These are named, reusable query definitions that can accept variables for dynamic resource discovery.- Specified by:
addQueryTemplatesin interfaceDiscoveryFacet- Parameters:
queryTemplates- the query template to add
-
-