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

de.uni.freiburg.iig.telematik.sepia.serialize.serializer.PNMLPTNetSerializer 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.netgraphics.AbstractPTGraphics;
import de.uni.freiburg.iig.telematik.sepia.graphic.netgraphics.AnnotationGraphics;
import de.uni.freiburg.iig.telematik.sepia.petrinet.NetType;
import de.uni.freiburg.iig.telematik.sepia.petrinet.pt.abstr.AbstractPTFlowRelation;
import de.uni.freiburg.iig.telematik.sepia.petrinet.pt.abstr.AbstractPTMarking;
import de.uni.freiburg.iig.telematik.sepia.petrinet.pt.abstr.AbstractPTNet;
import de.uni.freiburg.iig.telematik.sepia.petrinet.pt.abstr.AbstractPTPlace;
import de.uni.freiburg.iig.telematik.sepia.petrinet.pt.abstr.AbstractPTTransition;
import de.uni.freiburg.iig.telematik.sepia.serialize.PNSerializer_PNML;

public class PNMLPTNetSerializer

, T extends AbstractPTTransition, F extends AbstractPTFlowRelation, M extends AbstractPTMarking, N extends AbstractPTNet, G extends AbstractPTGraphics> extends PNSerializer_PNML { public PNMLPTNetSerializer(AbstractGraphicalPTNet petriNet) { super(petriNet); } public PNMLPTNetSerializer(N petriNet) { super(petriNet); } @Override protected Element addInitialMarking(Element placeElement, Integer state){ Element markingElement = getSupport().createElement("initialMarking"); markingElement.appendChild(getSupport().createTextElement("text", state.toString())); placeElement.appendChild(markingElement); return markingElement; } @Override protected void addConstraint(Element arcElement, Integer constraint, AnnotationGraphics annotationGraphics) { Element inscriptionElement = getSupport().createElement("inscription"); Element textElement = getSupport().createTextElement("text", constraint.toString()); inscriptionElement.appendChild(textElement); if(annotationGraphics != null && annotationGraphics.hasContent()){ Element graphicsElement = getSupport().createTextGraphicsElement(annotationGraphics); if(graphicsElement != null) inscriptionElement.appendChild(graphicsElement); } arcElement.appendChild(inscriptionElement); } @Override public NetType acceptedNetType() { return NetType.PTNet; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy