function db(str) { print(str);} db( // WARNING! Changing this file will affect unit-tests // A canonical JSON backed DB of OpenSocial datastrcutres in their RESTful forms // // Basic structure: // { people : Array, // activity : Map> // data : Map> // friendLinks : Map> // } // // Notes: // - The structure of Person, Activity MUST! match those in the RESTful spec // - Data for "canonical" user should exercise every field in the spec. And is used for unit-testing // // { "people" : [ { "id" : "canonical", "aboutMe" : "I have an example of every piece of data", "activities" : ["Coding Shindig"], "addresses" : [{ "country" : "US", "extendedAddress" : "Next door", "latitude" : "28.3043", "longitude" : "143.0859", "poBox" : "3653", "postalCode" : "12345", "region" : "Apache, CA", "streetAddress" : "1 OpenStandards Way", "unstructuredAddress" : "PoBox 3565, 1 OpenStandards Way, Apache, CA" }], "age" : "33", "bodyType" : "Svelte", "books" : ["The Cathedral & the Bazaar","Catch 22"], "cars" : ["beetle","prius"], "children" : "3", "currentLocation" : [{ "latitude" : "48.858193", "longitude" : "2.29419" }], "dateOfBirth" : "1/1/1975", "drinker" : "SOCIALLY", "emails" : [{ "address" : "shindig-dev@incubator.apache.org", "type" : "work" }], "ethnicity" : "developer", "fashion" : "t-shirts", "food" : ["sushi","burgers"], "gender" : "MALE", "happiestWhen" : "coding", "hasApp" : "true", "heroes" : ["Doug Crockford", "Charles Babbage"], "humor" : "none to speak of", "interests" : ["PHP","Java"], "jobInterests" : "will work for beer", "jobs" : [{ "address" : "1 Shindig Drive", "description" : "lots of coding", "endDate" : "1/1/2010", "field" : "Software Engineering", "name" : "Apache.com", "salary" : "$1000000000", "startDate" : "1/1/1995", "subField" : "Development", "title" : "Grand PooBah", "webpage" : "http://incubator.apache.org/projects/shindig.html" },{ "address" : "1 Skid Row", "description" : "", "endDate" : "1/1/1995", "field" : "College", "name" : "School of hard Knocks", "salary" : "$100", "startDate" : "1/1/1991", "subField" : "Lab Tech", "title" : "Gopher", "webpage" : "" }], "languagesSpoken" : ["English","Dutch","Esperanto"], "updated" : "6/6/2006 12:12:12", "livingArrangement" : "in a house", "lookingFor" : "patches", "movies" : ["Iron Man", "Nosferatu"], "music" : ["Chieftains","Beck"], "name" : { "additionalName" : "H", "familyName" : "Digg", "givenName" : "Shin", "honorificPrefix" : "Sir", "honorificSuffix" : "Social Butterfly", "unstructured" : "Sir Shin H. Digg Social Butterfly" }, "networkPresence" : "ONLINE", "nickname" : "diggy", "pets" : "dog,cat", "phoneNumbers" : [{ "number" : "111-111-111", "type" : "work" },{ "number" : "999-999-999", "type" : "mobile" }], "politicalViews" : "open leaning", "profileSong" : "Only the lonely", "profileUrl" : "http://www.example.org/?id=1", "profileVideo" : "Thriller", "quotes" : ["I am therfore I code", "Doh!"], "relationshipStatus" : "married to my job", "religion" : "druidic", "romance" : "twice a year", "scaredOf" : "COBOL", "schools" : [{ "address" : "1 Edu St.", "description" : "High School", "endDate" : "1/1/1991", "startDate" : "1/1/1982" }], "sexualOrientation" : "north", "smoker" : "true", "sports" : ["frisbee","rugby"], "status" : "happy", "tags" : ["C#","JSON","template"], "thumbnailUrl" : "http://www.example.org/pic/?id=1", "timeZone" : "PST", "turnOffs" : ["lack of unit tests","cabbage"], "turnOns" : ["well document code"], "tvShows" : ["House","Battlestar Galactica"], "urls" : [{ "address" : "http://www.example.org/?id=1", "linkText" : "Profile", "type" : "text/html" },{ "address" : "http://www.example.org/pic/?id=1", "linkText" : "Thumbnail", "type" : "img/*" }] }, { "id" : "john.doe", "gender" : "M", "hasApp" : "true", "name" : { "familyName" : "Doe", "givenName" : "John", "unstructured" : "John Doe" } }, { "id" : "jane.doe", "gender" : "F", "hasApp" : "true", "name" : { "familyName" : "Doe", "givenName" : "Jane", "unstructured" : "Jane Doe" } }, { "id" : "george.doe", "gender" : "M", "hasApp" : "true", "name" : { "familyName" : "Doe", "givenName" : "George", "unstructured" : "George Doe" } }, { "id" : "mario.rossi", "gender" : "M", "hasApp" : "true", "name" : { "familyName" : "Rossi", "givenName" : "Mario", "unstructured" : "Mario Rossi" } }, { "id" : "maija.m", "gender" : "F", "hasApp" : "true", "name" : { "familyName" : "Meikäläinen", "givenName" : "Maija", "unstructured" : "Maija Meikäläinen" } }], // // ----------------------------- Data --------------------------------------- // "data" : { "canonical" : { "count" : "2", "size" : "100" }, "george.doe" : { "count" : "2" }, "jane.doe" : { "count" : "7" } }, "activities" : { "canonical" : [{ "appId" : "1", "body" : "Went rafting", "bodyId" : "1", "externalId" : "http://www.example.org/123456", "id" : "1", "updated" : "2008-6-6 12:12:12", "mediaItems" : [{ "mimeType" : "image/*", "type" : "image", "url" : "http://upload.wikimedia.org/wikipedia/commons/thumb/7/77/Rafting_em_Brotas.jpg/800px-Rafting_em_Brotas.jpg" },{ "mimeType" : "audio/mpeg", "type" : "audio", "url" : "http://www.archive.org/download/testmp3testfile/mpthreetest.mp3" }], "postedTime" : "2008-6-6 12:12:12", "priority" : "0.7", "streamFaviconUrl" : "http://upload.wikimedia.org/wikipedia/commons/0/02/Nuvola_apps_edu_languages.gif", "streamSourceUrl" : "http://www.example.org/canonical/streamsource", "streamTitle" : "All my activities", "streamUrl" : "http://www.example.org/canonical/activities", "templateParams" : { "small" : "true", "otherContent" : "and got wet" }, "title" : "My trip", "titleId" : "1", "url" : "http://www.example.org/canonical/activities/1", "userId" : "canonical" }], "jane.doe" : [{ "id" : "1", "body" : "and she thinks you look like him", "mediaItems" : [{ "mimeType" : "image/jpeg", "type" : "IMAGE", "url" : "http://animals.nationalgeographic.com/staticfiles/NGS/Shared/StaticFiles/animals/images/primary/black-spider-monkey.jpg" },{ "mimeType" : "image/jpeg", "type" : "IMAGE", "url" : "http://image.guardian.co.uk/sys-images/Guardian/Pix/gallery/2002/01/03/monkey300.jpg" }], "streamTitle" : "jane's photos", "title" : "Jane just posted a photo of a monkey", "userId" : "jane.doe" },{ "id" : "2", "body" : "or is it you?", "mediaItems" : [{ "mimeType" : "image/jpeg", "type" : "IMAGE", "url" : "http://www.funnyphotos.net.au/images/fancy-dress-dog-yoda-from-star-wars1.jpg" }], "streamTitle" : "jane's photos", "title" : "Jane says George likes yoda!", "userId" : "jane.doe" }] }, // // ----------------------------- Data --------------------------------------- // "friendLinks" : { "john.doe" : ["jane.doe", "george.doe", "maija.m"], "jane.doe" : ["john.doe"], "george.doe" : ["john.doe"], "maija.m" : [] } });