Difference between revisions of "Org.eclipse.higgins.idasclient.cpp.core"
(New page: {{#eclipseproject:technology.higgins|eclipse_custom_style.css}} right ==Introduction== The IdAS Client C++ component provides a subset of the functional...) |
|||
Line 8: | Line 8: | ||
* [[Org.eclipse.higgins.idas.client]] | * [[Org.eclipse.higgins.idas.client]] | ||
− | In short, the IdAS Client C++ component makes it possible to resolve [[UDI]]s and | + | In short, the IdAS Client C++ component makes it possible to resolve [[UDI]]s and to perform [[IdAS]] operations, which can be either forwarded to a remote [[Org.eclipse.higgins.idas.proxy|IdAS Proxy]] or applied to a local context file. 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. | |
− | + | * Multiple values for an IdAS [[Attribute]] | |
− | * | + | * Complex values for an IdAS [[Attribute]] |
− | * | + | * Several advanced IdAS features such as filters, models, transactions. |
− | + | ||
− | + | ||
− | + | ||
==End-User Perspective== | ==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== | ==Developer Perspective== | ||
Line 27: | Line 24: | ||
===Sample Code=== | ===Sample Code=== | ||
− | The following sample code shows how to | + | The following sample code shows how to open a local context and read a few Entities, Attributes and values: |
<pre> | <pre> | ||
int _tmain(int argc, _TCHAR* argv[]) { | 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 | // clean up | ||
− | delete | + | values.clear(); |
− | delete | + | delete attribute; |
− | + | ||
+ | delete entityMetaAlice; | ||
+ | |||
+ | delete contextAliceMeta; | ||
} | } | ||
</pre> | </pre> | ||
Line 60: | Line 66: | ||
The XDI C++ Higgins project is: | The XDI C++ Higgins project is: | ||
− | * app/org.eclipse.higgins. | + | * app/org.eclipse.higgins.idasclient.cpp.core |
This project can be checked out from the Eclipse repository at the following SVN URI: | This project can be checked out from the Eclipse repository at the following SVN URI: | ||
Line 66: | Line 72: | ||
{| class="wikitable" style="text-align:left; border="1" cellpadding="5" cellspacing="0" | {| class="wikitable" style="text-align:left; border="1" cellpadding="5" cellspacing="0" | ||
|- | |- | ||
− | | https://dev.eclipse.org/svnroot/technology/org.eclipse.higgins/trunk/app/org.eclipse.higgins. | + | | https://dev.eclipse.org/svnroot/technology/org.eclipse.higgins/trunk/app/org.eclipse.higgins.idasclient.cpp.core |
|- | |- | ||
|} | |} |
Revision as of 16:17, 17 September 2009
{{#eclipseproject:technology.higgins|eclipse_custom_style.css}}
Contents
Introduction
The IdAS Client C++ component provides a subset of the functionalities of the following Java components:
- Org.eclipse.higgins.idas.api
- Org.eclipse.higgins.idas.udi
- Org.eclipse.higgins.idas.cp.xdi
- Org.eclipse.higgins.idas.client
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 or applied to a local context file. In both cases it relies on theOrg.eclipse.higgins.xdi.cpp.core C++ component.
The following is not currently support:
- Synchronization between a local and remote IdAS Context.
- Multiple values for an IdAS Attribute
- Complex values for an IdAS Attribute
- Several advanced IdAS features such as filters, models, transactions.
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; }
Building
The XDI 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 we 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