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

Difference between revisions of "Org.eclipse.higgins.xdi.cpp.core"

(New page: {{#eclipseproject:technology.higgins|eclipse_custom_style.css}} right ==Introduction== XDI ("XRI Data Interchange") is a data model and protocol for sha...)
 
(Introduction)
 
(5 intermediate revisions by the same user not shown)
Line 5: Line 5:
  
 
The Higgins XDI C++ component is a general-purpose implementation of some XDI concepts, e.g.:
 
The Higgins XDI C++ component is a general-purpose implementation of some XDI concepts, e.g.:
* The basic graph model (subjects, predicate, references, literals, inner graphs)
+
* The basic graph model (subjects, predicates, references, literals, inner graphs)
 
* Serialization and deserialization of an XDI graph (only in the "X3 Standard" format)
 
* Serialization and deserialization of an XDI graph (only in the "X3 Standard" format)
 
* Sending of XDI messages to XDI endpoints
 
* Sending of XDI messages to XDI endpoints
  
This components is similar in its purpose as the Java [[XDI4j 1.1]] component, however it is more limited in its functionality.
+
This component is similar in its purpose to the Java [[XDI4j 1.1]] component, however it is more limited in its functionality.
  
 
==End-User Perspective==
 
==End-User Perspective==
  
XDI4j is a component for use by other components and applications. It is not used by end-users directly.
+
XDI C++ is a component for use by other components and applications. It is not used by end-users directly.
  
 
==Developer Perspective==
 
==Developer Perspective==
Line 47: Line 47:
 
return 0;
 
return 0;
 
}
 
}
 +
</pre>
 +
 +
The program output will look like this:
 +
 +
<pre>
 +
[=markus[+friend[=vitaliy][=paul]][+name["Markus Sabadello"]]]
 
</pre>
 
</pre>
  
Line 62: Line 68:
 
|}
 
|}
  
The shared library can be built we the tools "cmake", "nmake" and MS Visual C++.
+
The shared library can be built with the tools "cmake", "nmake" and MS Visual C++.
  
 
== Links ==
 
== Links ==

Latest revision as of 09:44, 22 September 2009

{{#eclipseproject:technology.higgins|eclipse_custom_style.css}}

Higgins logo 76Wx100H.jpg

Introduction

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 XML documents and Extensible Resource Identifiers (XRIs). It is being developed by the OASIS XDI Technical Committee.

The Higgins XDI C++ component is a general-purpose implementation of some XDI concepts, e.g.:

  • The basic graph model (subjects, predicates, references, literals, inner graphs)
  • Serialization and deserialization of an XDI graph (only in the "X3 Standard" format)
  • Sending of XDI messages to XDI endpoints

This component is similar in its purpose to the Java XDI4j 1.1 component, however it is more limited in its functionality.

End-User Perspective

XDI C++ is a component for use by other components and applications. It is not used by end-users directly.

Developer Perspective

Sample Code

The following sample code shows how to construct and serialize a simple XDI graph using the XDI C++ component:

int _tmain(int argc, _TCHAR* argv[]) {

	// create a new graph and some sample data

	IF_XdiGraph * graph = xdiNewXdiGraph();
	graph->createSubjectPredicateReferenceStatement(L"=markus", L"+friend", L"=vitaliy");
	graph->createSubjectPredicateLiteralStatement(L"=markus", L"+name", L"Markus Sabadello");

	// find the +friend predicate and add a second reference

	IF_XdiPredicate * predicate = graph->getSubject(L"=markus")->getPredicate(L"+friend");
	predicate->createReference(L"=paul");

	// serialize and print the graph in X3 Standard format

	wchar_t * string;
	xdiWriteToString(graph, & string);
	fputws(string, stdout);

	// clean up

	delete [] string;
	delete graph;
	return 0;
}

The program output will look like this:

[=markus[+friend[=vitaliy][=paul]][+name["Markus Sabadello"]]]

Building

The XDI C++ Higgins project is:

  • app/org.eclipse.higgins.xdi.cpp.core

This project can be checked out from the Eclipse repository at the following SVN URI:

https://dev.eclipse.org/svnroot/technology/org.eclipse.higgins/trunk/app/org.eclipse.higgins.xdi.cpp.core

The shared library can be built with the tools "cmake", "nmake" and MS Visual C++.

Links

  • 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