• 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

86.14
/src/main/java/de/gwdg/metadataqa/marc/cli/parameters/CommonParameters.java
1
package de.gwdg.metadataqa.marc.cli.parameters;
2

3
import com.fasterxml.jackson.annotation.JsonIgnore;
4
import de.gwdg.metadataqa.marc.cli.utils.IgnorableFields;
5
import de.gwdg.metadataqa.marc.cli.utils.ignorablerecords.RecordFilter;
6
import de.gwdg.metadataqa.marc.cli.utils.ignorablerecords.RecordFilterFactory;
7
import de.gwdg.metadataqa.marc.cli.utils.ignorablerecords.RecordIgnorator;
8
import de.gwdg.metadataqa.marc.cli.utils.ignorablerecords.RecordIgnoratorFactory;
9
import de.gwdg.metadataqa.marc.dao.MarcLeader;
10
import de.gwdg.metadataqa.marc.definition.DataSource;
11
import de.gwdg.metadataqa.marc.definition.MarcFormat;
12
import de.gwdg.metadataqa.marc.definition.MarcVersion;
13
import de.gwdg.metadataqa.marc.definition.bibliographic.SchemaType;
14
import de.gwdg.metadataqa.marc.utils.alephseq.AlephseqLine;
15
import org.apache.commons.cli.CommandLine;
16
import org.apache.commons.cli.CommandLineParser;
17
import org.apache.commons.cli.DefaultParser;
18
import org.apache.commons.cli.Options;
19
import org.apache.commons.cli.ParseException;
20
import org.apache.commons.lang3.StringUtils;
21

22
import java.io.InputStream;
23
import java.io.Serializable;
24

25
public class CommonParameters implements Serializable {
26

27
  private static final long serialVersionUID = -4760615880678251867L;
28

29
  protected String[] args;
30
  public static final String DEFAULT_OUTPUT_DIR = ".";
31
  public static final MarcVersion DEFAULT_MARC_VERSION = MarcVersion.MARC21;
1✔
32

33
  protected MarcVersion marcVersion = DEFAULT_MARC_VERSION;
1✔
34
  protected MarcFormat marcFormat = MarcFormat.ISO;
1✔
35
  protected DataSource dataSource = DataSource.FILE;
1✔
36
  protected boolean doHelp;
37
  protected boolean doLog = true;
1✔
38
  protected int limit = -1;
1✔
39
  protected int offset = -1;
1✔
40
  protected String id = null;
1✔
41
  protected MarcLeader.Type defaultRecordType = MarcLeader.Type.BOOKS;
1✔
42
  protected boolean fixAlephseq = false;
1✔
43
  protected boolean fixAlma = false;
1✔
44
  protected boolean fixKbr = false;
1✔
45
  protected boolean alephseq = false;
1✔
46
  protected boolean marcxml = false;
1✔
47
  protected boolean lineSeparated = false;
1✔
48
  protected boolean trimId = false;
1✔
49
  private String outputDir = DEFAULT_OUTPUT_DIR;
1✔
50
  protected String ignorableRecords;
51
  @JsonIgnore
52
  protected RecordIgnorator recordIgnorator;
53
  protected RecordFilter recordFilter;
54
  protected IgnorableFields ignorableFields = new IgnorableFields();
1✔
55
  protected InputStream stream = null;
1✔
56
  protected String defaultEncoding = null;
1✔
57

58
  @JsonIgnore
1✔
59
  protected Options options = new Options();
60
  protected static final CommandLineParser parser = new DefaultParser();
1✔
61
  protected CommandLine cmd;
62
  private boolean isOptionSet = false;
1✔
63
  private AlephseqLine.TYPE alephseqLineType;
64
  private String picaIdField = "003@$0";
1✔
65
  private String picaSubfieldSeparator = "$";
1✔
66
  private String picaSchemaFile;
67
  private String picaRecordTypeField = "002@$0";
1✔
68
  private SchemaType schemaType = SchemaType.MARC21;
1✔
69
  private String groupBy;
70
  private String groupListFile;
71
  private String solrForScoresUrl;
72
  private Boolean processRecordsWithoutId = false;
1✔
73

74
  protected void setOptions() {
75
    if (!isOptionSet) {
1✔
76
      options.addOption("m", "marcVersion", true, "MARC version ('OCLC' or 'DNB')");
1✔
77
      options.addOption("h", "help", false, "display help");
1✔
78
      options.addOption("n", "nolog", false, "do not display log messages");
1✔
79
      options.addOption("l", "limit", true, "limit the number of records to process");
1✔
80
      options.addOption("o", "offset", true, "the first record to process");
1✔
81
      options.addOption("i", "id", true, "the MARC identifier (content of 001)");
1✔
82
      options.addOption("d", "defaultRecordType", true, "the default record type if the record's type is undetectable");
1✔
83
      options.addOption("q", "fixAlephseq", false, "fix the known issues of Alephseq format");
1✔
84
      options.addOption("a", "fixAlma", false, "fix the known issues of Alma format");
1✔
85
      options.addOption("b", "fixKbr", false, "fix the known issues of Alma format");
1✔
86
      options.addOption("p", "alephseq", false, "the source is in Alephseq format");
1✔
87
      options.addOption("x", "marcxml", false, "the source is in MARCXML format");
1✔
88
      options.addOption("y", "lineSeparated", false, "the source is in line separated MARC format");
1✔
89
      options.addOption("t", "outputDir", true, "output directory");
1✔
90
      options.addOption("r", "trimId", false, "remove spaces from the end of record IDs");
1✔
91
      options.addOption("z", "ignorableFields", true, "ignore fields from the analysis");
1✔
92
      options.addOption("v", "ignorableRecords", true, "ignore records from the analysis");
1✔
93
      options.addOption("f", "marcFormat", true, "MARC format (like 'ISO' or 'MARCXML')");
1✔
94
      options.addOption("s", "dataSource", true, "data source (file of stream)");
1✔
95
      options.addOption("g", "defaultEncoding", true, "default character encoding");
1✔
96
      options.addOption("1", "alephseqLineType", true, "Alephseq line type");
1✔
97
      options.addOption("2", "picaIdField", true, "PICA id field");
1✔
98
      options.addOption("u", "picaSubfieldSeparator", true, "PICA subfield separator");
1✔
99
      options.addOption("j", "picaSchemaFile", true, "Avram PICA schema file");
1✔
100
      // For now, I'll be using picaSchemaFile for both PICA and UNIMARC. The option could be renamed later or a separate option could be added
101
      options.addOption("w", "schemaType", true, "metadata schema type ('MARC21', 'UNIMARC', or 'PICA')");
1✔
102
      options.addOption("k", "picaRecordType", true, "picaRecordType");
1✔
103
      options.addOption("c", "allowableRecords", true, "allow records for the analysis");
1✔
104
      options.addOption("e", "groupBy", true, "group the results by the value of this data element (e.g. the ILN of  library)");
1✔
105
      options.addOption("3", "groupListFile", true, "the file which contains a list of ILN codes");
1✔
106
      options.addOption("4", "solrForScoresUrl", true, "the URL of the Solr server used to store scores");
1✔
107
      options.addOption("5", "processRecordsWithoutId", false, "process the record even it does not have an identifier");
1✔
108
      isOptionSet = true;
1✔
109
    }
110
  }
1✔
111

112
  public CommonParameters() {
1✔
113
  }
1✔
114

115
  public CommonParameters(String[] arguments)  throws ParseException {
1✔
116
    cmd = parser.parse(getOptions(), arguments);
1✔
117

118
    readSchemaType();
1✔
119
    readMarcVersion();
1✔
120
    readMarcFormat();
1✔
121
    readDataSource();
1✔
122
    doHelp = cmd.hasOption("help");
1✔
123
    doLog = !cmd.hasOption("nolog");
1✔
124
    readLimit();
1✔
125
    readOffset();
1✔
126
    if (offset > -1 && limit > -1)
1✔
127
      limit += offset;
1✔
128
    readId();
1✔
129
    readDefaultRecordType();
1✔
130
    setAlephseq(cmd.hasOption("alephseq"));
1✔
131
    fixAlephseq = cmd.hasOption("fixAlephseq");
1✔
132
    fixAlma = cmd.hasOption("fixAlma");
1✔
133
    fixKbr = cmd.hasOption("fixKbr");
1✔
134
    setMarcxml(cmd.hasOption("marcxml"));
1✔
135
    lineSeparated = cmd.hasOption("lineSeparated");
1✔
136
    readOutputDir();
1✔
137
    trimId = cmd.hasOption("trimId");
1✔
138
    readIgnorableFields();
1✔
139
    readIgnorableRecords();
1✔
140
    readAllowableRecords();
1✔
141
    readDefaultEncoding();
1✔
142
    readAlephseqLineType();
1✔
143
    readPicaIdField();
1✔
144
    readPicaSubfieldSeparator();
1✔
145
    readPicaSchemaFile();
1✔
146
    readPicaRecordType();
1✔
147
    readGroupBy();
1✔
148
    readGroupListFile();
1✔
149
    readSolrForScoresUrl();
1✔
150
    readProcessRecordsWithoutId();
1✔
151

152
    args = cmd.getArgs();
1✔
153
  }
1✔
154

155
  private void readPicaSchemaFile() {
156
    if (cmd.hasOption("picaSchemaFile"))
1✔
UNCOV
157
      picaSchemaFile = cmd.getOptionValue("picaSchemaFile");
×
158
  }
1✔
159

160
  private void readPicaRecordType() {
161
    if (cmd.hasOption("picaRecordType"))
1✔
162
      picaRecordTypeField = cmd.getOptionValue("picaRecordType");
1✔
163
  }
1✔
164

165
  private void readGroupBy() {
166
    if (cmd.hasOption("groupBy"))
1✔
167
      groupBy = cmd.getOptionValue("groupBy");
1✔
168
  }
1✔
169

170
  private void readGroupListFile() {
171
    if (cmd.hasOption("groupListFile"))
1✔
172
      groupListFile = cmd.getOptionValue("groupListFile");
1✔
173
  }
1✔
174

175
  private void readSolrForScoresUrl() {
176
    if (cmd.hasOption("solrForScoresUrl"))
1✔
177
      solrForScoresUrl = cmd.getOptionValue("solrForScoresUrl");
1✔
178
  }
1✔
179

180
  private void readPicaSubfieldSeparator() {
181
    if (cmd.hasOption("picaSubfieldSeparator"))
1✔
182
      picaSubfieldSeparator = cmd.getOptionValue("picaSubfieldSeparator");
1✔
183
  }
1✔
184

185
  private void readPicaIdField() {
186
    if (cmd.hasOption("picaIdField"))
1✔
187
      picaIdField = cmd.getOptionValue("picaIdField");
1✔
188
  }
1✔
189

190
  private void readAlephseqLineType() throws ParseException {
191
    if (cmd.hasOption("alephseqLineType"))
1✔
192
      setAlephseqLineType(cmd.getOptionValue("alephseqLineType"));
1✔
193
  }
1✔
194

195
  private void readDefaultEncoding() {
196
    if (cmd.hasOption("defaultEncoding"))
1✔
197
      setDefaultEncoding(cmd.getOptionValue("defaultEncoding"));
1✔
198
  }
1✔
199

200
  private void readIgnorableRecords() {
201
    ignorableRecords = cmd.hasOption("ignorableRecords") ? cmd.getOptionValue("ignorableRecords") : "";
1✔
202
    setRecordIgnorator(ignorableRecords);
1✔
203
  }
1✔
204

205
  private void readAllowableRecords() {
206
    String allowableRecords = cmd.hasOption("allowableRecords") ? cmd.getOptionValue("allowableRecords") : "";
1✔
207
    setRecordFilter(allowableRecords);
1✔
208
  }
1✔
209

210
  private void readIgnorableFields() {
211
    if (cmd.hasOption("ignorableFields"))
1✔
212
      setIgnorableFields(cmd.getOptionValue("ignorableFields"));
1✔
213
  }
1✔
214

215
  private void readOutputDir() {
216
    if (cmd.hasOption("outputDir"))
1✔
217
      outputDir = cmd.getOptionValue("outputDir");
1✔
218
  }
1✔
219

220
  private void readDefaultRecordType() throws ParseException {
221
    if (cmd.hasOption("defaultRecordType"))
1✔
222
      setDefaultRecordType(cmd.getOptionValue("defaultRecordType"));
1✔
223
  }
1✔
224

225
  private void readId() {
226
    if (cmd.hasOption("id"))
1✔
227
      id = cmd.getOptionValue("id").trim();
1✔
228
  }
1✔
229

230
  private void readOffset() {
231
    if (cmd.hasOption("offset"))
1✔
232
      offset = Integer.parseInt(cmd.getOptionValue("offset"));
1✔
233
  }
1✔
234

235
  private void readLimit() {
236
    if (cmd.hasOption("limit"))
1✔
237
      limit = Integer.parseInt(cmd.getOptionValue("limit"));
1✔
238
  }
1✔
239

240
  private void readDataSource() throws ParseException {
241
    if (cmd.hasOption("dataSource"))
1✔
242
      setDataSource(cmd.getOptionValue("dataSource"));
1✔
243
  }
1✔
244

245
  private void readSchemaType() throws ParseException {
246
    if (cmd.hasOption("schemaType"))
1✔
247
      setSchemaType(cmd.getOptionValue("schemaType"));
1✔
248
  }
1✔
249

250
  private void setSchemaType(String input) throws ParseException {
251
    try {
252
      schemaType = SchemaType.valueOf(input);
1✔
253
    } catch (IllegalArgumentException e) {
1✔
254
      throw new ParseException(String.format("Unrecognized schemaType parameter value: '%s'", input));
1✔
255
    }
1✔
256
  }
1✔
257

258
  private void readMarcFormat() throws ParseException {
259
    if (cmd.hasOption("marcFormat"))
1✔
260
      setMarcFormat(cmd.getOptionValue("marcFormat"));
1✔
261
  }
1✔
262

263
  private void readMarcVersion() throws ParseException {
264
    if (cmd.hasOption("marcVersion"))
1✔
265
      setMarcVersion(cmd.getOptionValue("marcVersion"));
1✔
266
  }
1✔
267

268
  private void readProcessRecordsWithoutId() {
269
    if (cmd.hasOption("processRecordsWithoutId"))
1✔
NEW
270
      processRecordsWithoutId = true;
×
271
  }
1✔
272

273
  private void setAlephseqLineType(String alephseqLineTypeInput) throws ParseException {
274
    try {
275
      alephseqLineType = AlephseqLine.TYPE.valueOf(cmd.getOptionValue("alephseqLineType"));
1✔
276
    } catch (IllegalArgumentException e) {
1✔
277
      throw new ParseException(String.format("Unrecognized alephseqLineType parameter value: '%s'", alephseqLineTypeInput));
1✔
278
    }
1✔
279
  }
1✔
280

281
  public Options getOptions() {
282
    if (!isOptionSet)
1✔
283
      setOptions();
1✔
284
    return options;
1✔
285
  }
286

287
  public MarcVersion getMarcVersion() {
288
    return marcVersion;
1✔
289
  }
290

291
  public void setMarcVersion(MarcVersion marcVersion) {
UNCOV
292
    this.marcVersion = marcVersion;
×
UNCOV
293
  }
×
294

295
  public void setMarcVersion(String marcVersion) throws ParseException {
296
    this.marcVersion = MarcVersion.byCode(marcVersion.trim());
1✔
297
    if (this.marcVersion == null)
1✔
298
      throw new ParseException(String.format("Unrecognized marcVersion parameter value: '%s'", marcVersion));
1✔
299
  }
1✔
300

301
  public MarcFormat getMarcFormat() {
302
    return marcFormat;
1✔
303
  }
304

305
  public void setMarcFormat(MarcFormat marcFormat) {
UNCOV
306
    this.marcFormat = marcFormat;
×
UNCOV
307
  }
×
308

309
  public void setMarcFormat(String marcFormatString) throws ParseException {
310
    marcFormat = MarcFormat.byCode(marcFormatString.trim());
1✔
311
    if (marcFormat == null)
1✔
UNCOV
312
      throw new ParseException(String.format("Unrecognized marcFormat parameter value: '%s'", marcFormatString));
×
313
    if (marcFormat.equals(MarcFormat.ALEPHSEQ))
1✔
314
      setAlephseq(true);
1✔
315
    if (marcFormat.equals(MarcFormat.XML))
1✔
316
      setMarcxml(true);
×
317
    if (marcFormat.equals(MarcFormat.LINE_SEPARATED))
1✔
UNCOV
318
      setLineSeparated(true);
×
319
    if (marcFormat.equals(MarcFormat.PICA_NORMALIZED) || marcFormat.equals(MarcFormat.PICA_PLAIN))
1✔
320
      schemaType = SchemaType.PICA;
1✔
321
  }
1✔
322

323
  public DataSource getDataSource() {
324
    return dataSource;
1✔
325
  }
326

327
  public void setDataSource(DataSource dataSource) {
328
    this.dataSource = dataSource;
×
UNCOV
329
  }
×
330

331
  public void setDataSource(String dataSourceString) throws ParseException {
332
    dataSource = DataSource.byCode(dataSourceString.trim());
1✔
333
    if (dataSource == null)
1✔
334
      throw new ParseException(String.format("Unrecognized marcFormat parameter value: '%s'", dataSourceString));
1✔
335
  }
1✔
336

337
  public boolean doHelp() {
338
    return doHelp;
1✔
339
  }
340

341
  public void setDoHelp(boolean doHelp) {
UNCOV
342
    this.doHelp = doHelp;
×
UNCOV
343
  }
×
344

345
  public boolean doLog() {
346
    return doLog;
1✔
347
  }
348

349
  public void setDoLog(boolean doLog) {
UNCOV
350
    this.doLog = doLog;
×
UNCOV
351
  }
×
352

353
  public String[] getArgs() {
354
    return args;
1✔
355
  }
356

357
  public int getLimit() {
358
    return limit;
1✔
359
  }
360

361
  public void setLimit(int limit) {
UNCOV
362
    this.limit = limit;
×
UNCOV
363
  }
×
364

365
  public int getOffset() {
366
    return offset;
1✔
367
  }
368

369
  public void setOffset(int offset) {
UNCOV
370
    this.offset = offset;
×
UNCOV
371
  }
×
372

373
  public boolean hasId() {
374
    return StringUtils.isNotBlank(id);
1✔
375
  }
376

377
  public String getId() {
378
    return id;
1✔
379
  }
380

381
  public void setId(String id) {
UNCOV
382
    this.id = id;
×
UNCOV
383
  }
×
384

385
  public MarcLeader.Type getDefaultRecordType() {
386
    return defaultRecordType;
1✔
387
  }
388

389
  public void setDefaultRecordType(MarcLeader.Type defaultRecordType) {
UNCOV
390
    this.defaultRecordType = defaultRecordType;
×
UNCOV
391
  }
×
392

393
  public void setDefaultRecordType(String defaultRecordType) throws ParseException {
394
    this.defaultRecordType = MarcLeader.Type.valueOf(defaultRecordType);
1✔
395
    if (this.defaultRecordType == null)
1✔
UNCOV
396
      throw new ParseException(String.format("Unrecognized defaultRecordType parameter value: '%s'", defaultRecordType));
×
397
  }
1✔
398

399
  public boolean fixAlephseq() {
400
    return fixAlephseq;
1✔
401
  }
402

403
  public void setFixAlephseq(boolean fixAlephseq) {
UNCOV
404
    this.fixAlephseq = fixAlephseq;
×
UNCOV
405
  }
×
406

407
  public boolean fixAlma() {
408
    return fixAlma;
1✔
409
  }
410

411
  public void setFixAlma(boolean fixAlma) {
UNCOV
412
    this.fixAlma = fixAlma;
×
UNCOV
413
  }
×
414

415
  public boolean fixKbr() {
416
    return fixKbr;
1✔
417
  }
418

419
  public void setFixKbr(boolean fixKbr) {
UNCOV
420
    this.fixKbr = fixKbr;
×
UNCOV
421
  }
×
422

423
  public String getReplacementInControlFields() {
424
    if (fixAlephseq())
1✔
UNCOV
425
      return "^";
×
426
    else if (fixAlma() || fixKbr())
1✔
UNCOV
427
      return "#";
×
428
    else
429
      return null;
1✔
430
  }
431

432
  public boolean isAlephseq() {
433
    return alephseq;
1✔
434
  }
435

436
  public void setAlephseq(boolean alephseq) {
437
    this.alephseq = alephseq;
1✔
438
    if (alephseq)
1✔
439
      marcFormat = MarcFormat.ALEPHSEQ;
1✔
440
  }
1✔
441

442
  public boolean isMarcxml() {
443
    return marcxml;
1✔
444
  }
445

446
  public void setMarcxml(boolean marcxml) {
447
    this.marcxml = marcxml;
1✔
448
    if (marcxml)
1✔
449
      marcFormat = MarcFormat.XML;
1✔
450
  }
1✔
451

452
  public boolean isLineSeparated() {
453
    return lineSeparated;
1✔
454
  }
455

456
  public void setLineSeparated(boolean lineSeparated) {
UNCOV
457
    this.lineSeparated = lineSeparated;
×
UNCOV
458
  }
×
459

460
  public String getOutputDir() {
461
    return outputDir;
1✔
462
  }
463

464
  public void setOutputDir(String outputDir) {
UNCOV
465
    this.outputDir = outputDir;
×
UNCOV
466
  }
×
467

468
  public boolean getTrimId() {
469
    return trimId;
1✔
470
  }
471

472
  public void setTrimId(boolean trimId) {
UNCOV
473
    this.trimId = trimId;
×
UNCOV
474
  }
×
475

476
  public IgnorableFields getIgnorableFields() {
477
    return ignorableFields;
1✔
478
  }
479

480
  public void setIgnorableFields(String ignorableFields) {
481
    this.ignorableFields.parseFields(ignorableFields.trim());
1✔
482
  }
1✔
483

484
  public RecordIgnorator getRecordIgnorator() {
485
    return recordIgnorator;
1✔
486
  }
487

488
  public void setRecordIgnorator(String ignorableRecords) {
489
    this.recordIgnorator = RecordIgnoratorFactory.create(schemaType, ignorableRecords.trim());
1✔
490
  }
1✔
491

492
  public RecordFilter getRecordFilter() {
493
    return recordFilter;
1✔
494
  }
495

496
  public void setRecordFilter(String allowableRecords) {
497
    this.recordFilter = RecordFilterFactory.create(schemaType, allowableRecords.trim());
1✔
498
    System.err.println(this.recordFilter);
1✔
499
  }
1✔
500

501
  public InputStream getStream() {
502
    return stream;
1✔
503
  }
504

505
  public void setStream(InputStream stream) {
UNCOV
506
    this.stream = stream;
×
UNCOV
507
  }
×
508

509
  public String getDefaultEncoding() {
510
    return defaultEncoding;
1✔
511
  }
512

513
  private void setDefaultEncoding(String defaultEncoding) {
514
    this.defaultEncoding = defaultEncoding;
1✔
515
  }
1✔
516

517
  public AlephseqLine.TYPE getAlephseqLineType() {
518
    return this.alephseqLineType;
1✔
519
  }
520

521
  public String getPicaIdField() {
522
    return picaIdField;
1✔
523
  }
524

525
  public void setPicaIdField(String picaIdField) {
UNCOV
526
    this.picaIdField = picaIdField;
×
UNCOV
527
  }
×
528

529
  public String getPicaSubfieldSeparator() {
530
    return picaSubfieldSeparator;
1✔
531
  }
532

533
  public void setPicaSubfieldSeparator(String picaSubfieldSeparator) {
UNCOV
534
    this.picaSubfieldSeparator = picaSubfieldSeparator;
×
UNCOV
535
  }
×
536

537
  public String getPicaSchemaFile() {
538
    return picaSchemaFile;
1✔
539
  }
540

541
  public SchemaType getSchemaType() {
542
    return schemaType;
1✔
543
  }
544

545
  public String getPicaRecordTypeField() {
546
    return picaRecordTypeField;
1✔
547
  }
548

549
  public boolean isMarc21() {
550
    return schemaType.equals(SchemaType.MARC21);
1✔
551
  }
552

553
  public boolean isPica() {
554
    return schemaType.equals(SchemaType.PICA);
1✔
555
  }
556

557
  public boolean isUnimarc() {
558
    return schemaType.equals(SchemaType.UNIMARC);
1✔
559
  }
560

561
  public String getGroupBy() {
562
    return groupBy;
1✔
563
  }
564

565
  public String getGroupListFile() {
566
    return groupListFile;
1✔
567
  }
568

569
  public String getSolrForScoresUrl() {
570
    return solrForScoresUrl;
1✔
571
  }
572

573
  public Boolean getProcessRecordsWithoutId() {
574
    return processRecordsWithoutId;
1✔
575
  }
576

577
  public void setProcessRecordsWithoutId(Boolean processRecordsWithoutId) {
NEW
578
    this.processRecordsWithoutId = processRecordsWithoutId;
×
NEW
579
  }
×
580

581
  public String formatParameters() {
582
    String text = "";
1✔
583
    text += String.format("schemaType: %s%n", schemaType);
1✔
584
    text += String.format("marcVersion: %s, %s%n", marcVersion.getCode(), marcVersion.getLabel());
1✔
585
    text += String.format("marcFormat: %s, %s%n", marcFormat.getCode(), marcFormat.getLabel());
1✔
586
    text += String.format("dataSource: %s, %s%n", dataSource.getCode(), dataSource.getLabel());
1✔
587
    text += String.format("limit: %d%n", limit);
1✔
588
    text += String.format("offset: %s%n", offset);
1✔
589
    text += String.format("MARC files: %s%n", StringUtils.join(args, ", "));
1✔
590
    text += String.format("id: %s%n", id);
1✔
591
    text += String.format("defaultRecordType: %s%n", defaultRecordType);
1✔
592
    text += String.format("fixAlephseq: %s%n", fixAlephseq);
1✔
593
    text += String.format("fixAlma: %s%n", fixAlma);
1✔
594
    text += String.format("alephseq: %s%n", alephseq);
1✔
595
    text += String.format("marcxml: %s%n", marcxml);
1✔
596
    text += String.format("lineSeparated: %s%n", lineSeparated);
1✔
597
    text += String.format("outputDir: %s%n", outputDir);
1✔
598
    text += String.format("trimId: %s%n", trimId);
1✔
599
    text += String.format("ignorableFields: %s%n", ignorableFields);
1✔
600
    text += String.format("allowableRecords: %s%n", recordFilter);
1✔
601
    text += String.format("ignorableRecords: %s%n", recordIgnorator);
1✔
602
    text += String.format("defaultEncoding: %s%n", defaultEncoding);
1✔
603
    text += String.format("alephseqLineType: %s%n", alephseqLineType);
1✔
604
    if (isPica()) {
1✔
605
      text += String.format("picaIdField: %s%n", picaIdField);
1✔
606
      text += String.format("picaSubfieldSeparator: %s%n", picaSubfieldSeparator);
1✔
607
      text += String.format("picaRecordType: %s%n", picaRecordTypeField);
1✔
608
    }
609
    text += String.format("groupBy: %s%n", groupBy);
1✔
610
    text += String.format("groupListFile: %s%n", groupListFile);
1✔
611
    text += String.format("solrForScoresUrl: %s%n", solrForScoresUrl);
1✔
612
    text += String.format("processRecordsWithoutId: %s%n", processRecordsWithoutId);
1✔
613

614
    return text;
1✔
615
  }
616
}
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