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

de.uni.freiburg.iig.telematik.sepia.serialize.serializer.PNMLTimedNetSerializer 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.serialize.serializer;

import org.w3c.dom.Element;

import de.uni.freiburg.iig.telematik.sepia.graphic.AbstractGraphicalPTNet;
import de.uni.freiburg.iig.telematik.sepia.graphic.AbstractGraphicalTimedNet;
import de.uni.freiburg.iig.telematik.sepia.graphic.netgraphics.AbstractTimedNetGraphics;
import de.uni.freiburg.iig.telematik.sepia.petrinet.NetType;
import de.uni.freiburg.iig.telematik.sepia.petrinet.timedNet.abstr.AbstractTimedFlowRelation;
import de.uni.freiburg.iig.telematik.sepia.petrinet.timedNet.abstr.AbstractTimedMarking;
import de.uni.freiburg.iig.telematik.sepia.petrinet.timedNet.abstr.AbstractTimedNet;
import de.uni.freiburg.iig.telematik.sepia.petrinet.timedNet.abstr.AbstractTimedPlace;
import de.uni.freiburg.iig.telematik.sepia.petrinet.timedNet.abstr.AbstractTimedTransition;

public class PNMLTimedNetSerializer

, T extends AbstractTimedTransition, F extends AbstractTimedFlowRelation, M extends AbstractTimedMarking, N extends AbstractTimedNet, G extends AbstractTimedNetGraphics> extends PNMLPTNetSerializer { public static final String resourceContext = "resourcecontext"; public static final String timeContext = "timecontext"; public static final String processContext = "processcontext"; public PNMLTimedNetSerializer(AbstractGraphicalTimedNet petriNet) { super(petriNet); } public PNMLTimedNetSerializer(N net){ super(net); } @Override public NetType acceptedNetType() { return NetType.RTPTnet; } @Override protected void addHeader() { // Add resource context name Element resourceContextElement = getSupport().createElement(resourceContext); resourceContextElement.setTextContent(petriNet.getResourceContextName()); getSupport().getNetElement().appendChild(resourceContextElement); // Add time context name Element timeContextElement = getSupport().createElement(timeContext); timeContextElement.setTextContent(petriNet.getTimeContextName()); getSupport().getNetElement().appendChild(timeContextElement); // Add processContext (AccessContext) Element processContextElement = getSupport().createElement(processContext); processContextElement.setTextContent(petriNet.getAccessContextName()); getSupport().getNetElement().appendChild(processContextElement); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy