diff options
| author | Kostya <mail@sartin.in> | 2026-10-08 16:45:02 +0300 |
|---|---|---|
| committer | Kostya <mail@sartin.in> | 2026-10-08 16:45:30 +0300 |
| commit | 95eb4ff500defc4e34d043bbc096593ffcadecea (patch) | |
| tree | 65630fe3cb61260a5fedf7f63d969d27ccdb430b /.project | |
| parent | 930eb953e8cb598a99002cb41f3b8f57d05f1fa7 (diff) | |
| download | guess-market-95eb4ff500defc4e34d043bbc096593ffcadecea.tar.gz guess-market-95eb4ff500defc4e34d043bbc096593ffcadecea.tar.xz guess-market-95eb4ff500defc4e34d043bbc096593ffcadecea.zip | |
catalog: add cumulative v3 XML loader and event mapper
Exercise 3 uploads arrive over HTTP and must never be written to the
server's disk, so load Schema v3 straight from an InputStream. Each
valid file is appended to the market rather than replacing it, and the
uploading user becomes the Market Maker of every event in it.
With no id in v3, the mapper keys events by their trimmed name, so the
repository's case-insensitive lookup finds them by name. Display ids
continue from the current market size.
The whole file is validated and mapped before anything is added, so a
rejected upload leaves the market as it was. Loading is synchronized
so two concurrent uploads cannot both pass the name-collision check.
DTDs and external entities are disabled on the parser, since the input
is untrusted and an XXE payload could otherwise read server files.
Check the loader against the course's Exercise 3 sample files, kept
with their schema under test-data/ex-3/.
Diffstat (limited to '.project')
0 files changed, 0 insertions, 0 deletions