github.com/slspeek/camlistore_namedsearch@v0.0.0-20140519202248-ed6f70f7721a/doc/schema/claims/TODO (about) 1 TODO: 2 ----- 3 Clean this up and/or break into separate files. 4 5 {"camliVersion": 1, 6 "camliType": "claim", 7 "camliSigner": "....", 8 "claimDate": "2010-07-10T17:20:03.9212Z", // redundant with data in ascii armored "camliSig", 9 // but required. more legible. takes precedence over 10 // any date inferred from camliSig 11 "permaNode": "dig-xxxxxxx", // what is being modified 12 "claimType": "set-attribute", 13 "attribute": "camliContent", 14 "value": "dig-yyyyyyy", 15 "camliSig": .........} 16 17 claimTypes: 18 ----------- 19 "add-attribute" (adds a value to a multi-valued attribute (e.g. "tag")) 20 "set-attribute" (set a single-valued attribute. equivalent to "del-attribute" of "attribute" and then add-attribute) 21 "del-attribute" (deletes all values of "attribute", if no "value" given, or just the provided "value" if multi-valued) 22 23 "multi".. atomically do multiple add/set/del from above on potentially different permanodes. looks like: 24 25 {"camliVersion": 1, 26 "camliType": "claim", 27 "claimType": "multi", 28 "claimDate": "2013-02-24T17:20:03.9212Z", 29 "claims": [ 30 {"claimType": "set-attribute", 31 "permanode": "dig-xxxxxx", 32 "attribute": "foo", 33 "value": "fooValue"}, 34 {"claimType": "add-attribute", 35 "permanode": "dig-yyyyy", 36 "attribute": "tag", 37 "value": "funny"} 38 ], 39 "camliSig": .........} 40 41 Attribute names: 42 ---------------- 43 camliContent: a permanode "becoming" something. value is pointer to what it is now. 44 45 46 Old notes from July 2010 doc: 47 ----------------------------- 48 Claim types: 49 permanode-become: 50 -- implies either: 51 1) switching from typeless/lifeless virgin pnode into something (dynamic set, filesystem tree, etc) 52 2) changing versions of that base metadata (new filesystem snapshot) 53 -- ‘permaNode’ is the thing that is changing 54 -- ‘contents’ is the current node that represents what permaNode changes to 55 set-membership: add a blobref to a dynamic set 56 -- "permaNode" is blobref of the dynamic set 57 delete-claim: delete another claim (target is claim to delete) 58 -- "contents" is the claim blobref you’re deleting 59 {set,add}-attribute: 60 -- attach a piece of metadata to something. 61 -- use set-attribute for single-valued attributes only: highest dated claim wins (of trusted person) e.g. "title", "description" 62 -- use add-attribute for multi-valued things. e.g. "tag" 63 64 Tagging something: 65 {"claimType": "add-attribute", // 66 "attribute": "tag", // utf-8, should have list of valid attributes names, preferrably not made up by us (open social spec?) 67 "value": "funny", // value that doesn’t have lasting value 68 "valueRef": "sha1-blobref", // hefty reference to a lasting value 69 70 "claimer?": "sha1-of-the-dude-who’s-signing", 71 "claimDate": "2010-07-10T17:20:03.9212Z", 72 "claimType", "permanode-become", 73 "permaNode": "sha1-pnode", 74 } 75 76 filesystem root claim: 77 { 78 "camliVersion": 1, 79 "camliType": "claim", 80 81 // Stuff for camliType "claim": 82 "claimDate": "2010-07-10T17:20:03.9212Z", // redundant with data in ascii armored "camliSig". TODO: resolve 83 "claimType", "permanode-become", 84 85 // Stuff for "permanode-become": 86 "permaNode": "sha1-pnode", 87 "contents": "sha1-fs-node" 88 89 ,"camliSigner": "digalg-blobref-to-ascii-armor-public-key-of-signer", 90 "camliSig": "......"}