Interface DiscoveryFacet
- All Superinterfaces:
org.gcube.informationsystem.base.reference.Element,org.gcube.informationsystem.model.reference.entities.Entity,org.gcube.informationsystem.base.reference.entities.EntityElement,org.gcube.informationsystem.model.reference.ERElement,org.gcube.informationsystem.model.reference.entities.Facet,org.gcube.informationsystem.base.reference.IdentifiableElement,org.gcube.informationsystem.model.reference.ModelElement,org.gcube.informationsystem.base.reference.SchemaMixedElement,Serializable
- All Known Implementing Classes:
DiscoveryFacetImpl
@TypeMetadata(name="DiscoveryFacet",
description="DiscoveryFacet defines a group of resources to be discovered and potentially selected for inclusion in a context. It enables dynamic resource discovery through JSON queries and/or query template references, and supports min/max selection constraints on the discovered group.",
version="1.1.0")
@Change(version="1.1.0",description="\'max\' is optional, absent for an unlimited selection; \'queries\' and \'queryTemplates\' are always present, empty when there are none.") @Change(version="1.0.0",description="First Version")
public interface DiscoveryFacet
extends org.gcube.informationsystem.model.reference.entities.Facet
DiscoveryFacet defines a group of resources to be discovered and potentially
selected for
inclusion in a context. It enables dynamic resource discovery through JSON
queries and/or query template references, and supports min/max selection
constraints on the discovered group.
- Author:
- Luca Frosini (ISTI - CNR)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe name of 'description' propertystatic final StringThe name of 'group' propertystatic final StringThe name of 'max' propertystatic final StringThe name of 'min' propertystatic final StringThe name associated with this facetstatic final StringThe name of 'queries' propertystatic final StringThe name of 'queryTemplates' propertystatic final StringThe version of this type definition.Fields inherited from interface org.gcube.informationsystem.base.reference.Element
DATETIME_PATTERN, REDACTED, TYPE_PROPERTY, UNKNOWN_USERFields inherited from interface org.gcube.informationsystem.model.reference.ERElement
CONTEXTS_PROPERTYFields inherited from interface org.gcube.informationsystem.base.reference.IdentifiableElement
ID_PROPERTY, METADATA_PROPERTYFields inherited from interface org.gcube.informationsystem.model.reference.ModelElement
EXPECTED_TYPE_PROPERTY, SUPERTYPES_PROPERTY -
Method Summary
Modifier and TypeMethodDescriptionvoidaddQuery(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.static DiscoveryFacetReturns a default instance of DiscoveryFacetHuman-readable description displayed to users explaining what type of resources will be discovered in this groupgetGroup()The name identifier of the resource group to discover.getMax()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.ArrayNodeArray of JSON query objects used to discover resources.List<org.gcube.informationsystem.queries.templates.reference.properties.QueryTemplateReference>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 groupvoidSets the name identifier of the resource group to discover.voidSets 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 interface org.gcube.informationsystem.base.reference.Element
getTypeNameMethods inherited from interface org.gcube.informationsystem.base.reference.entities.EntityElement
getID, getMetadata, setID, setMetadataMethods inherited from interface org.gcube.informationsystem.model.reference.ERElement
getContextsMethods inherited from interface org.gcube.informationsystem.model.reference.entities.Facet
getAdditionalProperties, getAdditionalProperty, setAdditionalProperties, setAdditionalPropertyMethods inherited from interface org.gcube.informationsystem.model.reference.ModelElement
getExpectedType, getSupertypes
-
Field Details
-
NAME
The name associated with this facet- See Also:
-
VERSION
The version of this type definition.- See Also:
-
GROUP_PROPERTY
The name of 'group' property- See Also:
-
DESCRIPTION_PROPERTY
The name of 'description' property- See Also:
-
MAX_PROPERTY
The name of 'max' property- See Also:
-
MIN_PROPERTY
The name of 'min' property- See Also:
-
QUERIES_PROPERTY
The name of 'queries' property- See Also:
-
QUERY_TEMPLATES_PROPERTY
The name of 'queryTemplates' property- See Also:
-
-
Method Details
-
getDefaultInstance
Returns a default instance of DiscoveryFacet- Returns:
- a default instance of DiscoveryFacet
-
getGroup
@ISProperty(name="group", description="The name identifier of the resource group to discover. This serves as a unique identifier for organizing and categorizing discovered resources.", mandatory=true) String getGroup()The name identifier of the resource group to discover. This serves as a unique identifier for organizing and categorizing discovered resources.- Returns:
- the group name
-
setGroup
Sets the name identifier of the resource group to discover. This serves as a unique identifier for organizing and categorizing discovered resources.- Parameters:
group- the group name
-
getDescription
@ISProperty(name="description", description="A human-readable description displayed to users explaining what type of resources will be discovered in this group.") String getDescription()Human-readable description displayed to users explaining what type of resources will be discovered in this group- Returns:
- the description
-
setDescription
Sets a human-readable description displayed to users explaining what type of resources will be discovered in this group- Parameters:
description- the description
-
getMin
@ISProperty(name="min", description="The minimum number of resources that must be selected from this group. Default is 0 (optional selection).", readonly=false, mandatory=true, defaultValue="0") int getMin()Minimum number of resources that must be selected from this group. Default is 0 (optional selection).- Returns:
- the min
-
setMin
void setMin(int min) Sets the minimum number of resources that must be selected from this group. Default is 0 (optional selection).- Parameters:
min- the min
-
getMax
@ISProperty(name="max", description="The maximum number of resources that can be selected from this group. Absent means unlimited selection.", readonly=false, mandatory=false) Integer getMax()Maximum number of resources that can be selected from this group. Null means unlimited selection.- Returns:
- the max
-
setMax
Sets the maximum number of resources that can be selected from this group. Null means unlimited selection.- Parameters:
max- the max
-
getQueries
@ISProperty(name="queries", description="An array of JSON query objects used to discover resources. Each query is executed and results are combined (union of all query results). Empty when there are none.", readonly=false, mandatory=true) org.gcube.com.fasterxml.jackson.databind.node.ArrayNode getQueries()Array of JSON query objects used to discover resources. Each query is executed and results are combined (union of all query results).- Returns:
- the queries
-
setQueries
void setQueries(org.gcube.com.fasterxml.jackson.databind.node.ArrayNode queries) Sets the array of JSON query objects used to discover resources. Each query is executed and results are combined (union of all query results).- Parameters:
queries- the queries
-
addQuery
void addQuery(org.gcube.com.fasterxml.jackson.databind.node.ObjectNode query) Adds a JSON query object used to discover resources.- Parameters:
query- the query
-
getQueryTemplates
@ISProperty(name="queryTemplates", description="An array of query template references with parameters. These are named, reusable query definitions that can accept variables for dynamic resource discovery. Empty when there are none.", readonly=false, mandatory=true) List<org.gcube.informationsystem.queries.templates.reference.properties.QueryTemplateReference> getQueryTemplates()Array of query template references with parameters. These are named, reusable query definitions that can accept variables for dynamic resource discovery.- Returns:
- the query templates
-
setQueryTemplates
void setQueryTemplates(List<org.gcube.informationsystem.queries.templates.reference.properties.QueryTemplateReference> queryTemplates) Sets the array of query template references with parameters. These are named, reusable query definitions that can accept variables for dynamic resource discovery.- Parameters:
queryTemplates- the query templates
-
addQueryTemplates
void addQueryTemplates(org.gcube.informationsystem.queries.templates.reference.properties.QueryTemplateReference queryTemplates) Adds a query template reference with parameters. These are named, reusable query definitions that can accept variables for dynamic resource discovery.- Parameters:
queryTemplates- the query template to add
-