Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

IdAS XDI Mapping

Revision as of 03:55, 24 June 2008 by Markus.sabadello.gmail.com (Talk | contribs) (entitys -> entities)

{{#eclipseproject:technology.higgins}} 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.

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 Entity 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 EntityId 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 Entity) 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 Entities in the Context

IdAS calls:

Iterator<Entity> entities = context.getEntities(null);

Message sent by the XDI Context Provider:

=sender
	$get

Reply from the XDI Engine:

=markus
	+(http://www.example.com/name)
		/
			$1
				+(http://www.example.com/name)
					"Markus Sabadello"
	+(http://www.example.com/location)
		/
			$1
				+(http://www.example.com/location)
					"Vienna"
	+(http://www.example.com/email)
		/
			$1
				+(http://www.example.com/email)
					"markus.sabadello@gmail.com"
			$2
				+(http://www.example.com/email)
					"msabadello@parityinc.net"
=drummond
	+(http://www.example.com/name)
		/
			$1
				+(http://www.example.com/name)
					"Drummond Reed"

Get one Entity from the Context

IdAS calls:

IEntity entity = context.getEntity("=markus");

Message sent by the XDI Context Provider:

=sender
	$get
		/
			=markus

Reply from the XDI Engine:

=markus
	+(http://www.example.com/name)
		/
			$1
				+(http://www.example.com/name)
					"Markus Sabadello"
	+(http://www.example.com/location)
		/
			$1
				+(http://www.example.com/location)
					"Vienna"
	+(http://www.example.com/email)
		/
			$1
				+(http://www.example.com/email)
					"markus.sabadello@gmail.com"
			$2
				+(http://www.example.com/email)
					"msabadello@parityinc.net"

Get one Attribute from a Entity

IdAS calls:

IEntity entity = context.getEntity("=markus");
IAttribute attribute = entity.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
				+(http://www.example.com/name)
					"Markus Sabadello"

Remove a Entity from the Context

IdAS calls:

IEntity entity = context.getEntity("=markus");
entity.remove();

Message sent by the XDI Context Provider:

=sender
	$del
		/
			=markus

Reply from the XDI Engine: (none)

Remove an Attribute from a Entity

IdAS calls:

IEntity entity = context.getEntity("=markus");
IAttribute attribute = entity.getAttribute(new URI("http://www.example.com/name"));
attribute.remove();

Message sent by the XDI Context Provider:

=sender
	$del
		/
			=markus
				+(http://www.example.com/name)

Reply from the XDI Engine: (none)

Remove a Value from an Attribute

IdAS calls:

IEntity entity = context.getEntity("=markus");
IAttribute attribute = entity.getAttribute(new URI("http://www.example.com/name"));
IAttributeValue value = attribute.getValues().next().next().next();    // for example, we want the third value of the attribute
value.remove();

Message sent by the XDI Context Provider:

=sender
	$del
		/
			=markus
				+(http://www.example.com/name)
					/
						$3

Reply from the XDI Engine: (none)

Change a Value of an Attribute

IdAS calls:

IEntity entity = context.getEntity("=markus");
IAttribute attribute = entity.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
							+(http://www.example.com/name)
								"M.S."

Reply from the XDI Engine: (none)

Add a Value to an Attribute

IdAS calls:

IEntity entity = context.getEntity("=markus");
IAttribute attribute = entity.getAttribute(new URI("http://www.example.com/email"));
attribute.addSimpleValue(new URI(""), "markus.sabadello@gmail.com");

Message sent by the XDI Context Provider:

=sender
	$add
		/
			=markus
				+(http://www.example.com/email)
					"markus.sabadello@gmail.com"

Reply from the XDI Engine: (none)

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

Back to the top