plugin/src/java/org/pm4knime/node/logmanipulation/merge/MergeUtil.java
public static XLog mergeLogsSeparate(XLog log0, XLog log1, ExecutionContext exec)
			throws CanceledExecutionException {
		XLog mlog = XLogUtil.clonePureLog(log0, "Merged Log");
		mlog.getAttributes().putAll(log1.getAttributes());
		mlog.getGlobalTraceAttributes().addAll(log1.getGlobalTraceAttributes());
		mlog.getGlobalEventAttributes().addAll(log1.getGlobalEventAttributes());

		// put the first event log into the mlog
		for (XTrace trace : log0) {
			exec.checkCanceled();
			mlog.add((XTrace) trace.clone());
		}

		// put the first event log into the mlog
		for (XTrace trace : log1) {
			exec.checkCanceled();
			mlog.add((XTrace) trace.clone());
		}

		return mlog;
	}
// merge two event logs with separate strategy
merge two event logs with separate strategy
merge two event logs with separate strategy
public static XLog mergeLogsSeparate(XLog log0, XLog log1, ExecutionContext exec)
			throws CanceledExecutionException {
		XLog mlog = XLogUtil.clonePureLog(log0, "Merged Log");
		mlog.getAttributes().putAll(log1.getAttributes());
		mlog.getGlobalTraceAttributes().addAll(log1.getGlobalTraceAttributes());
		mlog.getGlobalEventAttributes().addAll(log1.getGlobalEventAttributes());
		for (XTrace trace : log0) {
			exec.checkCanceled();
			mlog.add((XTrace) trace.clone());
		}
		for (XTrace trace : log1) {
			exec.checkCanceled();
			mlog.add((XTrace) trace.clone());
		}
		return mlog;
	}
public static XLog mergeLogsSeparate ( XLog log0 , XLog log1 , ExecutionContext exec ) throws CanceledExecutionException { XLog mlog = XLogUtil . clonePureLog ( log0 , "Merged Log" ) ; mlog . getAttributes ( ) . putAll ( log1 . getAttributes ( ) ) ; mlog . getGlobalTraceAttributes ( ) . addAll ( log1 . getGlobalTraceAttributes ( ) ) ; mlog . getGlobalEventAttributes ( ) . addAll ( log1 . getGlobalEventAttributes ( ) ) ; for ( XTrace trace : log0 ) { exec . checkCanceled ( ) ; mlog . add ( ( XTrace ) trace . clone ( ) ) ; } for ( XTrace trace : log1 ) { exec . checkCanceled ( ) ; mlog . add ( ( XTrace ) trace . clone ( ) ) ; } return mlog ; }
merge two event logs with separate strategy
merge two event logs with separate strategy
// put the first event log into the mlog // put the first event log into the mlog