Merge commit '0.3.1-RC3' into message-recipient
[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
6         <client>
7                 <name>Sone</name>
8                 <version><% version|xml></version>
9         </client>
10
11         <profile>
12                 <first-name><% currentSone.profile.firstName|xml></first-name>
13                 <middle-name><% currentSone.profile.middleName|xml></middle-name>
14                 <last-name><% currentSone.profile.lastName|xml></last-name>
15                 <birth-day><% currentSone.profile.birthDay|xml></birth-day>
16                 <birth-month><% currentSone.profile.birthMonth|xml></birth-month>
17                 <birth-year><% currentSone.profile.birthYear|xml></birth-year>
18         </profile>
19
20         <posts>
21                 <%foreach currentSone.posts post>
22                 <post>
23                         <id><% post.id|xml></id>
24                         <recipient><%ifnull !post.recipient><% post.recipient.id|xml><%/if></recipient>
25                         <time><% post.time></time>
26                         <text><% post.text|xml></text>
27                 </post>
28                 <%/foreach>
29         </posts>
30
31         <replies>
32                 <%foreach currentSone.replies reply>
33                 <reply>
34                         <id><% reply.id></id>
35                         <post-id><% reply.post.id|xml></post-id>
36                         <time><% reply.time></time>
37                         <text><% reply.text|xml></text>
38                 </reply>
39                 <%/foreach>
40         </replies>
41
42         <post-likes>
43                 <%foreach currentSone.likedPostIds postId>
44                 <post-like><% postId|xml></post-like>
45                 <%/foreach>
46         </post-likes>
47
48         <reply-likes>
49                 <%foreach currentSone.likedReplyIds replyId>
50                 <reply-like><% replyId|xml></reply-like>
51                 <%/foreach>
52         </reply-likes>
53
54 </sone>