Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a good RDF library for .net? [closed]

I'm looking for a library that can deal with RDF and OWL data.

So far I have found:

  • semweb (no owl support for all I know)
  • rowlex (more of a 'browser' application)

Your recommendations:

  • LinqToRdf (very interesting, thanks mark!)
like image 474
kitsune Avatar asked Oct 27 '08 18:10

kitsune


2 Answers

ROWLEX is actually very cool (uses SemWeb internally). It is not just a browser app but rather an SDK written in C#. If you use ROWLEX, you do not directly interact with the tripples of RDF anymore (though you can), but gives an object oriented look&feel. There are two main usage scenarios:

  1. Business class first: You have your .NET business classes. You declaratively add attributes to your classes similarly as you do with XML serialization attributes. After this, ROWLEX can extract the ontology corresponding your business classes and/or can serialize your business objects into RDF.
  2. Ontology first: You have your ontology(s) and ROWLEX generates .NET classes for you that you can use to build/browse RDF documents. The great thing is that these autogenerated classes are far better then the typical results of codegenerators. They are comfortable to use and mimic the multiple inheritence feature of OWL by providing implicit and explicit cast operators to cover the entire inheritence graph.

The typical usage is the Ontology first approach. For example, let us say that your ontology describes the following multiple inheritence scenario:

Car isSubClassOf Vehicle

Car isSubClassOf CompanyAsset

Using ROWLEX, you will get .NET classes for Car, Vehicle, and CompanyAsset. The following C# code will compile without any problem:

    RdfDocument rdfDoc = new RdfDocument();
    Car car = new Car("myCarUri", rdfDoc);
    Vehicle vehicle = car; // implicit casting
    CompanyAsset companyAsset = car; // implicit casting 
    vehicle.WheelCount = 4;
    companyAsset.MonetaryValue = 15000;
    Console.WriteLine(rdfDoc.ToN3());

This would print:

myCarUri typeOf Car 
myCarUri WheelCount 4 
myCarUri MonetaryValue 15000

The "car" business object is represented inside the RdfDocument as triples. The autogenerated C#/VB classes behave as a views. You can have several C# views - each of a completely different type - on the same business object. When you interact with these views, you actually modifying the RdfDocument.

like image 198
Mr. Lame Avatar answered Oct 04 '22 22:10

Mr. Lame


BrightstarDB is a native, .NET NoSQL RDF triple store, with SPARQL support, a .NET entity framework with LINQ and OData support. It is free for developers and open source projects and has a small runtime cost for commercial use.

BrightstarDB provide three levels of API.

  1. SPARQL query and simple transaction API.
  2. A generic object api that groups collections of triples into data objects
  3. A Visual Studio integration that takes Interface definitions and generated a strongly typed .NET domain model that stores its data as RDF in a BrightstarDB instance. The .NET model has LINQ support and can also be exposed as an OData service.

All BrightstarDB documentation is online and the software is available for download with no registration at http://www.brightstardb.com

like image 28
Graham Moore Avatar answered Oct 04 '22 22:10

Graham Moore