Skip to main content
Jump to: navigation, search

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

Line 63: Line 63:
 
}
 
}
 
</pre>
 
</pre>
 +
 +
===UDIs===
 +
 +
This section describes how [[UDI]]s are handled by this component.
 +
 +
1.A. '''local://ContextID#EntityID'''
 +
--> The IdAS Client uses a local XDI file which is the same for all users. It is included with the installation and can not be modified.
 +
 +
1.B. '''local://alice@ContextID#EntityID'''
 +
--> The IdAS Client uses a local XDI file which is specific to this user ("alice"). It can be modified by the client.
 +
 +
2.A. '''sync://ContextID#EntityID'''
 +
--> The IdAS Client uses a local XDI file which is the same for all users and gets synchronized with the backend. It can only be modified by the backend.
 +
 +
2.B. '''sync://alice@ContextID#EntityID'''
 +
--> The IdAS Client uses a local XDI file which is specific to this user ("alice") and gets synchronized with the backend. It can be modified both by the client and backend.
 +
--> There can be additional, globally resolvable UDIs that point to the same Context/Entity in the backend, e.g. http://service.azigo.net/contexts/alice/ContextID#EntityID
 +
 +
3. Anything else (e.g. http URI, XRI, Gmail address, inline XRDS)
 +
--> The IdAS Client resolves and opens the Context normally via the [[IdAS Proxy]].
  
 
===Building===
 
===Building===

Revision as of 08:00, 30 September 2009

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

Higgins logo 76Wx100H.jpg

Introduction

The IdAS Client C++ component provides a subset of the functionalities of the following Java components:

In short, the IdAS Client C++ component makes it possible to resolve UDIs and to perform IdAS operations, which can be either forwarded to a remote IdAS Proxy and Attribute Service or applied to a local Context file in XDI format. In both cases it relies on the Org.eclipse.higgins.xdi.cpp.core C++ component.

The following is not currently support:

  • Synchronization between a local and remote IdAS Context.
  • Complex values for an IdAS Attribute
  • Several advanced IdAS features such as filters, models, transactions
  • Secure storage of local Context data
  • Multithreading

End-User Perspective

IdAS Client 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 open a local context and read a few Entities, Attributes and values:

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

	IF_IdasAttribute * attribute;
	std::list<IF_IdasAttribute *> attributes;
	std::list<IF_IdasAttributeValue *> values;

	// resolve a Context UDI and open the Context

	IF_IdasContext * contextAliceMeta = idasclientResolveContext(L"local:AliceMeta", NULL, NULL);
		
	contextAliceMeta->open(NULL);

	// get Meta-Alice Entity and its h:correlations

	IF_IdasEntity * entityMetaAlice = contextAliceMeta->getEntity(L"Meta-Alice");
	wprintf(L"type of Meta-Alice in Alice's Meta context: %s\n", entityMetaAlice->getEntityType());

	attribute = entityMetaAlice->getAttribute(NAMESPACE_HIGGINS L"correlation");
	values = attribute->getValues();
	for (std::list<IF_IdasAttributeValue *>::iterator i = values.begin(); i != values.end(); i++) {

		IF_IdasSimpleAttributeValue * value = dynamic_cast<IF_IdasSimpleAttributeValue *> (* i);
		wprintf(L"h:correlation on Meta-Alice in Alice's Meta context: %s\n", value->getData());
	}

	// clean up

	values.clear();
	delete attribute;

	delete entityMetaAlice;

	delete contextAliceMeta;
}

UDIs

This section describes how UDIs are handled by this component.

1.A. local://ContextID#EntityID --> The IdAS Client uses a local XDI file which is the same for all users. It is included with the installation and can not be modified.

1.B. local://alice@ContextID#EntityID --> The IdAS Client uses a local XDI file which is specific to this user ("alice"). It can be modified by the client.

2.A. sync://ContextID#EntityID --> The IdAS Client uses a local XDI file which is the same for all users and gets synchronized with the backend. It can only be modified by the backend.

2.B. sync://alice@ContextID#EntityID --> The IdAS Client uses a local XDI file which is specific to this user ("alice") and gets synchronized with the backend. It can be modified both by the client and backend. --> There can be additional, globally resolvable UDIs that point to the same Context/Entity in the backend, e.g. http://service.azigo.net/contexts/alice/ContextID#EntityID

3. Anything else (e.g. http URI, XRI, Gmail address, inline XRDS) --> The IdAS Client resolves and opens the Context normally via the IdAS Proxy.

Building

The IdAS Client C++ Higgins project is:

  • app/org.eclipse.higgins.idasclient.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.idasclient.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

Copyright © Eclipse Foundation, Inc. All Rights Reserved.