|
44 | 44 | * this String value will be used instead.<br />
|
45 | 45 | * With 2.6, value will also be recognized during value reads.
|
46 | 46 | * </li>
|
| 47 | + * <li>strictHeaders (boolean) [default: false] (added in Jackson 2.7): whether names of |
| 48 | + * columns defined in the schema MUST match with actual declaration from |
| 49 | + * the header row (if header row handling enabled): if true, they must be and |
| 50 | + * an exception if thrown if order differs: if false, no verification is performed. |
| 51 | + * </li> |
47 | 52 | * </ul>
|
48 | 53 | *<p>
|
49 | 54 | * Note that schemas without any columns are legal, but if no columns
|
50 | 55 | * are added, behavior of parser/generator is usually different and
|
51 | 56 | * content will be exposed as logical Arrays instead of Objects.
|
52 | 57 | *<p>
|
| 58 | + * |
53 | 59 | * There are 4 ways to create <code>CsvSchema</code> instances:
|
54 | 60 | *<ul>
|
55 | 61 | * <li>Manually build one, using {@link Builder}
|
@@ -131,8 +137,10 @@ public class CsvSchema
|
131 | 137 | /**
|
132 | 138 | * By default we do NOT expect the first line to be header.
|
133 | 139 | */
|
| 140 | + @Deprecated // since 2.7 |
134 | 141 | public final static boolean DEFAULT_USE_HEADER = false;
|
135 | 142 |
|
| 143 | + @Deprecated // since 2.7 |
136 | 144 | public final static boolean DEFAULT_SKIP_FIRST_DATA_ROW = false;
|
137 | 145 |
|
138 | 146 | /*
|
@@ -474,12 +482,12 @@ public Builder setReorderColumns(boolean b) {
|
474 | 482 |
|
475 | 483 |
|
476 | 484 | /**
|
477 |
| - * Use in combination with setUseHeader. When use header flag is |
| 485 | + * Use in combination with {@link #setUseHeader}. When use header flag is |
478 | 486 | * is set, this setting will ensure the headers are in the order
|
479 |
| - * of the schema |
| 487 | + * of the schema; if order differs, an exception is thrown. |
480 | 488 | *
|
481 |
| - * @param b Enable / Disable this setting |
482 |
| - * @return This Builder instance |
| 489 | + * @param b Enable / Disable this setting |
| 490 | + * @return This Builder instance |
483 | 491 | *
|
484 | 492 | * @since 2.7
|
485 | 493 | */
|
@@ -649,18 +657,6 @@ protected void _checkIndex(int index) {
|
649 | 657 | protected final char[] _nullValue;
|
650 | 658 |
|
651 | 659 | protected transient String _nullValueAsString;
|
652 |
| - |
653 |
| - @Deprecated // in 2.5; remove from 2.6 |
654 |
| - public CsvSchema(Column[] columns, |
655 |
| - boolean useHeader, boolean skipFirstDataRow, |
656 |
| - char columnSeparator, int quoteChar, int escapeChar, |
657 |
| - char[] lineSeparator) |
658 |
| - { |
659 |
| - this(columns, |
660 |
| - (useHeader ? ENCODING_FEATURE_USE_HEADER : 0) + (skipFirstDataRow ? ENCODING_FEATURE_SKIP_FIRST_DATA_ROW : 0), |
661 |
| - columnSeparator, quoteChar, escapeChar, lineSeparator, |
662 |
| - DEFAULT_ARRAY_ELEMENT_SEPARATOR, DEFAULT_NULL_VALUE); |
663 |
| - } |
664 | 660 |
|
665 | 661 | /**
|
666 | 662 | * @since 2.5
|
|
0 commit comments