Removed wrong Abstract annotation and fixed property names
This commit is contained in:
parent
f2fbfc7b66
commit
42a650167b
|
@ -29,12 +29,12 @@ public class QueryTemplateImpl extends EntityElementImpl implements QueryTemplat
|
|||
@JsonInclude(Include.NON_NULL)
|
||||
protected Map<Version, String> changelog;
|
||||
|
||||
protected TemplateProperty templateProperty;
|
||||
protected Map<String, TemplateVariable> templateDefaultValues;
|
||||
protected TemplateProperty template;
|
||||
protected Map<String, TemplateVariable> templateVariables;
|
||||
|
||||
public QueryTemplateImpl() {
|
||||
this.changelog = new HashMap<>();
|
||||
this.templateDefaultValues = new HashMap<>();
|
||||
this.templateVariables = new HashMap<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -120,23 +120,23 @@ public class QueryTemplateImpl extends EntityElementImpl implements QueryTemplat
|
|||
|
||||
@Override
|
||||
public TemplateProperty getTemplate() {
|
||||
return templateProperty;
|
||||
return template;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTemplate(TemplateProperty templateProperty) {
|
||||
this.templateProperty = templateProperty;
|
||||
public void setTemplate(TemplateProperty template) {
|
||||
this.template = template;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, TemplateVariable> getTemplateVariables() {
|
||||
return templateDefaultValues;
|
||||
return templateVariables;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTemplateVariable(TemplateVariable templateVariable) {
|
||||
String name = templateVariable.getName();
|
||||
this.templateDefaultValues.put(name, templateVariable);
|
||||
this.templateVariables.put(name, templateVariable);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -13,7 +13,6 @@ import org.gcube.informationsystem.base.reference.entities.EntityElement;
|
|||
import org.gcube.informationsystem.querytemplates.impl.entities.QueryTemplateImpl;
|
||||
import org.gcube.informationsystem.querytemplates.reference.properties.TemplateProperty;
|
||||
import org.gcube.informationsystem.querytemplates.reference.properties.TemplateVariable;
|
||||
import org.gcube.informationsystem.types.annotations.Abstract;
|
||||
import org.gcube.informationsystem.types.annotations.ISProperty;
|
||||
import org.gcube.informationsystem.types.reference.Change;
|
||||
import org.gcube.informationsystem.types.reference.TypeMetadata;
|
||||
|
@ -22,7 +21,6 @@ import org.gcube.informationsystem.utils.Version;
|
|||
/**
|
||||
* @author Luca Frosini (ISTI - CNR)
|
||||
*/
|
||||
@Abstract
|
||||
@JsonIgnoreProperties(ignoreUnknown=true)
|
||||
@JsonDeserialize(as=QueryTemplateImpl.class)
|
||||
@TypeMetadata(name = QueryTemplate.NAME, description = "The type used to store Query Templates", version = Version.MINIMAL_VERSION_STRING)
|
||||
|
@ -36,8 +34,8 @@ public interface QueryTemplate extends EntityElement {
|
|||
public static final String VERSION_PROPERTY = "version";
|
||||
public static final String CHANGELOG_PROPERTY = "changelog";
|
||||
|
||||
public static final String QUERY_TEMPLATE_PROPERTY = "queryTemplate";
|
||||
public static final String QUERY_TEMPLATE_DEFAULT_VALUES_PROPERTY = "queryTemplateDefaultValues";
|
||||
public static final String TEMPLATE_PROPERTY = "template";
|
||||
public static final String TEMPLATE_VARIABLES_PROPERTY = "templateVariables";
|
||||
|
||||
@ISProperty(name = NAME_PROPERTY, description = "The name of the Query Template. Among UUID univocally identifiy the Query Template.", readonly = true, mandatory = true, nullable = false)
|
||||
public String getName();
|
||||
|
@ -82,14 +80,15 @@ public interface QueryTemplate extends EntityElement {
|
|||
@JsonIgnore
|
||||
public void addChangelog(String version, String changeDescription);
|
||||
|
||||
@JsonGetter(value = QUERY_TEMPLATE_PROPERTY)
|
||||
@ISProperty(name = QUERY_TEMPLATE_PROPERTY, description = "The Query Template. It can contains QueryVariable to be replaced to obtain a runnable query.", readonly = false, mandatory = true, nullable = false)
|
||||
@JsonGetter(value = TEMPLATE_PROPERTY)
|
||||
@ISProperty(name = TEMPLATE_PROPERTY, description = "The Query Template. It can contains query variables to be replaced to obtain a runnable query.", readonly = false, mandatory = true, nullable = false)
|
||||
public TemplateProperty getTemplate();
|
||||
|
||||
@JsonIgnore
|
||||
public void setTemplate(TemplateProperty templateProperty);
|
||||
|
||||
@JsonGetter(value = QUERY_TEMPLATE_DEFAULT_VALUES_PROPERTY)
|
||||
@JsonGetter(value = TEMPLATE_VARIABLES_PROPERTY)
|
||||
@ISProperty(name = TEMPLATE_VARIABLES_PROPERTY, description = "The Query Template Variables. It can contains Query Template Variable to be replaced to obtain a runnable query.", readonly = false, mandatory = true, nullable = false)
|
||||
public Map<String, TemplateVariable> getTemplateVariables();
|
||||
|
||||
@JsonIgnore
|
||||
|
|
Loading…
Reference in New Issue