make eclipse happier by removing @Override annotations when really it's an interface method implementation
(no functional changes) git-svn-id: http://google-refine.googlecode.com/svn/trunk@62 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
parent
a025b272bd
commit
a61f35079a
@ -44,7 +44,6 @@ public class ProjectMetadata implements Serializable, Jsonizable {
|
|||||||
_modified = new Date();
|
_modified = new Date();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void write(JSONWriter writer, Properties options)
|
public void write(JSONWriter writer, Properties options)
|
||||||
throws JSONException {
|
throws JSONException {
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@ public class ConjunctiveFilteredRows implements FilteredRows {
|
|||||||
_rowFilters.add(rowFilter);
|
_rowFilters.add(rowFilter);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void accept(Project project, RowVisitor visitor) {
|
public void accept(Project project, RowVisitor visitor) {
|
||||||
if (_contextual) {
|
if (_contextual) {
|
||||||
contextualAccept(project, visitor);
|
contextualAccept(project, visitor);
|
||||||
|
@ -16,7 +16,6 @@ public class DecoratedValue implements Jsonizable {
|
|||||||
this.label = label;
|
this.label = label;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void write(JSONWriter writer, Properties options)
|
public void write(JSONWriter writer, Properties options)
|
||||||
throws JSONException {
|
throws JSONException {
|
||||||
writer.object();
|
writer.object();
|
||||||
|
@ -74,7 +74,6 @@ public class Engine implements Jsonizable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void write(JSONWriter writer, Properties options)
|
public void write(JSONWriter writer, Properties options)
|
||||||
throws JSONException {
|
throws JSONException {
|
||||||
|
|
||||||
|
@ -23,7 +23,6 @@ public class ExpressionNominalRowGrouper implements RowVisitor {
|
|||||||
_cellIndex = cellIndex;
|
_cellIndex = cellIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean visit(Project project, int rowIndex, Row row, boolean contextual) {
|
public boolean visit(Project project, int rowIndex, Row row, boolean contextual) {
|
||||||
Cell cell = row.getCell(_cellIndex);
|
Cell cell = row.getCell(_cellIndex);
|
||||||
|
|
||||||
|
@ -23,7 +23,6 @@ public class ExpressionNumericRowBinner implements RowVisitor {
|
|||||||
bins = new int[_index.getBins().length];
|
bins = new int[_index.getBins().length];
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean visit(Project project, int rowIndex, Row row, boolean contextual) {
|
public boolean visit(Project project, int rowIndex, Row row, boolean contextual) {
|
||||||
Cell cell = row.getCell(_cellIndex);
|
Cell cell = row.getCell(_cellIndex);
|
||||||
|
|
||||||
|
@ -29,7 +29,6 @@ public class ListFacet implements Facet {
|
|||||||
public ListFacet() {
|
public ListFacet() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void write(JSONWriter writer, Properties options)
|
public void write(JSONWriter writer, Properties options)
|
||||||
throws JSONException {
|
throws JSONException {
|
||||||
|
|
||||||
@ -46,7 +45,6 @@ public class ListFacet implements Facet {
|
|||||||
writer.endObject();
|
writer.endObject();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void initializeFromJSON(JSONObject o) throws Exception {
|
public void initializeFromJSON(JSONObject o) throws Exception {
|
||||||
_name = o.getString("name");
|
_name = o.getString("name");
|
||||||
_expression = o.getString("expression");
|
_expression = o.getString("expression");
|
||||||
@ -74,13 +72,11 @@ public class ListFacet implements Facet {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public RowFilter getRowFilter() {
|
public RowFilter getRowFilter() {
|
||||||
return _selection.size() == 0 ? null :
|
return _selection.size() == 0 ? null :
|
||||||
new ExpressionEqualRowFilter(_eval, _cellIndex, createMatches());
|
new ExpressionEqualRowFilter(_eval, _cellIndex, createMatches());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void computeChoices(Project project, FilteredRows filteredRows) {
|
public void computeChoices(Project project, FilteredRows filteredRows) {
|
||||||
ExpressionNominalRowGrouper grouper =
|
ExpressionNominalRowGrouper grouper =
|
||||||
new ExpressionNominalRowGrouper(_eval, _cellIndex);
|
new ExpressionNominalRowGrouper(_eval, _cellIndex);
|
||||||
|
@ -17,7 +17,6 @@ public class NominalFacetChoice implements Jsonizable {
|
|||||||
this.decoratedValue = decoratedValue;
|
this.decoratedValue = decoratedValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void write(JSONWriter writer, Properties options)
|
public void write(JSONWriter writer, Properties options)
|
||||||
throws JSONException {
|
throws JSONException {
|
||||||
writer.object();
|
writer.object();
|
||||||
|
@ -34,7 +34,6 @@ public class RangeFacet implements Facet {
|
|||||||
public RangeFacet() {
|
public RangeFacet() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void write(JSONWriter writer, Properties options)
|
public void write(JSONWriter writer, Properties options)
|
||||||
throws JSONException {
|
throws JSONException {
|
||||||
|
|
||||||
@ -70,7 +69,6 @@ public class RangeFacet implements Facet {
|
|||||||
writer.endObject();
|
writer.endObject();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void initializeFromJSON(JSONObject o) throws Exception {
|
public void initializeFromJSON(JSONObject o) throws Exception {
|
||||||
_name = o.getString("name");
|
_name = o.getString("name");
|
||||||
_expression = o.getString("expression");
|
_expression = o.getString("expression");
|
||||||
@ -98,7 +96,6 @@ public class RangeFacet implements Facet {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public RowFilter getRowFilter() {
|
public RowFilter getRowFilter() {
|
||||||
if (_selected) {
|
if (_selected) {
|
||||||
if ("min".equals(_mode)) {
|
if ("min".equals(_mode)) {
|
||||||
@ -125,7 +122,6 @@ public class RangeFacet implements Facet {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void computeChoices(Project project, FilteredRows filteredRows) {
|
public void computeChoices(Project project, FilteredRows filteredRows) {
|
||||||
Column column = project.columnModel.getColumnByCellIndex(_cellIndex);
|
Column column = project.columnModel.getColumnByCellIndex(_cellIndex);
|
||||||
|
|
||||||
|
@ -24,7 +24,6 @@ public class TextSearchFacet implements Facet {
|
|||||||
public TextSearchFacet() {
|
public TextSearchFacet() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void write(JSONWriter writer, Properties options)
|
public void write(JSONWriter writer, Properties options)
|
||||||
throws JSONException {
|
throws JSONException {
|
||||||
|
|
||||||
@ -37,7 +36,6 @@ public class TextSearchFacet implements Facet {
|
|||||||
writer.endObject();
|
writer.endObject();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void initializeFromJSON(JSONObject o) throws Exception {
|
public void initializeFromJSON(JSONObject o) throws Exception {
|
||||||
_name = o.getString("name");
|
_name = o.getString("name");
|
||||||
_cellIndex = o.getInt("cellIndex");
|
_cellIndex = o.getInt("cellIndex");
|
||||||
@ -49,7 +47,6 @@ public class TextSearchFacet implements Facet {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public RowFilter getRowFilter() {
|
public RowFilter getRowFilter() {
|
||||||
Evaluable eval = new VariableExpr("value");
|
Evaluable eval = new VariableExpr("value");
|
||||||
|
|
||||||
@ -68,7 +65,6 @@ public class TextSearchFacet implements Facet {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void computeChoices(Project project, FilteredRows filteredRows) {
|
public void computeChoices(Project project, FilteredRows filteredRows) {
|
||||||
// nothing to do
|
// nothing to do
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,6 @@ public class ExpressionEqualRowFilter implements RowFilter {
|
|||||||
_matches = matches;
|
_matches = matches;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean filterRow(Project project, int rowIndex, Row row) {
|
public boolean filterRow(Project project, int rowIndex, Row row) {
|
||||||
Cell cell = row.getCell(_cellIndex);
|
Cell cell = row.getCell(_cellIndex);
|
||||||
Properties bindings = ExpressionUtils.createBindings(project);
|
Properties bindings = ExpressionUtils.createBindings(project);
|
||||||
|
@ -17,7 +17,6 @@ abstract public class ExpressionNumberComparisonRowFilter implements RowFilter {
|
|||||||
_cellIndex = cellIndex;
|
_cellIndex = cellIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean filterRow(Project project, int rowIndex, Row row) {
|
public boolean filterRow(Project project, int rowIndex, Row row) {
|
||||||
Cell cell = row.getCell(_cellIndex);
|
Cell cell = row.getCell(_cellIndex);
|
||||||
|
|
||||||
|
@ -17,7 +17,6 @@ abstract public class ExpressionStringComparisonRowFilter implements RowFilter {
|
|||||||
_cellIndex = cellIndex;
|
_cellIndex = cellIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean filterRow(Project project, int rowIndex, Row row) {
|
public boolean filterRow(Project project, int rowIndex, Row row) {
|
||||||
Cell cell = row.getCell(_cellIndex);
|
Cell cell = row.getCell(_cellIndex);
|
||||||
Properties bindings = ExpressionUtils.createBindings(project);
|
Properties bindings = ExpressionUtils.createBindings(project);
|
||||||
|
@ -17,8 +17,8 @@ import com.metaweb.gridworks.model.Project;
|
|||||||
import com.metaweb.gridworks.model.Row;
|
import com.metaweb.gridworks.model.Row;
|
||||||
|
|
||||||
public class ExportRowsCommand extends Command {
|
public class ExportRowsCommand extends Command {
|
||||||
@Override
|
|
||||||
public void doPost(HttpServletRequest request, HttpServletResponse response)
|
public void doPost(HttpServletRequest request, HttpServletResponse response)
|
||||||
throws ServletException, IOException {
|
throws ServletException, IOException {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -50,7 +50,6 @@ public class ExportRowsCommand extends Command {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean visit(Project project, int rowIndex, Row row, boolean contextual) {
|
public boolean visit(Project project, int rowIndex, Row row, boolean contextual) {
|
||||||
boolean first = true;
|
boolean first = true;
|
||||||
for (Column column : project.columnModel.columns) {
|
for (Column column : project.columnModel.columns) {
|
||||||
@ -93,7 +92,6 @@ public class ExportRowsCommand extends Command {
|
|||||||
this.limit = limit;
|
this.limit = limit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean visit(Project project, int rowIndex, Row row, boolean contextual) {
|
public boolean visit(Project project, int rowIndex, Row row, boolean contextual) {
|
||||||
boolean r = false;
|
boolean r = false;
|
||||||
|
|
||||||
|
@ -18,8 +18,8 @@ import com.metaweb.gridworks.model.Project;
|
|||||||
import com.metaweb.gridworks.model.Row;
|
import com.metaweb.gridworks.model.Row;
|
||||||
|
|
||||||
public class GetRowsCommand extends Command {
|
public class GetRowsCommand extends Command {
|
||||||
@Override
|
|
||||||
public void doPost(HttpServletRequest request, HttpServletResponse response)
|
public void doPost(HttpServletRequest request, HttpServletResponse response)
|
||||||
throws ServletException, IOException {
|
throws ServletException, IOException {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -99,7 +99,6 @@ public class GetRowsCommand extends Command {
|
|||||||
this.limit = limit;
|
this.limit = limit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean visit(Project project, int rowIndex, Row row, boolean contextual) {
|
public boolean visit(Project project, int rowIndex, Row row, boolean contextual) {
|
||||||
boolean r = false;
|
boolean r = false;
|
||||||
|
|
||||||
|
@ -11,7 +11,6 @@ public class ControlCallExpr implements Evaluable {
|
|||||||
_control = c;
|
_control = c;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object evaluate(Properties bindings) {
|
public Object evaluate(Properties bindings) {
|
||||||
return _control.call(bindings, _args);
|
return _control.call(bindings, _args);
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,6 @@ public class FieldAccessorExpr implements Evaluable {
|
|||||||
_fieldName = fieldName;
|
_fieldName = fieldName;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object evaluate(Properties bindings) {
|
public Object evaluate(Properties bindings) {
|
||||||
Object o = _inner.evaluate(bindings);
|
Object o = _inner.evaluate(bindings);
|
||||||
if (o != null && o instanceof HasFields) {
|
if (o != null && o instanceof HasFields) {
|
||||||
|
@ -11,7 +11,6 @@ public class FunctionCallExpr implements Evaluable {
|
|||||||
_function = f;
|
_function = f;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object evaluate(Properties bindings) {
|
public Object evaluate(Properties bindings) {
|
||||||
Object[] args = new Object[_args.length];
|
Object[] args = new Object[_args.length];
|
||||||
for (int i = 0; i < _args.length; i++) {
|
for (int i = 0; i < _args.length; i++) {
|
||||||
@ -20,7 +19,6 @@ public class FunctionCallExpr implements Evaluable {
|
|||||||
return _function.call(bindings, args);
|
return _function.call(bindings, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuffer sb = new StringBuffer();
|
||||||
|
|
||||||
|
@ -11,12 +11,10 @@ public class LiteralExpr implements Evaluable {
|
|||||||
_value = value;
|
_value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object evaluate(Properties bindings) {
|
public Object evaluate(Properties bindings) {
|
||||||
return _value;
|
return _value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return _value instanceof String ? JSONObject.quote((String) _value) : _value.toString();
|
return _value instanceof String ? JSONObject.quote((String) _value) : _value.toString();
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,6 @@ public class OperatorCallExpr implements Evaluable {
|
|||||||
_op = op;
|
_op = op;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object evaluate(Properties bindings) {
|
public Object evaluate(Properties bindings) {
|
||||||
Object[] args = new Object[_args.length];
|
Object[] args = new Object[_args.length];
|
||||||
for (int i = 0; i < _args.length; i++) {
|
for (int i = 0; i < _args.length; i++) {
|
||||||
|
@ -9,12 +9,10 @@ public class VariableExpr implements Evaluable {
|
|||||||
_name = name;
|
_name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object evaluate(Properties bindings) {
|
public Object evaluate(Properties bindings) {
|
||||||
return bindings.get(_name);
|
return bindings.get(_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return _name;
|
return _name;
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,6 @@ import com.metaweb.gridworks.expr.VariableExpr;
|
|||||||
|
|
||||||
public class ForEach implements Control {
|
public class ForEach implements Control {
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object call(Properties bindings, Evaluable[] args) {
|
public Object call(Properties bindings, Evaluable[] args) {
|
||||||
if (args.length >= 3) {
|
if (args.length >= 3) {
|
||||||
Object o = args[0].evaluate(bindings);
|
Object o = args[0].evaluate(bindings);
|
||||||
|
@ -9,7 +9,6 @@ import com.metaweb.gridworks.expr.VariableExpr;
|
|||||||
|
|
||||||
public class ForNonBlank implements Control {
|
public class ForNonBlank implements Control {
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object call(Properties bindings, Evaluable[] args) {
|
public Object call(Properties bindings, Evaluable[] args) {
|
||||||
if (args.length >= 3) {
|
if (args.length >= 3) {
|
||||||
Object o = args[0].evaluate(bindings);
|
Object o = args[0].evaluate(bindings);
|
||||||
|
@ -8,7 +8,6 @@ import com.metaweb.gridworks.expr.ExpressionUtils;
|
|||||||
|
|
||||||
public class If implements Control {
|
public class If implements Control {
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object call(Properties bindings, Evaluable[] args) {
|
public Object call(Properties bindings, Evaluable[] args) {
|
||||||
if (args.length >= 3) {
|
if (args.length >= 3) {
|
||||||
Object o = args[0].evaluate(bindings);
|
Object o = args[0].evaluate(bindings);
|
||||||
|
@ -6,7 +6,6 @@ import com.metaweb.gridworks.expr.Function;
|
|||||||
|
|
||||||
public class And implements Function {
|
public class And implements Function {
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object call(Properties bindings, Object[] args) {
|
public Object call(Properties bindings, Object[] args) {
|
||||||
for (Object o : args) {
|
for (Object o : args) {
|
||||||
if (!Not.objectToBoolean(o)) {
|
if (!Not.objectToBoolean(o)) {
|
||||||
|
@ -7,7 +7,6 @@ import com.metaweb.gridworks.expr.HasFields;
|
|||||||
|
|
||||||
public class Get implements Function {
|
public class Get implements Function {
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object call(Properties bindings, Object[] args) {
|
public Object call(Properties bindings, Object[] args) {
|
||||||
if (args.length > 1 && args.length <= 3) {
|
if (args.length > 1 && args.length <= 3) {
|
||||||
Object v = args[0];
|
Object v = args[0];
|
||||||
|
@ -7,7 +7,6 @@ import com.metaweb.gridworks.expr.Function;
|
|||||||
|
|
||||||
public class IsBlank implements Function {
|
public class IsBlank implements Function {
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object call(Properties bindings, Object[] args) {
|
public Object call(Properties bindings, Object[] args) {
|
||||||
return args.length == 0 || ExpressionUtils.isBlank(args[0]);
|
return args.length == 0 || ExpressionUtils.isBlank(args[0]);
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,6 @@ import com.metaweb.gridworks.expr.Function;
|
|||||||
|
|
||||||
public class IsNotBlank implements Function {
|
public class IsNotBlank implements Function {
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object call(Properties bindings, Object[] args) {
|
public Object call(Properties bindings, Object[] args) {
|
||||||
return args.length > 0 && !ExpressionUtils.isBlank(args[0]);
|
return args.length > 0 && !ExpressionUtils.isBlank(args[0]);
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,6 @@ import com.metaweb.gridworks.expr.Function;
|
|||||||
|
|
||||||
public class IsNotNull implements Function {
|
public class IsNotNull implements Function {
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object call(Properties bindings, Object[] args) {
|
public Object call(Properties bindings, Object[] args) {
|
||||||
return args.length > 0 && args[0] != null;
|
return args.length > 0 && args[0] != null;
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,6 @@ import com.metaweb.gridworks.expr.Function;
|
|||||||
|
|
||||||
public class IsNull implements Function {
|
public class IsNull implements Function {
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object call(Properties bindings, Object[] args) {
|
public Object call(Properties bindings, Object[] args) {
|
||||||
return args.length == 0 || args[0] == null;
|
return args.length == 0 || args[0] == null;
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,6 @@ import com.metaweb.gridworks.expr.Function;
|
|||||||
|
|
||||||
public class Length implements Function {
|
public class Length implements Function {
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object call(Properties bindings, Object[] args) {
|
public Object call(Properties bindings, Object[] args) {
|
||||||
if (args.length == 1) {
|
if (args.length == 1) {
|
||||||
Object v = args[0];
|
Object v = args[0];
|
||||||
|
@ -6,7 +6,6 @@ import com.metaweb.gridworks.expr.Function;
|
|||||||
|
|
||||||
public class Not implements Function {
|
public class Not implements Function {
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object call(Properties bindings, Object[] args) {
|
public Object call(Properties bindings, Object[] args) {
|
||||||
if (args.length > 0) {
|
if (args.length > 0) {
|
||||||
return !objectToBoolean(args[0]);
|
return !objectToBoolean(args[0]);
|
||||||
|
@ -6,7 +6,6 @@ import com.metaweb.gridworks.expr.Function;
|
|||||||
|
|
||||||
public class Or implements Function {
|
public class Or implements Function {
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object call(Properties bindings, Object[] args) {
|
public Object call(Properties bindings, Object[] args) {
|
||||||
for (Object o : args) {
|
for (Object o : args) {
|
||||||
if (Not.objectToBoolean(o)) {
|
if (Not.objectToBoolean(o)) {
|
||||||
|
@ -6,7 +6,6 @@ import com.metaweb.gridworks.expr.Function;
|
|||||||
|
|
||||||
public class Replace implements Function {
|
public class Replace implements Function {
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object call(Properties bindings, Object[] args) {
|
public Object call(Properties bindings, Object[] args) {
|
||||||
if (args.length == 3) {
|
if (args.length == 3) {
|
||||||
Object v = args[0];
|
Object v = args[0];
|
||||||
|
@ -6,7 +6,6 @@ import com.metaweb.gridworks.expr.Function;
|
|||||||
|
|
||||||
public class Slice implements Function {
|
public class Slice implements Function {
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object call(Properties bindings, Object[] args) {
|
public Object call(Properties bindings, Object[] args) {
|
||||||
if (args.length > 1 && args.length <= 3) {
|
if (args.length > 1 && args.length <= 3) {
|
||||||
Object v = args[0];
|
Object v = args[0];
|
||||||
|
@ -6,7 +6,6 @@ import com.metaweb.gridworks.expr.Function;
|
|||||||
|
|
||||||
public class Split implements Function {
|
public class Split implements Function {
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object call(Properties bindings, Object[] args) {
|
public Object call(Properties bindings, Object[] args) {
|
||||||
if (args.length == 2) {
|
if (args.length == 2) {
|
||||||
Object v = args[0];
|
Object v = args[0];
|
||||||
|
@ -6,7 +6,6 @@ import com.metaweb.gridworks.expr.Function;
|
|||||||
|
|
||||||
public class ToLowercase implements Function {
|
public class ToLowercase implements Function {
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object call(Properties bindings, Object[] args) {
|
public Object call(Properties bindings, Object[] args) {
|
||||||
if (args.length == 1 && args[0] != null) {
|
if (args.length == 1 && args[0] != null) {
|
||||||
Object o = args[0];
|
Object o = args[0];
|
||||||
|
@ -6,7 +6,6 @@ import com.metaweb.gridworks.expr.Function;
|
|||||||
|
|
||||||
public class ToTitlecase implements Function {
|
public class ToTitlecase implements Function {
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object call(Properties bindings, Object[] args) {
|
public Object call(Properties bindings, Object[] args) {
|
||||||
if (args.length == 1 && args[0] != null) {
|
if (args.length == 1 && args[0] != null) {
|
||||||
Object o = args[0];
|
Object o = args[0];
|
||||||
|
@ -6,7 +6,6 @@ import com.metaweb.gridworks.expr.Function;
|
|||||||
|
|
||||||
public class ToUppercase implements Function {
|
public class ToUppercase implements Function {
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object call(Properties bindings, Object[] args) {
|
public Object call(Properties bindings, Object[] args) {
|
||||||
if (args.length == 1 && args[0] != null) {
|
if (args.length == 1 && args[0] != null) {
|
||||||
Object o = args[0];
|
Object o = args[0];
|
||||||
|
@ -11,7 +11,6 @@ public class ChangeSequence implements Change {
|
|||||||
_changes = changes;
|
_changes = changes;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void apply(Project project) {
|
public void apply(Project project) {
|
||||||
synchronized (project) {
|
synchronized (project) {
|
||||||
for (int i = 0; i < _changes.length; i++) {
|
for (int i = 0; i < _changes.length; i++) {
|
||||||
@ -20,7 +19,6 @@ public class ChangeSequence implements Change {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void revert(Project project) {
|
public void revert(Project project) {
|
||||||
synchronized (project) {
|
synchronized (project) {
|
||||||
for (int i = _changes.length - 1; i >= 0 ; i--) {
|
for (int i = _changes.length - 1; i >= 0 ; i--) {
|
||||||
|
@ -108,7 +108,6 @@ public class History implements Serializable, Jsonizable {
|
|||||||
setModified();
|
setModified();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void write(JSONWriter writer, Properties options)
|
public void write(JSONWriter writer, Properties options)
|
||||||
throws JSONException {
|
throws JSONException {
|
||||||
|
|
||||||
|
@ -42,7 +42,6 @@ public class HistoryEntry implements Serializable, Jsonizable {
|
|||||||
saveChange();
|
saveChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void write(JSONWriter writer, Properties options)
|
public void write(JSONWriter writer, Properties options)
|
||||||
throws JSONException {
|
throws JSONException {
|
||||||
|
|
||||||
|
@ -28,28 +28,23 @@ public class HistoryProcess extends Process {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void cancel() {
|
public void cancel() {
|
||||||
throw new RuntimeException("Not a long-running process");
|
throw new RuntimeException("Not a long-running process");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isImmediate() {
|
public boolean isImmediate() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void performImmediate() {
|
public void performImmediate() {
|
||||||
_project.history.undoRedo(_lastDoneID);
|
_project.history.undoRedo(_lastDoneID);
|
||||||
_done = true;
|
_done = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void startPerforming(ProcessManager manager) {
|
public void startPerforming(ProcessManager manager) {
|
||||||
throw new RuntimeException("Not a long-running process");
|
throw new RuntimeException("Not a long-running process");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void write(JSONWriter writer, Properties options)
|
public void write(JSONWriter writer, Properties options)
|
||||||
throws JSONException {
|
throws JSONException {
|
||||||
|
|
||||||
@ -60,12 +55,10 @@ public class HistoryProcess extends Process {
|
|||||||
writer.endObject();
|
writer.endObject();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isDone() {
|
public boolean isDone() {
|
||||||
throw new RuntimeException("Not a long-running process");
|
throw new RuntimeException("Not a long-running process");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isRunning() {
|
public boolean isRunning() {
|
||||||
throw new RuntimeException("Not a long-running process");
|
throw new RuntimeException("Not a long-running process");
|
||||||
}
|
}
|
||||||
|
@ -20,19 +20,16 @@ import com.metaweb.gridworks.model.Row;
|
|||||||
|
|
||||||
public class ExcelImporter implements Importer {
|
public class ExcelImporter implements Importer {
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean takesReader() {
|
public boolean takesReader() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void read(Reader reader, Project project, Properties options)
|
public void read(Reader reader, Project project, Properties options)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
|
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void read(InputStream inputStream, Project project,
|
public void read(InputStream inputStream, Project project,
|
||||||
Properties options) throws Exception {
|
Properties options) throws Exception {
|
||||||
|
|
||||||
|
@ -13,7 +13,6 @@ import com.metaweb.gridworks.model.Row;
|
|||||||
|
|
||||||
public class TsvCsvImporter implements Importer {
|
public class TsvCsvImporter implements Importer {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void read(Reader reader, Project project, Properties options)
|
public void read(Reader reader, Project project, Properties options)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
|
|
||||||
@ -68,14 +67,12 @@ public class TsvCsvImporter implements Importer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void read(InputStream inputStream, Project project,
|
public void read(InputStream inputStream, Project project,
|
||||||
Properties options) throws Exception {
|
Properties options) throws Exception {
|
||||||
|
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean takesReader() {
|
public boolean takesReader() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,6 @@ public class Cell implements Serializable, HasFields, Jsonizable {
|
|||||||
this.recon = recon;
|
this.recon = recon;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object getField(String name, Properties bindings) {
|
public Object getField(String name, Properties bindings) {
|
||||||
if ("value".equals(name)) {
|
if ("value".equals(name)) {
|
||||||
return value;
|
return value;
|
||||||
@ -30,7 +29,6 @@ public class Cell implements Serializable, HasFields, Jsonizable {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void write(JSONWriter writer, Properties options) throws JSONException {
|
public void write(JSONWriter writer, Properties options) throws JSONException {
|
||||||
writer.object();
|
writer.object();
|
||||||
writer.key("v");
|
writer.key("v");
|
||||||
|
@ -49,7 +49,6 @@ public class Column implements Serializable, Jsonizable {
|
|||||||
return _reconConfig;
|
return _reconConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void write(JSONWriter writer, Properties options)
|
public void write(JSONWriter writer, Properties options)
|
||||||
throws JSONException {
|
throws JSONException {
|
||||||
|
|
||||||
|
@ -29,7 +29,6 @@ public class ColumnGroup implements Serializable, Jsonizable {
|
|||||||
internalInitialize();
|
internalInitialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void write(JSONWriter writer, Properties options)
|
public void write(JSONWriter writer, Properties options)
|
||||||
throws JSONException {
|
throws JSONException {
|
||||||
|
|
||||||
|
@ -66,7 +66,6 @@ public class ColumnModel implements Serializable, Jsonizable {
|
|||||||
return _cellIndexToColumn.get(cellIndex);
|
return _cellIndexToColumn.get(cellIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void write(JSONWriter writer, Properties options)
|
public void write(JSONWriter writer, Properties options)
|
||||||
throws JSONException {
|
throws JSONException {
|
||||||
|
|
||||||
@ -102,7 +101,6 @@ public class ColumnModel implements Serializable, Jsonizable {
|
|||||||
|
|
||||||
_rootColumnGroups = new LinkedList<ColumnGroup>(columnGroups);
|
_rootColumnGroups = new LinkedList<ColumnGroup>(columnGroups);
|
||||||
Collections.sort(_rootColumnGroups, new Comparator<ColumnGroup>() {
|
Collections.sort(_rootColumnGroups, new Comparator<ColumnGroup>() {
|
||||||
@Override
|
|
||||||
public int compare(ColumnGroup o1, ColumnGroup o2) {
|
public int compare(ColumnGroup o1, ColumnGroup o2) {
|
||||||
int firstDiff = o1.startColumnIndex - o2.startColumnIndex;
|
int firstDiff = o1.startColumnIndex - o2.startColumnIndex;
|
||||||
return firstDiff != 0 ?
|
return firstDiff != 0 ?
|
||||||
|
@ -71,7 +71,6 @@ public class Project implements Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Collections.sort(keyedGroups, new Comparator<Group>() {
|
Collections.sort(keyedGroups, new Comparator<Group>() {
|
||||||
@Override
|
|
||||||
public int compare(Group o1, Group o2) {
|
public int compare(Group o1, Group o2) {
|
||||||
return o2.cellIndices.length - o1.cellIndices.length; // larger groups first
|
return o2.cellIndices.length - o1.cellIndices.length; // larger groups first
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,6 @@ public class Recon implements Serializable, HasFields, Jsonizable {
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object getField(String name, Properties bindings) {
|
public Object getField(String name, Properties bindings) {
|
||||||
if ("best".equals(name)) {
|
if ("best".equals(name)) {
|
||||||
return candidates.size() > 0 ? candidates.get(0) : null;
|
return candidates.size() > 0 ? candidates.get(0) : null;
|
||||||
@ -50,7 +49,6 @@ public class Recon implements Serializable, HasFields, Jsonizable {
|
|||||||
return match;
|
return match;
|
||||||
} else if ("features".equals(name)) {
|
} else if ("features".equals(name)) {
|
||||||
return new HasFields() {
|
return new HasFields() {
|
||||||
@Override
|
|
||||||
public Object getField(String name, Properties bindings) {
|
public Object getField(String name, Properties bindings) {
|
||||||
return features.get(name);
|
return features.get(name);
|
||||||
}
|
}
|
||||||
@ -70,13 +68,11 @@ public class Recon implements Serializable, HasFields, Jsonizable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public class Features implements HasFields {
|
public class Features implements HasFields {
|
||||||
@Override
|
|
||||||
public Object getField(String name, Properties bindings) {
|
public Object getField(String name, Properties bindings) {
|
||||||
return features.get(name);
|
return features.get(name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void write(JSONWriter writer, Properties options)
|
public void write(JSONWriter writer, Properties options)
|
||||||
throws JSONException {
|
throws JSONException {
|
||||||
|
|
||||||
|
@ -26,7 +26,6 @@ public class ReconCandidate implements Serializable, HasFields, Jsonizable {
|
|||||||
this.score = score;
|
this.score = score;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object getField(String name, Properties bindings) {
|
public Object getField(String name, Properties bindings) {
|
||||||
if ("id".equals(name)) {
|
if ("id".equals(name)) {
|
||||||
return topicName;
|
return topicName;
|
||||||
@ -42,7 +41,6 @@ public class ReconCandidate implements Serializable, HasFields, Jsonizable {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void write(JSONWriter writer, Properties options)
|
public void write(JSONWriter writer, Properties options)
|
||||||
throws JSONException {
|
throws JSONException {
|
||||||
|
|
||||||
|
@ -17,7 +17,6 @@ public class ReconConfig implements Serializable, Jsonizable {
|
|||||||
this.typeID = typeID;
|
this.typeID = typeID;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void write(JSONWriter writer, Properties options)
|
public void write(JSONWriter writer, Properties options)
|
||||||
throws JSONException {
|
throws JSONException {
|
||||||
|
|
||||||
|
@ -34,7 +34,6 @@ public class Row implements Serializable, HasFields, Jsonizable {
|
|||||||
return row;
|
return row;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object getField(String name, Properties bindings) {
|
public Object getField(String name, Properties bindings) {
|
||||||
if ("flagged".equals(name)) {
|
if ("flagged".equals(name)) {
|
||||||
return flagged;
|
return flagged;
|
||||||
@ -95,7 +94,6 @@ public class Row implements Serializable, HasFields, Jsonizable {
|
|||||||
public class Cells implements HasFields {
|
public class Cells implements HasFields {
|
||||||
private Cells() {};
|
private Cells() {};
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object getField(String name, Properties bindings) {
|
public Object getField(String name, Properties bindings) {
|
||||||
Project project = (Project) bindings.get("project");
|
Project project = (Project) bindings.get("project");
|
||||||
Column column = project.columnModel.getColumnByName(name);
|
Column column = project.columnModel.getColumnByName(name);
|
||||||
@ -108,7 +106,6 @@ public class Row implements Serializable, HasFields, Jsonizable {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void write(JSONWriter writer, Properties options)
|
public void write(JSONWriter writer, Properties options)
|
||||||
throws JSONException {
|
throws JSONException {
|
||||||
|
|
||||||
|
@ -21,7 +21,6 @@ public class ColumnAdditionChange extends ColumnChange {
|
|||||||
newCells.toArray(_newCells);
|
newCells.toArray(_newCells);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void apply(Project project) {
|
public void apply(Project project) {
|
||||||
synchronized (project) {
|
synchronized (project) {
|
||||||
_newCellIndex = project.columnModel.allocateNewCellIndex();
|
_newCellIndex = project.columnModel.allocateNewCellIndex();
|
||||||
@ -41,7 +40,6 @@ public class ColumnAdditionChange extends ColumnChange {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void revert(Project project) {
|
public void revert(Project project) {
|
||||||
synchronized (project) {
|
synchronized (project) {
|
||||||
for (CellAtRow cell : _newCells) {
|
for (CellAtRow cell : _newCells) {
|
||||||
|
@ -16,7 +16,6 @@ public class ColumnRemovalChange extends ColumnChange {
|
|||||||
_oldColumnIndex = index;
|
_oldColumnIndex = index;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void apply(Project project) {
|
public void apply(Project project) {
|
||||||
synchronized (project) {
|
synchronized (project) {
|
||||||
_oldColumn = project.columnModel.columns.remove(_oldColumnIndex);
|
_oldColumn = project.columnModel.columns.remove(_oldColumnIndex);
|
||||||
@ -40,7 +39,6 @@ public class ColumnRemovalChange extends ColumnChange {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void revert(Project project) {
|
public void revert(Project project) {
|
||||||
synchronized (project) {
|
synchronized (project) {
|
||||||
project.columnModel.columns.add(_oldColumnIndex, _oldColumn);
|
project.columnModel.columns.add(_oldColumnIndex, _oldColumn);
|
||||||
|
@ -21,7 +21,6 @@ public class MassCellChange implements Change {
|
|||||||
_updateRowContextDependencies = updateRowContextDependencies;
|
_updateRowContextDependencies = updateRowContextDependencies;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void apply(Project project) {
|
public void apply(Project project) {
|
||||||
synchronized (project) {
|
synchronized (project) {
|
||||||
List<Row> rows = project.rows;
|
List<Row> rows = project.rows;
|
||||||
@ -40,7 +39,6 @@ public class MassCellChange implements Change {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void revert(Project project) {
|
public void revert(Project project) {
|
||||||
synchronized (project) {
|
synchronized (project) {
|
||||||
List<Row> rows = project.rows;
|
List<Row> rows = project.rows;
|
||||||
|
@ -17,7 +17,6 @@ public class MassRowChange implements Change {
|
|||||||
_newRows = newRows;
|
_newRows = newRows;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void apply(Project project) {
|
public void apply(Project project) {
|
||||||
synchronized (project) {
|
synchronized (project) {
|
||||||
_oldRows = new ArrayList<Row>(project.rows);
|
_oldRows = new ArrayList<Row>(project.rows);
|
||||||
@ -28,7 +27,6 @@ public class MassRowChange implements Change {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void revert(Project project) {
|
public void revert(Project project) {
|
||||||
synchronized (project) {
|
synchronized (project) {
|
||||||
project.rows.clear();
|
project.rows.clear();
|
||||||
|
@ -23,14 +23,12 @@ public class ApproveNewReconOperation extends EngineDependentMassCellOperation {
|
|||||||
super(engineConfig, cellIndex, false);
|
super(engineConfig, cellIndex, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void write(JSONWriter writer, Properties options)
|
public void write(JSONWriter writer, Properties options)
|
||||||
throws JSONException {
|
throws JSONException {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected String createDescription(Column column,
|
protected String createDescription(Column column,
|
||||||
List<CellChange> cellChanges) {
|
List<CellChange> cellChanges) {
|
||||||
|
|
||||||
@ -38,7 +36,6 @@ public class ApproveNewReconOperation extends EngineDependentMassCellOperation {
|
|||||||
" cells in column " + column.getHeaderLabel();
|
" cells in column " + column.getHeaderLabel();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected RowVisitor createRowVisitor(Project project, List<CellChange> cellChanges) throws Exception {
|
protected RowVisitor createRowVisitor(Project project, List<CellChange> cellChanges) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return new RowVisitor() {
|
return new RowVisitor() {
|
||||||
@ -51,7 +48,6 @@ public class ApproveNewReconOperation extends EngineDependentMassCellOperation {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean visit(Project project, int rowIndex, Row row, boolean contextual) {
|
public boolean visit(Project project, int rowIndex, Row row, boolean contextual) {
|
||||||
if (cellIndex < row.cells.size()) {
|
if (cellIndex < row.cells.size()) {
|
||||||
Cell cell = row.cells.get(cellIndex);
|
Cell cell = row.cells.get(cellIndex);
|
||||||
|
@ -22,14 +22,12 @@ public class ApproveReconOperation extends EngineDependentMassCellOperation {
|
|||||||
super(engineConfig, cellIndex, false);
|
super(engineConfig, cellIndex, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void write(JSONWriter writer, Properties options)
|
public void write(JSONWriter writer, Properties options)
|
||||||
throws JSONException {
|
throws JSONException {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected String createDescription(Column column,
|
protected String createDescription(Column column,
|
||||||
List<CellChange> cellChanges) {
|
List<CellChange> cellChanges) {
|
||||||
|
|
||||||
@ -37,7 +35,6 @@ public class ApproveReconOperation extends EngineDependentMassCellOperation {
|
|||||||
" cells in column " + column.getHeaderLabel();
|
" cells in column " + column.getHeaderLabel();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected RowVisitor createRowVisitor(Project project, List<CellChange> cellChanges) throws Exception {
|
protected RowVisitor createRowVisitor(Project project, List<CellChange> cellChanges) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return new RowVisitor() {
|
return new RowVisitor() {
|
||||||
@ -50,7 +47,6 @@ public class ApproveReconOperation extends EngineDependentMassCellOperation {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean visit(Project project, int rowIndex, Row row, boolean contextual) {
|
public boolean visit(Project project, int rowIndex, Row row, boolean contextual) {
|
||||||
if (cellIndex < row.cells.size()) {
|
if (cellIndex < row.cells.size()) {
|
||||||
Cell cell = row.cells.get(cellIndex);
|
Cell cell = row.cells.get(cellIndex);
|
||||||
|
@ -50,7 +50,6 @@ public class ColumnAdditionOperation extends EngineDependentOperation {
|
|||||||
_columnInsertIndex = columnInsertIndex;
|
_columnInsertIndex = columnInsertIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Process createProcess(Project project, Properties options)
|
public Process createProcess(Project project, Properties options)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
|
|
||||||
@ -75,7 +74,6 @@ public class ColumnAdditionOperation extends EngineDependentOperation {
|
|||||||
return new QuickHistoryEntryProcess(project, historyEntry);
|
return new QuickHistoryEntryProcess(project, historyEntry);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void write(JSONWriter writer, Properties options)
|
public void write(JSONWriter writer, Properties options)
|
||||||
throws JSONException {
|
throws JSONException {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
@ -107,7 +105,6 @@ public class ColumnAdditionOperation extends EngineDependentOperation {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean visit(Project project, int rowIndex, Row row, boolean contextual) {
|
public boolean visit(Project project, int rowIndex, Row row, boolean contextual) {
|
||||||
Cell cell = row.getCell(cellIndex);
|
Cell cell = row.getCell(cellIndex);
|
||||||
|
|
||||||
|
@ -25,7 +25,6 @@ public class ColumnRemovalOperation implements AbstractOperation {
|
|||||||
_columnRemovalIndex = columnRemoveIndex;
|
_columnRemovalIndex = columnRemoveIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Process createProcess(Project project, Properties options)
|
public Process createProcess(Project project, Properties options)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
|
|
||||||
@ -43,7 +42,6 @@ public class ColumnRemovalOperation implements AbstractOperation {
|
|||||||
return new QuickHistoryEntryProcess(project, historyEntry);
|
return new QuickHistoryEntryProcess(project, historyEntry);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void write(JSONWriter writer, Properties options)
|
public void write(JSONWriter writer, Properties options)
|
||||||
throws JSONException {
|
throws JSONException {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
@ -21,14 +21,12 @@ public class DiscardReconOperation extends EngineDependentMassCellOperation {
|
|||||||
super(engineConfig, cellIndex, false);
|
super(engineConfig, cellIndex, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void write(JSONWriter writer, Properties options)
|
public void write(JSONWriter writer, Properties options)
|
||||||
throws JSONException {
|
throws JSONException {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected String createDescription(Column column,
|
protected String createDescription(Column column,
|
||||||
List<CellChange> cellChanges) {
|
List<CellChange> cellChanges) {
|
||||||
|
|
||||||
@ -36,7 +34,6 @@ public class DiscardReconOperation extends EngineDependentMassCellOperation {
|
|||||||
" cells in column " + column.getHeaderLabel();
|
" cells in column " + column.getHeaderLabel();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected RowVisitor createRowVisitor(Project project, List<CellChange> cellChanges) throws Exception {
|
protected RowVisitor createRowVisitor(Project project, List<CellChange> cellChanges) throws Exception {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return new RowVisitor() {
|
return new RowVisitor() {
|
||||||
@ -49,7 +46,6 @@ public class DiscardReconOperation extends EngineDependentMassCellOperation {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean visit(Project project, int rowIndex, Row row, boolean contextual) {
|
public boolean visit(Project project, int rowIndex, Row row, boolean contextual) {
|
||||||
if (cellIndex < row.cells.size()) {
|
if (cellIndex < row.cells.size()) {
|
||||||
Cell cell = row.cells.get(cellIndex);
|
Cell cell = row.cells.get(cellIndex);
|
||||||
|
@ -30,7 +30,6 @@ abstract public class EngineDependentMassCellOperation extends EngineDependentOp
|
|||||||
_updateRowContextDependencies = updateRowContextDependencies;
|
_updateRowContextDependencies = updateRowContextDependencies;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Process createProcess(Project project, Properties options) throws Exception {
|
public Process createProcess(Project project, Properties options) throws Exception {
|
||||||
Engine engine = createEngine(project);
|
Engine engine = createEngine(project);
|
||||||
|
|
||||||
|
@ -36,7 +36,6 @@ public class MultiValueCellJoinOperation implements AbstractOperation {
|
|||||||
_separator = separator;
|
_separator = separator;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Process createProcess(Project project, Properties options)
|
public Process createProcess(Project project, Properties options)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
|
|
||||||
@ -102,7 +101,6 @@ public class MultiValueCellJoinOperation implements AbstractOperation {
|
|||||||
return new QuickHistoryEntryProcess(project, historyEntry);
|
return new QuickHistoryEntryProcess(project, historyEntry);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void write(JSONWriter writer, Properties options)
|
public void write(JSONWriter writer, Properties options)
|
||||||
throws JSONException {
|
throws JSONException {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
@ -39,7 +39,6 @@ public class MultiValueCellSplitOperation implements AbstractOperation {
|
|||||||
_mode = mode;
|
_mode = mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Process createProcess(Project project, Properties options)
|
public Process createProcess(Project project, Properties options)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
|
|
||||||
@ -117,7 +116,6 @@ public class MultiValueCellSplitOperation implements AbstractOperation {
|
|||||||
return new QuickHistoryEntryProcess(project, historyEntry);
|
return new QuickHistoryEntryProcess(project, historyEntry);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void write(JSONWriter writer, Properties options)
|
public void write(JSONWriter writer, Properties options)
|
||||||
throws JSONException {
|
throws JSONException {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
@ -52,7 +52,6 @@ public class ReconOperation extends EngineDependentOperation {
|
|||||||
_typeID = typeID;
|
_typeID = typeID;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Process createProcess(Project project, Properties options) throws Exception {
|
public Process createProcess(Project project, Properties options) throws Exception {
|
||||||
Engine engine = createEngine(project);
|
Engine engine = createEngine(project);
|
||||||
|
|
||||||
@ -74,7 +73,6 @@ public class ReconOperation extends EngineDependentOperation {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean visit(Project project, int rowIndex, Row row, boolean contextual) {
|
public boolean visit(Project project, int rowIndex, Row row, boolean contextual) {
|
||||||
if (cellIndex < row.cells.size()) {
|
if (cellIndex < row.cells.size()) {
|
||||||
Cell cell = row.cells.get(cellIndex);
|
Cell cell = row.cells.get(cellIndex);
|
||||||
@ -94,7 +92,6 @@ public class ReconOperation extends EngineDependentOperation {
|
|||||||
return new ReconProcess(project, description, entries);
|
return new ReconProcess(project, description, entries);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void write(JSONWriter writer, Properties options)
|
public void write(JSONWriter writer, Properties options)
|
||||||
throws JSONException {
|
throws JSONException {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
@ -156,12 +153,10 @@ public class ReconOperation extends EngineDependentOperation {
|
|||||||
_entries = entries;
|
_entries = entries;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected Runnable getRunnable() {
|
protected Runnable getRunnable() {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void run() {
|
public void run() {
|
||||||
Map<String, List<ReconEntry>> valueToEntries = new HashMap<String, List<ReconEntry>>();
|
Map<String, List<ReconEntry>> valueToEntries = new HashMap<String, List<ReconEntry>>();
|
||||||
|
|
||||||
|
@ -27,14 +27,11 @@ public class TextTransformOperation extends EngineDependentMassCellOperation {
|
|||||||
_expression = expression;
|
_expression = expression;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void write(JSONWriter writer, Properties options)
|
public void write(JSONWriter writer, Properties options)
|
||||||
throws JSONException {
|
throws JSONException {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected String createDescription(Column column,
|
protected String createDescription(Column column,
|
||||||
List<CellChange> cellChanges) {
|
List<CellChange> cellChanges) {
|
||||||
|
|
||||||
@ -42,7 +39,6 @@ public class TextTransformOperation extends EngineDependentMassCellOperation {
|
|||||||
" cells in column " + column.getHeaderLabel() + ": " + _expression;
|
" cells in column " + column.getHeaderLabel() + ": " + _expression;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected RowVisitor createRowVisitor(Project project, List<CellChange> cellChanges) throws Exception {
|
protected RowVisitor createRowVisitor(Project project, List<CellChange> cellChanges) throws Exception {
|
||||||
Evaluable eval = new Parser(_expression).getExpression();
|
Evaluable eval = new Parser(_expression).getExpression();
|
||||||
Properties bindings = ExpressionUtils.createBindings(project);
|
Properties bindings = ExpressionUtils.createBindings(project);
|
||||||
@ -61,7 +57,6 @@ public class TextTransformOperation extends EngineDependentMassCellOperation {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean visit(Project project, int rowIndex, Row row, boolean contextual) {
|
public boolean visit(Project project, int rowIndex, Row row, boolean contextual) {
|
||||||
Cell cell = row.getCell(cellIndex);
|
Cell cell = row.getCell(cellIndex);
|
||||||
|
|
||||||
|
@ -16,7 +16,6 @@ abstract public class LongRunningProcess extends Process {
|
|||||||
_description = description;
|
_description = description;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void cancel() {
|
public void cancel() {
|
||||||
_canceled = true;
|
_canceled = true;
|
||||||
if (_thread != null && _thread.isAlive()) {
|
if (_thread != null && _thread.isAlive()) {
|
||||||
@ -24,7 +23,6 @@ abstract public class LongRunningProcess extends Process {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void write(JSONWriter writer, Properties options)
|
public void write(JSONWriter writer, Properties options)
|
||||||
throws JSONException {
|
throws JSONException {
|
||||||
|
|
||||||
|
@ -16,8 +16,6 @@ public class ProcessManager implements Jsonizable {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void write(JSONWriter writer, Properties options)
|
public void write(JSONWriter writer, Properties options)
|
||||||
throws JSONException {
|
throws JSONException {
|
||||||
|
|
||||||
|
@ -18,33 +18,27 @@ public class QuickHistoryEntryProcess extends Process {
|
|||||||
_historyEntry = historyEntry;
|
_historyEntry = historyEntry;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void cancel() {
|
public void cancel() {
|
||||||
throw new RuntimeException("Not a long-running process");
|
throw new RuntimeException("Not a long-running process");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isImmediate() {
|
public boolean isImmediate() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isRunning() {
|
public boolean isRunning() {
|
||||||
throw new RuntimeException("Not a long-running process");
|
throw new RuntimeException("Not a long-running process");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void performImmediate() {
|
public void performImmediate() {
|
||||||
_project.history.addEntry(_historyEntry);
|
_project.history.addEntry(_historyEntry);
|
||||||
_done = true;
|
_done = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void startPerforming(ProcessManager manager) {
|
public void startPerforming(ProcessManager manager) {
|
||||||
throw new RuntimeException("Not a long-running process");
|
throw new RuntimeException("Not a long-running process");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void write(JSONWriter writer, Properties options)
|
public void write(JSONWriter writer, Properties options)
|
||||||
throws JSONException {
|
throws JSONException {
|
||||||
|
|
||||||
|
@ -14,7 +14,6 @@ public class AnonymousNode extends Node {
|
|||||||
this.type = type;
|
this.type = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void write(JSONWriter writer, Properties options)
|
public void write(JSONWriter writer, Properties options)
|
||||||
throws JSONException {
|
throws JSONException {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
@ -22,7 +22,6 @@ public class CellNode extends Node {
|
|||||||
this.type = type;
|
this.type = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void write(JSONWriter writer, Properties options)
|
public void write(JSONWriter writer, Properties options)
|
||||||
throws JSONException {
|
throws JSONException {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
@ -14,7 +14,6 @@ public class ExistingTopicNode extends Node {
|
|||||||
_topic = topic;
|
_topic = topic;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void write(JSONWriter writer, Properties options)
|
public void write(JSONWriter writer, Properties options)
|
||||||
throws JSONException {
|
throws JSONException {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
@ -19,7 +19,6 @@ public class FreebaseTopic implements Serializable, Jsonizable {
|
|||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void write(JSONWriter writer, Properties options)
|
public void write(JSONWriter writer, Properties options)
|
||||||
throws JSONException {
|
throws JSONException {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
@ -27,7 +27,6 @@ public class Link implements Serializable, Jsonizable {
|
|||||||
return _target;
|
return _target;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void write(JSONWriter writer, Properties options)
|
public void write(JSONWriter writer, Properties options)
|
||||||
throws JSONException {
|
throws JSONException {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
@ -20,6 +20,7 @@ import org.json.JSONObject;
|
|||||||
public class JSObject extends Properties {
|
public class JSObject extends Properties {
|
||||||
private static final long serialVersionUID = 5864375136126385719L;
|
private static final long serialVersionUID = 5864375136126385719L;
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
static public void writeJSObject(IndentWriter writer, JSObject jso) throws IOException, JSONException {
|
static public void writeJSObject(IndentWriter writer, JSObject jso) throws IOException, JSONException {
|
||||||
writer.println("{");
|
writer.println("{");
|
||||||
writer.indent();
|
writer.indent();
|
||||||
@ -44,6 +45,7 @@ public class JSObject extends Properties {
|
|||||||
writer.print("}");
|
writer.print("}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
static public void writeCollection(IndentWriter writer, Collection c) throws IOException, JSONException {
|
static public void writeCollection(IndentWriter writer, Collection c) throws IOException, JSONException {
|
||||||
writer.println("[");
|
writer.println("[");
|
||||||
writer.indent();
|
writer.indent();
|
||||||
@ -66,7 +68,7 @@ public class JSObject extends Properties {
|
|||||||
writer.println("{");
|
writer.println("{");
|
||||||
writer.indent();
|
writer.indent();
|
||||||
{
|
{
|
||||||
String[] names = no.getNames(no);
|
String[] names = JSONObject.getNames(no);
|
||||||
for (int i = 0; i < names.length; i++) {
|
for (int i = 0; i < names.length; i++) {
|
||||||
String name = names[i];
|
String name = names[i];
|
||||||
Object value = no.get(name);
|
Object value = no.get(name);
|
||||||
@ -106,6 +108,7 @@ public class JSObject extends Properties {
|
|||||||
writer.print("]");
|
writer.print("]");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
static public void writeObject(IndentWriter writer, Object o) throws IOException, JSONException {
|
static public void writeObject(IndentWriter writer, Object o) throws IOException, JSONException {
|
||||||
if (o == null) {
|
if (o == null) {
|
||||||
writer.print("null");
|
writer.print("null");
|
||||||
|
Loading…
Reference in New Issue
Block a user