Class DataPattern


  • public class DataPattern
    extends java.lang.Object
    A 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 Detail

      • dataKey

        protected java.lang.String dataKey
      • transition

        protected org.processmining.models.graphbased.directed.petrinet.elements.Transition transition
      • 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 accessed
        t - Transition t that accessed the data
        i - 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 accessed
        lmp - The log move pattern that accessed the data
        i - 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;
      • 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 that
        event -
        a -
      • equals

        public boolean equals​(java.lang.Object obj)
        Equal keys, DataAccessType, and (Transition or pattern)
        Overrides:
        equals in class java.lang.Object