Class DotToken
- java.lang.Object
-
- org.processmining.plugins.inductiveVisualMiner.animation.DotToken
-
- All Implemented Interfaces:
java.lang.Iterable<DotTokenStep>
public class DotToken extends java.lang.Object implements java.lang.Iterable<DotTokenStep>
-
-
Constructor Summary
Constructors Constructor Description DotToken(LocalDotNode startPosition, java.lang.Double startTime, boolean fade)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddStepInNode(LocalDotNode node, java.lang.Double arrivalTime)voidaddStepOverEdge(LocalDotEdge edge, java.lang.Double arrivalTime)voidaddSubToken(DotToken token)DotTokenStepget(int i)java.util.Set<DotToken>getAllTokensRecursively()Returns a set containing this token and all its subtokens.LocalDotNodegetLastPosition()Returns the last known dot node in this token.DotTokenStepgetLastStep()java.util.Set<DotToken>getLastSubTokens()Returns the set of subtokens that start at the last known position in this token.java.lang.DoublegetLastTime()LocalDotNodegetStartPosition()Returns the start dot node of this token.java.lang.DoublegetStartTime()Returns the start time of this token.java.util.Set<DotToken>getSubTokensAtPoint(int index)Returns a set of tokens that start after the given index.LocalDotNodegetTarget(int index)Gets the target dot node after the edge of the given index.java.lang.DoublegetTimestamp(int index)GetsintgetTokenDestination(int index)Given an index, returns the index of the parallel join where index is the parallel split of.booleanhasSubTokensAt(int index)Returns whether there are subtokens after the given index.booleanisAllTimestampsSet()Returns whether all timestamps have been setbooleanisFade()Returns whether this token is supposed to be faded in and out at start and end.booleanisParallelJoin(int index)Returns whether the position after index is a parallel join, i.e.java.util.Iterator<DotTokenStep>iterator()voidsetStartTime(double startTime)voidsetTimestampOfPoint(int index, java.lang.Double timestamp)intsize()java.lang.StringtoString()java.lang.StringtoString(int indent)
-
-
-
Constructor Detail
-
DotToken
public DotToken(LocalDotNode startPosition, java.lang.Double startTime, boolean fade)
-
-
Method Detail
-
getLastTime
public java.lang.Double getLastTime()
- Returns:
- the last known time stamp in this token; Can return null.
-
getLastPosition
public LocalDotNode getLastPosition()
Returns the last known dot node in this token.- Returns:
-
getTarget
public LocalDotNode getTarget(int index)
Gets the target dot node after the edge of the given index. -1 gives the start position- Parameters:
index-- Returns:
-
getTimestamp
public java.lang.Double getTimestamp(int index)
Gets- Parameters:
index-- Returns:
- the arrival time stamp of the step at the given index. -1 gives the start time.
-
setTimestampOfPoint
public void setTimestampOfPoint(int index, java.lang.Double timestamp)
-
getAllTokensRecursively
public java.util.Set<DotToken> getAllTokensRecursively()
Returns a set containing this token and all its subtokens.- Returns:
-
addStepInNode
public void addStepInNode(LocalDotNode node, java.lang.Double arrivalTime)
-
addStepOverEdge
public void addStepOverEdge(LocalDotEdge edge, java.lang.Double arrivalTime)
-
addSubToken
public void addSubToken(DotToken token)
-
getLastStep
public DotTokenStep getLastStep()
-
getSubTokensAtPoint
public java.util.Set<DotToken> getSubTokensAtPoint(int index)
Returns a set of tokens that start after the given index. Subtokens cannot start at the start of the token, so -1 is not a valid input.- Parameters:
index-- Returns:
-
getLastSubTokens
public java.util.Set<DotToken> getLastSubTokens()
Returns the set of subtokens that start at the last known position in this token.- Returns:
-
getStartPosition
public LocalDotNode getStartPosition()
Returns the start dot node of this token.- Returns:
-
setStartTime
public void setStartTime(double startTime)
-
getStartTime
public java.lang.Double getStartTime()
Returns the start time of this token.- Returns:
-
isFade
public boolean isFade()
Returns whether this token is supposed to be faded in and out at start and end.- Returns:
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
toString
public java.lang.String toString(int indent)
-
hasSubTokensAt
public boolean hasSubTokensAt(int index)
Returns whether there are subtokens after the given index. A token cannot have subtokens at its start position, so -1 is not a valid input.- Parameters:
index-- Returns:
-
getTokenDestination
public int getTokenDestination(int index)
Given an index, returns the index of the parallel join where index is the parallel split of.- Parameters:
index-- Returns:
-
isParallelJoin
public boolean isParallelJoin(int index)
Returns whether the position after index is a parallel join, i.e. has ending sub tokens.- Parameters:
index-- Returns:
-
isAllTimestampsSet
public boolean isAllTimestampsSet()
Returns whether all timestamps have been set- Returns:
-
iterator
public java.util.Iterator<DotTokenStep> iterator()
- Specified by:
iteratorin interfacejava.lang.Iterable<DotTokenStep>
-
size
public int size()
-
get
public DotTokenStep get(int i)
-
-