Fixed name of list properties

This commit is contained in:
Kai S. K. Engelbart 2019-10-28 06:18:16 +01:00
parent 81865e954c
commit 0251d120df
4 changed files with 43 additions and 27 deletions

View File

@ -32,6 +32,7 @@
</classpathentry>
<classpathentry kind="src" output="target/classes" path="target/generated-sources/jaxb">
<attributes>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="optional" value="true"/>
</attributes>

View File

@ -14,7 +14,7 @@ import javax.xml.bind.annotation.XmlType;
@XmlEnum
public enum UserStatus {
ONLINE, DONOTDISTURB, AFK, OFFLINE;
Online, DoNotDisturb, AFK, Offline;
public String value() { return name(); }

View File

@ -4,17 +4,19 @@
xmlns="https://github.com/informatik-ag-ngl"
elementFormDefault="qualified">
<xs:element name="Sync">
<xs:complexType>
<xs:sequence>
<xs:element name="Message" type="Message" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="User" type="User" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Sync">
<xs:complexType>
<xs:sequence>
<xs:element name="Message" type="Message" minOccurs="0"
maxOccurs="unbounded" />
<xs:element name="User" type="User" minOccurs="0"
maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="Message">
<xs:complexType name="Message">
<xs:sequence>
<xs:element name="Metadata">
<xs:complexType>
@ -22,14 +24,14 @@
<xs:element name="Sender" type="xs:long" />
<xs:element name="Recipient" type="xs:long" />
<xs:element name="Date" type="xs:dateTime" />
<xs:element name="MessageId" type="xs:long"/>
<xs:element name="MessageId" type="xs:long" />
<xs:element name="State">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Waiting"/>
<xs:enumeration value="Sent"/>
<xs:enumeration value="Received"/>
<xs:enumeration value="Read"/>
<xs:enumeration value="Waiting" />
<xs:enumeration value="Sent" />
<xs:enumeration value="Received" />
<xs:enumeration value="Read" />
</xs:restriction>
</xs:simpleType>
</xs:element>
@ -48,20 +50,20 @@
</xs:complexType>
<xs:complexType name="User">
<xs:complexType name="User">
<xs:sequence>
<xs:element name="Name" type="xs:string" />
<xs:element name="ID" type="xs:long" />
<xs:element name="Status">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="ONLINE"/>
<xs:enumeration value="DONOTDISTURB"/>
<xs:enumeration value="AFK"/>
<xs:enumeration value="OFFLINE"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Online" />
<xs:enumeration value="DoNotDisturb" />
<xs:enumeration value="AFK" />
<xs:enumeration value="Offline" />
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>

View File

@ -1,3 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xml>
<jaxb:bindings xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
@ -6,15 +8,26 @@
fixedAttributeAsConstantProperty="true">
<xjc:serializable />
</jaxb:globalBindings>
<jaxb:bindings schemaLocation="../resources/sync_schema.xsd">
<jaxb:bindings
schemaLocation="../resources/sync_schema.xsd">
<jaxb:bindings node="//xs:element[@name='Message']">
<jaxb:property name="Messages"/>
</jaxb:bindings>
<jaxb:bindings node="//xs:element[@name='User']">
<jaxb:property name="Users"/>
</jaxb:bindings>
<jaxb:bindings
node="//xs:element[@name='State']/xs:simpleType">
<jaxb:typesafeEnumClass name="MessageState" />
</jaxb:bindings>
<jaxb:bindings
node="//xs:element[@name='Status']/xs:simpleType">
<jaxb:typesafeEnumClass name="UserStatus" />
</jaxb:bindings>
</jaxb:bindings>
</jaxb:bindings>