it.uniroma2.art.coda.pearl.model.RegexProjectionRule Maven / Gradle / Ivy
package it.uniroma2.art.coda.pearl.model;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import it.uniroma2.art.coda.pearl.model.annotation.Annotation;
import it.uniroma2.art.coda.pearl.parser.antlr4.regex.structures.SingleRegexStruct;
public class RegexProjectionRule extends BaseProjectionRule{
private SingleRegexStruct singleRegexStruct;
private Collection graphList;
private List annotationList;
public RegexProjectionRule(String id, SingleRegexStruct singleRegexStruct,
Collection graphList, ProjectionRulesModel projectionRulesModel) {
super(id, projectionRulesModel);
this.id = id;
this.singleRegexStruct = singleRegexStruct;
this.graphList = graphList;
this.annotationList = new ArrayList<>();
}
public SingleRegexStruct getSingleRegexStruct() {
return singleRegexStruct;
}
public Collection getGraphList() {
return graphList;
}
public void setAnnotations(List annotationList){
this.annotationList = annotationList;
}
public boolean hasAnnotations(){
if (annotationList == null)
return false;
if (annotationList.isEmpty())
return false;
return true;
}
public List getAnnotationList(){
return annotationList;
}
}