1
2
3
4
5
6
7
8
9
10
11 package org.csveed.report;
12
13 import java.util.List;
14
15
16
17
18 public class RowError extends AbstractCsvError {
19
20
21 private RowReport report;
22
23
24 private int lineNumber;
25
26
27
28
29
30
31
32
33
34
35
36 public RowError(String message, RowReport report, int lineNumber) {
37 super(message);
38 this.report = report;
39 this.lineNumber = lineNumber;
40 }
41
42
43
44
45
46
47 public RowReport getReport() {
48 return report;
49 }
50
51 @Override
52 public List<String> getPrintableLines() {
53 List<String> lines = getMessageAsList();
54 List<String> lineReport = report.getPrintableLines();
55 lines.add(lineNumber + ": " + lineReport.get(0));
56 lines.add(lineNumber + ": " + lineReport.get(1));
57 return lines;
58 }
59
60 @Override
61 public List<RowPart> getRowParts() {
62 return report.tokenize();
63 }
64
65 @Override
66 public int getLineNumber() {
67 return lineNumber;
68 }
69
70 }