de.uni.freiburg.iig.telematik.sewol.log.Log Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of SEWOL Show documentation
Show all versions of SEWOL Show documentation
SEWOL provides support for the handling of workflow traces. Specifically it allows to specify the shape and content of process traces in terms of entries representing the execution of a specific workflow activity. SEWOL also allows to write these traces on disk as a log file with the help of a special file writer for process logs. Currently it supports plain text, Petrify, MXML and XES log file types. In order to specify security-related context information, SEWOL provides access control models such as access control lists (ACL) and role-based access control models (RBAC). All types of models can be conveniently edited with the help of appropriate dialogs.
package de.uni.freiburg.iig.telematik.sewol.log;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import de.invation.code.toval.validate.ParameterException;
import de.invation.code.toval.validate.Validate;
public class Log {
private final LogSummary summary = new LogSummary<>();
private final Set> distinctTraces = new HashSet<>();
private final List> traces = new ArrayList<>();
public LogSummary getSummary() {
return summary;
}
public void addTraces(List> traces) throws ParameterException{
Validate.notNull(traces);
for(LogTrace trace: traces){
addTrace(trace);
}
}
public void addTrace(LogTrace trace) throws ParameterException{
Validate.notNull(trace);
trace.setCaseNumber(traces.size()+1);
traces.add(trace);
summary.addTrace(trace);
if(!distinctTraces.add(trace)){
for(LogTrace storedTrace: traces){
if(storedTrace.equals(trace)){
storedTrace.addSimilarInstance(trace.getCaseNumber());
trace.addSimilarInstance(storedTrace.getCaseNumber());
}
}
}
}
public List> getTraces(){
return Collections.unmodifiableList(traces);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy