public class QueryTemplateImpl extends EntityElementImpl implements QueryTemplate
| Modifier and Type | Field and Description |
|---|---|
protected String |
description |
protected String |
name |
protected org.gcube.com.fasterxml.jackson.databind.ObjectMapper |
objectMapper |
protected org.gcube.com.fasterxml.jackson.databind.JsonNode |
params |
protected org.gcube.com.fasterxml.jackson.databind.JsonNode |
template |
protected Map<String,TemplateVariable> |
templateVariables |
headerDESCRIPTION_PROPERTY, NAME, NAME_PROPERTY, TEMPLATE_PROPERTY, TEMPLATE_VARIABLES_PROPERTYHEADER_PROPERTYCLASS_PROPERTY, DATETIME_PATTERN, SUPERCLASSES_PROPERTY| Constructor and Description |
|---|
QueryTemplateImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addTemplateVariable(TemplateVariable templateVariable) |
String |
getDescription() |
org.gcube.com.fasterxml.jackson.databind.JsonNode |
getJsonQuery() |
org.gcube.com.fasterxml.jackson.databind.JsonNode |
getJsonQuery(org.gcube.com.fasterxml.jackson.databind.JsonNode values) |
String |
getName() |
org.gcube.com.fasterxml.jackson.databind.node.ObjectNode |
getParamsFromDefaultValues()
Create an ObjectNode which can be used as parameters to obtain a
JSON Query from the Query Template.
|
org.gcube.com.fasterxml.jackson.databind.JsonNode |
getTemplate() |
String |
getTemplateAsString() |
Map<String,TemplateVariable> |
getTemplateVariables() |
protected org.gcube.com.fasterxml.jackson.databind.JsonNode |
replaceVariables(org.gcube.com.fasterxml.jackson.databind.JsonNode jsonNode) |
void |
setDescription(String description) |
void |
setName(String name) |
void |
setTemplate(org.gcube.com.fasterxml.jackson.databind.JsonNode template) |
void |
setTemplate(String template) |
getHeader, setHeader, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetHeadersetHeaderprotected String name
protected String description
protected org.gcube.com.fasterxml.jackson.databind.ObjectMapper objectMapper
protected org.gcube.com.fasterxml.jackson.databind.JsonNode template
protected Map<String,TemplateVariable> templateVariables
protected org.gcube.com.fasterxml.jackson.databind.JsonNode params
public String getName()
getName in interface QueryTemplatepublic void setName(String name)
setName in interface QueryTemplatepublic String getDescription()
getDescription in interface QueryTemplatepublic void setDescription(String description)
setDescription in interface QueryTemplatepublic String getTemplateAsString() throws org.gcube.com.fasterxml.jackson.core.JsonProcessingException
getTemplateAsString in interface QueryTemplateorg.gcube.com.fasterxml.jackson.core.JsonProcessingExceptionpublic void setTemplate(String template) throws org.gcube.com.fasterxml.jackson.core.JsonProcessingException, IOException
setTemplate in interface QueryTemplateorg.gcube.com.fasterxml.jackson.core.JsonProcessingExceptionIOExceptionpublic org.gcube.com.fasterxml.jackson.databind.JsonNode getTemplate()
getTemplate in interface QueryTemplatepublic void setTemplate(org.gcube.com.fasterxml.jackson.databind.JsonNode template)
setTemplate in interface QueryTemplatepublic Map<String,TemplateVariable> getTemplateVariables()
getTemplateVariables in interface QueryTemplatepublic void addTemplateVariable(TemplateVariable templateVariable)
addTemplateVariable in interface QueryTemplatepublic org.gcube.com.fasterxml.jackson.databind.node.ObjectNode getParamsFromDefaultValues()
QueryTemplategetParamsFromDefaultValues in interface QueryTemplatepublic org.gcube.com.fasterxml.jackson.databind.JsonNode getJsonQuery()
throws Exception
getJsonQuery in interface QueryTemplateExceptionprotected org.gcube.com.fasterxml.jackson.databind.JsonNode replaceVariables(org.gcube.com.fasterxml.jackson.databind.JsonNode jsonNode)
throws Exception
Exceptionpublic org.gcube.com.fasterxml.jackson.databind.JsonNode getJsonQuery(org.gcube.com.fasterxml.jackson.databind.JsonNode values)
throws Exception
getJsonQuery in interface QueryTemplateExceptionCopyright © 2022. All Rights Reserved.