Search in sources :

Example 1 with ColumnRemovalChange

use of com.google.refine.model.changes.ColumnRemovalChange in project OpenRefine by OpenRefine.

the class ColumnRemovalOperation method createHistoryEntry.

@Override
protected HistoryEntry createHistoryEntry(Project project, long historyEntryID) throws Exception {
    Column column = project.columnModel.getColumnByName(_columnName);
    if (column == null) {
        throw new Exception("No column named " + _columnName);
    }
    String description = "Remove column " + column.getName();
    Change change = new ColumnRemovalChange(project.columnModel.columns.indexOf(column));
    return new HistoryEntry(historyEntryID, project, description, ColumnRemovalOperation.this, change);
}
Also used : ColumnRemovalChange(com.google.refine.model.changes.ColumnRemovalChange) Column(com.google.refine.model.Column) HistoryEntry(com.google.refine.history.HistoryEntry) Change(com.google.refine.history.Change) ColumnRemovalChange(com.google.refine.model.changes.ColumnRemovalChange) JSONException(org.json.JSONException)

Aggregations

Change (com.google.refine.history.Change)1 HistoryEntry (com.google.refine.history.HistoryEntry)1 Column (com.google.refine.model.Column)1 ColumnRemovalChange (com.google.refine.model.changes.ColumnRemovalChange)1 JSONException (org.json.JSONException)1