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

pkiraly / metadata-qa-marc / #1527

22 Aug 2025 02:21PM UTC coverage: 90.345%. Remained the same
#1527

push

pkiraly
Improve timeline handling

5191 of 6416 new or added lines in 219 files covered. (80.91%)

886 existing lines in 78 files now uncovered.

36717 of 40641 relevant lines covered (90.34%)

0.9 hits per line

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

94.12
/src/main/java/de/gwdg/metadataqa/marc/utils/keygenerator/HumanDataFieldKeyGenerator.java
1
package de.gwdg.metadataqa.marc.utils.keygenerator;
2

3
import de.gwdg.metadataqa.marc.definition.bibliographic.SchemaType;
4
import de.gwdg.metadataqa.marc.definition.structure.DataFieldDefinition;
5
import de.gwdg.metadataqa.marc.definition.structure.SubfieldDefinition;
6

7
public class HumanDataFieldKeyGenerator extends DataFieldKeyGenerator {
8

9
  public HumanDataFieldKeyGenerator(DataFieldDefinition definition) {
10
    super(definition);
1✔
11
  }
1✔
12

13
  public HumanDataFieldKeyGenerator(DataFieldDefinition definition,
14
                                    String tag,
15
                                    SchemaType schemaType) {
16
    super(definition, tag, schemaType);
1✔
17
  }
1✔
18

19
  @Override
20
  public String forInd1() {
21
    return String.format(
1✔
22
      "%s_%s",
23
      indexTag, definition.getInd1().getIndexTag());
1✔
24
  }
25

26
  @Override
27
  public String forInd2() {
28
    return String.format(
1✔
29
      "%s_%s",
30
      indexTag, definition.getInd2().getIndexTag());
1✔
31
  }
32

33
  @Override
34
  protected String addVersionSpecifier(SubfieldDefinition versionSpecificDefinition, String key) {
35
    if (versionSpecificDefinition != null && versionSpecificDefinition.getMarcVersion() != null) {
1✔
NEW
36
      key += "_" + versionSpecificDefinition.getMarcVersion().getCode();
×
37
    }
38
    return key;
1✔
39
  }
40

41
  @Override
42
  public String getKeyForSubfield(String code, String codeForIndex) {
43
    if (schemaType != null && schemaType.equals(SchemaType.PICA)) {
1✔
44
      return String.format("%s%s", indexTag, codeForIndex);
1✔
45
    }
46
    if (!codeForIndex.isEmpty()) {
1✔
47
      return String.format("%s_%s", indexTag, codeForIndex);
1✔
48
    }
49
    return String.format("%s", indexTag);
1✔
50
  }
51

52
  @Override
53
  public String forFullField() {
54
    return indexTag + "_full";
1✔
55
  }
56
}
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