• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

OpenRefine / OpenRefine / 13352995192

16 Feb 2025 07:44AM UTC coverage: 70.084%. First build
13352995192

Pull #7131

github

web-flow
Merge 32b1be571 into b666a8632
Pull Request #7131: Introduce GetColumnDependenciesCommand

3372 of 5491 branches covered (61.41%)

Branch coverage included in aggregate %.

15 of 17 new or added lines in 2 files covered. (88.24%)

9534 of 12924 relevant lines covered (73.77%)

3.36 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

88.89
/main/src/com/google/refine/commands/history/GetColumnDependenciesCommand.java
1

2
package com.google.refine.commands.history;
3

4
import java.io.IOException;
5
import java.util.Set;
6

7
import javax.servlet.ServletException;
8
import javax.servlet.http.HttpServletRequest;
9
import javax.servlet.http.HttpServletResponse;
10

11
import com.fasterxml.jackson.annotation.JsonProperty;
12

13
import com.google.refine.commands.Command;
14
import com.google.refine.operations.Recipe;
15
import com.google.refine.util.ParsingUtilities;
16

17
/**
18
 * Computes the column dependencies of a list of operations, provided in the same JSON format as to the
19
 * {@link ApplyOperationsCommand}.
20
 */
21
public class GetColumnDependenciesCommand extends Command {
3✔
22

23
    class Result {
5✔
24

25
        @JsonProperty("code")
4✔
26
        String code = "ok";
27
        @JsonProperty("dependencies")
28
        Set<String> dependencies;
29
        @JsonProperty("newColumns")
30
        Set<String> newColumns;
31
    }
32

33
    @Override
34
    public void doPost(HttpServletRequest request, HttpServletResponse response)
35
            throws ServletException, IOException {
36
        if (!hasValidCSRFToken(request)) {
4✔
37
            respondCSRFError(response);
2✔
38
            return;
1✔
39
        }
40
        try {
41
            String jsonString = request.getParameter("operations");
4✔
42

43
            Recipe recipe = ParsingUtilities.mapper.readValue(jsonString, Recipe.class);
6✔
44

45
            Result result = new Result();
5✔
46
            result.dependencies = recipe.getRequiredColumns();
4✔
47
            result.newColumns = recipe.getNewColumns();
4✔
48

49
            respondJSON(response, result);
3✔
NEW
50
        } catch (Exception e) {
×
NEW
51
            respondException(response, e);
×
52
        }
1✔
53
    }
1✔
54
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc