Class IMLogImpl

  • All Implemented Interfaces:
    java.lang.Cloneable, java.lang.Iterable<IMTrace>, IMLog
    Direct Known Subclasses:
    IMLogImplPartialTraces

    public class IMLogImpl
    extends java.lang.Object
    implements IMLog
    • Constructor Summary

      Constructors 
      Constructor Description
      IMLogImpl​(org.deckfour.xes.model.XLog xLog, org.deckfour.xes.classification.XEventClassifier classifier, org.processmining.plugins.InductiveMiner.mining.logs.XLifeCycleClassifier lifeCycleClassifier)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int addActivity​(java.lang.String activityName)
      Add an activity (if it was not yet added yet).
      IMLogImpl clone()  
      java.lang.String[] getActivities()  
      java.lang.String getActivity​(int index)  
      static int getActivityIndex​(long event)  
      static long getEvent​(int activityIndex, int lifeCycleTransitionIndex)  
      static org.processmining.plugins.InductiveMiner.mining.logs.XLifeCycleClassifier.Transition getLifeCycleTransition​(long event)  
      int getNumberOfActivities()  
      IMTraceIterator iterator()
      Do not mix iterators when removing events.
      void removeEvent​(int traceIndex, int eventIndex)  
      void removeTrace​(int traceIndex)  
      void setTrace​(long[] trace, int index)  
      int size()  
      int splitTrace​(int traceIndex, int eventIndex)
      Split a trace: add a new trace at the start of the log, containing all events up till (excluding) eventIndex.
      java.lang.String toString()  
      protected void toString​(java.lang.StringBuilder result, int traceIndex)  
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Constructor Detail

      • IMLogImpl

        public IMLogImpl​(org.deckfour.xes.model.XLog xLog,
                         org.deckfour.xes.classification.XEventClassifier classifier,
                         org.processmining.plugins.InductiveMiner.mining.logs.XLifeCycleClassifier lifeCycleClassifier)
    • Method Detail

      • size

        public int size()
        Specified by:
        size in interface IMLog
        Returns:
        The number of traces in the log.
      • iterator

        public IMTraceIterator iterator()
        Description copied from interface: IMLog
        Do not mix iterators when removing events.
        Specified by:
        iterator in interface IMLog
        Specified by:
        iterator in interface java.lang.Iterable<IMTrace>
      • clone

        public IMLogImpl clone()
        Specified by:
        clone in interface IMLog
        Overrides:
        clone in class java.lang.Object
        Returns:
        a completely independent copy. This is the only method that should be used in log splitting, such that extra information can be preserved by the log implementation.
      • getActivity

        public java.lang.String getActivity​(int index)
        Specified by:
        getActivity in interface IMLog
      • getActivities

        public java.lang.String[] getActivities()
        Specified by:
        getActivities in interface IMLog
      • setTrace

        public void setTrace​(long[] trace,
                             int index)
      • addActivity

        public int addActivity​(java.lang.String activityName)
        Description copied from interface: IMLog
        Add an activity (if it was not yet added yet).
        Specified by:
        addActivity in interface IMLog
        Returns:
        the (possibly new) index of the activity.
      • getEvent

        public static long getEvent​(int activityIndex,
                                    int lifeCycleTransitionIndex)
      • getActivityIndex

        public static int getActivityIndex​(long event)
      • getLifeCycleTransition

        public static org.processmining.plugins.InductiveMiner.mining.logs.XLifeCycleClassifier.Transition getLifeCycleTransition​(long event)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • toString

        protected void toString​(java.lang.StringBuilder result,
                                int traceIndex)
      • removeTrace

        public void removeTrace​(int traceIndex)
        Specified by:
        removeTrace in interface IMLog
      • removeEvent

        public void removeEvent​(int traceIndex,
                                int eventIndex)
        Specified by:
        removeEvent in interface IMLog
      • splitTrace

        public int splitTrace​(int traceIndex,
                              int eventIndex)
        Description copied from interface: IMLog
        Split a trace: add a new trace at the start of the log, containing all events up till (excluding) eventIndex. Furthermore, remove all events up to (excluding) eventIndex from the trace at traceIndex.
        Specified by:
        splitTrace in interface IMLog
        Returns:
        the index of the inserted trace