2e4f298cd9e6759d0eb34da1fa73794b144dd9f1
[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                 <fields>
20                         <%foreach currentSone.profile.fields field>
21                         <field>
22                                 <field-name><% field.name|xml></field-name>
23                                 <field-value><% field.value|xml></field-value>
24                         </field>
25                         <%/foreach>
26                 </fields>
27         </profile>
28
29         <posts>
30                 <%foreach currentSone.posts post>
31                 <post>
32                         <id><% post.id|xml></id>
33                         <recipient><%ifnull !post.recipient><% post.recipient.id|xml><%/if></recipient>
34                         <time><% post.time></time>
35                         <text><% post.text|xml></text>
36                 </post>
37                 <%/foreach>
38         </posts>
39
40         <replies>
41                 <%foreach currentSone.replies reply>
42                 <reply>
43                         <id><% reply.id></id>
44                         <post-id><% reply.post.id|xml></post-id>
45                         <time><% reply.time></time>
46                         <text><% reply.text|xml></text>
47                 </reply>
48                 <%/foreach>
49         </replies>
50
51         <post-likes>
52                 <%foreach currentSone.likedPostIds postId>
53                 <post-like><% postId|xml></post-like>
54                 <%/foreach>
55         </post-likes>
56
57         <reply-likes>
58                 <%foreach currentSone.likedReplyIds replyId>
59                 <reply-like><% replyId|xml></reply-like>
60                 <%/foreach>
61         </reply-likes>
62
63         <%foreach currentSone.albums album>
64         <%first>
65         <albums>
66                 <%/first>
67                 <album>
68                         <id><%album.id|xml></id>
69                         <%ifnull !album.parent>
70                         <parent><%album.parent.id|xml></parent>
71                         <%/if>
72                         <title><%album.title|xml></title>
73                         <description><%album.description|xml></description>
74                         <album-image><%album.albumImage.id|xml></album-image>
75                         <%foreach album.images image>
76                         <%first>
77                         <images>
78                                 <%/first>
79                                 <image>
80                                         <id><%image.id|xml></id>
81                                         <creation-time><%image.creationTime|xml></creation-time>
82                                         <key><%image.key|xml></key>
83                                         <title><%image.title|xml></title>
84                                         <description><%image.description|xml></description>
85                                         <width><%image.width|xml></width>
86                                         <height><%image.height|xml></height>
87                                 </image>
88                                 <%last>
89                         </images>
90                         <%/last>
91                         <%/foreach>
92                 </album>
93                 <%last>
94         </albums>
95         <%/last>
96         <%/foreach>
97
98 </sone>