SlideShare ist ein Scribd-Unternehmen logo
1 von 8
Downloaden Sie, um offline zu lesen
RDF APIs for .NET Framework

              Rata Gheorghita Mugurel MOC2, Ivanciu Adriana MLC2
                              gheorghita.rata@infoiasi.ro, adriana.ivanciu@infoiasi.ro


       The RDF (Resource Description Framework) is a structure for
describing and interchanging metadata on the Web. RDF provides a
consistent framework and syntax for describing and querying data
(Personal RDF).


DRIVE RDF API

       According to Shelley, one of the first RDF API for C# is
DRIVE. It consists in dll file (drive.dll) that must be located in project
bin directory. The project should have the correct references to the dll.
       This API is providing three major classes:
1. Softagents.Drive.RDFEdge – represent an edge in a RDF graph.
  Such an object includes a source node (m_Sourcenode) and a
  destination node (m_Destnode).
2. Softagents.Drive.RDFGraph – this kind of object is able to store and
  manage the RDF graph
3. Softagents.Drive.RDFNode – represent a node in the RDF graph. It
  includes a variable that contains all the edges associated with the
  node (m_Edges), some methods that manipulate the graphs elements
  such as getEdges(), getIncomingEdges(), … .
       To work with a RDF graph we should first create an instance of
RDFGraph, reading in an RDF/XML document. Once it is read in, we
2   Rata Gheorghita Mugurel MOC2, Ivanciu Adriana MLC2


can query information from the graph, such as accessing a node with a
URI and then querying for the edges related to that node. I’ll show in
the next paragraph the example given by Shelley in its book. It’s
printing out the edges for a given node.

    using System;

    using Softagents.Drive;

    using System.Collections;

    namespace PracticalRDF

    {

               Public class PracticalRDF

    {

               Static void Main (string[] args)

               {

                   String[] arrNodes;

                   if(args.Length <1)

                   {

                       Console.WriteLine(“Not correct input
    file”);

                       Return;

    }

    //read in RDF/XML document

    RDFGraph rg = new RDFGraph();
RDF APIs for .NET Framework   3


  Rg.BuildRDFGraph(args[0]);

  //find specific node

  RDFNode rNode = rg.GetNode(“here will be an
  URI”);

  System.Collections.ArrayList arrEdges =
  rNode.GetEdges();

  //access edges and print

  Foreach(RDFEdge rEdge in arrEdges){

  Console.WriteLine(rEdge.m_lpszNameSpace +
  rEdge.m_lpszEdgeLocalName);

  }

  //dump all N-Triples

  Rg.PrintNTruples();

  }

  }

  }
       Unfortunately, because the drive.dll cannot be found in the
specified sources, I cannot test it myself.
       The only source for information about Drive was Shelley’s
document. So, the support for developers is practical zero. Also Drive
doesn’t offer support for processing data using a query language.


Drive RDF library should be found at http://www.driverdf.org/.
4    Rata Gheorghita Mugurel MOC2, Ivanciu Adriana MLC2


Semantic Web/RDF Library for C#/.NET

         Another RDF API for .NET Framework is Semnatic Web,
initially developed in 2005 by Joshua Tauberer. It continued his work
on this library till present. This is an open source library developed
under GNU GPL license.
         Example of web applications that use SemWeb: ROLEX
(http://rowlex.nc3a.nato.int),       F-Spot     (http://f-spot.org)   –   photo
management, Beagle (http://beagle-project.org), Sentient Knowledge
explorer (http://www.io-informatics.com/products/sentient-KE.html).
         Semantic Web it is well documented and it is dived as follow:


Basic documentation
       (http://razor.occams.info/code/semweb/semweb-
     current/doc/index.html)


API documentation
      (http://razor.occams.info/code/semweb/semweb-
         current/apidocs/index.html)


Example Programs
      (http://razor.occams.info/code/repo/?/semweb/examples)
         SemWeb is based on two keywords: Resources and Statements.
 Resources it’s the abstract base class of the terms in RDF which has
    two subclasses: Entity and Literal.. The nodes are object of the entity
    class. Those nodes can be empty or can contain a name (URI).
 A statement is in fact a RDF Triple, and can be defined as follows:

    new Statement(
RDF APIs for .NET Framework    5


          new
  Entity(“http://www.example.org/SemWeb”),

          new
  Entity(“http://www.example.org/hasName”),

          new Literal(“My semantic Web
  LIbrary”));
        If we want to instantiate a blank node we have to replace the
Literal instance with “new Bnode()” (which represents an instance
of an empty Literal).
        I’ll show an example for how to get the statements from an
object stored in computer memory.

      MemoryStore ms = new MemoryStore();

  for(int i=0; i<ms.StatementsCount; i ++) //( I
  replaced ms++ from the initial document with
  i++; the original line doesn’t make sense)

  Statement stmr = ms[i];

  Console.WriteLine(stmt);

  }
        It also offers support for query languages. It must be included
the SemWeb.Query Namespace. The SPARQL specifications are
implemented in SemWeb.Query.Sparql. It has implemented an
algorithm for graph matching in SemWeb.Query.GraphMatch.
6   Rata Gheorghita Mugurel MOC2, Ivanciu Adriana MLC2


GreenGrass RDF API for C#

        Greengrass provide a high-level API that allows the RDF
triples to be parsed, stored and manipulated. It works with CRL
compiled languages, C#, VB.NET, …
        It is released under LPGL license and it’s independent of
operating systems. It is implemented in C# and it was released for the
first time in 2007.
        The documentation is also practically nonexistent. I tried to
obtain some information directly from the source code that can be
downloaded from softpedia at
(http://linux.softpedia.com/progDownload/Greengrass-Download-
32460.html).
        It has the same structure as the previous API. It contains a class
Node that offers some methods for:
    -   creating a resource node – CreateResource(…) (having an
        URI parameter – string or URI type);
    -   creating a blank node - CreateBlank();
    -   creating a literal – CreateLiteral() (having a data
        parameter, type string);
        GreenGrass has support for query languages. It also contains
an algorithm for managing graphs, but the support for SPARQL is
nonexistent.
RDF APIs for .NET Framework   7


Conclusions

          The best RDF API for .NET is the second one - SemanticWeb
because it offers support both for SPARQL and Graphs. SemanticWeb
has a good structured documentation and the authors still offer
technical support, fix bugs and updates the library to the last web
trends.
8    Rata Gheorghita Mugurel MOC2, Ivanciu Adriana MLC2


Bibliografy:
1. Practical RDF, Shelley Powers, O’Reilly,
    http://books.google.com/books?id=88yzElvD9sgC&printsec=frontco
    ver&dq=Practical+RDF#v=onepage&q=&f=false
2. Semantic Web/RDF Library for C#/.NET, Joshua Tauberer
3. http://razor.occams.info/code/semweb
4. http://freshmeat.net/projects/greengrass
5. http://linux.softpedia.com/progDownload/Greengrass-Download-
    32460.html

Weitere ähnliche Inhalte

Was ist angesagt?

Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 2 (...
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 2 (...Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 2 (...
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 2 (...Olaf Hartig
 
Facet: Building Web Pages with SPARQL
Facet: Building Web Pages with SPARQLFacet: Building Web Pages with SPARQL
Facet: Building Web Pages with SPARQLLeigh Dodds
 
Graph Analytics with ArangoDB
Graph Analytics with ArangoDBGraph Analytics with ArangoDB
Graph Analytics with ArangoDBArangoDB Database
 
XSLT+SPARQL: Scripting the Semantic Web with SPARQL embedded into XSLT styles...
XSLT+SPARQL: Scripting the Semantic Web with SPARQL embedded into XSLT styles...XSLT+SPARQL: Scripting the Semantic Web with SPARQL embedded into XSLT styles...
XSLT+SPARQL: Scripting the Semantic Web with SPARQL embedded into XSLT styles...Diego Berrueta
 
The Semantics of SPARQL
The Semantics of SPARQLThe Semantics of SPARQL
The Semantics of SPARQLOlaf Hartig
 
WebTech Tutorial Querying DBPedia
WebTech Tutorial Querying DBPediaWebTech Tutorial Querying DBPedia
WebTech Tutorial Querying DBPediaKatrien Verbert
 
Rdf Overview Presentation
Rdf Overview PresentationRdf Overview Presentation
Rdf Overview PresentationKen Varnum
 
Graph Data -- RDF and Property Graphs
Graph Data -- RDF and Property GraphsGraph Data -- RDF and Property Graphs
Graph Data -- RDF and Property Graphsandyseaborne
 
SWT Lecture Session 9 - RDB2RDF direct mapping
SWT Lecture Session 9 - RDB2RDF direct mappingSWT Lecture Session 9 - RDB2RDF direct mapping
SWT Lecture Session 9 - RDB2RDF direct mappingMariano Rodriguez-Muro
 
RDF, SPARQL and Semantic Repositories
RDF, SPARQL and Semantic RepositoriesRDF, SPARQL and Semantic Repositories
RDF, SPARQL and Semantic RepositoriesMarin Dimitrov
 
SHACL: Shaping the Big Ball of Data Mud
SHACL: Shaping the Big Ball of Data MudSHACL: Shaping the Big Ball of Data Mud
SHACL: Shaping the Big Ball of Data MudRichard Cyganiak
 

Was ist angesagt? (20)

SPARQL Cheat Sheet
SPARQL Cheat SheetSPARQL Cheat Sheet
SPARQL Cheat Sheet
 
SPIN in Five Slides
SPIN in Five SlidesSPIN in Five Slides
SPIN in Five Slides
 
RDFa Tutorial
RDFa TutorialRDFa Tutorial
RDFa Tutorial
 
SWT Lecture Session 2 - RDF
SWT Lecture Session 2 - RDFSWT Lecture Session 2 - RDF
SWT Lecture Session 2 - RDF
 
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 2 (...
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 2 (...Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 2 (...
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 2 (...
 
Facet: Building Web Pages with SPARQL
Facet: Building Web Pages with SPARQLFacet: Building Web Pages with SPARQL
Facet: Building Web Pages with SPARQL
 
Graph Analytics with ArangoDB
Graph Analytics with ArangoDBGraph Analytics with ArangoDB
Graph Analytics with ArangoDB
 
XSLT+SPARQL: Scripting the Semantic Web with SPARQL embedded into XSLT styles...
XSLT+SPARQL: Scripting the Semantic Web with SPARQL embedded into XSLT styles...XSLT+SPARQL: Scripting the Semantic Web with SPARQL embedded into XSLT styles...
XSLT+SPARQL: Scripting the Semantic Web with SPARQL embedded into XSLT styles...
 
The Semantics of SPARQL
The Semantics of SPARQLThe Semantics of SPARQL
The Semantics of SPARQL
 
WebTech Tutorial Querying DBPedia
WebTech Tutorial Querying DBPediaWebTech Tutorial Querying DBPedia
WebTech Tutorial Querying DBPedia
 
Introduction to dotNetRDF
Introduction to dotNetRDFIntroduction to dotNetRDF
Introduction to dotNetRDF
 
5 rdfs
5 rdfs5 rdfs
5 rdfs
 
Rdf Overview Presentation
Rdf Overview PresentationRdf Overview Presentation
Rdf Overview Presentation
 
Graph Data -- RDF and Property Graphs
Graph Data -- RDF and Property GraphsGraph Data -- RDF and Property Graphs
Graph Data -- RDF and Property Graphs
 
Jesús Barrasa
Jesús BarrasaJesús Barrasa
Jesús Barrasa
 
SWT Lecture Session 9 - RDB2RDF direct mapping
SWT Lecture Session 9 - RDB2RDF direct mappingSWT Lecture Session 9 - RDB2RDF direct mapping
SWT Lecture Session 9 - RDB2RDF direct mapping
 
SWT Lecture Session 11 - R2RML part 2
SWT Lecture Session 11 - R2RML part 2SWT Lecture Session 11 - R2RML part 2
SWT Lecture Session 11 - R2RML part 2
 
RDF, SPARQL and Semantic Repositories
RDF, SPARQL and Semantic RepositoriesRDF, SPARQL and Semantic Repositories
RDF, SPARQL and Semantic Repositories
 
SWT Lecture Session 10 R2RML Part 1
SWT Lecture Session 10 R2RML Part 1SWT Lecture Session 10 R2RML Part 1
SWT Lecture Session 10 R2RML Part 1
 
SHACL: Shaping the Big Ball of Data Mud
SHACL: Shaping the Big Ball of Data MudSHACL: Shaping the Big Ball of Data Mud
SHACL: Shaping the Big Ball of Data Mud
 

Ähnlich wie RDF APIs for .NET Framework

Rdf Processing On The Java Platform
Rdf Processing On The Java PlatformRdf Processing On The Java Platform
Rdf Processing On The Java Platformguestc1b16406
 
Comparative study on the processing of RDF in PHP
Comparative study on the processing of RDF in PHPComparative study on the processing of RDF in PHP
Comparative study on the processing of RDF in PHPMSGUNC
 
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
 
State of the Semantic Web
State of the Semantic WebState of the Semantic Web
State of the Semantic WebIvan Herman
 
Triplestore and SPARQL
Triplestore and SPARQLTriplestore and SPARQL
Triplestore and SPARQLLino Valdivia
 
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
 
Rdf Processing Tools In Java
Rdf Processing Tools In JavaRdf Processing Tools In Java
Rdf Processing Tools In JavaDicusarCorneliu
 
GraphTech Ecosystem - part 1: Graph Databases
GraphTech Ecosystem - part 1: Graph DatabasesGraphTech Ecosystem - part 1: Graph Databases
GraphTech Ecosystem - part 1: Graph DatabasesLinkurious
 
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
 
A year on the Semantic Web @ W3C
A year on the Semantic Web @ W3CA year on the Semantic Web @ W3C
A year on the Semantic Web @ W3CIvan Herman
 
Apache Spark Introduction
Apache Spark IntroductionApache Spark Introduction
Apache Spark Introductionsudhakara st
 
RDF_API_Java_Stefan_Apostoaie
RDF_API_Java_Stefan_ApostoaieRDF_API_Java_Stefan_Apostoaie
RDF_API_Java_Stefan_Apostoaieiosstef
 
Sparql semantic information retrieval by
Sparql semantic information retrieval bySparql semantic information retrieval by
Sparql semantic information retrieval byIJNSA Journal
 
Semantic web
Semantic webSemantic web
Semantic webtariq1352
 
SPARQL: SEMANTIC INFORMATION RETRIEVAL BY EMBEDDING PREPOSITIONS
SPARQL: SEMANTIC INFORMATION RETRIEVAL BY EMBEDDING PREPOSITIONSSPARQL: SEMANTIC INFORMATION RETRIEVAL BY EMBEDDING PREPOSITIONS
SPARQL: SEMANTIC INFORMATION RETRIEVAL BY EMBEDDING PREPOSITIONSIJNSA Journal
 

Ähnlich wie RDF APIs for .NET Framework (20)

.Net and Rdf APIs
.Net and Rdf APIs.Net and Rdf APIs
.Net and Rdf APIs
 
Rdf Processing On The Java Platform
Rdf Processing On The Java PlatformRdf Processing On The Java Platform
Rdf Processing On The Java Platform
 
Comparative study on the processing of RDF in PHP
Comparative study on the processing of RDF in PHPComparative study on the processing of RDF in PHP
Comparative study on the processing of RDF in PHP
 
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
 
State of the Semantic Web
State of the Semantic WebState of the Semantic Web
State of the Semantic Web
 
Web Spa
Web SpaWeb Spa
Web Spa
 
Triplestore and SPARQL
Triplestore and SPARQLTriplestore and SPARQL
Triplestore and SPARQL
 
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
 
RDF and Java
RDF and JavaRDF and Java
RDF and Java
 
Hacia la Internet del Futuro: Web Semántica y Open Linked Data, Parte 2
Hacia la Internet del Futuro: Web Semántica y Open Linked Data, Parte 2Hacia la Internet del Futuro: Web Semántica y Open Linked Data, Parte 2
Hacia la Internet del Futuro: Web Semántica y Open Linked Data, Parte 2
 
Rdf Processing Tools In Java
Rdf Processing Tools In JavaRdf Processing Tools In Java
Rdf Processing Tools In Java
 
GraphTech Ecosystem - part 1: Graph Databases
GraphTech Ecosystem - part 1: Graph DatabasesGraphTech Ecosystem - part 1: Graph Databases
GraphTech Ecosystem - part 1: Graph Databases
 
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
 
A year on the Semantic Web @ W3C
A year on the Semantic Web @ W3CA year on the Semantic Web @ W3C
A year on the Semantic Web @ W3C
 
Apache Spark Introduction
Apache Spark IntroductionApache Spark Introduction
Apache Spark Introduction
 
RDF_API_Java_Stefan_Apostoaie
RDF_API_Java_Stefan_ApostoaieRDF_API_Java_Stefan_Apostoaie
RDF_API_Java_Stefan_Apostoaie
 
Sparql semantic information retrieval by
Sparql semantic information retrieval bySparql semantic information retrieval by
Sparql semantic information retrieval by
 
Semantic web
Semantic webSemantic web
Semantic web
 
SPARQL: SEMANTIC INFORMATION RETRIEVAL BY EMBEDDING PREPOSITIONS
SPARQL: SEMANTIC INFORMATION RETRIEVAL BY EMBEDDING PREPOSITIONSSPARQL: SEMANTIC INFORMATION RETRIEVAL BY EMBEDDING PREPOSITIONS
SPARQL: SEMANTIC INFORMATION RETRIEVAL BY EMBEDDING PREPOSITIONS
 
Jena Programming
Jena ProgrammingJena Programming
Jena Programming
 

Kürzlich hochgeladen

Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxnelietumpap1
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 

Kürzlich hochgeladen (20)

Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptx
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 

RDF APIs for .NET Framework

  • 1. RDF APIs for .NET Framework Rata Gheorghita Mugurel MOC2, Ivanciu Adriana MLC2 gheorghita.rata@infoiasi.ro, adriana.ivanciu@infoiasi.ro The RDF (Resource Description Framework) is a structure for describing and interchanging metadata on the Web. RDF provides a consistent framework and syntax for describing and querying data (Personal RDF). DRIVE RDF API According to Shelley, one of the first RDF API for C# is DRIVE. It consists in dll file (drive.dll) that must be located in project bin directory. The project should have the correct references to the dll. This API is providing three major classes: 1. Softagents.Drive.RDFEdge – represent an edge in a RDF graph. Such an object includes a source node (m_Sourcenode) and a destination node (m_Destnode). 2. Softagents.Drive.RDFGraph – this kind of object is able to store and manage the RDF graph 3. Softagents.Drive.RDFNode – represent a node in the RDF graph. It includes a variable that contains all the edges associated with the node (m_Edges), some methods that manipulate the graphs elements such as getEdges(), getIncomingEdges(), … . To work with a RDF graph we should first create an instance of RDFGraph, reading in an RDF/XML document. Once it is read in, we
  • 2. 2 Rata Gheorghita Mugurel MOC2, Ivanciu Adriana MLC2 can query information from the graph, such as accessing a node with a URI and then querying for the edges related to that node. I’ll show in the next paragraph the example given by Shelley in its book. It’s printing out the edges for a given node. using System; using Softagents.Drive; using System.Collections; namespace PracticalRDF { Public class PracticalRDF { Static void Main (string[] args) { String[] arrNodes; if(args.Length <1) { Console.WriteLine(“Not correct input file”); Return; } //read in RDF/XML document RDFGraph rg = new RDFGraph();
  • 3. RDF APIs for .NET Framework 3 Rg.BuildRDFGraph(args[0]); //find specific node RDFNode rNode = rg.GetNode(“here will be an URI”); System.Collections.ArrayList arrEdges = rNode.GetEdges(); //access edges and print Foreach(RDFEdge rEdge in arrEdges){ Console.WriteLine(rEdge.m_lpszNameSpace + rEdge.m_lpszEdgeLocalName); } //dump all N-Triples Rg.PrintNTruples(); } } } Unfortunately, because the drive.dll cannot be found in the specified sources, I cannot test it myself. The only source for information about Drive was Shelley’s document. So, the support for developers is practical zero. Also Drive doesn’t offer support for processing data using a query language. Drive RDF library should be found at http://www.driverdf.org/.
  • 4. 4 Rata Gheorghita Mugurel MOC2, Ivanciu Adriana MLC2 Semantic Web/RDF Library for C#/.NET Another RDF API for .NET Framework is Semnatic Web, initially developed in 2005 by Joshua Tauberer. It continued his work on this library till present. This is an open source library developed under GNU GPL license. Example of web applications that use SemWeb: ROLEX (http://rowlex.nc3a.nato.int), F-Spot (http://f-spot.org) – photo management, Beagle (http://beagle-project.org), Sentient Knowledge explorer (http://www.io-informatics.com/products/sentient-KE.html). Semantic Web it is well documented and it is dived as follow: Basic documentation (http://razor.occams.info/code/semweb/semweb- current/doc/index.html) API documentation (http://razor.occams.info/code/semweb/semweb- current/apidocs/index.html) Example Programs (http://razor.occams.info/code/repo/?/semweb/examples) SemWeb is based on two keywords: Resources and Statements.  Resources it’s the abstract base class of the terms in RDF which has two subclasses: Entity and Literal.. The nodes are object of the entity class. Those nodes can be empty or can contain a name (URI).  A statement is in fact a RDF Triple, and can be defined as follows: new Statement(
  • 5. RDF APIs for .NET Framework 5 new Entity(“http://www.example.org/SemWeb”), new Entity(“http://www.example.org/hasName”), new Literal(“My semantic Web LIbrary”)); If we want to instantiate a blank node we have to replace the Literal instance with “new Bnode()” (which represents an instance of an empty Literal). I’ll show an example for how to get the statements from an object stored in computer memory. MemoryStore ms = new MemoryStore(); for(int i=0; i<ms.StatementsCount; i ++) //( I replaced ms++ from the initial document with i++; the original line doesn’t make sense) Statement stmr = ms[i]; Console.WriteLine(stmt); } It also offers support for query languages. It must be included the SemWeb.Query Namespace. The SPARQL specifications are implemented in SemWeb.Query.Sparql. It has implemented an algorithm for graph matching in SemWeb.Query.GraphMatch.
  • 6. 6 Rata Gheorghita Mugurel MOC2, Ivanciu Adriana MLC2 GreenGrass RDF API for C# Greengrass provide a high-level API that allows the RDF triples to be parsed, stored and manipulated. It works with CRL compiled languages, C#, VB.NET, … It is released under LPGL license and it’s independent of operating systems. It is implemented in C# and it was released for the first time in 2007. The documentation is also practically nonexistent. I tried to obtain some information directly from the source code that can be downloaded from softpedia at (http://linux.softpedia.com/progDownload/Greengrass-Download- 32460.html). It has the same structure as the previous API. It contains a class Node that offers some methods for: - creating a resource node – CreateResource(…) (having an URI parameter – string or URI type); - creating a blank node - CreateBlank(); - creating a literal – CreateLiteral() (having a data parameter, type string); GreenGrass has support for query languages. It also contains an algorithm for managing graphs, but the support for SPARQL is nonexistent.
  • 7. RDF APIs for .NET Framework 7 Conclusions The best RDF API for .NET is the second one - SemanticWeb because it offers support both for SPARQL and Graphs. SemanticWeb has a good structured documentation and the authors still offer technical support, fix bugs and updates the library to the last web trends.
  • 8. 8 Rata Gheorghita Mugurel MOC2, Ivanciu Adriana MLC2 Bibliografy: 1. Practical RDF, Shelley Powers, O’Reilly, http://books.google.com/books?id=88yzElvD9sgC&printsec=frontco ver&dq=Practical+RDF#v=onepage&q=&f=false 2. Semantic Web/RDF Library for C#/.NET, Joshua Tauberer 3. http://razor.occams.info/code/semweb 4. http://freshmeat.net/projects/greengrass 5. http://linux.softpedia.com/progDownload/Greengrass-Download- 32460.html