-
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding flatfile.reader and format - thus completing the new 'fixed-le…
…ngth2' format handler with nested structure support. (#170) Next steps: - enable it from omnniv21 schema handler - add samples - add more end to end integration tests - update cli server sample collection - documentation on 'fixed-length2', deprecation of 'fixed-length' and migration strategy.
- Loading branch information
Showing
9 changed files
with
1,530 additions
and
0 deletions.
There are no files selected for viewing
58 changes: 58 additions & 0 deletions
58
extensions/omniv21/fileformat/flatfile/fixedlength/.snapshots/TestLinesToNode-line_matches
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ | ||
"Children": [ | ||
{ | ||
"Children": [ | ||
{ | ||
"Children": null, | ||
"Data": "world", | ||
"FirstChild": null, | ||
"FormatSpecific": null, | ||
"LastChild": null, | ||
"NextSibling": null, | ||
"Parent": "(ElementNode W)", | ||
"PrevSibling": null, | ||
"Type": "TextNode" | ||
} | ||
], | ||
"Data": "W", | ||
"FirstChild": "(TextNode 'world')", | ||
"FormatSpecific": null, | ||
"LastChild": "(TextNode 'world')", | ||
"NextSibling": "(ElementNode C)", | ||
"Parent": "(ElementNode test-envelope)", | ||
"PrevSibling": null, | ||
"Type": "ElementNode" | ||
}, | ||
{ | ||
"Children": [ | ||
{ | ||
"Children": null, | ||
"Data": "c", | ||
"FirstChild": null, | ||
"FormatSpecific": null, | ||
"LastChild": null, | ||
"NextSibling": null, | ||
"Parent": "(ElementNode C)", | ||
"PrevSibling": null, | ||
"Type": "TextNode" | ||
} | ||
], | ||
"Data": "C", | ||
"FirstChild": "(TextNode 'c')", | ||
"FormatSpecific": null, | ||
"LastChild": "(TextNode 'c')", | ||
"NextSibling": null, | ||
"Parent": "(ElementNode test-envelope)", | ||
"PrevSibling": "(ElementNode W)", | ||
"Type": "ElementNode" | ||
} | ||
], | ||
"Data": "test-envelope", | ||
"FirstChild": "(ElementNode W)", | ||
"FormatSpecific": null, | ||
"LastChild": "(ElementNode C)", | ||
"NextSibling": null, | ||
"Parent": null, | ||
"PrevSibling": null, | ||
"Type": "ElementNode" | ||
} |
198 changes: 198 additions & 0 deletions
198
extensions/omniv21/fileformat/flatfile/fixedlength/.snapshots/TestRead-success
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,198 @@ | ||
{ | ||
"Children": [ | ||
{ | ||
"Children": [ | ||
{ | ||
"Children": [ | ||
{ | ||
"Children": null, | ||
"Data": "2", | ||
"FirstChild": null, | ||
"FormatSpecific": null, | ||
"LastChild": null, | ||
"NextSibling": null, | ||
"Parent": "(ElementNode c2)", | ||
"PrevSibling": null, | ||
"Type": "TextNode" | ||
} | ||
], | ||
"Data": "c2", | ||
"FirstChild": "(TextNode '2')", | ||
"FormatSpecific": null, | ||
"LastChild": "(TextNode '2')", | ||
"NextSibling": null, | ||
"Parent": "(ElementNode e2)", | ||
"PrevSibling": null, | ||
"Type": "ElementNode" | ||
} | ||
], | ||
"Data": "e2", | ||
"FirstChild": "(ElementNode c2)", | ||
"FormatSpecific": null, | ||
"LastChild": "(ElementNode c2)", | ||
"NextSibling": "(ElementNode e3)", | ||
"Parent": "(ElementNode e1)", | ||
"PrevSibling": null, | ||
"Type": "ElementNode" | ||
}, | ||
{ | ||
"Children": [ | ||
{ | ||
"Children": [ | ||
{ | ||
"Children": null, | ||
"Data": "1", | ||
"FirstChild": null, | ||
"FormatSpecific": null, | ||
"LastChild": null, | ||
"NextSibling": null, | ||
"Parent": "(ElementNode c31)", | ||
"PrevSibling": null, | ||
"Type": "TextNode" | ||
} | ||
], | ||
"Data": "c31", | ||
"FirstChild": "(TextNode '1')", | ||
"FormatSpecific": null, | ||
"LastChild": "(TextNode '1')", | ||
"NextSibling": "(ElementNode c32)", | ||
"Parent": "(ElementNode e3)", | ||
"PrevSibling": null, | ||
"Type": "ElementNode" | ||
}, | ||
{ | ||
"Children": [ | ||
{ | ||
"Children": null, | ||
"Data": "2", | ||
"FirstChild": null, | ||
"FormatSpecific": null, | ||
"LastChild": null, | ||
"NextSibling": null, | ||
"Parent": "(ElementNode c32)", | ||
"PrevSibling": null, | ||
"Type": "TextNode" | ||
} | ||
], | ||
"Data": "c32", | ||
"FirstChild": "(TextNode '2')", | ||
"FormatSpecific": null, | ||
"LastChild": "(TextNode '2')", | ||
"NextSibling": null, | ||
"Parent": "(ElementNode e3)", | ||
"PrevSibling": "(ElementNode c31)", | ||
"Type": "ElementNode" | ||
} | ||
], | ||
"Data": "e3", | ||
"FirstChild": "(ElementNode c31)", | ||
"FormatSpecific": null, | ||
"LastChild": "(ElementNode c32)", | ||
"NextSibling": "(ElementNode e3)", | ||
"Parent": "(ElementNode e1)", | ||
"PrevSibling": "(ElementNode e2)", | ||
"Type": "ElementNode" | ||
}, | ||
{ | ||
"Children": [ | ||
{ | ||
"Children": [ | ||
{ | ||
"Children": null, | ||
"Data": "3", | ||
"FirstChild": null, | ||
"FormatSpecific": null, | ||
"LastChild": null, | ||
"NextSibling": null, | ||
"Parent": "(ElementNode c31)", | ||
"PrevSibling": null, | ||
"Type": "TextNode" | ||
} | ||
], | ||
"Data": "c31", | ||
"FirstChild": "(TextNode '3')", | ||
"FormatSpecific": null, | ||
"LastChild": "(TextNode '3')", | ||
"NextSibling": "(ElementNode c32)", | ||
"Parent": "(ElementNode e3)", | ||
"PrevSibling": null, | ||
"Type": "ElementNode" | ||
}, | ||
{ | ||
"Children": [ | ||
{ | ||
"Children": null, | ||
"Data": "4", | ||
"FirstChild": null, | ||
"FormatSpecific": null, | ||
"LastChild": null, | ||
"NextSibling": null, | ||
"Parent": "(ElementNode c32)", | ||
"PrevSibling": null, | ||
"Type": "TextNode" | ||
} | ||
], | ||
"Data": "c32", | ||
"FirstChild": "(TextNode '4')", | ||
"FormatSpecific": null, | ||
"LastChild": "(TextNode '4')", | ||
"NextSibling": null, | ||
"Parent": "(ElementNode e3)", | ||
"PrevSibling": "(ElementNode c31)", | ||
"Type": "ElementNode" | ||
} | ||
], | ||
"Data": "e3", | ||
"FirstChild": "(ElementNode c31)", | ||
"FormatSpecific": null, | ||
"LastChild": "(ElementNode c32)", | ||
"NextSibling": "(ElementNode e4)", | ||
"Parent": "(ElementNode e1)", | ||
"PrevSibling": "(ElementNode e3)", | ||
"Type": "ElementNode" | ||
}, | ||
{ | ||
"Children": [ | ||
{ | ||
"Children": [ | ||
{ | ||
"Children": null, | ||
"Data": "4", | ||
"FirstChild": null, | ||
"FormatSpecific": null, | ||
"LastChild": null, | ||
"NextSibling": null, | ||
"Parent": "(ElementNode c4)", | ||
"PrevSibling": null, | ||
"Type": "TextNode" | ||
} | ||
], | ||
"Data": "c4", | ||
"FirstChild": "(TextNode '4')", | ||
"FormatSpecific": null, | ||
"LastChild": "(TextNode '4')", | ||
"NextSibling": null, | ||
"Parent": "(ElementNode e4)", | ||
"PrevSibling": null, | ||
"Type": "ElementNode" | ||
} | ||
], | ||
"Data": "e4", | ||
"FirstChild": "(ElementNode c4)", | ||
"FormatSpecific": null, | ||
"LastChild": "(ElementNode c4)", | ||
"NextSibling": null, | ||
"Parent": "(ElementNode e1)", | ||
"PrevSibling": "(ElementNode e3)", | ||
"Type": "ElementNode" | ||
} | ||
], | ||
"Data": "e1", | ||
"FirstChild": "(ElementNode e2)", | ||
"FormatSpecific": null, | ||
"LastChild": "(ElementNode e4)", | ||
"NextSibling": null, | ||
"Parent": "(DocumentNode)", | ||
"PrevSibling": null, | ||
"Type": "ElementNode" | ||
} |
35 changes: 35 additions & 0 deletions
35
...hots/TestReadAndMatchHeaderFooterBasedEnvelope-empty_buf;_single_line_header-footer_match
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"Children": [ | ||
{ | ||
"Children": [ | ||
{ | ||
"Children": null, | ||
"Data": "1", | ||
"FirstChild": null, | ||
"FormatSpecific": null, | ||
"LastChild": null, | ||
"NextSibling": null, | ||
"Parent": "(ElementNode C)", | ||
"PrevSibling": null, | ||
"Type": "TextNode" | ||
} | ||
], | ||
"Data": "C", | ||
"FirstChild": "(TextNode '1')", | ||
"FormatSpecific": null, | ||
"LastChild": "(TextNode '1')", | ||
"NextSibling": null, | ||
"Parent": "(ElementNode E)", | ||
"PrevSibling": null, | ||
"Type": "ElementNode" | ||
} | ||
], | ||
"Data": "E", | ||
"FirstChild": "(ElementNode C)", | ||
"FormatSpecific": null, | ||
"LastChild": "(ElementNode C)", | ||
"NextSibling": null, | ||
"Parent": null, | ||
"PrevSibling": null, | ||
"Type": "ElementNode" | ||
} |
58 changes: 58 additions & 0 deletions
58
...th/.snapshots/TestReadAndMatchRowsBasedEnvelope-non-empty_buf;_no_read;_match;_create_IDR
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ | ||
"Children": [ | ||
{ | ||
"Children": [ | ||
{ | ||
"Children": null, | ||
"Data": "1", | ||
"FirstChild": null, | ||
"FormatSpecific": null, | ||
"LastChild": null, | ||
"NextSibling": null, | ||
"Parent": "(ElementNode C1)", | ||
"PrevSibling": null, | ||
"Type": "TextNode" | ||
} | ||
], | ||
"Data": "C1", | ||
"FirstChild": "(TextNode '1')", | ||
"FormatSpecific": null, | ||
"LastChild": "(TextNode '1')", | ||
"NextSibling": "(ElementNode C2)", | ||
"Parent": "(ElementNode E)", | ||
"PrevSibling": null, | ||
"Type": "ElementNode" | ||
}, | ||
{ | ||
"Children": [ | ||
{ | ||
"Children": null, | ||
"Data": "2", | ||
"FirstChild": null, | ||
"FormatSpecific": null, | ||
"LastChild": null, | ||
"NextSibling": null, | ||
"Parent": "(ElementNode C2)", | ||
"PrevSibling": null, | ||
"Type": "TextNode" | ||
} | ||
], | ||
"Data": "C2", | ||
"FirstChild": "(TextNode '2')", | ||
"FormatSpecific": null, | ||
"LastChild": "(TextNode '2')", | ||
"NextSibling": null, | ||
"Parent": "(ElementNode E)", | ||
"PrevSibling": "(ElementNode C1)", | ||
"Type": "ElementNode" | ||
} | ||
], | ||
"Data": "E", | ||
"FirstChild": "(ElementNode C1)", | ||
"FormatSpecific": null, | ||
"LastChild": "(ElementNode C2)", | ||
"NextSibling": null, | ||
"Parent": null, | ||
"PrevSibling": null, | ||
"Type": "ElementNode" | ||
} |
39 changes: 39 additions & 0 deletions
39
extensions/omniv21/fileformat/flatfile/fixedlength/.snapshots/TestValidateSchema-success
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"file_declaration": { | ||
"envelopes": [ | ||
{ | ||
"name": "e1", | ||
"type": "envelope_group", | ||
"is_target": true, | ||
"min": 1, | ||
"max": 1, | ||
"child_envelopes": [ | ||
{ | ||
"name": "e2", | ||
"max": 5, | ||
"columns": [ | ||
{ | ||
"name": "c1", | ||
"start_pos": 1, | ||
"length": 3 | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "e2", | ||
"header": "^ABC$", | ||
"columns": [ | ||
{ | ||
"name": "c2", | ||
"start_pos": 2, | ||
"length": 5, | ||
"line_pattern": "^H00" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"XPath": ".[c1 != 'skip']" | ||
} |
Oops, something went wrong.