🚚 Rename file containing annotations
[Sone.git] / src / main / resources / templates / insert / sone.xml
1 <?xml version="1.0" encoding="utf-8" ?>
2 <sone>
3
4         <time><% currentSone.time></time>
5         <protocol-version>0</protocol-version>
6
7         <client>
8                 <name>Sone</name>
9                 <version><% version|xml></version>
10         </client>
11
12         <profile>
13                 <first-name><% currentSone.profile.firstName|xml></first-name>
14                 <middle-name><% currentSone.profile.middleName|xml></middle-name>
15                 <last-name><% currentSone.profile.lastName|xml></last-name>
16                 <birth-day><% currentSone.profile.birthDay|xml></birth-day>
17                 <birth-month><% currentSone.profile.birthMonth|xml></birth-month>
18                 <birth-year><% currentSone.profile.birthYear|xml></birth-year>
19                 <avatar><%currentSone.profile.avatar|xml></avatar>
20                 <fields>
21                         <%foreach currentSone.profile.fields field>
22                         <field>
23                                 <field-name><% field.name|xml></field-name>
24                                 <field-value><% field.value|xml></field-value>
25                         </field>
26                         <%/foreach>
27                 </fields>
28         </profile>
29
30         <posts>
31                 <%foreach currentSone.posts post>
32                 <post>
33                         <id><% post.id|xml></id>
34                         <recipient><%if post.recipientId.present><% post.recipientId.get|xml><%/if></recipient>
35                         <time><% post.time></time>
36                         <text><% post.text|xml></text>
37                 </post>
38                 <%/foreach>
39         </posts>
40
41         <replies>
42                 <%foreach currentSone.replies reply>
43                 <reply>
44                         <id><% reply.id></id>
45                         <post-id><% reply.postId|xml></post-id>
46                         <time><% reply.time></time>
47                         <text><% reply.text|xml></text>
48                 </reply>
49                 <%/foreach>
50         </replies>
51
52         <post-likes>
53                 <%foreach currentSone.likedPostIds postId>
54                 <post-like><% postId|xml></post-like>
55                 <%/foreach>
56         </post-likes>
57
58         <reply-likes>
59                 <%foreach currentSone.likedReplyIds replyId>
60                 <reply-like><% replyId|xml></reply-like>
61                 <%/foreach>
62         </reply-likes>
63
64         <%foreach currentSone.albums album>
65         <%first>
66         <albums>
67                 <%/first>
68                 <album>
69                         <id><%album.id|xml></id>
70                         <%if !album.parent.root>
71                         <parent><%album.parent.id|xml></parent>
72                         <%/if>
73                         <title><%album.title|xml></title>
74                         <description><%album.description|xml></description>
75                         <!-- album-image is ignored, a random image is shown as album image. -->
76                         <album-image><%album.albumImage.id|xml></album-image>
77                         <%foreach album.images image>
78                         <%first>
79                         <images>
80                                 <%/first>
81                                 <image>
82                                         <id><%image.id|xml></id>
83                                         <creation-time><%image.creationTime|xml></creation-time>
84                                         <key><%image.key|xml></key>
85                                         <title><%image.title|xml></title>
86                                         <description><%image.description|xml></description>
87                                         <width><%image.width|xml></width>
88                                         <height><%image.height|xml></height>
89                                 </image>
90                                 <%last>
91                         </images>
92                         <%/last>
93                         <%/foreach>
94                 </album>
95                 <%last>
96         </albums>
97         <%/last>
98         <%/foreach>
99
100 </sone>