de.uni.freiburg.iig.telematik.sepia.graphic.netgraphics.TokenGraphics Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of SEPIA Show documentation
Show all versions of SEPIA Show documentation
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.graphic.netgraphics;
import de.invation.code.toval.validate.Validate;
import de.uni.freiburg.iig.telematik.sepia.graphic.netgraphics.attributes.Position;
/**
*
* Token graphics attribute class containing the attribute token position.
*
*
* @author Thomas Stocker
* @author Adrian Lange
*/
public class TokenGraphics extends AbstractObjectGraphics {
/** Default position */
public static final Position DEFAULT_TOKENPOSITION = new Position();
private Position tokenposition;
public TokenGraphics() {
tokenposition = DEFAULT_TOKENPOSITION;
}
public TokenGraphics(Position tokenposition) {
setTokenposition(tokenposition);
}
public Position getTokenposition() {
return tokenposition;
}
public void setTokenposition(Position tokenposition) {
Validate.notNull(tokenposition);
this.tokenposition = tokenposition;
}
@Override
public boolean hasContent() {
return tokenposition.hasContent();
}
@Override
public String toString() {
StringBuilder str = new StringBuilder();
str.append("[");
if (tokenposition != DEFAULT_TOKENPOSITION) {
str.append(tokenposition);
}
str.append("]");
return str.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy