Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "IdAS XDI Mapping"
(→Get one Node from the Context) |
(→Get one Attribute from a Node) |
||
Line 108: | Line 108: | ||
<pre> | <pre> | ||
− | INode node = | + | INode node = context.getNode("=markus"); |
IAttribute attribute = node.getAttribute("http://www.example.com/someAttributeId"); | IAttribute attribute = node.getAttribute("http://www.example.com/someAttributeId"); | ||
</pre> | </pre> |
Revision as of 06:03, 10 March 2008
This page explains the relation between the Higgins Data Model (which is implemented by IdAS) and XDI. XDI ("XRI Data Interchange") is a data model and protocol for sharing, linking, and synchronizing data over the Internet ("structured web") and other networks using Extensible Resource Identifiers (XRIs). It is being developed by the OASIS XDI Technical Committee.
This page consists of two parts: A list of theoretical mappings between Higgins Data Model concepts and XDI concepts, and a list of mappings between concrete IdAS operations and concrete XDI operations.
The IdAS XDI Engine maps the Higgins Data Model to XDI and maps XDI operations to IdAS operations.
The XDI Context Provider maps XDI to the Higgins Data Model and maps IdAS operations to XDI operations.
Contents
- 1 Mapping the Higgins Data Model to XDI
- 2 Mapping Higgins IdAS operation to XDI operations
- 2.1 List all Nodes in the Context
- 2.2 Get one Node from the Context
- 2.3 Get one Attribute from a Node
- 2.4 Remove a Node from the Context
- 2.5 Change a Value of an Attribute
- 2.6 Add Values and Attributes
- 2.7 Get the schema of the Context
- 2.8 Get Context Relations and Context Correlations
- 2.9 Authorization
- 2.10 Notifications
- 3 Links
Mapping the Higgins Data Model to XDI
Since the Higgins Data Model is based on RDF/OWL, and since XDI is also (conceptually) based on RDF, the basic mapping is straight-forward. However, some attention has to be paid to details.
Roughly speaking, a Higgins context can be mapped to an XDI graph using the following rules:
- A Higgins Node maps to an XDI subject
- A Higgins Attribute maps to an XDI predicate
- Values of Higgins Attributes map to XDI literals
- A Higgins Relation maps to an XDI predicate
- A Higgins Correlation maps to the special $is XDI predicate
- A Higgins NodeId maps to an XRI
Mapping Higgins IdAS operation to XDI operations
Using IdAS, a Higgins context can be opened, and operations can be performed on it. The equivalent in XDI is XDI messages (which contain XDI operations).
XDI messages have "senders". A sender is an XRI that identifies the subject (the Higgins Node) that performs the operation. This sender XRI is provided to the XDI Context Provider when the Context is opened, i.e. as part of the Authentication Materials.
The following sub-sections each list the following:
- A typical IdAS operation (the sub-section header).
- The IdAS calls that perform the operation.
- An XDI message produced by the XDI Context Provider (the first XDI example in the sub-section).
- An XDI result document produced by the XDI Engine (the second XDI example in the sub-section).
All XDI examples are in the X3 Simple serialization format. See X3Format for more information about X3 serialization formats.
List all Nodes in the Context
IdAS calls:
Iterator<Node> nodes = context.getNodes(null);
Message sent by the XDI Context Provider:
=sender $get
Reply from the XDI Engine:
=markus +(http://www.example.com/name) / $ $1 "Markus Sabadello" +(http://www.example.com/location) / $ $1 "Vienna" =drummond +(http://www.example.com/name) / $ $1 "Drummond Reed"
Get one Node from the Context
IdAS calls:
INode node = context.getNode("=markus");
Message sent by the XDI Context Provider:
=sender $get / =markus
Reply from the XDI Engine:
=markus +(http://www.example.com/name) / $ $1 "Markus Sabadello" +(http://www.example.com/location) / $ $1 "Vienna"
Get one Attribute from a Node
IdAS calls:
INode node = context.getNode("=markus"); IAttribute attribute = node.getAttribute("http://www.example.com/someAttributeId");
Message sent by the XDI Context Provider:
=sender $get / =markus +(http://www.example.com/name)
Reply from the XDI Engine:
=markus +(http://www.example.com/name) / $ $1 "Markus Sabadello"
Remove a Node from the Context
IdAS calls:
INode node = IContext.getNode("=markus"); node.remove();
Message sent by the XDI Context Provider:
=sender $del / =markus
Reply from the XDI Engine: (none)
Change a Value of an Attribute
IdAS calls:
INode node = context.getNode("=markus"); IAttribute attribute = node.getAttribute(new URI("http://www.example.com/name")); Iterator<IAttributeValue> values = (Iterator<IAttributeValue>) attribute.getValues(); IAttributeValue value = values.next(); ((ITypedValue) value).setData("M.S.");
Message sent by the XDI Context Provider:
=sender $mod / =markus +(http://www.example.com/name) / $ $1 "M.S."
Reply from the XDI Engine: (none)
Add Values and Attributes
Adding attributes and values involves sending XDI $add operations.
TODO
Get the schema of the Context
IdAS calls:
String schema = IContext.getSchema();
TODO
Get Context Relations and Context Correlations
IdAS calls:
IContext.getRelationships()
TODO
Authorization
Authorization support in IdAS maps to XDI link contracts.
TODO
Notifications
Notification support in IdAS maps to XDI links contracts.
TODO
Links
- Higgins Home
- The XDI RDF Model is the current OASIS TC proposal for an RDF-based data model and addressing format for XDI. This document includes the proposed XDI RDF schema and a number of examples of XDI documents. (Note that it does not yet include the proposed XDI messaging format, which uses XDI documents as message envelopes for other XDI documents.)
- OASIS XDI TC Wiki
- Wikipedia page on XDI