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/multiple.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/multiple.xml')
| -rw-r--r-- | test-data/ex-2/multiple.xml | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/test-data/ex-2/multiple.xml b/test-data/ex-2/multiple.xml new file mode 100644 index 0000000..52c6f6b --- /dev/null +++ b/test-data/ex-2/multiple.xml | |||
| @@ -0,0 +1,76 @@ | |||
| 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">10</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-event name="Earth Quake on Dead Sea"> | ||
| 31 | <id>3</id> | ||
| 32 | <description>Will there be an earth quake at the dead sea until the December 31th 2026</description> | ||
| 33 | <commission type="on-purchase">50</commission> | ||
| 34 | <GM-options> | ||
| 35 | <GM-option>Yes</GM-option> | ||
| 36 | <GM-option>No</GM-option> | ||
| 37 | </GM-options> | ||
| 38 | <GM-method> | ||
| 39 | <GM-order-book allow-mint="false" initial="1000" d="1"/> | ||
| 40 | </GM-method> | ||
| 41 | </GM-event> | ||
| 42 | <GM-event name="Will it rain tomorrow ?"> | ||
| 43 | <id>4</id> | ||
| 44 | <description>Will there be 30 mm of rain tomorrow at Alenbi 283 st by 12:00 PM ?</description> | ||
| 45 | <commission type="on-close">10</commission> | ||
| 46 | <GM-options> | ||
| 47 | <GM-option>Yes</GM-option> | ||
| 48 | <GM-option>No</GM-option> | ||
| 49 | </GM-options> | ||
| 50 | <GM-method> | ||
| 51 | <GM-LMSR> | ||
| 52 | <b>200</b> | ||
| 53 | </GM-LMSR> | ||
| 54 | </GM-method> | ||
| 55 | </GM-event> | ||
| 56 | </GM-events> | ||
| 57 | <GM-users> | ||
| 58 | <GM-user name="Avrum"> | ||
| 59 | <initial-cash>1000</initial-cash> | ||
| 60 | <GM-market-maker> | ||
| 61 | <event id="2"/> | ||
| 62 | </GM-market-maker> | ||
| 63 | </GM-user> | ||
| 64 | <GM-user name="Tikva"> | ||
| 65 | <initial-cash>10000</initial-cash> | ||
| 66 | <GM-market-maker> | ||
| 67 | <event id="1"/> | ||
| 68 | <event id="4"/> | ||
| 69 | <event id="3"/> | ||
| 70 | </GM-market-maker> | ||
| 71 | </GM-user> | ||
| 72 | <GM-user name="Menash"> | ||
| 73 | <initial-cash>100</initial-cash> | ||
| 74 | </GM-user> | ||
| 75 | </GM-users> | ||
| 76 | </Guess-Market> | ||