commit
06f2cdb028
@ -13,12 +13,6 @@
|
|||||||
<attribute name="test" value="true"/>
|
<attribute name="test" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
|
||||||
<attribute name="test" value="true"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
22
src/main/java/envoy/schema/UserStatus.java
Normal file
22
src/main/java/envoy/schema/UserStatus.java
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
package envoy.schema;
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.XmlEnum;
|
||||||
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Project: <strong>envoy-common</strong><br>
|
||||||
|
* File: <strong>UserStatus.java</strong><br>
|
||||||
|
* Created: <strong>27 Oct 2019</strong><br>
|
||||||
|
*
|
||||||
|
* @author Maximilian Käfer
|
||||||
|
*/
|
||||||
|
@XmlType(name = "")
|
||||||
|
@XmlEnum
|
||||||
|
public enum UserStatus {
|
||||||
|
|
||||||
|
Online, DoNotDisturb, AFK, Offline;
|
||||||
|
|
||||||
|
public String value() { return name(); }
|
||||||
|
|
||||||
|
public static UserStatus fromValue(String v) { return valueOf(v); }
|
||||||
|
}
|
@ -1,48 +1,70 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||||
targetNamespace="https://github.com/informatik-ag-ngl"
|
targetNamespace="https://github.com/informatik-ag-ngl"
|
||||||
xmlns="https://github.com/informatik-ag-ngl"
|
xmlns="https://github.com/informatik-ag-ngl"
|
||||||
elementFormDefault="qualified">
|
elementFormDefault="qualified">
|
||||||
|
|
||||||
<xs:element name="Messages">
|
<xs:element name="Sync">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="Message" type="Message" minOccurs="0"
|
<xs:element name="Message" type="Message" minOccurs="0"
|
||||||
maxOccurs="unbounded" />
|
maxOccurs="unbounded" />
|
||||||
</xs:sequence>
|
<xs:element name="User" type="User" minOccurs="0"
|
||||||
</xs:complexType>
|
maxOccurs="unbounded" />
|
||||||
</xs:element>
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
<xs:complexType name="Message">
|
</xs:element>
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="MetaData">
|
|
||||||
<xs:complexType>
|
<xs:complexType name="Message">
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="Sender" type="xs:long" />
|
<xs:element name="Metadata">
|
||||||
<xs:element name="Recipient" type="xs:long" />
|
<xs:complexType>
|
||||||
<xs:element name="Date" type="xs:dateTime" />
|
<xs:sequence>
|
||||||
<xs:element name="State">
|
<xs:element name="Sender" type="xs:long" />
|
||||||
<xs:simpleType>
|
<xs:element name="Recipient" type="xs:long" />
|
||||||
<xs:restriction base="xs:string">
|
<xs:element name="Date" type="xs:dateTime" />
|
||||||
<xs:enumeration value="Waiting"/>
|
<xs:element name="MessageId" type="xs:long" />
|
||||||
<xs:enumeration value="Sent"/>
|
<xs:element name="State">
|
||||||
<xs:enumeration value="Received"/>
|
<xs:simpleType>
|
||||||
<xs:enumeration value="Read"/>
|
<xs:restriction base="xs:string">
|
||||||
</xs:restriction>
|
<xs:enumeration value="Waiting" />
|
||||||
</xs:simpleType>
|
<xs:enumeration value="Sent" />
|
||||||
</xs:element>
|
<xs:enumeration value="Received" />
|
||||||
</xs:sequence>
|
<xs:enumeration value="Read" />
|
||||||
</xs:complexType>
|
</xs:restriction>
|
||||||
</xs:element>
|
</xs:simpleType>
|
||||||
<xs:element name="Content" maxOccurs="unbounded">
|
</xs:element>
|
||||||
<xs:complexType>
|
</xs:sequence>
|
||||||
<xs:sequence>
|
</xs:complexType>
|
||||||
<xs:element name="text" type="xs:string" />
|
</xs:element>
|
||||||
</xs:sequence>
|
<xs:element name="Content" maxOccurs="unbounded">
|
||||||
<xs:attribute name="type" type="xs:string" />
|
<xs:complexType>
|
||||||
</xs:complexType>
|
<xs:sequence>
|
||||||
</xs:element>
|
<xs:element name="text" type="xs:string" />
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
</xs:complexType>
|
<xs:attribute name="type" type="xs:string" />
|
||||||
|
</xs:complexType>
|
||||||
</xs:schema>
|
</xs:element>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
|
||||||
|
|
||||||
|
<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:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
|
||||||
|
</xs:schema>
|
@ -1,23 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
|
||||||
targetNamespace="https://github.com/informatik-ag-ngl"
|
|
||||||
xmlns="https://github.com/informatik-ag-ngl"
|
|
||||||
elementFormDefault="qualified">
|
|
||||||
|
|
||||||
<xs:element name="Users">
|
|
||||||
<xs:complexType>
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="User" type="User" minOccurs="0"
|
|
||||||
maxOccurs="unbounded" />
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
</xs:element>
|
|
||||||
|
|
||||||
<xs:complexType name="User">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="Name" type="xs:string" />
|
|
||||||
<xs:element name="ID" type="xs:long" />
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
|
|
||||||
</xs:schema>
|
|
@ -1,3 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE xml>
|
||||||
<jaxb:bindings xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
<jaxb:bindings xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||||
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
|
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
|
||||||
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
|
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
|
||||||
@ -6,10 +8,26 @@
|
|||||||
fixedAttributeAsConstantProperty="true">
|
fixedAttributeAsConstantProperty="true">
|
||||||
<xjc:serializable />
|
<xjc:serializable />
|
||||||
</jaxb:globalBindings>
|
</jaxb:globalBindings>
|
||||||
<jaxb:bindings schemaLocation="../resources/message_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
|
<jaxb:bindings
|
||||||
node="//xs:element[@name='State']/xs:simpleType">
|
node="//xs:element[@name='State']/xs:simpleType">
|
||||||
<jaxb:typesafeEnumClass name="MessageState" />
|
<jaxb:typesafeEnumClass name="MessageState" />
|
||||||
</jaxb:bindings>
|
</jaxb:bindings>
|
||||||
|
|
||||||
|
<jaxb:bindings
|
||||||
|
node="//xs:element[@name='Status']/xs:simpleType">
|
||||||
|
<jaxb:typesafeEnumClass name="UserStatus" />
|
||||||
|
</jaxb:bindings>
|
||||||
|
|
||||||
</jaxb:bindings>
|
</jaxb:bindings>
|
||||||
</jaxb:bindings>
|
</jaxb:bindings>
|
Reference in New Issue
Block a user