Class XESConversionHandlerImpl

  • All Implemented Interfaces:
    CSVConversionHandler<org.deckfour.xes.model.XLog>

    public class XESConversionHandlerImpl
    extends java.lang.Object
    implements CSVConversionHandler<org.deckfour.xes.model.XLog>
    Handler that creates an XLog from a CSV
    Author:
    F. Mannhardt
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void endAttribute()
      Called after the attribute has been parsed
      void endEvent()
      Called when the full row (including all attributes) have been parsed.
      void endTrace​(java.lang.String caseId)
      Called after a traces has been fully parsed.
      void errorDetected​(int lineNumber, int columnIndex, java.lang.String attributeName, java.lang.Object content, java.lang.Exception e)
      Detected an error in the conversion.
      java.lang.String getConversionErrors()  
      org.deckfour.xes.model.XLog getResult()  
      boolean hasConversionErrors()  
      boolean isShouldAddStartEventAttributes()  
      void startAttribute​(java.lang.String name, boolean value)
      Called when a boolean attribute is parsed
      void startAttribute​(java.lang.String name, double value)
      Called when a double attribute is parsed
      void startAttribute​(java.lang.String name, long value)
      Called when a long attribute is parsed
      void startAttribute​(java.lang.String name, java.lang.String value)
      Called when a string attribute is parsed
      void startAttribute​(java.lang.String name, java.util.Date value)
      Called when a date attribute is parsed
      void startEvent​(java.lang.String eventClass, java.util.Date completionTime, java.util.Date startTime)
      Called when parsing a row, thereby creating an event.
      void startLog​(CSVFile inputFile)
      Called upon start parsing the CSVFile.
      void startTrace​(java.lang.String caseId)
      Called when a new trace is encountered.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getConversionErrors

        public java.lang.String getConversionErrors()
        Specified by:
        getConversionErrors in interface CSVConversionHandler<org.deckfour.xes.model.XLog>
        Returns:
        a descriptive String of the error
      • hasConversionErrors

        public boolean hasConversionErrors()
        Specified by:
        hasConversionErrors in interface CSVConversionHandler<org.deckfour.xes.model.XLog>
        Returns:
        whether any errors have been encountered during the conversion
      • startTrace

        public void startTrace​(java.lang.String caseId)
        Description copied from interface: CSVConversionHandler
        Called when a new trace is encountered. Traces are assumed to be sorted by caseId, therefore, this is only called once per trace.
        Specified by:
        startTrace in interface CSVConversionHandler<org.deckfour.xes.model.XLog>
      • endTrace

        public void endTrace​(java.lang.String caseId)
        Description copied from interface: CSVConversionHandler
        Called after a traces has been fully parsed.
        Specified by:
        endTrace in interface CSVConversionHandler<org.deckfour.xes.model.XLog>
      • startEvent

        public void startEvent​(java.lang.String eventClass,
                               java.util.Date completionTime,
                               java.util.Date startTime)
        Description copied from interface: CSVConversionHandler
        Called when parsing a row, thereby creating an event.
        Specified by:
        startEvent in interface CSVConversionHandler<org.deckfour.xes.model.XLog>
        Parameters:
        eventClass - the name (class) of the event
        completionTime - the completion time possibly NULL
        startTime - the start time possibly NULL
      • startAttribute

        public void startAttribute​(java.lang.String name,
                                   java.lang.String value)
        Description copied from interface: CSVConversionHandler
        Called when a string attribute is parsed
        Specified by:
        startAttribute in interface CSVConversionHandler<org.deckfour.xes.model.XLog>
      • startAttribute

        public void startAttribute​(java.lang.String name,
                                   long value)
        Description copied from interface: CSVConversionHandler
        Called when a long attribute is parsed
        Specified by:
        startAttribute in interface CSVConversionHandler<org.deckfour.xes.model.XLog>
      • startAttribute

        public void startAttribute​(java.lang.String name,
                                   double value)
        Description copied from interface: CSVConversionHandler
        Called when a double attribute is parsed
        Specified by:
        startAttribute in interface CSVConversionHandler<org.deckfour.xes.model.XLog>
      • startAttribute

        public void startAttribute​(java.lang.String name,
                                   java.util.Date value)
        Description copied from interface: CSVConversionHandler
        Called when a date attribute is parsed
        Specified by:
        startAttribute in interface CSVConversionHandler<org.deckfour.xes.model.XLog>
      • startAttribute

        public void startAttribute​(java.lang.String name,
                                   boolean value)
        Description copied from interface: CSVConversionHandler
        Called when a boolean attribute is parsed
        Specified by:
        startAttribute in interface CSVConversionHandler<org.deckfour.xes.model.XLog>
      • endEvent

        public void endEvent()
        Description copied from interface: CSVConversionHandler
        Called when the full row (including all attributes) have been parsed.
        Specified by:
        endEvent in interface CSVConversionHandler<org.deckfour.xes.model.XLog>
      • getResult

        public org.deckfour.xes.model.XLog getResult()
        Specified by:
        getResult in interface CSVConversionHandler<org.deckfour.xes.model.XLog>
        Returns:
        the result of the parse
      • isShouldAddStartEventAttributes

        public boolean isShouldAddStartEventAttributes()