73 lines
1.7 KiB
Java
73 lines
1.7 KiB
Java
package org.gcube.informationsystem.queries.templates.impl.entities;
|
|
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
|
|
import org.gcube.informationsystem.base.impl.entities.EntityElementImpl;
|
|
import org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate;
|
|
import org.gcube.informationsystem.queries.templates.reference.properties.TemplateProperty;
|
|
import org.gcube.informationsystem.queries.templates.reference.properties.TemplateVariable;
|
|
|
|
/**
|
|
* @author Luca Frosini (ISTI - CNR)
|
|
*/
|
|
public class QueryTemplateImpl extends EntityElementImpl implements QueryTemplate {
|
|
|
|
/**
|
|
* Generated Serial version UID
|
|
*/
|
|
private static final long serialVersionUID = -1096809036997782113L;
|
|
|
|
protected String name;
|
|
protected String description;
|
|
|
|
protected TemplateProperty template;
|
|
protected Map<String, TemplateVariable> templateVariables;
|
|
|
|
public QueryTemplateImpl() {
|
|
this.templateVariables = new HashMap<>();
|
|
}
|
|
|
|
@Override
|
|
public String getName() {
|
|
return name;
|
|
}
|
|
|
|
@Override
|
|
public void setName(String name) {
|
|
this.name = name;
|
|
}
|
|
|
|
@Override
|
|
public String getDescription() {
|
|
return description;
|
|
}
|
|
|
|
@Override
|
|
public void setDescription(String description) {
|
|
this.description = description;
|
|
}
|
|
|
|
@Override
|
|
public TemplateProperty getTemplate() {
|
|
return template;
|
|
}
|
|
|
|
@Override
|
|
public void setTemplate(TemplateProperty template) {
|
|
this.template = template;
|
|
}
|
|
|
|
@Override
|
|
public Map<String, TemplateVariable> getTemplateVariables() {
|
|
return templateVariables;
|
|
}
|
|
|
|
@Override
|
|
public void addTemplateVariable(TemplateVariable templateVariable) {
|
|
String name = templateVariable.getName();
|
|
this.templateVariables.put(name, templateVariable);
|
|
}
|
|
|
|
}
|