SlideShare uma empresa Scribd logo
1 de 8
Baixar para ler offline
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

Mais conteúdo relacionado

Mais procurados

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
 

Mais procurados (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
 

Semelhante a 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
 

Semelhante a 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
 

Último

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
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...anjaliyadav012327
 
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
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...Pooja Nehwal
 
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
 
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
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 

Último (20)

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...
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
 
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
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
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
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
 
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
 
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
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 

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