2 // WARNING! Changing this file will affect unit-tests
3 // A canonical JSON backed DB of OpenSocial datastructures in their RESTful forms
6 // { people : Array<Person>,
7 // activity : Map<Person.Id, Array<Activity>>
8 // data : Map<Person.Id, Map<String,String>>
9 // friendLinks : Map<Person.Id, Array<Person.Id>>
10 // userApplications : Map<Person.Id, Array<Application.Id>>
11 // messages : Map<Person.Id, Map<MessageCollection.Id, MessageCollection>>
15 // - The structure of Person, Activity MUST! match those in the RESTful spec
16 // - Data for "canonical" user should exercise every field in the spec. And is relied on
17 // for unit-testing so change at your peril
18 // - Consider adding a structure for Map<Person.Id, Array<appId>> to represent installed gadgets
21 // - Use URLs for appIds
28 "aboutMe" : "I have an example of every piece of data",
29 "activities" : ["Coding Shindig"],
32 "latitude" : "28.3043",
33 "longitude" : "143.0859",
34 "locality" : "who knows",
35 "postalCode" : "12345",
36 "region" : "Apache, CA",
37 "streetAddress" : "1 OpenStandards Way",
39 "formatted" : "PoBox 3565, 1 OpenStandards Way, Apache, CA"
45 "hairColor" : "black",
49 "books" : ["The Cathedral & the Bazaar","Catch 22"],
50 "cars" : ["beetle","prius"],
53 "latitude" : "48.858193",
54 "longitude" : "2.29419"
56 "birthday" : "1975-01-01",
57 "displayName" : "Shin Digg",
60 "displayValue" : "Socially"
63 "value" : "shindig-dev@incubator.apache.org",
66 "ethnicity" : "developer",
67 "fashion" : "t-shirts",
68 "food" : ["sushi","burgers"],
70 "happiestWhen" : "coding",
72 "heroes" : ["Doug Crockford", "Charles Babbage"],
73 "humor" : "none to speak of",
74 "interests" : ["PHP","Java"],
75 "jobInterests" : "will work for beer",
78 "formatted" : "1 Shindig Drive"
80 "description" : "lots of coding",
81 "endDate" : "2010-10-10",
82 "field" : "Software Engineering",
83 "name" : "Apache.com",
84 "salary" : "$1000000000",
85 "startDate" : "1995-01-01",
86 "subField" : "Development",
87 "title" : "Grand PooBah",
88 "webpage" : "http://incubator.apache.org/projects/shindig.html",
92 "formatted" : "1 Skid Row"
95 "endDate" : "1995-01-01",
97 "name" : "School of hard Knocks",
99 "startDate" : "1991-01-01",
100 "subField" : "Lab Tech",
105 "languagesSpoken" : ["English","Dutch","Esperanto"],
106 "updated" : "2006-06-06T12:12:12Z",
107 "livingArrangement" : "in a house",
109 {"value" : "RANDOM", "displayValue" : "Random"},
110 {"value" : "NETWORKING", "displayValue" : "Networking"}
112 "movies" : ["Iron Man", "Nosferatu"],
113 "music" : ["Chieftains","Beck"],
115 "additionalName" : "H",
116 "familyName" : "Digg",
117 "givenName" : "Shin",
118 "honorificPrefix" : "Sir",
119 "honorificSuffix" : "Social Butterfly",
120 "formatted" : "Sir Shin H. Digg Social Butterfly"
122 "networkPresence" : {
124 "displayValue" : "Online"
126 "nickname" : "diggy",
129 "value" : "111-111-111",
132 "value" : "999-999-999",
135 "politicalViews" : "open leaning",
137 "value" : "http://www.example.org/songs/OnlyTheLonely.mp3",
138 "linkText" : "Feelin' blue",
141 "profileUrl" : "http://www.example.org/?id=1",
143 "value" : "http://www.example.org/videos/Thriller.flv",
144 "linkText" : "Thriller",
147 "quotes" : ["I am therfore I code", "Doh!"],
148 "relationshipStatus" : "married to my job",
149 "religion" : "druidic",
150 "romance" : "twice a year",
151 "scaredOf" : "COBOL",
152 "sexualOrientation" : "north",
155 "displayValue" : "No"
157 "sports" : ["frisbee","rugby"],
159 "tags" : ["C#","JSON","template"],
160 "thumbnailUrl" : "http://www.example.org/pic/?id=1",
162 "turnOffs" : ["lack of unit tests","cabbage"],
163 "turnOns" : ["well document code"],
164 "tvShows" : ["House","Battlestar Galactica"],
166 "value" : "http://www.example.org/?id=1",
167 "linkText" : "my profile",
170 "value" : "http://www.example.org/pic/?id=1",
171 "linkText" : "my awesome picture",
177 "displayName" : "Johnny",
181 "familyName" : "Doe",
182 "givenName" : "John",
183 "formatted" : "John Doe"
188 "displayName" : "Janey",
192 "familyName" : "Doe",
193 "givenName" : "Jane",
194 "formatted" : "Jane Doe"
199 "displayName" : "Georgey",
203 "familyName" : "Doe",
204 "givenName" : "George",
205 "formatted" : "George Doe"
209 "id" : "mario.rossi",
210 "displayName" : "Mario",
214 "familyName" : "Rossi",
215 "givenName" : "Mario",
216 "formatted" : "Mario Rossi"
221 "displayName" : "Maija",
225 "familyName" : "Meikäläinen",
226 "givenName" : "Maija",
227 "formatted" : "Maija Meikäläinen"
231 // ----------------------------- Data ---------------------------------------
251 "body" : "Went rafting",
253 "externalId" : "http://www.example.org/123456",
255 "updated" : "2008-06-06T12:12:12Z",
257 "mimeType" : "image/*",
259 "url" : "http://upload.wikimedia.org/wikipedia/commons/thumb/7/77/Rafting_em_Brotas.jpg/800px-Rafting_em_Brotas.jpg"
261 "mimeType" : "audio/mpeg",
263 "url" : "http://www.archive.org/download/testmp3testfile/mpthreetest.mp3"
265 "postedTime" : "1111111111",
267 "streamFaviconUrl" : "http://upload.wikimedia.org/wikipedia/commons/0/02/Nuvola_apps_edu_languages.gif",
268 "streamSourceUrl" : "http://www.example.org/canonical/streamsource",
269 "streamTitle" : "All my activities",
270 "streamUrl" : "http://www.example.org/canonical/activities",
273 "otherContent" : "and got wet"
277 "url" : "http://www.example.org/canonical/activities/1",
278 "userId" : "canonical"
281 "body" : "Went skiing",
283 "externalId" : "http://www.example.org/123457",
285 "updated" : "2008-06-10T12:12:12Z",
286 "postedTime" : "1111111112",
288 "streamFaviconUrl" : "http://upload.wikimedia.org/wikipedia/commons/0/02/Nuvola_apps_edu_languages.gif",
289 "streamSourceUrl" : "http://www.example.org/canonical/streamsource",
290 "streamTitle" : "All my activities",
291 "streamUrl" : "http://www.example.org/canonical/activities",
294 "otherContent" : "and went fast"
296 "title" : "My next trip",
298 "url" : "http://www.example.org/canonical/activities/2",
299 "userId" : "canonical"
303 "userId" : "john.doe",
305 "body" : "what a color!"
309 "body" : "and she thinks you look like him",
311 "mimeType" : "image/jpeg",
313 "url" : "http://animals.nationalgeographic.com/staticfiles/NGS/Shared/StaticFiles/animals/images/primary/black-spider-monkey.jpg"
315 "mimeType" : "image/jpeg",
317 "url" : "http://image.guardian.co.uk/sys-images/Guardian/Pix/gallery/2002/01/03/monkey300.jpg"
319 "streamTitle" : "jane's photos",
320 "title" : "Jane just posted a photo of a monkey",
321 "userId" : "jane.doe"
324 "body" : "or is it you?",
326 "mimeType" : "image/jpeg",
328 "url" : "http://www.funnyphotos.net.au/images/fancy-dress-dog-yoda-from-star-wars1.jpg"
330 "streamTitle" : "jane's photos",
331 "title" : "Jane says George likes yoda!",
332 "userId" : "jane.doe"
337 // ----------------------------- Data ---------------------------------------
340 "canonical" : ["john.doe", "jane.doe", "george.doe", "maija.m"],
341 "john.doe" : ["jane.doe", "george.doe", "maija.m"],
342 "jane.doe" : ["john.doe"],
343 "george.doe" : ["john.doe"],
347 //---------------------------- Data For User Applications --------------------------------------------
349 "userApplications" : {
350 "canonical" : ["9158", "9703", "9143", "8877"],
351 "john.doe" : ["8877", "9143", "9158"],
352 "jane.doe" : ["9158", "9703"],
353 "george.doe" : ["9143"],
357 //--------------------------- Message Collections. -----------------------------------------
361 "notification" : {"title" : "Notifications",
363 {"id": "1", "title": "whazzup", "type": "notification", "body": "hey dude."},
364 {"id": "2", "title": "play checkers", "type": "notification", "body": "hot online checkers action"},
365 {"id": "3", "title": "you won!", "type": "notification", "body": "<b>yes, you really, really won!</b>"}
368 "publicMessage" : { "title" : "Profile Comments",
370 {"id": "1", "senderId": "john.doe", "title": "Hairdo", "type": "publicMessage", "body": "nice "haircut!"", "replies": ["1a","1b"]},
371 {"id": "1a", "senderId": "canonical", "title": "", "type": "publicMessage", "body": "that's not hair, it's a wig!", "inReplyTo": "1"},
372 {"id": "1b", "senderId": "john.doe", "title": "100% polyester", "type": "publicMessage", "body": "only the finest hyrdrocarbons :)","inReplyTo": "1"},
373 {"id": "2", "senderId": "jane.doe", "title": "hola", "type": "publicMessage", "body": "be my bff?"}
376 "privateMessage" : {"title" : "Inbox",
382 "notification" : {"title" : "Notifications", "messages" : []},
383 "privateMessage" : {"title" : "Inbox", "messages" : []},
384 "publicMessage" : {"title" : "Inbox", "messages" : []}
388 "notification" : {"title" : "Notifications",
390 {"id": "1", "title": "you received a peanut", "type": "notification", "body": "peanuts are healthy"},
391 {"id": "3", "title": "Group Request", "type": "notification", "body": "Join Cat Lovers Anonymous"}
393 "privateMessage" : {"title" : "Inbox", "messages" : []},
394 "publicMessage" : {"title" : "Inbox", "messages" : []}
397 "notification" : {"title" : "Notifications", "messages" : []},
398 "privateMessage" : {"title" : "Inbox", "messages" : []},
399 "publicMessage" : {"title" : "Inbox", "messages" : []}
402 "notification" : {"title" : "Notifications", "messages" : []},
403 "privateMessage" : {"title" : "Inbox", "messages" : []},
404 "publicMessage" : {"title" : "Inbox", "messages" : []}
407 "notification" : {"title" : "Notifications", "messages" : []},
408 "privateMessage" : {"title" : "Inbox", "messages" : []},
409 "publicMessage" : {"title" : "Inbox", "messages" : []}
413 // Gadgets/App information. OAuth Consumer Key defaults to the app url.
416 "http://localhost:8080/gadgets/files/samplecontainer/examples/SocialHelloWorld.xml":
417 { "title" : "Social Hello World",
418 "consumerSecret" : "secret",
419 "icon" : "http://localhost:8080/gadgets/files/samplecontainer/examples/icon.png"},
420 "http://localhost:8080/gadgets/files/samplecontainer/examples/SocialActivitiesWorld.xml" :
421 { "title" : "Social Activities World",
422 "consumerSecret" : "secret",
423 "icon" : "http://localhost:8080/gadgets/files/samplecontainer/examples/icon.png"},
424 "http://localhost:8080/gadgets/files/samplecontainer/examples/oauth.xml" :
425 { "title" : "Demo OAuth Gadget",
426 "consumerSecret" : "secret",
427 "icon" : "http://localhost:8080/gadgets/files/samplecontainer/examples/icon.png"}
430 // duplicates userApplications as above..
432 "john.doe" : { "http://localhost:8080/gadgets/files/samplecontainer/examples/SocialHelloWorld.xml" : { "installed" : true},
433 "http://localhost:8080/gadgets/files/samplecontainer/examples/SocialActivitiesWorld.xml" : { "installed" : true}
435 "canonical" :{ "http://localhost:8080/gadgets/files/samplecontainer/examples/SocialHelloWorld.xml" : { "installed" : true},
436 "http://localhost:8080/gadgets/files/samplecontainer/examples/SocialActivitiesWorld.xml" : { "installed" : true}
439 // Passwords for authenticaiton service
441 "john.doe" : "password",
442 "jane.doe" : "password",
443 "canonical" : "password"