100 likes | 209 Views
This document contains illustrations of eight basic XDI graph patterns: Root context nodes and 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: Root context nodes and 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 inThe XDI Graph Model 2011-05-08 version. XDI Graph Patterns OASIS XDI TC SubmissionDrummond Reed 2011-05-08
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” relational contextual context literal contextual “literal” context contextual relational relational context
Root contexts and synonyms Every XDI context node has exactly one XRI address. Any two XDI context nodes may be declared as equivalent using a relational arc with the metagraph symbol $. Since this is an equivalence relationship, the inverse arc exists by definition, and is not shown in the graph. Except on the root context node, a $ relational arc on any context node requires XDI processors to redirect to its target node. $ (http://example.com/ox/=!0999.a7b2.25fd.c609) () (http://example.com/ox/=!0999.a7b2.25fd.c609) These XRI cross-references are addresses for the root context of this graph $ (=!0999.a7b2.25fd.c609) (=!0999.a7b2.25fd.c609) =abc =abc These two XRIs are synonyms $ =!0999.a7b2.25fd.c609 =!0999.a7b2.25fd.c609 +pea-patch =!0999.a7b2.25fd.c609+pea-patch +garden =!0999.a7b2.25fd.c609+garden These three XRIs are synonyms $ $ !1 =!0999.a7b2.25fd.c609!1
Simple properties () =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” Current version $v Versioning metadata subgraph =abc+age$v !2 The second version of the +age simple property is the current version, so it is a relational arc to the current simple property value =abc+age$v/!1! !1! “32” First version value !1 =abc+age$v!1 First version datestamp $d! =abc+age$v!1/$d! “2010-09-09T10:11:12Z” $v as a relational arc expresses the current version – it points to the =abc+age$v!2 node !2 =abc+age$v!2 $v Second version datestamp $d! =abc+age$v!2/$d! “2010-10-10T11:12:13Z”
Complex properties +home+fax () +home =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 Current version 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 is the current version $v
Simple subjects =abc+passport!1/+country! +country! () “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/+$d! =abc+passport!2 “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+passport$v !1 =abc+passport$v!1 First version snapshot(subgraph not shown) … !2 =abc+passport$v!2 $ Second version is the current version $v
Complex subjects =abc/+age! +age! () “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 =abc complex subject (child subgraphs not shown) =abc!1 … !2 For a person, these would be “personas” – see Link Contracts for an example =abc!2 … 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 is the current version $v
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! () “33” ($) =abc +tel =abc+tel =abc … ($) +passport =abc+passport … !1 The persona =abc!1 is a collection of attributes from =abc =abc!1 Link contract (=xyz) $do $get $get permission =abc!1$do (=xyz) $() $do is the root node of the link contract Link contract assignment =xyz =xyz $msg =xyz$msg $add $add permission @jkl $for identifies the policy or policies that apply to this link contract (privacy, security, forwarding, etc.) $policy $for !1 $uri …
Messages $ (=!0999.a7b2.25fd.c609) () “via” XDI endpoint =!0999.a7b2.25fd.c609 “from” XDI sender =!0999.a7b2.25fd.c609 $msg Message =!0999.a7b2.25fd.c609$msg !1234 Message ID =!0999.a7b2.25fd.c609$msg!1234 (=!0111.2222.3333.4444) Message datestamp $d! $() =!0999.a7b2.25fd.c609$msg!1234/$d! “2010-12-22T22:22:22Z” (=!0111.2222.3333.4444) “to” XDI recipient(s) Message envelope Message operations =!0111.2222.3333.4444 $do $do is the root of the message operations =!0111.2222.3333.4444 =!0999.a7b2.25fd.c609$msg!1234$do !1 $get =!0111.2222.3333.4444!1