2010-09-22 19:04:10 +02:00
|
|
|
package com.google.refine.model;
|
2010-05-05 01:24:48 +02:00
|
|
|
|
|
|
|
import java.util.Properties;
|
|
|
|
|
2010-09-22 19:04:10 +02:00
|
|
|
import com.google.refine.Jsonizable;
|
|
|
|
import com.google.refine.history.HistoryEntry;
|
|
|
|
import com.google.refine.process.Process;
|
|
|
|
import com.google.refine.process.QuickHistoryEntryProcess;
|
2010-05-05 01:24:48 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* An abstract operation can be applied to different but similar
|
|
|
|
* projects.
|
|
|
|
*/
|
|
|
|
abstract public class AbstractOperation implements Jsonizable {
|
|
|
|
public Process createProcess(Project project, Properties options) throws Exception {
|
|
|
|
return new QuickHistoryEntryProcess(project, getBriefDescription(null)) {
|
|
|
|
@Override
|
|
|
|
protected HistoryEntry createHistoryEntry(long historyEntryID) throws Exception {
|
|
|
|
return AbstractOperation.this.createHistoryEntry(_project, historyEntryID);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
protected HistoryEntry createHistoryEntry(Project project, long historyEntryID) throws Exception {
|
2010-05-13 23:02:19 +02:00
|
|
|
throw new UnsupportedOperationException();
|
2010-05-05 01:24:48 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
protected String getBriefDescription(Project project) {
|
2010-05-13 23:02:19 +02:00
|
|
|
throw new UnsupportedOperationException();
|
2010-05-05 01:24:48 +02:00
|
|
|
}
|
|
|
|
}
|