|
|
Sections
InternalUse
|
RDFContextToolsRDFContext Tools 0.2 21/3/2006 By Giovanni Tummarello, Christian Morbidoni SeMedia? group Part of the DBin project http://www.dbin.org (cache) Introduction This API gives a way to attach "context" information to pieces of an RDF model by adding triples to the model itself. This is similar to reification but at a different, coarser, level. These tools use the concept of MSG (Minimal Self-contained Graph) (1). Given a triple, the MSG that contains it is composed by that triple plus, recursively, for each blank node involved all the triples connected to it. An MSG therefore has a boundary consisting entirely of URIs or literals. An MSG is also the minimum "piece" of an RDF graph that can be can transferred to another peer that still allows the original graph to be incrementally reconstructed.
The statements inside the circle compose the RDFN, that is, the union of all the MSGs involving the central URI. One of the nice properties of MSGs is that they uniquely partition an RDF Graph, independently of which triple you begin decomposing the graph from. This (actually very simple) theory allows a number of interesting "operations", most of which are directly supported by this API:
Issues:
RDFN ourRDFN = new RDFN(ourGraph, URI INSIDE THE INCOMING MSG); MSG[] ourMSGs = ourRDFN.getComposingMSGs(); boolean merge = true; for (int j = 0; j < ourMSGs.length; j++) { if ((incomingMSGs.hasSemanticsOf(ourMSGsj))) { merge = false; } } if (merge) { db.addXMLRDF(incomingMSGsi.getRDFXML()); } Note that this example uses the RDFN concept (all the MSGs surrounding a given URI).
For a better explanation of the definitions, properties and issues, please see: (1) G. Tummarello, C. Morbidoni, P. Puliti, F. Piazza, "RDF signing supporting resource centric requests" Proceedings of the Poster track, ESWC 2005. http://semedia.deit.univpm.it/submissions/ESWC2005_Poster/ESWC2005_signignRDF.pdf RELEASE NOTES This is release 0.2, the code is to be considered beta and/or experimental. It is used inside DBin (cache) where, so far, it appears to be doing a good job. RDFContext Tools requires the following libraries in classpath Jena Framework and related: commons-logging.jar icu4j.jar jakarta-oro-2.0.5.jar jena.jar xercesImpl.jar Log4j: log4j-1.2.8.jar BouncyCastle? APIs: bcpg-jdk14-125.jar bcprov-jdk14-125.jar All of these are included in the release file (RDFTrusttoolkit/lib), except the Jena and related which are available in a single file (jenaLibs.zip) at dbin.org -> RDFContextTools Place these jars in the RDFTrusttoolkit/lib directory to able to run the examples. Running the sample code: In the "samplecode" folder there are two basic examples illustrating the API. You can run them using the .bat files or the equivalent command line. SigningMSG Shows how to create an MSG object from a graph where a digital signature already exists. Once the MSG is created, the signature is checked and another one is attached to it. RevokingMSG By means of the signature process it is possible to remotely "revoke" an MSG that, for example, was previously issued to another peer. This example uses the signature hash value of the MSG as inverse functional property to find the MSG to be revoked. The revocation itself is a digitally signed MSG containing the hash value of the MSG to be revoked. The revocation policy implemented in this example is: "remove the MSG if the same public keys are used to sign both the revocation and the MSG itself" (only the author can revoke his/her annotations). More sophisticated policies can be simply implemented (revocation might come from "groups moderators" etc.) LICENSE This library is distributed under the terms of the LGPL license (cache). Acknowledgments Gratitude goes to Fabio Panaioli for part of the implementation and to J. Carroll for the suggestions. Download RDFContextTools 1.1 (.tar.gz or .zip) Download needed Jena libraries (.tar.gz or .zip) Online Javadoc API (cache) Latest Source code (CVS) (cache) Created by: admin last modification: Tuesday 21 of March, 2006 12:24:36 UTC by admin |
login
Login
Search
|