SlideShare uma empresa Scribd logo
1 de 9
Baixar para ler offline
.NET Framework RDF APIs

                         Lucian Nistor, Denis Recean

                     Universitatea “Alexandru Ioan Cuza”, Iasi



1     Introduction

         In this paper we intend to do a comparative study about how RDF,
one of the most important bricks of Semantic Web, is processed in .NET. The
utility of such a study is obvious, .NET is one of the most used frameworks in
software development (desktop of web based), and Semantic Web, with RDF
at its foundation, represents the next step in web evolution, so they have to
interact with each other.

       Before we start comparing the tools, we do a short presentation of
the main technologies.

Semantic Web
         The Web has begun to “understand” the meaning of the information
it is composed of and this is the new phase of Web, the Semantic Web. This
process of “understanding” the data is realized using various formal ways,
like RDF (Resource Description Frameworks), RDFS (RDF Schema),
interchangeable data formats (like N3 or Turtle) or WOL (Web Ontology
Language). But the Semantic Web is like a living organism that is growing and
evolving right in front of our eyes.

RDF
       The Resource Description Framework (RDF) is a standard for storing
data on Semantic Web. Semantic Web compliant applications use structured
information that is transmitted in a decentralized and distributed way. In
order to store the information in small, discrete pieces an abstract model
was created, RDF. This model is stored in a multitude of formats, but the
most popular is RDF/XML.
Ontology
         Even thow there is no unique definition to Semantic Web Ontologies,
they are very important for Semantic Web. In philosophical way ontology is
“the study of entities and their relations” – Clay Shirky. Extrapolating that
definition to computer science we can say that an ontology is a formal
representation of a set of entities from a certain domain and the relations
between those entities.

SPARQL
        SPARQL (SPARQL Protocol and RDF Query Language) is a query
language for RDF. A SPARQL interrogation is querying required and optional
graph patterns (RDF stored information forms an informational graph). These
patterns can be connected by conjunctions or disjunctions. SPARQL can be
used to interrogate any data source that is stored in RDF format or can be
transformed in RDF. The result of a query can take the form of sets or RDFs.

http://en.wikipedia.org/wiki/SPARQL - SARQL query example:

 PREFIX abc: <http://example.com/exampleOntology#>
 SELECT ?capital ?country
 WHERE {
   ?x abc:cityname ?capital ;
      abc:isCapitalOf ?y .
   ?y abc:countryname ?country ;
      abc:isInContinent abc:Africa .
 }

.NET Framework and VS
       The .NET Framework is a software framework developed by
Microsoft and it used by the latest software applications that run on
Windows. The framework includes a big library with solutions to common
programming problems and a virtual machine.

        Developers that write applications in .NET have the advantage that
they can use one of many programming language to write their code (C#,
Visual Basic, C++,…), they have access to the Base Class Library, have a
common development environment for desktop and web applications, and
have access to a extraordinary documentation.
The Base Class Library is a component of the framework that
provides features like database connectivity, cryptography, web application
development and so on.

        Visual Studio is the Microsoft IDE for software development. It
includes .NET Framework and Microsoft encourages the use of the
framework in software development. VS provides advanced features and RIA
development support.

        Besides Microsoft there is a .NET Framework developed for Linux,
called Mono, but supports only .Net 1.0 and .NET 2.0 and unlike Windows
which is on .Net 3.5 and prepares for .Net 4.0


2     API comparation

        Even if, in the latest years, Semantic Web evolved considerably and
RDF has become a common data storing standard, Microsoft didn’t include
native support for RDF processing. Understanding the growing importance of
RDF in new web software development, some independent developers have
implemented solutions that offer support to RDF processing. We will discuss
about three such API’s, SemWeb, a library that provides low level RDF
interaction, LinqToRdf and Rowlex, thow API’s that use SemWeb internally
and provide a flexible and easy to use API.

       SemWeb

       Was developed by Joshua Tauberer and, according to the author, it
can be used to read and write RDF files in XML and N3 formats, persistently
store RDFs in memory, in SQL databases, to query persistent storage or
remote endpoints using SPARQL.Is also can provide limited RDFS interaction.

       LinqtoRdf

       Developed by Andrew Matthews this tool’s main aim is to allow .NET
programmers to use LINQ query technology to interrogate a RDF information
graph with the help of classes that have been defined using RDFS or OWL.
The tool includes extensions for visual studio that allows the user to model
ontologies using VS.NET class designer. Its main features are converting
LINQ query to SPARQL and to generating .NET classes that map ontologies.

        Rowlex

         Rowlex is a toolkit used for creating and browsing RDF documents. It
uses ontology to model classes and properties and then models RDF tipples
like instances of those classes. ROWLEX is the acronym for Relaxed OWL
Experience. On other words Rowlex maps the object oriented programming
advantages over RDF processing using OWL (Web Ontology Language). It
offers the ability to generate .NET classes from ontologies and ontologies
from .NET classes. This API was developed by NC3A Semantic Interoperability
tem.


3       RDF data storage

        The way the RDF information or the RDF itself is stored is very
important. It influences performance and the interoperability with other
platforms and applications.

        SemWeb is capable to work with RDF in XML and N3 formats. The
abstractization of a RDF triple in SemWeb library is done with the Entity
class, which stores an RDF entity, the Literal class which stores a relation and
the Statement class which combines two entities and a literal to obtain a RDF
triple.

         LinqToRdf API uses N3 format to store RDF files. In .Net LinqToRdf
creates classes that map the ontology describing the RDF and then uses the
Linq mechanisms to query, delete or add information to a certain RDF file.
The classes are created using attributes to map ontology features. A triple is
stored as an instance of a class and the relation between classes are
modeled with OOP means. For instance ontology class hierarchy is modeled
with class derivation and one-to-many relation is modeled with list of
objects.
ROWLEX uses XML and N3 format to store RDF files. When processes
documents the library stores RDF triples as instances of classes that map
ontology, in a similar way that LinqToRdf does.

        As a common characteristic of using the .NET framework all these
APIs have the possibility to serialize the data in the .NET ways. For instance
the RDFs can be stored in a SQL database or in binary format, as any .NET
object.


4      SPARQL support

      Only two of the three APIs have support for SPARQL interrogations,
both on local RDF files and on Remote SPARQL Endpoints. These are
SemWeb and LinqToRdf.

       In the SemWeb the interrogations are stored in special objects:
Query class objects for local queries and SparqlHttpSource for remote ones.

Example of SPARQL interrogation written using SemWeb API.

    SparqlHttpSource source =
    new SparqlHttpSource("http://DBpedia.org/sparql");
    source.RunSparqlQuery("SELECT * WHERE { ?a ?b
    "Michael Jackson" . }", Console.Out);


        LinqToRdf uses the LINQ mechanism to create queries. As a data
context for a query a RDF object is used. The constructed LINQ query is then
translated into SPARQL. In order to interrogate remote data that is not in
RDF format, special tools that transform in to RDF format need to be used.
For instance, in order to interrogate OpenLink data the Virtuoso platform can
be used.

        Example of LINQ interrogation over a RDF file, using LinqToRdf

TripleStore ts = new TripleStore();
ts.EndpointUri = @"://DBpedia.org/sparql ";
ts.QueryType = QueryType.RemoteSparqlStore;
var q = from p in new RDF(ts).ForType<Person>()
         where p.Name == " Michael Jackson “
         select p;


5     Support for developers

       Two of the projects are one man projects and the third is developed
by a company that has interest in other fields of computer science, like
information security. So the information is rather little and the support is
obviously insufficient.

5.1   Documentation

         All three APIs have a documentation that shows their main features
using examples, all of them lack serious, detailed information. SemWeb is an
older project so the documentation is a bit more structured. The forum
activities concerning the three APIs are low because people who work with
RDF and want a specialized API for it usually use other development
frameworks like Java or C++.

5.2   Integration with VS

        SemWeb is essentially a dll library which is included in VS project and
used as any other assembly.

        LinqToRdf besides the dlls provides extensions to create .NET classes
that map ontologies and to create your own ontologies. It is the only tool
that has an installing kit.

        Rowlex is integrated using the same dll method, but is also provides
two .exe files that can be used to generate an ontology from .NET classes
and to generate .NET classes that map an existing ontology.

       There is a problem that needs to be mentioned here. All three APIs
are developed with .NET 2.0 and with Visual Studio 2008 without SP1 and
have problems when used with higher versions of .NET of VS. LinqToRdf is
impossible to install on versions of VS2008 with at least SP1 because of the
tools extensions.

5.3   Learning curve

       The learning curve is almost the same for each of the three tools.
Performing simple tasks with all of them is relatively quick to learn, but when
it comes to serious, complicated tasks, that require a good understanding of
the API there are big problems due to lack of documentation and poor
support.

        Rowlex is slightly easier to learn because it lacks SPARQL capability
and LinqToRdf is a bit easier that SemWeb if you know LINQ, else it can be
harder as you have to learn LINQ as well. But, for a .NET programmer it is
easier to learn LINQ than SPARQL. Taking into account these considerations
Rowlex is the easiest to learn, SemWeb is the hardest and LinqToRdf is in
between.


6     Performance

        SemWeb has the best performance of all because it stores the
information in a lightweight manner (with three classes, Entity, Literal and
Statement) and the SPARQL interrogations need no transformation as they
are passed to the Query object as a string. Other reason why SemWeb is
more performant is the fact that the other two APIs use it to do their low
level interaction with the RDFs. Rowlex is worse in terms of performance
than SemWeb because it uses more classes to store the triples during
processing, but LinqToRdf is the least performant of all because the classes it
uses to map the ontology are LINQ compatible and because the LINQ queries
have to be transformed into SPARQL queries before they are run.


7     Interoperability

      In terms of interoperability all the APIs benefit from two sides. One is
the RDF format which is specially designed to be used by many web
development frameworks. The other side is .NET which allows the
interoperability with SQL databases or with other platforms via web services
or different network communication protocols.


8     Project development and licensing

        All the projects leave the impression that they are still in beta phase.
All have installing or integration problems, but the work on them ceased in
2008 or 2009.

       SemWeb is open source, LinqToRdf is under New BSD License and
Rowlex is under GNU LESSER GENERAL PUBLIC LICENSE


9     Conclusions

       Before drawing any conclusions we like to state the opinion of
Joshua Tauberer, the author to the most stabile API of the three, SemWeb,
about the fate of his project:

“May 19, 2009. I'm taking an indefinite hiatus from this project. That means
that while I'll try to apply any patches to fix existing bugs, I won't be actively
developing the library further, and I won't be answering questions for help
on the mail list. Over the last four years it's been fun to work on it, but I don't
think there has been enough uptake of the Semantic Web in the .NET world
(or otherwise) for me to justify spending more time on this when I have
other things in life I'd rather be working on.”

         Now to conclusions. The three APIs where selected because they
were the “loudest” on the internet, so we considered them to be the best
candidates for our comparative study. The ideas where good, the work is
outstanding but all of them need a better documentation, better support,
bug fixing and further development in order to make them usable and
reliable tools for big, serious applications.
10   Reference

http://www.w3.org/TR/rdf-sparql-query/
http://en.wikipedia.org/wiki/SPARQL
http://rowlex.nc3a.nato.int/default.aspx
http://www.hookedonlinq.com/linqtordf.ashx
http://aabs.wordpress.com/LINQ/
http://razor.occams.info/code/semweb/
http://en.wikipedia.org/wiki/.NET_Framework
http://www.microsoft.com/NET/
http://en.wikipedia.org/wiki/Web_Ontology_Language
http://semanticweb.org/wiki/Ontology
http://www.w3.org/RDF/




This article was processed using Microsoft Word with Springer LNCS style
and it is released under the Creative Commons Attribution-Share Alike 3.0
license http://creativecommons.org/licenses/by-sa/3.0/

Mais conteúdo relacionado

Mais procurados

Find your way in Graph labyrinths
Find your way in Graph labyrinthsFind your way in Graph labyrinths
Find your way in Graph labyrinthsDaniel Camarda
 
The Semantic Web #9 - Web Ontology Language (OWL)
The Semantic Web #9 - Web Ontology Language (OWL)The Semantic Web #9 - Web Ontology Language (OWL)
The Semantic Web #9 - Web Ontology Language (OWL)Myungjin Lee
 
Re-using Media on the Web: Media fragment re-mixing and playout
Re-using Media on the Web: Media fragment re-mixing and playoutRe-using Media on the Web: Media fragment re-mixing and playout
Re-using Media on the Web: Media fragment re-mixing and playoutMediaMixerCommunity
 
Rdf And Rdf Schema For Ontology Specification
Rdf And Rdf Schema For Ontology SpecificationRdf And Rdf Schema For Ontology Specification
Rdf And Rdf Schema For Ontology Specificationchenjennan
 
Publishing Linked Data 3/5 Semtech2011
Publishing Linked Data 3/5 Semtech2011Publishing Linked Data 3/5 Semtech2011
Publishing Linked Data 3/5 Semtech2011Juan Sequeda
 
Introduction to RDFa
Introduction to RDFaIntroduction to RDFa
Introduction to RDFaIvan Herman
 
Resource description framework
Resource description frameworkResource description framework
Resource description frameworkhozifa1010
 
Linked Data, Ontologies and Inference
Linked Data, Ontologies and InferenceLinked Data, Ontologies and Inference
Linked Data, Ontologies and InferenceBarry Norton
 
DLF 2015 Presentation, "RDF in the Real World."
DLF 2015 Presentation, "RDF in the Real World." DLF 2015 Presentation, "RDF in the Real World."
DLF 2015 Presentation, "RDF in the Real World." Avalon Media System
 
Shrinking the silo boundary: data and schema in the Semantic Web
Shrinking the silo boundary: data and schema in the Semantic WebShrinking the silo boundary: data and schema in the Semantic Web
Shrinking the silo boundary: data and schema in the Semantic WebGordon Dunsire
 
A Comparison Between Python APIs For RDF Processing
A Comparison Between Python APIs For RDF ProcessingA Comparison Between Python APIs For RDF Processing
A Comparison Between Python APIs For RDF Processinglucianb
 
An Approach for the Incremental Export of Relational Databases into RDF Graphs
An Approach for the Incremental Export of Relational Databases into RDF GraphsAn Approach for the Incremental Export of Relational Databases into RDF Graphs
An Approach for the Incremental Export of Relational Databases into RDF GraphsNikolaos Konstantinou
 
Apache Marmotta (incubating)
Apache Marmotta (incubating)Apache Marmotta (incubating)
Apache Marmotta (incubating)Sergio Fernández
 

Mais procurados (20)

Find your way in Graph labyrinths
Find your way in Graph labyrinthsFind your way in Graph labyrinths
Find your way in Graph labyrinths
 
The Semantic Web #9 - Web Ontology Language (OWL)
The Semantic Web #9 - Web Ontology Language (OWL)The Semantic Web #9 - Web Ontology Language (OWL)
The Semantic Web #9 - Web Ontology Language (OWL)
 
Re-using Media on the Web: Media fragment re-mixing and playout
Re-using Media on the Web: Media fragment re-mixing and playoutRe-using Media on the Web: Media fragment re-mixing and playout
Re-using Media on the Web: Media fragment re-mixing and playout
 
Rdf And Rdf Schema For Ontology Specification
Rdf And Rdf Schema For Ontology SpecificationRdf And Rdf Schema For Ontology Specification
Rdf And Rdf Schema For Ontology Specification
 
Rdf
RdfRdf
Rdf
 
Publishing Linked Data 3/5 Semtech2011
Publishing Linked Data 3/5 Semtech2011Publishing Linked Data 3/5 Semtech2011
Publishing Linked Data 3/5 Semtech2011
 
Introduction to RDFa
Introduction to RDFaIntroduction to RDFa
Introduction to RDFa
 
Introduction to dotNetRDF
Introduction to dotNetRDFIntroduction to dotNetRDF
Introduction to dotNetRDF
 
Sparql
SparqlSparql
Sparql
 
Resource description framework
Resource description frameworkResource description framework
Resource description framework
 
Linked Data, Ontologies and Inference
Linked Data, Ontologies and InferenceLinked Data, Ontologies and Inference
Linked Data, Ontologies and Inference
 
semanticweb
semanticwebsemanticweb
semanticweb
 
DLF 2015 Presentation, "RDF in the Real World."
DLF 2015 Presentation, "RDF in the Real World." DLF 2015 Presentation, "RDF in the Real World."
DLF 2015 Presentation, "RDF in the Real World."
 
Stay fresh
Stay freshStay fresh
Stay fresh
 
Shrinking the silo boundary: data and schema in the Semantic Web
Shrinking the silo boundary: data and schema in the Semantic WebShrinking the silo boundary: data and schema in the Semantic Web
Shrinking the silo boundary: data and schema in the Semantic Web
 
A Comparison Between Python APIs For RDF Processing
A Comparison Between Python APIs For RDF ProcessingA Comparison Between Python APIs For RDF Processing
A Comparison Between Python APIs For RDF Processing
 
Fedora Migration Considerations
Fedora Migration ConsiderationsFedora Migration Considerations
Fedora Migration Considerations
 
An Approach for the Incremental Export of Relational Databases into RDF Graphs
An Approach for the Incremental Export of Relational Databases into RDF GraphsAn Approach for the Incremental Export of Relational Databases into RDF Graphs
An Approach for the Incremental Export of Relational Databases into RDF Graphs
 
Apache Marmotta (incubating)
Apache Marmotta (incubating)Apache Marmotta (incubating)
Apache Marmotta (incubating)
 
CatConf2001
CatConf2001CatConf2001
CatConf2001
 

Destaque

maltato de animales
maltato de animalesmaltato de animales
maltato de animalesantonella
 
Kba january newsletter approved
Kba january newsletter approvedKba january newsletter approved
Kba january newsletter approvedKba Jen
 
Kba february newsletter
Kba february newsletterKba february newsletter
Kba february newsletterKba Jen
 
Kba december newsletter
Kba december newsletterKba december newsletter
Kba december newsletterKba Jen
 
Kids Be Aware Newsletter
Kids Be Aware NewsletterKids Be Aware Newsletter
Kids Be Aware NewsletterKba Jen
 
PRESENTAZIONE NEW AURAMEETING
PRESENTAZIONE NEW AURAMEETINGPRESENTAZIONE NEW AURAMEETING
PRESENTAZIONE NEW AURAMEETINGNOVEMBRE1
 
Kba june _newsletter[1]
Kba june _newsletter[1]Kba june _newsletter[1]
Kba june _newsletter[1]Kba Jen
 

Destaque (7)

maltato de animales
maltato de animalesmaltato de animales
maltato de animales
 
Kba january newsletter approved
Kba january newsletter approvedKba january newsletter approved
Kba january newsletter approved
 
Kba february newsletter
Kba february newsletterKba february newsletter
Kba february newsletter
 
Kba december newsletter
Kba december newsletterKba december newsletter
Kba december newsletter
 
Kids Be Aware Newsletter
Kids Be Aware NewsletterKids Be Aware Newsletter
Kids Be Aware Newsletter
 
PRESENTAZIONE NEW AURAMEETING
PRESENTAZIONE NEW AURAMEETINGPRESENTAZIONE NEW AURAMEETING
PRESENTAZIONE NEW AURAMEETING
 
Kba june _newsletter[1]
Kba june _newsletter[1]Kba june _newsletter[1]
Kba june _newsletter[1]
 

Semelhante a .Net and Rdf APIs

Comparative Study That Aims Rdf Processing For The Java Platform
Comparative Study That Aims Rdf Processing For The Java PlatformComparative Study That Aims Rdf Processing For The Java Platform
Comparative Study That Aims Rdf Processing For The Java PlatformComputer Science
 
Rdf Processing Tools In Java
Rdf Processing Tools In JavaRdf Processing Tools In Java
Rdf Processing Tools In JavaDicusarCorneliu
 
Modern PHP RDF toolkits: a comparative study
Modern PHP RDF toolkits: a comparative studyModern PHP RDF toolkits: a comparative study
Modern PHP RDF toolkits: a comparative studyMarius Butuc
 
Services semantic technology_terminology
Services semantic technology_terminologyServices semantic technology_terminology
Services semantic technology_terminologyTenforce
 
RDF APIs for .NET Framework
RDF APIs for .NET FrameworkRDF APIs for .NET Framework
RDF APIs for .NET FrameworkAdriana Ivanciu
 
RDF and the Semantic Web -- Joanna Pszenicyn
RDF and the Semantic Web -- Joanna PszenicynRDF and the Semantic Web -- Joanna Pszenicyn
RDF and the Semantic Web -- Joanna PszenicynRichard.Sapon-White
 
Semantic - Based Querying Using Ontology in Relational Database of Library Ma...
Semantic - Based Querying Using Ontology in Relational Database of Library Ma...Semantic - Based Querying Using Ontology in Relational Database of Library Ma...
Semantic - Based Querying Using Ontology in Relational Database of Library Ma...dannyijwest
 
State of the Semantic Web
State of the Semantic WebState of the Semantic Web
State of the Semantic WebIvan Herman
 
Corrib.org - OpenSource and Research
Corrib.org - OpenSource and ResearchCorrib.org - OpenSource and Research
Corrib.org - OpenSource and Researchadameq
 
Semantic web
Semantic webSemantic web
Semantic webtariq1352
 
Linked data HHS 2015
Linked data HHS 2015Linked data HHS 2015
Linked data HHS 2015Cason Snow
 
Deploying PHP applications using Virtuoso as Application Server
Deploying PHP applications using Virtuoso as Application ServerDeploying PHP applications using Virtuoso as Application Server
Deploying PHP applications using Virtuoso as Application Serverwebhostingguy
 
Building a semantic website
Building a semantic websiteBuilding a semantic website
Building a semantic websiteCJ Jenkins
 
Web 3 Mark Greaves
Web 3 Mark GreavesWeb 3 Mark Greaves
Web 3 Mark GreavesMediabistro
 

Semelhante a .Net and Rdf APIs (20)

Comparative Study That Aims Rdf Processing For The Java Platform
Comparative Study That Aims Rdf Processing For The Java PlatformComparative Study That Aims Rdf Processing For The Java Platform
Comparative Study That Aims Rdf Processing For The Java Platform
 
Rdf Processing Tools In Java
Rdf Processing Tools In JavaRdf Processing Tools In Java
Rdf Processing Tools In Java
 
Modern PHP RDF toolkits: a comparative study
Modern PHP RDF toolkits: a comparative studyModern PHP RDF toolkits: a comparative study
Modern PHP RDF toolkits: a comparative study
 
Services semantic technology_terminology
Services semantic technology_terminologyServices semantic technology_terminology
Services semantic technology_terminology
 
Web Spa
Web SpaWeb Spa
Web Spa
 
RDF APIs for .NET Framework
RDF APIs for .NET FrameworkRDF APIs for .NET Framework
RDF APIs for .NET Framework
 
RDF and the Semantic Web -- Joanna Pszenicyn
RDF and the Semantic Web -- Joanna PszenicynRDF and the Semantic Web -- Joanna Pszenicyn
RDF and the Semantic Web -- Joanna Pszenicyn
 
Semantic - Based Querying Using Ontology in Relational Database of Library Ma...
Semantic - Based Querying Using Ontology in Relational Database of Library Ma...Semantic - Based Querying Using Ontology in Relational Database of Library Ma...
Semantic - Based Querying Using Ontology in Relational Database of Library Ma...
 
State of the Semantic Web
State of the Semantic WebState of the Semantic Web
State of the Semantic Web
 
Corrib.org - OpenSource and Research
Corrib.org - OpenSource and ResearchCorrib.org - OpenSource and Research
Corrib.org - OpenSource and Research
 
Semantics
SemanticsSemantics
Semantics
 
RDF and Java
RDF and JavaRDF and Java
RDF and Java
 
Semantic web
Semantic webSemantic web
Semantic web
 
Linked data HHS 2015
Linked data HHS 2015Linked data HHS 2015
Linked data HHS 2015
 
Deploying PHP applications using Virtuoso as Application Server
Deploying PHP applications using Virtuoso as Application ServerDeploying PHP applications using Virtuoso as Application Server
Deploying PHP applications using Virtuoso as Application Server
 
Semantic web
Semantic web Semantic web
Semantic web
 
eureka09
eureka09eureka09
eureka09
 
eureka09
eureka09eureka09
eureka09
 
Building a semantic website
Building a semantic websiteBuilding a semantic website
Building a semantic website
 
Web 3 Mark Greaves
Web 3 Mark GreavesWeb 3 Mark Greaves
Web 3 Mark Greaves
 

Último

Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 

Último (20)

Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 

.Net and Rdf APIs

  • 1. .NET Framework RDF APIs Lucian Nistor, Denis Recean Universitatea “Alexandru Ioan Cuza”, Iasi 1 Introduction In this paper we intend to do a comparative study about how RDF, one of the most important bricks of Semantic Web, is processed in .NET. The utility of such a study is obvious, .NET is one of the most used frameworks in software development (desktop of web based), and Semantic Web, with RDF at its foundation, represents the next step in web evolution, so they have to interact with each other. Before we start comparing the tools, we do a short presentation of the main technologies. Semantic Web The Web has begun to “understand” the meaning of the information it is composed of and this is the new phase of Web, the Semantic Web. This process of “understanding” the data is realized using various formal ways, like RDF (Resource Description Frameworks), RDFS (RDF Schema), interchangeable data formats (like N3 or Turtle) or WOL (Web Ontology Language). But the Semantic Web is like a living organism that is growing and evolving right in front of our eyes. RDF The Resource Description Framework (RDF) is a standard for storing data on Semantic Web. Semantic Web compliant applications use structured information that is transmitted in a decentralized and distributed way. In order to store the information in small, discrete pieces an abstract model was created, RDF. This model is stored in a multitude of formats, but the most popular is RDF/XML.
  • 2. Ontology Even thow there is no unique definition to Semantic Web Ontologies, they are very important for Semantic Web. In philosophical way ontology is “the study of entities and their relations” – Clay Shirky. Extrapolating that definition to computer science we can say that an ontology is a formal representation of a set of entities from a certain domain and the relations between those entities. SPARQL SPARQL (SPARQL Protocol and RDF Query Language) is a query language for RDF. A SPARQL interrogation is querying required and optional graph patterns (RDF stored information forms an informational graph). These patterns can be connected by conjunctions or disjunctions. SPARQL can be used to interrogate any data source that is stored in RDF format or can be transformed in RDF. The result of a query can take the form of sets or RDFs. http://en.wikipedia.org/wiki/SPARQL - SARQL query example: PREFIX abc: <http://example.com/exampleOntology#> SELECT ?capital ?country WHERE { ?x abc:cityname ?capital ; abc:isCapitalOf ?y . ?y abc:countryname ?country ; abc:isInContinent abc:Africa . } .NET Framework and VS The .NET Framework is a software framework developed by Microsoft and it used by the latest software applications that run on Windows. The framework includes a big library with solutions to common programming problems and a virtual machine. Developers that write applications in .NET have the advantage that they can use one of many programming language to write their code (C#, Visual Basic, C++,…), they have access to the Base Class Library, have a common development environment for desktop and web applications, and have access to a extraordinary documentation.
  • 3. The Base Class Library is a component of the framework that provides features like database connectivity, cryptography, web application development and so on. Visual Studio is the Microsoft IDE for software development. It includes .NET Framework and Microsoft encourages the use of the framework in software development. VS provides advanced features and RIA development support. Besides Microsoft there is a .NET Framework developed for Linux, called Mono, but supports only .Net 1.0 and .NET 2.0 and unlike Windows which is on .Net 3.5 and prepares for .Net 4.0 2 API comparation Even if, in the latest years, Semantic Web evolved considerably and RDF has become a common data storing standard, Microsoft didn’t include native support for RDF processing. Understanding the growing importance of RDF in new web software development, some independent developers have implemented solutions that offer support to RDF processing. We will discuss about three such API’s, SemWeb, a library that provides low level RDF interaction, LinqToRdf and Rowlex, thow API’s that use SemWeb internally and provide a flexible and easy to use API. SemWeb Was developed by Joshua Tauberer and, according to the author, it can be used to read and write RDF files in XML and N3 formats, persistently store RDFs in memory, in SQL databases, to query persistent storage or remote endpoints using SPARQL.Is also can provide limited RDFS interaction. LinqtoRdf Developed by Andrew Matthews this tool’s main aim is to allow .NET programmers to use LINQ query technology to interrogate a RDF information graph with the help of classes that have been defined using RDFS or OWL. The tool includes extensions for visual studio that allows the user to model
  • 4. ontologies using VS.NET class designer. Its main features are converting LINQ query to SPARQL and to generating .NET classes that map ontologies. Rowlex Rowlex is a toolkit used for creating and browsing RDF documents. It uses ontology to model classes and properties and then models RDF tipples like instances of those classes. ROWLEX is the acronym for Relaxed OWL Experience. On other words Rowlex maps the object oriented programming advantages over RDF processing using OWL (Web Ontology Language). It offers the ability to generate .NET classes from ontologies and ontologies from .NET classes. This API was developed by NC3A Semantic Interoperability tem. 3 RDF data storage The way the RDF information or the RDF itself is stored is very important. It influences performance and the interoperability with other platforms and applications. SemWeb is capable to work with RDF in XML and N3 formats. The abstractization of a RDF triple in SemWeb library is done with the Entity class, which stores an RDF entity, the Literal class which stores a relation and the Statement class which combines two entities and a literal to obtain a RDF triple. LinqToRdf API uses N3 format to store RDF files. In .Net LinqToRdf creates classes that map the ontology describing the RDF and then uses the Linq mechanisms to query, delete or add information to a certain RDF file. The classes are created using attributes to map ontology features. A triple is stored as an instance of a class and the relation between classes are modeled with OOP means. For instance ontology class hierarchy is modeled with class derivation and one-to-many relation is modeled with list of objects.
  • 5. ROWLEX uses XML and N3 format to store RDF files. When processes documents the library stores RDF triples as instances of classes that map ontology, in a similar way that LinqToRdf does. As a common characteristic of using the .NET framework all these APIs have the possibility to serialize the data in the .NET ways. For instance the RDFs can be stored in a SQL database or in binary format, as any .NET object. 4 SPARQL support Only two of the three APIs have support for SPARQL interrogations, both on local RDF files and on Remote SPARQL Endpoints. These are SemWeb and LinqToRdf. In the SemWeb the interrogations are stored in special objects: Query class objects for local queries and SparqlHttpSource for remote ones. Example of SPARQL interrogation written using SemWeb API. SparqlHttpSource source = new SparqlHttpSource("http://DBpedia.org/sparql"); source.RunSparqlQuery("SELECT * WHERE { ?a ?b "Michael Jackson" . }", Console.Out); LinqToRdf uses the LINQ mechanism to create queries. As a data context for a query a RDF object is used. The constructed LINQ query is then translated into SPARQL. In order to interrogate remote data that is not in RDF format, special tools that transform in to RDF format need to be used. For instance, in order to interrogate OpenLink data the Virtuoso platform can be used. Example of LINQ interrogation over a RDF file, using LinqToRdf TripleStore ts = new TripleStore(); ts.EndpointUri = @"://DBpedia.org/sparql "; ts.QueryType = QueryType.RemoteSparqlStore;
  • 6. var q = from p in new RDF(ts).ForType<Person>() where p.Name == " Michael Jackson “ select p; 5 Support for developers Two of the projects are one man projects and the third is developed by a company that has interest in other fields of computer science, like information security. So the information is rather little and the support is obviously insufficient. 5.1 Documentation All three APIs have a documentation that shows their main features using examples, all of them lack serious, detailed information. SemWeb is an older project so the documentation is a bit more structured. The forum activities concerning the three APIs are low because people who work with RDF and want a specialized API for it usually use other development frameworks like Java or C++. 5.2 Integration with VS SemWeb is essentially a dll library which is included in VS project and used as any other assembly. LinqToRdf besides the dlls provides extensions to create .NET classes that map ontologies and to create your own ontologies. It is the only tool that has an installing kit. Rowlex is integrated using the same dll method, but is also provides two .exe files that can be used to generate an ontology from .NET classes and to generate .NET classes that map an existing ontology. There is a problem that needs to be mentioned here. All three APIs are developed with .NET 2.0 and with Visual Studio 2008 without SP1 and have problems when used with higher versions of .NET of VS. LinqToRdf is
  • 7. impossible to install on versions of VS2008 with at least SP1 because of the tools extensions. 5.3 Learning curve The learning curve is almost the same for each of the three tools. Performing simple tasks with all of them is relatively quick to learn, but when it comes to serious, complicated tasks, that require a good understanding of the API there are big problems due to lack of documentation and poor support. Rowlex is slightly easier to learn because it lacks SPARQL capability and LinqToRdf is a bit easier that SemWeb if you know LINQ, else it can be harder as you have to learn LINQ as well. But, for a .NET programmer it is easier to learn LINQ than SPARQL. Taking into account these considerations Rowlex is the easiest to learn, SemWeb is the hardest and LinqToRdf is in between. 6 Performance SemWeb has the best performance of all because it stores the information in a lightweight manner (with three classes, Entity, Literal and Statement) and the SPARQL interrogations need no transformation as they are passed to the Query object as a string. Other reason why SemWeb is more performant is the fact that the other two APIs use it to do their low level interaction with the RDFs. Rowlex is worse in terms of performance than SemWeb because it uses more classes to store the triples during processing, but LinqToRdf is the least performant of all because the classes it uses to map the ontology are LINQ compatible and because the LINQ queries have to be transformed into SPARQL queries before they are run. 7 Interoperability In terms of interoperability all the APIs benefit from two sides. One is the RDF format which is specially designed to be used by many web
  • 8. development frameworks. The other side is .NET which allows the interoperability with SQL databases or with other platforms via web services or different network communication protocols. 8 Project development and licensing All the projects leave the impression that they are still in beta phase. All have installing or integration problems, but the work on them ceased in 2008 or 2009. SemWeb is open source, LinqToRdf is under New BSD License and Rowlex is under GNU LESSER GENERAL PUBLIC LICENSE 9 Conclusions Before drawing any conclusions we like to state the opinion of Joshua Tauberer, the author to the most stabile API of the three, SemWeb, about the fate of his project: “May 19, 2009. I'm taking an indefinite hiatus from this project. That means that while I'll try to apply any patches to fix existing bugs, I won't be actively developing the library further, and I won't be answering questions for help on the mail list. Over the last four years it's been fun to work on it, but I don't think there has been enough uptake of the Semantic Web in the .NET world (or otherwise) for me to justify spending more time on this when I have other things in life I'd rather be working on.” Now to conclusions. The three APIs where selected because they were the “loudest” on the internet, so we considered them to be the best candidates for our comparative study. The ideas where good, the work is outstanding but all of them need a better documentation, better support, bug fixing and further development in order to make them usable and reliable tools for big, serious applications.
  • 9. 10 Reference http://www.w3.org/TR/rdf-sparql-query/ http://en.wikipedia.org/wiki/SPARQL http://rowlex.nc3a.nato.int/default.aspx http://www.hookedonlinq.com/linqtordf.ashx http://aabs.wordpress.com/LINQ/ http://razor.occams.info/code/semweb/ http://en.wikipedia.org/wiki/.NET_Framework http://www.microsoft.com/NET/ http://en.wikipedia.org/wiki/Web_Ontology_Language http://semanticweb.org/wiki/Ontology http://www.w3.org/RDF/ This article was processed using Microsoft Word with Springer LNCS style and it is released under the Creative Commons Attribution-Share Alike 3.0 license http://creativecommons.org/licenses/by-sa/3.0/