This interface is for the ECMA Common Language Infrastructure (CLI) which is implemented as a set of technologies called ".Net" on Microsoft platforms. It was originally written by César Lopez Nataren in April 2004 and updated to work with newer Mono releases. It is written in C# however it shoulde be usable by any of the CLI languages.
This is built if --with-ecma-cli=mono (or dotgnu - this has not been tested recently) is given to the configure, selecting a particular ECMA CLI implementation from those that may be available. The standard 'make' at the top level will build it.
You can also compile the C# interface by hand as follows:
cd csharp make # optional, but it may require a top-level 'make install # first depending on the operating system and how it # handles shared libraries make check
To install it system wide do this as root (or maybe via sudo make install):
root# make install
Which will try to install it in the runtime GAC, registering
Redland.dll
with it's strong name using the gac utility.
The C# interface for Redland is new and requires Mono 0.96 (Mono 1.0 beta3) or newer. It has been tested on:
1.0 on Linux/x86
0.97 (1.0 RC1) on Linux/x86
0.96 (1.0 beta3) on Linux/x86
0.95 (1.0 beta2) on Linux/x86
It mostly works with Mono 1.0 on OSX/ppc but some tests crash.
If you did the install above, you can try the C# examples and run the unit tests:
cd examples make check # Unit tests (using the NUnit framework DLL, supplied) make unittests
The result of the nunittests should be something like:
... Tests run: 13, Failures: 0, Not run: 0, Time: 0.731799 seconds
The C# API is an object-based API reflecting the same structure of the Redland objects with simple mappings between them:
Concept | Redland Class | C# Class | Purpose |
---|---|---|---|
Resource / Literal | librdf_node | Redland.Node | RDF Model & Syntax nodes |
Statement / Triple | librdf_statement | Redland.Statement | RDF Model & Syntax arcs (statements, triples) [isa Resource] |
Model | librdf_model | Redland.Model | Set of Statements usually held in one Storage. |
Storage | librdf_storage | Redland.Storage | Storage for Models either persistant or in-memory. |
Stream | librdf_stream | Redland.Stream | Providing sequences of Statements from Parsers, queries. |
Parser | librdf_parser | Redland.Parser | Syntaxes parsers delivering Stream of Statements or writing to a Model |
Query | librdf_query | Redland.Query | Querying of an Model delivering a QueryResults |
QueryResults | librdf_query_results | Redland.QueryResults | Results of applying an Query to a Model giving either variable bindings with Node values or Stream of Statements |
Serializer | librdf_serializer | Redland.Serializer | Serializes a Model into a syntax such as RDF/XML |
Iterator | librdf_iterator | Redland.Iterator | Enumerating lists (of Node) from queries. |
URI | librdf_uri | Redland.Uri | Provides URIs for Resources, Parsers, ... |
World | Internal | RDF wrapper class handling Redland startup/shutdown | |
Digest | librdf_digest | Internal content digest class | |
Hash | librdf_hash | Internal key:value maps class |
Copyright (C) 2000-2005 Dave Beckett, Copyright (C) 2000-2005 University of Bristol