Class DataPattern
- java.lang.Object
-
- org.processmining.partialorder.models.projection.DataPattern
-
public class DataPattern extends java.lang.ObjectA data pattern can be regarded as one edge (in the projection on process model) between a transition (or a log move) and a data attribute indicating an access to a data element observed in the log. The direction of the edge depends on the access type (I/O).This class stores all information related to one data access pattern including (1) the attribute key, (2) the transition or the log move pattern which caused the data access, (3) the type (I/O) of the access, and (4) a map of all relevant trace indices and event indices to the XAttribute.
- Author:
- xlu
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringdataKeyprotected java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,org.deckfour.xes.model.XAttribute>>mapTrace2Event2Attrprotected LogMovePatternpatternprotected org.processmining.models.graphbased.directed.petrinet.elements.Transitiontransitionprotected EnumDataAccessTypetype
-
Constructor Summary
Constructors Constructor Description DataPattern(java.lang.String key, org.processmining.models.graphbased.directed.petrinet.elements.Transition t, EnumDataAccessType i)Construct a data pattern that is associated with a transitionDataPattern(java.lang.String key, LogMovePattern lmp, EnumDataAccessType i)Construct a data pattern that is associated with a log move pattern
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAttribute(int trace, int event, org.deckfour.xes.model.XAttribute a)Add a data attribute accessed by event to this data patternbooleanequals(java.lang.Object obj)Equal keys, DataAccessType, and (Transition or pattern)java.lang.StringgetDataKey()java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,org.deckfour.xes.model.XAttribute>>getMapTraceToEventToAttr()intgetNumberEvents()intgetNumberTraces()LogMovePatterngetPattern()org.processmining.models.graphbased.directed.petrinet.elements.TransitiongetTransition()EnumDataAccessTypegetType()voidsetDataKey(java.lang.String dataKey)voidsetMapTraceToEventToAttr(java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,org.deckfour.xes.model.XAttribute>> mapTrace2Event2Attrs)voidsetPattern(LogMovePattern pattern)voidsetTransition(org.processmining.models.graphbased.directed.petrinet.elements.Transition transition)voidsetType(EnumDataAccessType type)
-
-
-
Field Detail
-
dataKey
protected java.lang.String dataKey
-
transition
protected org.processmining.models.graphbased.directed.petrinet.elements.Transition transition
-
pattern
protected LogMovePattern pattern
-
type
protected EnumDataAccessType type
-
mapTrace2Event2Attr
protected java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,org.deckfour.xes.model.XAttribute>> mapTrace2Event2Attr
-
-
Constructor Detail
-
DataPattern
public DataPattern(java.lang.String key, org.processmining.models.graphbased.directed.petrinet.elements.Transition t, EnumDataAccessType i)Construct a data pattern that is associated with a transition- Parameters:
key- Data attribute key that is accessedt- Transition t that accessed the datai- Access type i that is either I (for input) or O (for output)
-
DataPattern
public DataPattern(java.lang.String key, LogMovePattern lmp, EnumDataAccessType i)Construct a data pattern that is associated with a log move pattern- Parameters:
key- Data attribute key that is accessedlmp- The log move pattern that accessed the datai- Access type i that is either I (for input) or O (for output)
-
-
Method Detail
-
getPattern
public LogMovePattern getPattern()
- Returns:
- A log move pattern if this data access is performed by a log move else null;
-
setPattern
public void setPattern(LogMovePattern pattern)
-
getMapTraceToEventToAttr
public java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,org.deckfour.xes.model.XAttribute>> getMapTraceToEventToAttr()
- Returns:
- A map that given a trace, an event of the trace, returns the relevant attribute;
-
setMapTraceToEventToAttr
public void setMapTraceToEventToAttr(java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,org.deckfour.xes.model.XAttribute>> mapTrace2Event2Attrs)
-
getNumberTraces
public int getNumberTraces()
- Returns:
- The number of traces that has the data pattern
-
getNumberEvents
public int getNumberEvents()
- Returns:
- The total number of events that has the data pattern.
-
getDataKey
public java.lang.String getDataKey()
-
setDataKey
public void setDataKey(java.lang.String dataKey)
-
getTransition
public org.processmining.models.graphbased.directed.petrinet.elements.Transition getTransition()
- Returns:
- The relevant transition of the original model of this data pattern, else null (which means this data pattern associated with a log move pattern
-
setTransition
public void setTransition(org.processmining.models.graphbased.directed.petrinet.elements.Transition transition)
-
getType
public EnumDataAccessType getType()
- Returns:
- The access type of this data pattern that is either I (for input) or O (for output)
-
setType
public void setType(EnumDataAccessType type)
- Parameters:
type- The access type that is either I (for input) or O (for output)
-
addAttribute
public void addAttribute(int trace, int event, org.deckfour.xes.model.XAttribute a)Add a data attribute accessed by event to this data pattern- Parameters:
trace- The index of trace thatevent-a-
-
equals
public boolean equals(java.lang.Object obj)
Equal keys, DataAccessType, and (Transition or pattern)- Overrides:
equalsin classjava.lang.Object
-
-