Class XESConversionHandlerImpl
- java.lang.Object
-
- org.processmining.log.csvimport.handler.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
-
-
Constructor Summary
Constructors Constructor Description XESConversionHandlerImpl(CSVConfig importConfig, CSVConversionConfig conversionConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidendAttribute()Called after the attribute has been parsedvoidendEvent()Called when the full row (including all attributes) have been parsed.voidendTrace(java.lang.String caseId)Called after a traces has been fully parsed.voiderrorDetected(int lineNumber, int columnIndex, java.lang.String attributeName, java.lang.Object content, java.lang.Exception e)Detected an error in the conversion.java.lang.StringgetConversionErrors()org.deckfour.xes.model.XLoggetResult()booleanhasConversionErrors()booleanisShouldAddStartEventAttributes()voidstartAttribute(java.lang.String name, boolean value)Called when a boolean attribute is parsedvoidstartAttribute(java.lang.String name, double value)Called when a double attribute is parsedvoidstartAttribute(java.lang.String name, long value)Called when a long attribute is parsedvoidstartAttribute(java.lang.String name, java.lang.String value)Called when a string attribute is parsedvoidstartAttribute(java.lang.String name, java.util.Date value)Called when a date attribute is parsedvoidstartEvent(java.lang.String eventClass, java.util.Date completionTime, java.util.Date startTime)Called when parsing a row, thereby creating an event.voidstartLog(CSVFile inputFile)Called upon start parsing theCSVFile.voidstartTrace(java.lang.String caseId)Called when a new trace is encountered.
-
-
-
Constructor Detail
-
XESConversionHandlerImpl
public XESConversionHandlerImpl(CSVConfig importConfig, CSVConversionConfig conversionConfig)
-
-
Method Detail
-
getConversionErrors
public java.lang.String getConversionErrors()
- Specified by:
getConversionErrorsin interfaceCSVConversionHandler<org.deckfour.xes.model.XLog>- Returns:
- a descriptive String of the error
-
hasConversionErrors
public boolean hasConversionErrors()
- Specified by:
hasConversionErrorsin interfaceCSVConversionHandler<org.deckfour.xes.model.XLog>- Returns:
- whether any errors have been encountered during the conversion
-
startLog
public void startLog(CSVFile inputFile)
Description copied from interface:CSVConversionHandlerCalled upon start parsing theCSVFile.- Specified by:
startLogin interfaceCSVConversionHandler<org.deckfour.xes.model.XLog>
-
startTrace
public void startTrace(java.lang.String caseId)
Description copied from interface:CSVConversionHandlerCalled when a new trace is encountered. Traces are assumed to be sorted by caseId, therefore, this is only called once per trace.- Specified by:
startTracein interfaceCSVConversionHandler<org.deckfour.xes.model.XLog>
-
endTrace
public void endTrace(java.lang.String caseId)
Description copied from interface:CSVConversionHandlerCalled after a traces has been fully parsed.- Specified by:
endTracein interfaceCSVConversionHandler<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:CSVConversionHandlerCalled when parsing a row, thereby creating an event.- Specified by:
startEventin interfaceCSVConversionHandler<org.deckfour.xes.model.XLog>- Parameters:
eventClass- the name (class) of the eventcompletionTime- the completion time possibly NULLstartTime- the start time possibly NULL
-
startAttribute
public void startAttribute(java.lang.String name, java.lang.String value)Description copied from interface:CSVConversionHandlerCalled when a string attribute is parsed- Specified by:
startAttributein interfaceCSVConversionHandler<org.deckfour.xes.model.XLog>
-
startAttribute
public void startAttribute(java.lang.String name, long value)Description copied from interface:CSVConversionHandlerCalled when a long attribute is parsed- Specified by:
startAttributein interfaceCSVConversionHandler<org.deckfour.xes.model.XLog>
-
startAttribute
public void startAttribute(java.lang.String name, double value)Description copied from interface:CSVConversionHandlerCalled when a double attribute is parsed- Specified by:
startAttributein interfaceCSVConversionHandler<org.deckfour.xes.model.XLog>
-
startAttribute
public void startAttribute(java.lang.String name, java.util.Date value)Description copied from interface:CSVConversionHandlerCalled when a date attribute is parsed- Specified by:
startAttributein interfaceCSVConversionHandler<org.deckfour.xes.model.XLog>
-
startAttribute
public void startAttribute(java.lang.String name, boolean value)Description copied from interface:CSVConversionHandlerCalled when a boolean attribute is parsed- Specified by:
startAttributein interfaceCSVConversionHandler<org.deckfour.xes.model.XLog>
-
endAttribute
public void endAttribute()
Description copied from interface:CSVConversionHandlerCalled after the attribute has been parsed- Specified by:
endAttributein interfaceCSVConversionHandler<org.deckfour.xes.model.XLog>
-
endEvent
public void endEvent()
Description copied from interface:CSVConversionHandlerCalled when the full row (including all attributes) have been parsed.- Specified by:
endEventin interfaceCSVConversionHandler<org.deckfour.xes.model.XLog>
-
getResult
public org.deckfour.xes.model.XLog getResult()
- Specified by:
getResultin interfaceCSVConversionHandler<org.deckfour.xes.model.XLog>- Returns:
- the result of the parse
-
errorDetected
public void errorDetected(int lineNumber, int columnIndex, java.lang.String attributeName, java.lang.Object content, java.lang.Exception e) throws CSVConversionExceptionDescription copied from interface:CSVConversionHandlerDetected an error in the conversion.- Specified by:
errorDetectedin interfaceCSVConversionHandler<org.deckfour.xes.model.XLog>- Throws:
CSVConversionException
-
isShouldAddStartEventAttributes
public boolean isShouldAddStartEventAttributes()
-
-