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

pkiraly / metadata-qa-marc / #1648

06 May 2026 02:17PM UTC coverage: 90.202%. Remained the same
#1648

push

pkiraly
Reporting deprecated terms in MARC vocabularies #764: add list to LanguageCodes

1 of 1 new or added line in 1 file covered. (100.0%)

4 existing lines in 1 file now uncovered.

36749 of 40741 relevant lines covered (90.2%)

0.9 hits per line

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

60.0
/src/main/java/de/gwdg/metadataqa/marc/definition/general/codelist/CodeList.java
1
package de.gwdg.metadataqa.marc.definition.general.codelist;
2

3
import de.gwdg.metadataqa.marc.EncodedValue;
4
import de.gwdg.metadataqa.marc.MarcSubfield;
5
import de.gwdg.metadataqa.marc.model.validation.ValidationError;
6
import de.gwdg.metadataqa.marc.definition.Validator;
7

8
import java.io.Serializable;
9
import java.util.Collections;
10
import java.util.HashMap;
11
import java.util.List;
12
import java.util.Map;
13

14
public class CodeList implements Validator, Serializable {
1✔
15
  protected String name;
16
  protected String url;
17
  protected List<EncodedValue> codes;
18
  protected Map<String, EncodedValue> index = new HashMap<>();
1✔
19
  /**
20
   * a lookup table for deprecated values
21
   */
22
  protected Map<String, Boolean> deprecated = new HashMap<>();
1✔
23

24
  protected void indexCodes() {
25
    for (EncodedValue code : codes) {
1✔
26
      index.put(code.getCode(), code);
1✔
27
    }
1✔
28
  }
1✔
29

30
  public List<EncodedValue> getCodes() {
UNCOV
31
    return codes;
×
32
  }
33

34
  public EncodedValue getCode(String code) {
35
    return index.getOrDefault(code, null);
1✔
36
  }
37

38
  public boolean isValid(String code) {
39
    return index.containsKey(code);
1✔
40
  }
41

42
  public boolean isValid(String code, MarcSubfield field) {
43
    return index.containsKey(code);
×
44
  }
45

46
  public String getName() {
47
    return name;
×
48
  }
49

50
  public String getUrl() {
UNCOV
51
    return url;
×
52
  }
53

54
  public Map<String, Boolean> getDeprecated() {
UNCOV
55
    return deprecated;
×
56
  }
57

58
  @Override
59
  public List<ValidationError> getValidationErrors() {
UNCOV
60
    return Collections.emptyList();
×
61
  }
62
}
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