问题描述
我在找一个库,可以用RDF和OWL的数据处理。
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)
您的建议:
- LinqToRdf之类的(很有意思,感谢马克!)
- LinqToRdf (very interesting, thanks mark!)
推荐答案
ROWLEX 其实是非常酷的(使用的)。这不仅是一个浏览器应用程序,而是用C#编写的SDK。如果你使用ROWLEX,你不直接与RDF的tripples互动了(虽然你可以),但给出了一个面向对象的外观和放大器;感觉。主要有两种使用场景:
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:
- 公务舱第一:你有你的.NET业务类。你声明属性添加到您的类类似于你用XML序列化的属性。在此之后,ROWLEX可以提取本体相应的业务类和/或可序列化的业务对象转化成RDF。
- 本体第一:你有你的本体(S)和 ROWLEX 生成.NET类适合你你可以用它来建立/浏览RDF文档。伟大的事情是,这些自动生成的类是更好的那么codegenerators典型的结果。他们是舒适的使用,并通过提供隐式和显式类型转换操作符来覆盖整个图形的继承模仿猫头鹰多的传承功能。
- 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.
- 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:
汽车isSubClassOf车
汽车isSubClassOf CompanyAsset
Car isSubClassOf CompanyAsset
使用ROWLEX,你会得到.NET类的汽车,车辆,和CompanyAsset。下面的C#code编译没有任何问题:
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());
这将打印:
myCarUri typeOf Car
myCarUri WheelCount 4
myCarUri MonetaryValue 15000
车业务对象重新的RdfDocument内psented为三元$ P $。自动生成的C#/ VB类表现为一个观点。你可以有几个C#的观点 - 每一个完全不同类型的 - 相同的业务对象。当你与这些视图进行交互,你实际修改RdfDocument。
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.
这篇关于什么是一个很好的RDF库.NET?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!