All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.uni.freiburg.iig.telematik.sepia.replay.ReplayCallableGenerator Maven / Gradle / Ivy

Go to download

SEPIA provides implementations for various types of Petri nets. Along Place/Transition-nets, it supports Petri nets with distinguishable token colors and defines coloured workflow nets, where coloured tokens are interpreted as data elements used during process execution. To support information flow analysis of processes, SEPIA defines so-called IF-Nets, tailored for security-oriented workflow modeling which enable users to assign security-levels (HIGH, LOW) to transitions, data elements and persons/agents participating in the process execution.

The newest version!
package de.uni.freiburg.iig.telematik.sepia.replay;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;

import de.invation.code.toval.validate.Validate;
import de.uni.freiburg.iig.telematik.sepia.overlap.OverlapCallableGenerator;
import de.uni.freiburg.iig.telematik.sepia.petrinet.abstr.AbstractFlowRelation;
import de.uni.freiburg.iig.telematik.sepia.petrinet.abstr.AbstractMarking;
import de.uni.freiburg.iig.telematik.sepia.petrinet.abstr.AbstractPetriNet;
import de.uni.freiburg.iig.telematik.sepia.petrinet.abstr.AbstractPlace;
import de.uni.freiburg.iig.telematik.sepia.petrinet.abstr.AbstractTransition;
import de.uni.freiburg.iig.telematik.sepia.petrinet.properties.threaded.AbstractCallableGenerator;
import de.uni.freiburg.iig.telematik.sepia.replay.ReplayCallable.TerminationCriteria;
import de.uni.freiburg.iig.telematik.sewol.log.LogEntry;
import de.uni.freiburg.iig.telematik.sewol.log.LogTrace;
import de.uni.freiburg.iig.telematik.sewol.log.LogTraceUtils;

public class ReplayCallableGenerator< 	P extends AbstractPlace, 
										T extends AbstractTransition, 
										F extends AbstractFlowRelation, 
										M extends AbstractMarking, 
										S extends Object,
										E extends LogEntry> extends AbstractCallableGenerator{

	private Map transitionLabelRelation = null;
	private TerminationCriteria terminationCriteria = null;
	protected List> activitySequences = null;
	protected List> logTraces = null;
	
	public ReplayCallableGenerator(OverlapCallableGenerator overlapGenerator){
		super(overlapGenerator);
		this.transitionLabelRelation = overlapGenerator.getTransitionLabelRelation();
		this.terminationCriteria = overlapGenerator.getTerminationCriteria();
	}
	
	public ReplayCallableGenerator(AbstractPetriNet petriNet) {
		super(petriNet);
		this.transitionLabelRelation = Replay.getDefaultTransitionLabelRelation(petriNet);
	}

	
	public Map getTransitionLabelRelation() {
		return transitionLabelRelation;
	}
	
	public void setTransitionLabelRelation(Map transitionLabelRelation) {
		this.transitionLabelRelation = transitionLabelRelation;
	}
	
	public TerminationCriteria getTerminationCriteria() {
		return terminationCriteria;
	}
	
	public void setTerminationCriteria(TerminationCriteria terminationCriteria) {
		this.terminationCriteria = terminationCriteria;
	}
	
	public void setLogTraces(Collection> logTraces){
		Validate.notNull(logTraces);
		if(logTraces instanceof List){
			this.logTraces = (List>) logTraces;
		} else {
			this.logTraces = new ArrayList>(logTraces);
		}
		activitySequences = LogTraceUtils.createStringRepresentation(this.logTraces, true);
	}
	
	public void setLogSequences(Collection> logSequences){
		Validate.notNull(logSequences);
		this.logTraces = null;
		if(logSequences instanceof List){
			this.activitySequences = (List>) logSequences;
		} else {
			this.activitySequences = new ArrayList>(logSequences);
		}
	}

	public List> getActivitySequences() {
		return activitySequences;
	}

	public List> getLogTraces() {
		return logTraces;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy