100 likes | 204 Views
This document contains illustrations of eight basic XDI graph patterns: Synonyms : properties used to assert multiple addresses for the same node in the graph. Simple properties : properties that accept only a single literal value.
E N D
This document contains illustrations of eight basic XDI graph patterns: Synonyms: properties used to assert multiple addresses for the same node in the graph. Simple properties: properties that accept only a single literal value. Complex properties: properties that may accept multiple literal values as well as describe typing and ordering of those values. Simple subjects: subjects that may contain only instances of themselves and metadata describing those instances. Complex subjects: subjects that may contain all of the above. Social graphs: relationships between XDI authorities. Link contracts: subgraphs used for XDI authorization. Messages: XDI documents used in the XDI protocol. It also illustrates how versioning may be applied to any branch of the graph. Note: this document uses the XDI metagraph symbols as documented in the XDI Graph Model 2011-02-09. XDI Graph Patterns OASIS XDI TC SubmissionDrummond Reed 2011-03-17
Notation Root context node: Represents the root context of an XDI graph Context node: Represents an XDI subject Literal node: Represents a literal XDI object Contextual arc: Uniquely identifies a context node Literal arc: Uniquely identifies a literal node Relational arc: Non-uniquely links nodes Example root context literal “literal” contextual context literal contextual “literal” context contextual relational context
Synonyms Synonyms are different XDI addresses that identify the same XDI context node. They are expressed using a relational arc with the metagraph symbol $. Expresses that the root context of this XDI graph has the internal address: () and has the synonym: (=!0999.a7b2.25fd.c609) $ (=!0999.a7b2.25fd.c609) () (=!0999.a7b2.25fd.c609) $ Expresses that the root context also has the synonym: (http://example.com/) (http://example.com) (http://example.com/) =abc =abc Expresses that the address: =abc Is a synonym for: =!0999.a7b2.25fd.c609 and vice versa $ $ =!0999.a7b2.25fd.c609 =!0999.a7b2.25fd.c609 +pea-patch =!0999.a7b2.25fd.c609+pea-patch +garden Expresses that the address: =!0999.a7b2.25fd.c609+pea-patch and the address: =!0999.a7b2.25fd.c609+garden are synonyms for: =!0999.a7b2.25fd.c609!1 =!0999.a7b2.25fd.c609+garden $ $ !1 =!0999.a7b2.25fd.c609!1
Simple properties $ () (=abc) (=abc) =abc =abc +age! =abc/+age! “33” Simple property graph +age =abc+age Metadata subgraphfpr +age simple property =abc+age/$d! $d! “2010-10-10T11:12:13Z” Versioning metadata subgraph $v =abc+age$v =abc+age$v/!1! !1! “32” First version value =abc+age$v/!2! !2! “33” Second version value !1 =abc+age$v!1 First version datestamp $d! =abc+age$v!1/$d! “2010-09-09T10:11:12Z” !2 =abc+age$v!2 Second version datestamp $d! =abc+age$v!2/$d! “2010-10-10T11:12:13Z”
Complex properties +home+fax $ +home () (=abc) (=abc) =abc+tel/+home+fax =abc+tel/+home =abc+tel/*2 =abc+tel/!1! =abc *2 =abc !1! +tel “+1.206.555.1111” !2! =abc+tel “+1.206.555.2222” *1 =abc+tel/!2! =abc+tel/*1 =abc+tel/+work +work Complex property graph Metadata subgraphs for +tel complex property !1 =abc+tel!1 $d! =abc+tel!1/$d! “2010-11-11T11:11:11Z” !2 =abc+tel!2 $d! =abc+tel!2/$d! “2010-12-22T22:22:22Z” Versioning metadata subgraph $v =abc+tel$v !1 =abc+tel$v!1 First version snapshot(subgraph not shown) … !2 =abc+tel$v!2 Second version shapshot(subgraph not shown) …
Simple subjects $ =abc+passport!1/+country! +country! () (=abc) (=abc) “Canada” =abc+passport!1/+number! +number! =abc+passport!1 =abc =abc !1 “987654321” $d! =abc+passport!1/+$d! +passport *1 “2005-01-01T00:00:00Z” =abc+passport!2/+country! =abc+passport +country! *2 “New Zealand” !2 =abc+passport!2/+number! +number! “123456789” $d! =abc+passport!2 =abc+passport!2/+$d! “2010-10-01T00:00:00Z” Simple subject graph Metadata subgraph for +passport simple subject () =abc+passport() !1 =abc+passport()!1 $d! =abc+passport()!1/$d! “2010-11-11T11:11:11Z” !2 =abc+passport()!2 $d! =abc+passport()!2/$d! “2010-12-22T22:22:22Z” Versioning metadata subgraph $v =abc+tel$v !1 =abc+tel$v!1 First version snapshot(subgraph not shown) … !2 =abc+tel$v!2 Second version shapshot(subgraph not shown) …
Complex subjects $ =abc/+age! +age! () (=abc) (=abc) “33” Examples of from previous pages (child subgraphs not shown) of attributes of the complex subject =abc =abc =abc+tel +tel =abc … +passport =abc+passport … !1 Subgraphs for instances of the =abc complex subject (child subgraphs not shown) =abc!1 … !2 =abc!2 For a person, these would be “personas” … Metadata subgraph for =abc complex subject () =abc() !1 =abc()!1 $d! =abc()!1/$d! !2 “2010-11-11T11:11:11Z” =abc()!2 $d! =abc()!2/$d! “2010-12-22T22:22:22Z” Versioning metadata subgraph $v =abc$v !1 =abc$v!1 First version snapshot(subgraph not shown) … !2 =abc$v!2 Second version shapshot(subgraph not shown) …
Social graphs $ () (=abc) (=abc) Social graph expressed at the (=abc) endpoint =abc =abc =abc is best friends with =xyz =xyz +best+friend =xyz (http://facebook.com) (http://facebook.com) =abc is friends with =xyz in the Facebook context +friend =xyz (http://facebook.com)=xyz +seattle +seattle +soccer =abc is a teammate of =xyz in a Seattle soccer context +seattle+soccer +teammate =xyz +seattle+soccer=xyz
Link contracts $ +age! =abc/+age! () (=abc) (=abc) “33” =abc +tel =abc+tel =abc … +passport =abc+passport … +age! =abc!1/+age! Subgraph of =abc properties included in the persona =abc!1 !1 +tel =abc!1 =abc!1/+tel Link contract $do =abc!1$do Link contract root node $get =abc!1$do$get (=xyz) … $() Permitted XDI operations on the =abc!1 graph (subtrees not shown) (=xyz) $add … Link contract assignment =abc!1$do$add $for =abc!1$do$for … Policies under which these permissions are granted (subtree not shown)
Messages $ () (=abc) (=abc) “from” XDI endpoint =abc “from” sender ID =abc $msg Message context =abc$msg Message ID !1234 =abc$msg!1234 (=xyz) Message datestamp $d! $() =abc$msg!1234/$d! (=xyz) “2010-12-22T22:22:22Z” “to” target XDI endpoint(s) Message envelope Message actions $do =abc$msg!1234$do Message action root $get =abc$msg!1234$do$get … Message actions (verbs and subgraphs must match link contracts) (subgraphs not shown) $add … =abc$msg!1234$do$add $for =abc$msg!1234$do$for … Optional description of the message purpose (must match link contract) (subgraph not shown)