From ffd09319b04f7360cd95784272eadad60c2c5a79 Mon Sep 17 00:00:00 2001 From: Kostya Date: Thu, 13 Aug 2026 22:44:04 +0000 Subject: Add legacy XML model bindings, mapper infra, and normalize account balance Rename repositories package to repository, add MarketAction domain type, and round Account.initialBalance through BigDecimalOptions.toMoney. --- .../java/market/guess/service/domain/Account.java | 2 +- .../guess/service/domain/BigDecimalOptions.java | 6 +- .../market/guess/service/domain/MarketAction.java | 24 +++ .../guess/service/infrastructure/Mapper.java | 3 + .../infrastructure/adapter/InstantTypeAdapter.java | 18 ++ .../market/guess/service/model/v1/Comision.java | 94 +++++++++ .../market/guess/service/model/v1/GMEvent.java | 215 +++++++++++++++++++ .../market/guess/service/model/v1/GMEvents.java | 80 +++++++ .../java/market/guess/service/model/v1/GMLMSR.java | 60 ++++++ .../market/guess/service/model/v1/GMMethod.java | 70 +++++++ .../market/guess/service/model/v1/GMOptions.java | 80 +++++++ .../market/guess/service/model/v1/GuessMarket.java | 70 +++++++ .../guess/service/model/v1/ObjectFactory.java | 167 +++++++++++++++ .../market/guess/service/model/v2/Commission.java | 94 +++++++++ .../java/market/guess/service/model/v2/Event.java | 58 ++++++ .../market/guess/service/model/v2/GMEvent.java | 201 ++++++++++++++++++ .../market/guess/service/model/v2/GMEvents.java | 80 +++++++ .../java/market/guess/service/model/v2/GMLMSR.java | 60 ++++++ .../guess/service/model/v2/GMMarketMaker.java | 80 +++++++ .../market/guess/service/model/v2/GMMethod.java | 98 +++++++++ .../market/guess/service/model/v2/GMOptions.java | 80 +++++++ .../market/guess/service/model/v2/GMOrderBook.java | 111 ++++++++++ .../java/market/guess/service/model/v2/GMUser.java | 118 +++++++++++ .../market/guess/service/model/v2/GMUsers.java | 80 +++++++ .../market/guess/service/model/v2/GuessMarket.java | 97 +++++++++ .../guess/service/model/v2/ObjectFactory.java | 231 +++++++++++++++++++++ .../service/repositories/EventRepository.java | 7 - .../guess/service/repositories/UserRepository.java | 8 - .../guess/service/repository/EventRepository.java | 7 + .../guess/service/repository/UserRepository.java | 8 + 30 files changed, 2290 insertions(+), 17 deletions(-) create mode 100644 service/src/main/java/market/guess/service/domain/MarketAction.java create mode 100644 service/src/main/java/market/guess/service/infrastructure/Mapper.java create mode 100644 service/src/main/java/market/guess/service/infrastructure/adapter/InstantTypeAdapter.java create mode 100644 service/src/main/java/market/guess/service/model/v1/Comision.java create mode 100644 service/src/main/java/market/guess/service/model/v1/GMEvent.java create mode 100644 service/src/main/java/market/guess/service/model/v1/GMEvents.java create mode 100644 service/src/main/java/market/guess/service/model/v1/GMLMSR.java create mode 100644 service/src/main/java/market/guess/service/model/v1/GMMethod.java create mode 100644 service/src/main/java/market/guess/service/model/v1/GMOptions.java create mode 100644 service/src/main/java/market/guess/service/model/v1/GuessMarket.java create mode 100644 service/src/main/java/market/guess/service/model/v1/ObjectFactory.java create mode 100644 service/src/main/java/market/guess/service/model/v2/Commission.java create mode 100644 service/src/main/java/market/guess/service/model/v2/Event.java create mode 100644 service/src/main/java/market/guess/service/model/v2/GMEvent.java create mode 100644 service/src/main/java/market/guess/service/model/v2/GMEvents.java create mode 100644 service/src/main/java/market/guess/service/model/v2/GMLMSR.java create mode 100644 service/src/main/java/market/guess/service/model/v2/GMMarketMaker.java create mode 100644 service/src/main/java/market/guess/service/model/v2/GMMethod.java create mode 100644 service/src/main/java/market/guess/service/model/v2/GMOptions.java create mode 100644 service/src/main/java/market/guess/service/model/v2/GMOrderBook.java create mode 100644 service/src/main/java/market/guess/service/model/v2/GMUser.java create mode 100644 service/src/main/java/market/guess/service/model/v2/GMUsers.java create mode 100644 service/src/main/java/market/guess/service/model/v2/GuessMarket.java create mode 100644 service/src/main/java/market/guess/service/model/v2/ObjectFactory.java delete mode 100644 service/src/main/java/market/guess/service/repositories/EventRepository.java delete mode 100644 service/src/main/java/market/guess/service/repositories/UserRepository.java create mode 100644 service/src/main/java/market/guess/service/repository/EventRepository.java create mode 100644 service/src/main/java/market/guess/service/repository/UserRepository.java (limited to 'service/src/main/java/market') diff --git a/service/src/main/java/market/guess/service/domain/Account.java b/service/src/main/java/market/guess/service/domain/Account.java index 8b510a5..e350400 100644 --- a/service/src/main/java/market/guess/service/domain/Account.java +++ b/service/src/main/java/market/guess/service/domain/Account.java @@ -21,7 +21,7 @@ public final class Account { super(); this.accountType = accountType; this.owner = owner; - this.balance = initialBalance; + this.balance = BigDecimalOptions.toMoney(initialBalance); this.clock = clock; } } diff --git a/service/src/main/java/market/guess/service/domain/BigDecimalOptions.java b/service/src/main/java/market/guess/service/domain/BigDecimalOptions.java index 159905f..25306c6 100644 --- a/service/src/main/java/market/guess/service/domain/BigDecimalOptions.java +++ b/service/src/main/java/market/guess/service/domain/BigDecimalOptions.java @@ -8,7 +8,11 @@ public record BigDecimalOptions(int scale, RoundingMode roundingMode) { public static final BigDecimal ZERO_MONEY = BigDecimal.ZERO.setScale(DEFAULT.scale(), DEFAULT.roundingMode()); - public static BigDecimal valueOf(double v) { + public static BigDecimal toMoney(BigDecimal value) { + return value.setScale(DEFAULT.scale(), DEFAULT.roundingMode()); + } + + public static BigDecimal toMoney(double v) { return BigDecimal.valueOf(v).setScale(DEFAULT.scale(), DEFAULT.roundingMode()); } } diff --git a/service/src/main/java/market/guess/service/domain/MarketAction.java b/service/src/main/java/market/guess/service/domain/MarketAction.java new file mode 100644 index 0000000..c0aabd1 --- /dev/null +++ b/service/src/main/java/market/guess/service/domain/MarketAction.java @@ -0,0 +1,24 @@ +package market.guess.service.domain; + +public record MarketAction( + String kind, String at, String userName, String eventKey, String optionKey, long quantity) { + + public static final String BUY = "BUY"; + public static final String SELL = "SELL"; + public static final String CLOSE = "CLOSE"; + + public static MarketAction buy( + String at, String userName, String eventKey, String optionKey, long quantity) { + return new MarketAction(BUY, at, userName, eventKey, optionKey, quantity); + } + + public static MarketAction sell( + String at, String userName, String eventKey, String optionKey, long quantity) { + return new MarketAction(SELL, at, userName, eventKey, optionKey, quantity); + } + + public static MarketAction close( + String at, String userName, String eventKey, String winningOptionKey) { + return new MarketAction(CLOSE, at, userName, eventKey, winningOptionKey, 0); + } +} diff --git a/service/src/main/java/market/guess/service/infrastructure/Mapper.java b/service/src/main/java/market/guess/service/infrastructure/Mapper.java new file mode 100644 index 0000000..07f565b --- /dev/null +++ b/service/src/main/java/market/guess/service/infrastructure/Mapper.java @@ -0,0 +1,3 @@ +package market.guess.service.infrastructure; + +public interface Mapper {} diff --git a/service/src/main/java/market/guess/service/infrastructure/adapter/InstantTypeAdapter.java b/service/src/main/java/market/guess/service/infrastructure/adapter/InstantTypeAdapter.java new file mode 100644 index 0000000..0e8a0e0 --- /dev/null +++ b/service/src/main/java/market/guess/service/infrastructure/adapter/InstantTypeAdapter.java @@ -0,0 +1,18 @@ +package market.guess.service.infrastructure.adapter; + +import com.google.gson.*; +import java.lang.reflect.Type; +import java.time.Instant; + +public class InstantTypeAdapter implements JsonSerializer, JsonDeserializer { + @Override + public JsonElement serialize(Instant src, Type typeOfSrc, JsonSerializationContext context) { + return new JsonPrimitive(src.toString()); + } + + @Override + public Instant deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) + throws JsonParseException { + return Instant.parse(json.getAsString()); + } +} diff --git a/service/src/main/java/market/guess/service/model/v1/Comision.java b/service/src/main/java/market/guess/service/model/v1/Comision.java new file mode 100644 index 0000000..c8a374c --- /dev/null +++ b/service/src/main/java/market/guess/service/model/v1/Comision.java @@ -0,0 +1,94 @@ +// +// This file was generated by the Eclipse Implementation of JAXB, v4.0.5 +// See https://eclipse-ee4j.github.io/jaxb-ri +// Any modifications to this file will be lost upon recompilation of the source schema. +// + + +package market.guess.service.model.v1; + +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlAttribute; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; +import jakarta.xml.bind.annotation.XmlValue; + + +/** + *

Java class for anonymous complex type

. + * + *

The following schema fragment specifies the expected content contained within this class.

+ * + *
{@code
+ * 
+ *   
+ *     
+ *       
+ *         
+ *           
+ *             
+ *             
+ *           
+ *         
+ *       
+ *     
+ *   
+ * 
+ * }
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "value" +}) +@XmlRootElement(name = "comision") +public class Comision { + + @XmlValue + protected int value; + @XmlAttribute(name = "type", required = true) + protected String type; + + /** + * Gets the value of the value property. + * + */ + public int getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + */ + public void setValue(int value) { + this.value = value; + } + + /** + * Gets the value of the type property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + +} diff --git a/service/src/main/java/market/guess/service/model/v1/GMEvent.java b/service/src/main/java/market/guess/service/model/v1/GMEvent.java new file mode 100644 index 0000000..efe5d30 --- /dev/null +++ b/service/src/main/java/market/guess/service/model/v1/GMEvent.java @@ -0,0 +1,215 @@ +// +// This file was generated by the Eclipse Implementation of JAXB, v4.0.5 +// See https://eclipse-ee4j.github.io/jaxb-ri +// Any modifications to this file will be lost upon recompilation of the source schema. +// + + +package market.guess.service.model.v1; + +import java.util.ArrayList; +import java.util.List; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlAttribute; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type

. + * + *

The following schema fragment specifies the expected content contained within this class.

+ * + *
{@code
+ * 
+ *   
+ *     
+ *       
+ *         
+ *         
+ *         
+ *         
+ *         
+ *       
+ *       
+ *         
+ *           
+ *         
+ *       
+ *     
+ *   
+ * 
+ * }
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "id", + "description", + "comision", + "gmOptions", + "gmMethod" +}) +@XmlRootElement(name = "GM-event") +public class GMEvent { + + protected int id; + @XmlElement(required = true) + protected String description; + @XmlElement(required = true) + protected Comision comision; + @XmlElement(name = "GM-options", required = true) + protected GMOptions gmOptions; + @XmlElement(name = "GM-method", required = true) + protected GMMethod gmMethod; + @XmlAttribute(name = "name", required = true) + protected List name; + + /** + * Gets the value of the id property. + * + */ + public int getId() { + return id; + } + + /** + * Sets the value of the id property. + * + */ + public void setId(int value) { + this.id = value; + } + + /** + * Gets the value of the description property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDescription() { + return description; + } + + /** + * Sets the value of the description property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDescription(String value) { + this.description = value; + } + + /** + * Gets the value of the comision property. + * + * @return + * possible object is + * {@link Comision } + * + */ + public Comision getComision() { + return comision; + } + + /** + * Sets the value of the comision property. + * + * @param value + * allowed object is + * {@link Comision } + * + */ + public void setComision(Comision value) { + this.comision = value; + } + + /** + * Gets the value of the gmOptions property. + * + * @return + * possible object is + * {@link GMOptions } + * + */ + public GMOptions getGMOptions() { + return gmOptions; + } + + /** + * Sets the value of the gmOptions property. + * + * @param value + * allowed object is + * {@link GMOptions } + * + */ + public void setGMOptions(GMOptions value) { + this.gmOptions = value; + } + + /** + * Gets the value of the gmMethod property. + * + * @return + * possible object is + * {@link GMMethod } + * + */ + public GMMethod getGMMethod() { + return gmMethod; + } + + /** + * Sets the value of the gmMethod property. + * + * @param value + * allowed object is + * {@link GMMethod } + * + */ + public void setGMMethod(GMMethod value) { + this.gmMethod = value; + } + + /** + * Gets the value of the name property. + * + *

This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the name property.

+ * + *

+ * For example, to add a new item, do as follows: + *

+ *
+     * getName().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + *

+ * + * + * @return + * The value of the name property. + */ + public List getName() { + if (name == null) { + name = new ArrayList<>(); + } + return this.name; + } + +} diff --git a/service/src/main/java/market/guess/service/model/v1/GMEvents.java b/service/src/main/java/market/guess/service/model/v1/GMEvents.java new file mode 100644 index 0000000..ca4efea --- /dev/null +++ b/service/src/main/java/market/guess/service/model/v1/GMEvents.java @@ -0,0 +1,80 @@ +// +// This file was generated by the Eclipse Implementation of JAXB, v4.0.5 +// See https://eclipse-ee4j.github.io/jaxb-ri +// Any modifications to this file will be lost upon recompilation of the source schema. +// + + +package market.guess.service.model.v1; + +import java.util.ArrayList; +import java.util.List; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type

. + * + *

The following schema fragment specifies the expected content contained within this class.

+ * + *
{@code
+ * 
+ *   
+ *     
+ *       
+ *         
+ *       
+ *     
+ *   
+ * 
+ * }
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "gmEvent" +}) +@XmlRootElement(name = "GM-events") +public class GMEvents { + + @XmlElement(name = "GM-event", required = true) + protected List gmEvent; + + /** + * Gets the value of the gmEvent property. + * + *

This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the gmEvent property.

+ * + *

+ * For example, to add a new item, do as follows: + *

+ *
+     * getGMEvent().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link GMEvent } + *

+ * + * + * @return + * The value of the gmEvent property. + */ + public List getGMEvent() { + if (gmEvent == null) { + gmEvent = new ArrayList<>(); + } + return this.gmEvent; + } + +} diff --git a/service/src/main/java/market/guess/service/model/v1/GMLMSR.java b/service/src/main/java/market/guess/service/model/v1/GMLMSR.java new file mode 100644 index 0000000..a8e90a5 --- /dev/null +++ b/service/src/main/java/market/guess/service/model/v1/GMLMSR.java @@ -0,0 +1,60 @@ +// +// This file was generated by the Eclipse Implementation of JAXB, v4.0.5 +// See https://eclipse-ee4j.github.io/jaxb-ri +// Any modifications to this file will be lost upon recompilation of the source schema. +// + + +package market.guess.service.model.v1; + +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type

. + * + *

The following schema fragment specifies the expected content contained within this class.

+ * + *
{@code
+ * 
+ *   
+ *     
+ *       
+ *         
+ *       
+ *     
+ *   
+ * 
+ * }
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "b" +}) +@XmlRootElement(name = "GM-LMSR") +public class GMLMSR { + + protected int b; + + /** + * Gets the value of the b property. + * + */ + public int getB() { + return b; + } + + /** + * Sets the value of the b property. + * + */ + public void setB(int value) { + this.b = value; + } + +} diff --git a/service/src/main/java/market/guess/service/model/v1/GMMethod.java b/service/src/main/java/market/guess/service/model/v1/GMMethod.java new file mode 100644 index 0000000..867d932 --- /dev/null +++ b/service/src/main/java/market/guess/service/model/v1/GMMethod.java @@ -0,0 +1,70 @@ +// +// This file was generated by the Eclipse Implementation of JAXB, v4.0.5 +// See https://eclipse-ee4j.github.io/jaxb-ri +// Any modifications to this file will be lost upon recompilation of the source schema. +// + + +package market.guess.service.model.v1; + +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type

. + * + *

The following schema fragment specifies the expected content contained within this class.

+ * + *
{@code
+ * 
+ *   
+ *     
+ *       
+ *         
+ *       
+ *     
+ *   
+ * 
+ * }
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "gmlmsr" +}) +@XmlRootElement(name = "GM-method") +public class GMMethod { + + @XmlElement(name = "GM-LMSR", required = true) + protected GMLMSR gmlmsr; + + /** + * Gets the value of the gmlmsr property. + * + * @return + * possible object is + * {@link GMLMSR } + * + */ + public GMLMSR getGMLMSR() { + return gmlmsr; + } + + /** + * Sets the value of the gmlmsr property. + * + * @param value + * allowed object is + * {@link GMLMSR } + * + */ + public void setGMLMSR(GMLMSR value) { + this.gmlmsr = value; + } + +} diff --git a/service/src/main/java/market/guess/service/model/v1/GMOptions.java b/service/src/main/java/market/guess/service/model/v1/GMOptions.java new file mode 100644 index 0000000..d344f74 --- /dev/null +++ b/service/src/main/java/market/guess/service/model/v1/GMOptions.java @@ -0,0 +1,80 @@ +// +// This file was generated by the Eclipse Implementation of JAXB, v4.0.5 +// See https://eclipse-ee4j.github.io/jaxb-ri +// Any modifications to this file will be lost upon recompilation of the source schema. +// + + +package market.guess.service.model.v1; + +import java.util.ArrayList; +import java.util.List; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type

. + * + *

The following schema fragment specifies the expected content contained within this class.

+ * + *
{@code
+ * 
+ *   
+ *     
+ *       
+ *         
+ *       
+ *     
+ *   
+ * 
+ * }
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "gmOption" +}) +@XmlRootElement(name = "GM-options") +public class GMOptions { + + @XmlElement(name = "GM-option", required = true) + protected List gmOption; + + /** + * Gets the value of the gmOption property. + * + *

This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the gmOption property.

+ * + *

+ * For example, to add a new item, do as follows: + *

+ *
+     * getGMOption().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + *

+ * + * + * @return + * The value of the gmOption property. + */ + public List getGMOption() { + if (gmOption == null) { + gmOption = new ArrayList<>(); + } + return this.gmOption; + } + +} diff --git a/service/src/main/java/market/guess/service/model/v1/GuessMarket.java b/service/src/main/java/market/guess/service/model/v1/GuessMarket.java new file mode 100644 index 0000000..43f134d --- /dev/null +++ b/service/src/main/java/market/guess/service/model/v1/GuessMarket.java @@ -0,0 +1,70 @@ +// +// This file was generated by the Eclipse Implementation of JAXB, v4.0.5 +// See https://eclipse-ee4j.github.io/jaxb-ri +// Any modifications to this file will be lost upon recompilation of the source schema. +// + + +package market.guess.service.model.v1; + +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type

. + * + *

The following schema fragment specifies the expected content contained within this class.

+ * + *
{@code
+ * 
+ *   
+ *     
+ *       
+ *         
+ *       
+ *     
+ *   
+ * 
+ * }
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "gmEvents" +}) +@XmlRootElement(name = "Guess-Market") +public class GuessMarket { + + @XmlElement(name = "GM-events", required = true) + protected GMEvents gmEvents; + + /** + * Gets the value of the gmEvents property. + * + * @return + * possible object is + * {@link GMEvents } + * + */ + public GMEvents getGMEvents() { + return gmEvents; + } + + /** + * Sets the value of the gmEvents property. + * + * @param value + * allowed object is + * {@link GMEvents } + * + */ + public void setGMEvents(GMEvents value) { + this.gmEvents = value; + } + +} diff --git a/service/src/main/java/market/guess/service/model/v1/ObjectFactory.java b/service/src/main/java/market/guess/service/model/v1/ObjectFactory.java new file mode 100644 index 0000000..cd43428 --- /dev/null +++ b/service/src/main/java/market/guess/service/model/v1/ObjectFactory.java @@ -0,0 +1,167 @@ +// +// This file was generated by the Eclipse Implementation of JAXB, v4.0.5 +// See https://eclipse-ee4j.github.io/jaxb-ri +// Any modifications to this file will be lost upon recompilation of the source schema. +// + + +package market.guess.service.model.v1; + +import javax.xml.namespace.QName; +import jakarta.xml.bind.JAXBElement; +import jakarta.xml.bind.annotation.XmlElementDecl; +import jakarta.xml.bind.annotation.XmlRegistry; + + +/** + * This object contains factory methods for each + * Java content interface and Java element interface + * generated in the market.guess.service.model.v1 package. + *

An ObjectFactory allows you to programmatically + * construct new instances of the Java representation + * for XML content. The Java representation of XML + * content can consist of schema derived interfaces + * and classes representing the binding of schema + * type definitions, element declarations and model + * groups. Factory methods for each of these are + * provided in this class. + * + */ +@XmlRegistry +public class ObjectFactory { + + private static final QName _Id_QNAME = new QName("", "id"); + private static final QName _Description_QNAME = new QName("", "description"); + private static final QName _B_QNAME = new QName("", "b"); + private static final QName _GMOption_QNAME = new QName("", "GM-option"); + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: market.guess.service.model.v1 + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link Comision } + * + * @return + * the new instance of {@link Comision } + */ + public Comision createComision() { + return new Comision(); + } + + /** + * Create an instance of {@link GuessMarket } + * + * @return + * the new instance of {@link GuessMarket } + */ + public GuessMarket createGuessMarket() { + return new GuessMarket(); + } + + /** + * Create an instance of {@link GMEvents } + * + * @return + * the new instance of {@link GMEvents } + */ + public GMEvents createGMEvents() { + return new GMEvents(); + } + + /** + * Create an instance of {@link GMEvent } + * + * @return + * the new instance of {@link GMEvent } + */ + public GMEvent createGMEvent() { + return new GMEvent(); + } + + /** + * Create an instance of {@link GMOptions } + * + * @return + * the new instance of {@link GMOptions } + */ + public GMOptions createGMOptions() { + return new GMOptions(); + } + + /** + * Create an instance of {@link GMMethod } + * + * @return + * the new instance of {@link GMMethod } + */ + public GMMethod createGMMethod() { + return new GMMethod(); + } + + /** + * Create an instance of {@link GMLMSR } + * + * @return + * the new instance of {@link GMLMSR } + */ + public GMLMSR createGMLMSR() { + return new GMLMSR(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link Integer }{@code >} + * + * @param value + * Java instance representing xml element's value. + * @return + * the new instance of {@link JAXBElement }{@code <}{@link Integer }{@code >} + */ + @XmlElementDecl(namespace = "", name = "id") + public JAXBElement createId(Integer value) { + return new JAXBElement<>(_Id_QNAME, Integer.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >} + * + * @param value + * Java instance representing xml element's value. + * @return + * the new instance of {@link JAXBElement }{@code <}{@link String }{@code >} + */ + @XmlElementDecl(namespace = "", name = "description") + public JAXBElement createDescription(String value) { + return new JAXBElement<>(_Description_QNAME, String.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link Integer }{@code >} + * + * @param value + * Java instance representing xml element's value. + * @return + * the new instance of {@link JAXBElement }{@code <}{@link Integer }{@code >} + */ + @XmlElementDecl(namespace = "", name = "b") + public JAXBElement createB(Integer value) { + return new JAXBElement<>(_B_QNAME, Integer.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >} + * + * @param value + * Java instance representing xml element's value. + * @return + * the new instance of {@link JAXBElement }{@code <}{@link String }{@code >} + */ + @XmlElementDecl(namespace = "", name = "GM-option") + public JAXBElement createGMOption(String value) { + return new JAXBElement<>(_GMOption_QNAME, String.class, null, value); + } + +} diff --git a/service/src/main/java/market/guess/service/model/v2/Commission.java b/service/src/main/java/market/guess/service/model/v2/Commission.java new file mode 100644 index 0000000..5448ff0 --- /dev/null +++ b/service/src/main/java/market/guess/service/model/v2/Commission.java @@ -0,0 +1,94 @@ +// +// This file was generated by the Eclipse Implementation of JAXB, v4.0.5 +// See https://eclipse-ee4j.github.io/jaxb-ri +// Any modifications to this file will be lost upon recompilation of the source schema. +// + + +package market.guess.service.model.v2; + +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlAttribute; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; +import jakarta.xml.bind.annotation.XmlValue; + + +/** + *

Java class for anonymous complex type

. + * + *

The following schema fragment specifies the expected content contained within this class.

+ * + *
{@code
+ * 
+ *   
+ *     
+ *       
+ *         
+ *           
+ *             
+ *             
+ *           
+ *         
+ *       
+ *     
+ *   
+ * 
+ * }
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "value" +}) +@XmlRootElement(name = "commission") +public class Commission { + + @XmlValue + protected int value; + @XmlAttribute(name = "type", required = true) + protected String type; + + /** + * Gets the value of the value property. + * + */ + public int getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + */ + public void setValue(int value) { + this.value = value; + } + + /** + * Gets the value of the type property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + +} diff --git a/service/src/main/java/market/guess/service/model/v2/Event.java b/service/src/main/java/market/guess/service/model/v2/Event.java new file mode 100644 index 0000000..53ca4ca --- /dev/null +++ b/service/src/main/java/market/guess/service/model/v2/Event.java @@ -0,0 +1,58 @@ +// +// This file was generated by the Eclipse Implementation of JAXB, v4.0.5 +// See https://eclipse-ee4j.github.io/jaxb-ri +// Any modifications to this file will be lost upon recompilation of the source schema. +// + + +package market.guess.service.model.v2; + +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlAttribute; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type

. + * + *

The following schema fragment specifies the expected content contained within this class.

+ * + *
{@code
+ * 
+ *   
+ *     
+ *       
+ *     
+ *   
+ * 
+ * }
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "") +@XmlRootElement(name = "event") +public class Event { + + @XmlAttribute(name = "id", required = true) + protected int id; + + /** + * Gets the value of the id property. + * + */ + public int getId() { + return id; + } + + /** + * Sets the value of the id property. + * + */ + public void setId(int value) { + this.id = value; + } + +} diff --git a/service/src/main/java/market/guess/service/model/v2/GMEvent.java b/service/src/main/java/market/guess/service/model/v2/GMEvent.java new file mode 100644 index 0000000..c011c32 --- /dev/null +++ b/service/src/main/java/market/guess/service/model/v2/GMEvent.java @@ -0,0 +1,201 @@ +// +// This file was generated by the Eclipse Implementation of JAXB, v4.0.5 +// See https://eclipse-ee4j.github.io/jaxb-ri +// Any modifications to this file will be lost upon recompilation of the source schema. +// + + +package market.guess.service.model.v2; + +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlAttribute; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type

. + * + *

The following schema fragment specifies the expected content contained within this class.

+ * + *
{@code
+ * 
+ *   
+ *     
+ *       
+ *         
+ *         
+ *         
+ *         
+ *         
+ *       
+ *       
+ *     
+ *   
+ * 
+ * }
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "id", + "description", + "commission", + "gmOptions", + "gmMethod" +}) +@XmlRootElement(name = "GM-event") +public class GMEvent { + + protected int id; + @XmlElement(required = true) + protected String description; + @XmlElement(required = true) + protected Commission commission; + @XmlElement(name = "GM-options", required = true) + protected GMOptions gmOptions; + @XmlElement(name = "GM-method", required = true) + protected GMMethod gmMethod; + @XmlAttribute(name = "name", required = true) + protected String name; + + /** + * Gets the value of the id property. + * + */ + public int getId() { + return id; + } + + /** + * Sets the value of the id property. + * + */ + public void setId(int value) { + this.id = value; + } + + /** + * Gets the value of the description property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDescription() { + return description; + } + + /** + * Sets the value of the description property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDescription(String value) { + this.description = value; + } + + /** + * Gets the value of the commission property. + * + * @return + * possible object is + * {@link Commission } + * + */ + public Commission getCommission() { + return commission; + } + + /** + * Sets the value of the commission property. + * + * @param value + * allowed object is + * {@link Commission } + * + */ + public void setCommission(Commission value) { + this.commission = value; + } + + /** + * Gets the value of the gmOptions property. + * + * @return + * possible object is + * {@link GMOptions } + * + */ + public GMOptions getGMOptions() { + return gmOptions; + } + + /** + * Sets the value of the gmOptions property. + * + * @param value + * allowed object is + * {@link GMOptions } + * + */ + public void setGMOptions(GMOptions value) { + this.gmOptions = value; + } + + /** + * Gets the value of the gmMethod property. + * + * @return + * possible object is + * {@link GMMethod } + * + */ + public GMMethod getGMMethod() { + return gmMethod; + } + + /** + * Sets the value of the gmMethod property. + * + * @param value + * allowed object is + * {@link GMMethod } + * + */ + public void setGMMethod(GMMethod value) { + this.gmMethod = value; + } + + /** + * Gets the value of the name property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + return name; + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + +} diff --git a/service/src/main/java/market/guess/service/model/v2/GMEvents.java b/service/src/main/java/market/guess/service/model/v2/GMEvents.java new file mode 100644 index 0000000..61a5473 --- /dev/null +++ b/service/src/main/java/market/guess/service/model/v2/GMEvents.java @@ -0,0 +1,80 @@ +// +// This file was generated by the Eclipse Implementation of JAXB, v4.0.5 +// See https://eclipse-ee4j.github.io/jaxb-ri +// Any modifications to this file will be lost upon recompilation of the source schema. +// + + +package market.guess.service.model.v2; + +import java.util.ArrayList; +import java.util.List; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type

. + * + *

The following schema fragment specifies the expected content contained within this class.

+ * + *
{@code
+ * 
+ *   
+ *     
+ *       
+ *         
+ *       
+ *     
+ *   
+ * 
+ * }
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "gmEvent" +}) +@XmlRootElement(name = "GM-events") +public class GMEvents { + + @XmlElement(name = "GM-event", required = true) + protected List gmEvent; + + /** + * Gets the value of the gmEvent property. + * + *

This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the gmEvent property.

+ * + *

+ * For example, to add a new item, do as follows: + *

+ *
+     * getGMEvent().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link GMEvent } + *

+ * + * + * @return + * The value of the gmEvent property. + */ + public List getGMEvent() { + if (gmEvent == null) { + gmEvent = new ArrayList<>(); + } + return this.gmEvent; + } + +} diff --git a/service/src/main/java/market/guess/service/model/v2/GMLMSR.java b/service/src/main/java/market/guess/service/model/v2/GMLMSR.java new file mode 100644 index 0000000..b299a19 --- /dev/null +++ b/service/src/main/java/market/guess/service/model/v2/GMLMSR.java @@ -0,0 +1,60 @@ +// +// This file was generated by the Eclipse Implementation of JAXB, v4.0.5 +// See https://eclipse-ee4j.github.io/jaxb-ri +// Any modifications to this file will be lost upon recompilation of the source schema. +// + + +package market.guess.service.model.v2; + +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type

. + * + *

The following schema fragment specifies the expected content contained within this class.

+ * + *
{@code
+ * 
+ *   
+ *     
+ *       
+ *         
+ *       
+ *     
+ *   
+ * 
+ * }
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "b" +}) +@XmlRootElement(name = "GM-LMSR") +public class GMLMSR { + + protected int b; + + /** + * Gets the value of the b property. + * + */ + public int getB() { + return b; + } + + /** + * Sets the value of the b property. + * + */ + public void setB(int value) { + this.b = value; + } + +} diff --git a/service/src/main/java/market/guess/service/model/v2/GMMarketMaker.java b/service/src/main/java/market/guess/service/model/v2/GMMarketMaker.java new file mode 100644 index 0000000..2eb0e6e --- /dev/null +++ b/service/src/main/java/market/guess/service/model/v2/GMMarketMaker.java @@ -0,0 +1,80 @@ +// +// This file was generated by the Eclipse Implementation of JAXB, v4.0.5 +// See https://eclipse-ee4j.github.io/jaxb-ri +// Any modifications to this file will be lost upon recompilation of the source schema. +// + + +package market.guess.service.model.v2; + +import java.util.ArrayList; +import java.util.List; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type

. + * + *

The following schema fragment specifies the expected content contained within this class.

+ * + *
{@code
+ * 
+ *   
+ *     
+ *       
+ *         
+ *       
+ *     
+ *   
+ * 
+ * }
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "event" +}) +@XmlRootElement(name = "GM-market-maker") +public class GMMarketMaker { + + @XmlElement(required = true) + protected List event; + + /** + * Gets the value of the event property. + * + *

This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the event property.

+ * + *

+ * For example, to add a new item, do as follows: + *

+ *
+     * getEvent().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Event } + *

+ * + * + * @return + * The value of the event property. + */ + public List getEvent() { + if (event == null) { + event = new ArrayList<>(); + } + return this.event; + } + +} diff --git a/service/src/main/java/market/guess/service/model/v2/GMMethod.java b/service/src/main/java/market/guess/service/model/v2/GMMethod.java new file mode 100644 index 0000000..06338c0 --- /dev/null +++ b/service/src/main/java/market/guess/service/model/v2/GMMethod.java @@ -0,0 +1,98 @@ +// +// This file was generated by the Eclipse Implementation of JAXB, v4.0.5 +// See https://eclipse-ee4j.github.io/jaxb-ri +// Any modifications to this file will be lost upon recompilation of the source schema. +// + + +package market.guess.service.model.v2; + +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type

. + * + *

The following schema fragment specifies the expected content contained within this class.

+ * + *
{@code
+ * 
+ *   
+ *     
+ *       
+ *         
+ *         
+ *       
+ *     
+ *   
+ * 
+ * }
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "gmlmsr", + "gmOrderBook" +}) +@XmlRootElement(name = "GM-method") +public class GMMethod { + + @XmlElement(name = "GM-LMSR") + protected GMLMSR gmlmsr; + @XmlElement(name = "GM-order-book") + protected GMOrderBook gmOrderBook; + + /** + * Gets the value of the gmlmsr property. + * + * @return + * possible object is + * {@link GMLMSR } + * + */ + public GMLMSR getGMLMSR() { + return gmlmsr; + } + + /** + * Sets the value of the gmlmsr property. + * + * @param value + * allowed object is + * {@link GMLMSR } + * + */ + public void setGMLMSR(GMLMSR value) { + this.gmlmsr = value; + } + + /** + * Gets the value of the gmOrderBook property. + * + * @return + * possible object is + * {@link GMOrderBook } + * + */ + public GMOrderBook getGMOrderBook() { + return gmOrderBook; + } + + /** + * Sets the value of the gmOrderBook property. + * + * @param value + * allowed object is + * {@link GMOrderBook } + * + */ + public void setGMOrderBook(GMOrderBook value) { + this.gmOrderBook = value; + } + +} diff --git a/service/src/main/java/market/guess/service/model/v2/GMOptions.java b/service/src/main/java/market/guess/service/model/v2/GMOptions.java new file mode 100644 index 0000000..a819656 --- /dev/null +++ b/service/src/main/java/market/guess/service/model/v2/GMOptions.java @@ -0,0 +1,80 @@ +// +// This file was generated by the Eclipse Implementation of JAXB, v4.0.5 +// See https://eclipse-ee4j.github.io/jaxb-ri +// Any modifications to this file will be lost upon recompilation of the source schema. +// + + +package market.guess.service.model.v2; + +import java.util.ArrayList; +import java.util.List; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type

. + * + *

The following schema fragment specifies the expected content contained within this class.

+ * + *
{@code
+ * 
+ *   
+ *     
+ *       
+ *         
+ *       
+ *     
+ *   
+ * 
+ * }
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "gmOption" +}) +@XmlRootElement(name = "GM-options") +public class GMOptions { + + @XmlElement(name = "GM-option", required = true) + protected List gmOption; + + /** + * Gets the value of the gmOption property. + * + *

This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the gmOption property.

+ * + *

+ * For example, to add a new item, do as follows: + *

+ *
+     * getGMOption().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + *

+ * + * + * @return + * The value of the gmOption property. + */ + public List getGMOption() { + if (gmOption == null) { + gmOption = new ArrayList<>(); + } + return this.gmOption; + } + +} diff --git a/service/src/main/java/market/guess/service/model/v2/GMOrderBook.java b/service/src/main/java/market/guess/service/model/v2/GMOrderBook.java new file mode 100644 index 0000000..f38c707 --- /dev/null +++ b/service/src/main/java/market/guess/service/model/v2/GMOrderBook.java @@ -0,0 +1,111 @@ +// +// This file was generated by the Eclipse Implementation of JAXB, v4.0.5 +// See https://eclipse-ee4j.github.io/jaxb-ri +// Any modifications to this file will be lost upon recompilation of the source schema. +// + + +package market.guess.service.model.v2; + +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlAttribute; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type

. + * + *

The following schema fragment specifies the expected content contained within this class.

+ * + *
{@code
+ * 
+ *   
+ *     
+ *       
+ *       
+ *       
+ *         
+ *           
+ *             
+ *             
+ *           
+ *         
+ *       
+ *     
+ *   
+ * 
+ * }
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "") +@XmlRootElement(name = "GM-order-book") +public class GMOrderBook { + + @XmlAttribute(name = "initial", required = true) + protected int initial; + @XmlAttribute(name = "d", required = true) + protected int d; + @XmlAttribute(name = "allow-mint", required = true) + protected String allowMint; + + /** + * Gets the value of the initial property. + * + */ + public int getInitial() { + return initial; + } + + /** + * Sets the value of the initial property. + * + */ + public void setInitial(int value) { + this.initial = value; + } + + /** + * Gets the value of the d property. + * + */ + public int getD() { + return d; + } + + /** + * Sets the value of the d property. + * + */ + public void setD(int value) { + this.d = value; + } + + /** + * Gets the value of the allowMint property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAllowMint() { + return allowMint; + } + + /** + * Sets the value of the allowMint property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAllowMint(String value) { + this.allowMint = value; + } + +} diff --git a/service/src/main/java/market/guess/service/model/v2/GMUser.java b/service/src/main/java/market/guess/service/model/v2/GMUser.java new file mode 100644 index 0000000..85b41f4 --- /dev/null +++ b/service/src/main/java/market/guess/service/model/v2/GMUser.java @@ -0,0 +1,118 @@ +// +// This file was generated by the Eclipse Implementation of JAXB, v4.0.5 +// See https://eclipse-ee4j.github.io/jaxb-ri +// Any modifications to this file will be lost upon recompilation of the source schema. +// + + +package market.guess.service.model.v2; + +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlAttribute; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type

. + * + *

The following schema fragment specifies the expected content contained within this class.

+ * + *
{@code
+ * 
+ *   
+ *     
+ *       
+ *         
+ *         
+ *       
+ *       
+ *     
+ *   
+ * 
+ * }
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "initialCash", + "gmMarketMaker" +}) +@XmlRootElement(name = "GM-user") +public class GMUser { + + @XmlElement(name = "initial-cash") + protected int initialCash; + @XmlElement(name = "GM-market-maker") + protected GMMarketMaker gmMarketMaker; + @XmlAttribute(name = "name", required = true) + protected String name; + + /** + * Gets the value of the initialCash property. + * + */ + public int getInitialCash() { + return initialCash; + } + + /** + * Sets the value of the initialCash property. + * + */ + public void setInitialCash(int value) { + this.initialCash = value; + } + + /** + * Gets the value of the gmMarketMaker property. + * + * @return + * possible object is + * {@link GMMarketMaker } + * + */ + public GMMarketMaker getGMMarketMaker() { + return gmMarketMaker; + } + + /** + * Sets the value of the gmMarketMaker property. + * + * @param value + * allowed object is + * {@link GMMarketMaker } + * + */ + public void setGMMarketMaker(GMMarketMaker value) { + this.gmMarketMaker = value; + } + + /** + * Gets the value of the name property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + return name; + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + +} diff --git a/service/src/main/java/market/guess/service/model/v2/GMUsers.java b/service/src/main/java/market/guess/service/model/v2/GMUsers.java new file mode 100644 index 0000000..cfebbc4 --- /dev/null +++ b/service/src/main/java/market/guess/service/model/v2/GMUsers.java @@ -0,0 +1,80 @@ +// +// This file was generated by the Eclipse Implementation of JAXB, v4.0.5 +// See https://eclipse-ee4j.github.io/jaxb-ri +// Any modifications to this file will be lost upon recompilation of the source schema. +// + + +package market.guess.service.model.v2; + +import java.util.ArrayList; +import java.util.List; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type

. + * + *

The following schema fragment specifies the expected content contained within this class.

+ * + *
{@code
+ * 
+ *   
+ *     
+ *       
+ *         
+ *       
+ *     
+ *   
+ * 
+ * }
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "gmUser" +}) +@XmlRootElement(name = "GM-users") +public class GMUsers { + + @XmlElement(name = "GM-user", required = true) + protected List gmUser; + + /** + * Gets the value of the gmUser property. + * + *

This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the gmUser property.

+ * + *

+ * For example, to add a new item, do as follows: + *

+ *
+     * getGMUser().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link GMUser } + *

+ * + * + * @return + * The value of the gmUser property. + */ + public List getGMUser() { + if (gmUser == null) { + gmUser = new ArrayList<>(); + } + return this.gmUser; + } + +} diff --git a/service/src/main/java/market/guess/service/model/v2/GuessMarket.java b/service/src/main/java/market/guess/service/model/v2/GuessMarket.java new file mode 100644 index 0000000..1ce28c8 --- /dev/null +++ b/service/src/main/java/market/guess/service/model/v2/GuessMarket.java @@ -0,0 +1,97 @@ +// +// This file was generated by the Eclipse Implementation of JAXB, v4.0.5 +// See https://eclipse-ee4j.github.io/jaxb-ri +// Any modifications to this file will be lost upon recompilation of the source schema. +// + + +package market.guess.service.model.v2; + +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type

. + * + *

The following schema fragment specifies the expected content contained within this class.

+ * + *
{@code
+ * 
+ *   
+ *     
+ *       
+ *         
+ *         
+ *       
+ *     
+ *   
+ * 
+ * }
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + +}) +@XmlRootElement(name = "Guess-Market") +public class GuessMarket { + + @XmlElement(name = "GM-events", required = true) + protected GMEvents gmEvents; + @XmlElement(name = "GM-users", required = true) + protected GMUsers gmUsers; + + /** + * Gets the value of the gmEvents property. + * + * @return + * possible object is + * {@link GMEvents } + * + */ + public GMEvents getGMEvents() { + return gmEvents; + } + + /** + * Sets the value of the gmEvents property. + * + * @param value + * allowed object is + * {@link GMEvents } + * + */ + public void setGMEvents(GMEvents value) { + this.gmEvents = value; + } + + /** + * Gets the value of the gmUsers property. + * + * @return + * possible object is + * {@link GMUsers } + * + */ + public GMUsers getGMUsers() { + return gmUsers; + } + + /** + * Sets the value of the gmUsers property. + * + * @param value + * allowed object is + * {@link GMUsers } + * + */ + public void setGMUsers(GMUsers value) { + this.gmUsers = value; + } + +} diff --git a/service/src/main/java/market/guess/service/model/v2/ObjectFactory.java b/service/src/main/java/market/guess/service/model/v2/ObjectFactory.java new file mode 100644 index 0000000..7f0fff9 --- /dev/null +++ b/service/src/main/java/market/guess/service/model/v2/ObjectFactory.java @@ -0,0 +1,231 @@ +// +// This file was generated by the Eclipse Implementation of JAXB, v4.0.5 +// See https://eclipse-ee4j.github.io/jaxb-ri +// Any modifications to this file will be lost upon recompilation of the source schema. +// + + +package market.guess.service.model.v2; + +import javax.xml.namespace.QName; +import jakarta.xml.bind.JAXBElement; +import jakarta.xml.bind.annotation.XmlElementDecl; +import jakarta.xml.bind.annotation.XmlRegistry; + + +/** + * This object contains factory methods for each + * Java content interface and Java element interface + * generated in the market.guess.service.model.v2 package. + *

An ObjectFactory allows you to programmatically + * construct new instances of the Java representation + * for XML content. The Java representation of XML + * content can consist of schema derived interfaces + * and classes representing the binding of schema + * type definitions, element declarations and model + * groups. Factory methods for each of these are + * provided in this class. + * + */ +@XmlRegistry +public class ObjectFactory { + + private static final QName _InitialCash_QNAME = new QName("", "initial-cash"); + private static final QName _Id_QNAME = new QName("", "id"); + private static final QName _Description_QNAME = new QName("", "description"); + private static final QName _B_QNAME = new QName("", "b"); + private static final QName _GMOption_QNAME = new QName("", "GM-option"); + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: market.guess.service.model.v2 + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link Event } + * + * @return + * the new instance of {@link Event } + */ + public Event createEvent() { + return new Event(); + } + + /** + * Create an instance of {@link Commission } + * + * @return + * the new instance of {@link Commission } + */ + public Commission createCommission() { + return new Commission(); + } + + /** + * Create an instance of {@link GuessMarket } + * + * @return + * the new instance of {@link GuessMarket } + */ + public GuessMarket createGuessMarket() { + return new GuessMarket(); + } + + /** + * Create an instance of {@link GMEvents } + * + * @return + * the new instance of {@link GMEvents } + */ + public GMEvents createGMEvents() { + return new GMEvents(); + } + + /** + * Create an instance of {@link GMEvent } + * + * @return + * the new instance of {@link GMEvent } + */ + public GMEvent createGMEvent() { + return new GMEvent(); + } + + /** + * Create an instance of {@link GMOptions } + * + * @return + * the new instance of {@link GMOptions } + */ + public GMOptions createGMOptions() { + return new GMOptions(); + } + + /** + * Create an instance of {@link GMMethod } + * + * @return + * the new instance of {@link GMMethod } + */ + public GMMethod createGMMethod() { + return new GMMethod(); + } + + /** + * Create an instance of {@link GMLMSR } + * + * @return + * the new instance of {@link GMLMSR } + */ + public GMLMSR createGMLMSR() { + return new GMLMSR(); + } + + /** + * Create an instance of {@link GMOrderBook } + * + * @return + * the new instance of {@link GMOrderBook } + */ + public GMOrderBook createGMOrderBook() { + return new GMOrderBook(); + } + + /** + * Create an instance of {@link GMUsers } + * + * @return + * the new instance of {@link GMUsers } + */ + public GMUsers createGMUsers() { + return new GMUsers(); + } + + /** + * Create an instance of {@link GMUser } + * + * @return + * the new instance of {@link GMUser } + */ + public GMUser createGMUser() { + return new GMUser(); + } + + /** + * Create an instance of {@link GMMarketMaker } + * + * @return + * the new instance of {@link GMMarketMaker } + */ + public GMMarketMaker createGMMarketMaker() { + return new GMMarketMaker(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link Integer }{@code >} + * + * @param value + * Java instance representing xml element's value. + * @return + * the new instance of {@link JAXBElement }{@code <}{@link Integer }{@code >} + */ + @XmlElementDecl(namespace = "", name = "initial-cash") + public JAXBElement createInitialCash(Integer value) { + return new JAXBElement<>(_InitialCash_QNAME, Integer.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link Integer }{@code >} + * + * @param value + * Java instance representing xml element's value. + * @return + * the new instance of {@link JAXBElement }{@code <}{@link Integer }{@code >} + */ + @XmlElementDecl(namespace = "", name = "id") + public JAXBElement createId(Integer value) { + return new JAXBElement<>(_Id_QNAME, Integer.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >} + * + * @param value + * Java instance representing xml element's value. + * @return + * the new instance of {@link JAXBElement }{@code <}{@link String }{@code >} + */ + @XmlElementDecl(namespace = "", name = "description") + public JAXBElement createDescription(String value) { + return new JAXBElement<>(_Description_QNAME, String.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link Integer }{@code >} + * + * @param value + * Java instance representing xml element's value. + * @return + * the new instance of {@link JAXBElement }{@code <}{@link Integer }{@code >} + */ + @XmlElementDecl(namespace = "", name = "b") + public JAXBElement createB(Integer value) { + return new JAXBElement<>(_B_QNAME, Integer.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >} + * + * @param value + * Java instance representing xml element's value. + * @return + * the new instance of {@link JAXBElement }{@code <}{@link String }{@code >} + */ + @XmlElementDecl(namespace = "", name = "GM-option") + public JAXBElement createGMOption(String value) { + return new JAXBElement<>(_GMOption_QNAME, String.class, null, value); + } + +} diff --git a/service/src/main/java/market/guess/service/repositories/EventRepository.java b/service/src/main/java/market/guess/service/repositories/EventRepository.java deleted file mode 100644 index 7794c99..0000000 --- a/service/src/main/java/market/guess/service/repositories/EventRepository.java +++ /dev/null @@ -1,7 +0,0 @@ -package market.guess.service.repositories; - -import market.guess.service.domain.Event; - -public interface EventRepository { - Event getEvent(String id); -} diff --git a/service/src/main/java/market/guess/service/repositories/UserRepository.java b/service/src/main/java/market/guess/service/repositories/UserRepository.java deleted file mode 100644 index 992a8b3..0000000 --- a/service/src/main/java/market/guess/service/repositories/UserRepository.java +++ /dev/null @@ -1,8 +0,0 @@ -package market.guess.service.repositories; - -import market.guess.service.domain.User; - -public interface UserRepository { - - User getUser(String name); -} diff --git a/service/src/main/java/market/guess/service/repository/EventRepository.java b/service/src/main/java/market/guess/service/repository/EventRepository.java new file mode 100644 index 0000000..506949f --- /dev/null +++ b/service/src/main/java/market/guess/service/repository/EventRepository.java @@ -0,0 +1,7 @@ +package market.guess.service.repository; + +import market.guess.service.domain.Event; + +public interface EventRepository { + Event getEvent(String id); +} diff --git a/service/src/main/java/market/guess/service/repository/UserRepository.java b/service/src/main/java/market/guess/service/repository/UserRepository.java new file mode 100644 index 0000000..aafdc98 --- /dev/null +++ b/service/src/main/java/market/guess/service/repository/UserRepository.java @@ -0,0 +1,8 @@ +package market.guess.service.repository; + +import market.guess.service.domain.User; + +public interface UserRepository { + + User getUser(String name); +} -- cgit v1.2.3