be.ugent.rml.Template Maven / Gradle / Ivy
package be.ugent.rml;
import java.util.ArrayList;
import java.util.List;
public class Template {
private List templateElements;
public Template() {
this.templateElements = new ArrayList<>();
}
public Template(List templateElements) {
this.templateElements = templateElements;
}
public List getTemplateElements() {
return templateElements;
}
public void addElement(TemplateElement templateElement) {
this.templateElements.add(templateElement);
}
public int countVariables() {
int counter = 0;
for (TemplateElement aTemplate : this.templateElements) {
if (aTemplate.getType() == TEMPLATETYPE.VARIABLE) {
counter++;
}
}
return counter;
}
}