diff options
| author | Kostya <mail@sartin.in> | 2026-09-06 09:21:37 +0300 |
|---|---|---|
| committer | Kostya <mail@sartin.in> | 2026-09-06 09:21:37 +0300 |
| commit | da82f3b492c3cd36f2e8723632a63a6cc1f4e39b (patch) | |
| tree | 2ea5970e34757332c9a76e410b6f7ea0099e30ef /test-data/ex-2/small.xml | |
| parent | c0dde6531e831730c25230097fd85a8a38214101 (diff) | |
| download | guess-market-da82f3b492c3cd36f2e8723632a63a6cc1f4e39b.tar.gz guess-market-da82f3b492c3cd36f2e8723632a63a6cc1f4e39b.tar.xz guess-market-da82f3b492c3cd36f2e8723632a63a6cc1f4e39b.zip | |
catalog: add generated v3 JAXB binding and ex-2 test data
The ex-2 schema describes a nested Guess-Market/GM-events document in
which every event carries its pricing mechanism inline, as either a
GM-LMSR element holding the liquidity parameter b or a GM-order-book
element holding the allow-mint, initial and d attributes, instead of
naming a mechanism and passing its parameters separately.
Add the xjc-generated classes for that schema under catalog.model.v3,
along with the fixtures the loader will be tested against: small.xml
with two events, one per mechanism, multiple.xml with four, and two
negative cases -- error-2.xml, where a market maker is funded with
zero initial cash, and error-3.xml, where a market maker points at
event id 12, which no event declares -- so the cross-reference and
funding checks have something to reject.
The binding covers the GM-events subtree only. The GM-users half of
the document and the per-event id element are not bound yet, so
nothing reads these classes so far.
Diffstat (limited to 'test-data/ex-2/small.xml')
| -rw-r--r-- | test-data/ex-2/small.xml | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/test-data/ex-2/small.xml b/test-data/ex-2/small.xml new file mode 100644 index 0000000..640aa3e --- /dev/null +++ b/test-data/ex-2/small.xml | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <Guess-Market xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="GM-EX2-Schema.xsd"> | ||
| 3 | <GM-events> | ||
| 4 | <GM-event name="Mujtaba is Dead"> | ||
| 5 | <id>1</id> | ||
| 6 | <description>This event gambles if Mujtaba is a live or not. it will be determined if he will be shown in public until 31.8.26</description> | ||
| 7 | <commission type="on-purchase">5</commission> | ||
| 8 | <GM-options> | ||
| 9 | <GM-option>Hell Yea !</GM-option> | ||
| 10 | <GM-option>No way !</GM-option> | ||
| 11 | </GM-options> | ||
| 12 | <GM-method> | ||
| 13 | <GM-LMSR> | ||
| 14 | <b>100</b> | ||
| 15 | </GM-LMSR> | ||
| 16 | </GM-method> | ||
| 17 | </GM-event> | ||
| 18 | <GM-event name="World Cap Winner"> | ||
| 19 | <id>2</id> | ||
| 20 | <description>Who do you think will win the world cap ?</description> | ||
| 21 | <commission type="on-close">15</commission> | ||
| 22 | <GM-options> | ||
| 23 | <GM-option>Argentina</GM-option> | ||
| 24 | <GM-option>Spain</GM-option> | ||
| 25 | </GM-options> | ||
| 26 | <GM-method> | ||
| 27 | <GM-order-book allow-mint="true" initial="100" d="1"/> | ||
| 28 | </GM-method> | ||
| 29 | </GM-event> | ||
| 30 | </GM-events> | ||
| 31 | <GM-users> | ||
| 32 | <GM-user name="Avrum"> | ||
| 33 | <initial-cash>1000</initial-cash> | ||
| 34 | <GM-market-maker> | ||
| 35 | <event id="2"/> | ||
| 36 | </GM-market-maker> | ||
| 37 | </GM-user> | ||
| 38 | <GM-user name="Tikva"> | ||
| 39 | <initial-cash>10000</initial-cash> | ||
| 40 | <GM-market-maker> | ||
| 41 | <event id="1"/> | ||
| 42 | </GM-market-maker> | ||
| 43 | </GM-user> | ||
| 44 | <GM-user name="Menash"> | ||
| 45 | <initial-cash>100</initial-cash> | ||
| 46 | </GM-user> | ||
| 47 | </GM-users> | ||
| 48 | </Guess-Market> | ||