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

CeON / dataverse / 987

pending completion
987

push

jenkins

GitHub
Closes #2339: Change File Labels API (#2347)

124 of 124 new or added lines in 5 files covered. (100.0%)

21199 of 69091 relevant lines covered (30.68%)

0.31 hits per line

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

92.0
/dataverse-webapp/src/main/java/edu/harvard/iq/dataverse/api/dto/FileLabelsChangeOptionsDTO.java
1
package edu.harvard.iq.dataverse.api.dto;
2

3
import org.apache.commons.lang3.StringUtils;
4

5
import java.util.ArrayList;
6
import java.util.List;
7

8
public class FileLabelsChangeOptionsDTO {
1✔
9
    /**
10
     * Ids of files that should undergo the label change even if they're not
11
     * matching the pattern
12
     */
13
    private List<Long> filesToIncludeIds = new ArrayList<>();
1✔
14
    /** Ids of files that should be excluded from label change */
15
    private List<Long> filesToExcludeIds = new ArrayList<>();
1✔
16

17
    /**
18
     * Pattern used to find the files with matching labels. If the wildcard is
19
     * used, the pattern is matched against the whole label, otherwise it's
20
     * only checked whether the pattern is contained within the label.
21
     */
22
    private String pattern = "*";
1✔
23

24
    /**
25
     * Java-type regex for describing the fragment of label that should
26
     * be replaced
27
     */
28
    private String from = StringUtils.EMPTY;
1✔
29

30
    /** Replacement for fragments matching 'from' pattern */
31
    private String to = StringUtils.EMPTY;
1✔
32

33
    /** When set to true result of the replace won't be saved */
34
    private boolean preview = false;
1✔
35

36
    // -------------------- GETTERS --------------------
37

38
    public List<Long> getFilesToIncludeIds() {
39
        return filesToIncludeIds;
1✔
40
    }
41

42
    public List<Long> getFilesToExcludeIds() {
43
        return filesToExcludeIds;
1✔
44
    }
45

46
    public String getPattern() {
47
        return pattern;
1✔
48
    }
49

50
    public String getFrom() {
51
        return from;
1✔
52
    }
53

54
    public String getTo() {
55
        return to;
1✔
56
    }
57

58
    public boolean isPreview() {
59
        return preview;
1✔
60
    }
61

62
    // -------------------- SETTERS --------------------
63

64
    public void setFilesToIncludeIds(List<Long> filesToIncludeIds) {
65
        this.filesToIncludeIds = filesToIncludeIds;
1✔
66
    }
1✔
67

68
    public void setFilesToExcludeIds(List<Long> filesToExcludeIds) {
69
        this.filesToExcludeIds = filesToExcludeIds;
1✔
70
    }
1✔
71

72
    public void setPattern(String pattern) {
73
        this.pattern = pattern;
1✔
74
    }
1✔
75

76
    public void setFrom(String from) {
77
        this.from = from;
1✔
78
    }
1✔
79

80
    public void setTo(String to) {
81
        this.to = to;
1✔
82
    }
1✔
83

84
    public void setPreview(boolean preview) {
85
        this.preview = preview;
×
86
    }
×
87
}
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