SlideShare ist ein Scribd-Unternehmen logo
1 von 5
Downloaden Sie, um offline zu lesen
RDF processing tools in Java

                               Corneliu Dicusar, Petru Rebeja

                        Web Application Development papers,
                            Faculty of Computer Science,
                                    Iasi, Romania
               {corneliu.dicusar, petru.rebeja}@info.uaic.ro



         Abstract. This paper presents a comparison of several tools for RDF processing
         in Java taking in account the following aspects: storage, SPARQL support,
         support for developers and copyright.

         Keywords: RDF, Java, RDFSchema, SPARQL, METAMorphoses, Jena, JRDF



1        Introduction

RDF1 became a key concept in knowledge interchange on the Web [1] nowadays and
one of the briks on which Semantic Web2 will be build. It allows software tools to
link data with their semantics rather than just acknowledge their existence without
further knowledge of means of data interpretation. Thus, RDF pushes the immense
collection of data stored today on the Web to a new, higher level towards Semantic
Web. Still, RDF in essence isn’t but just a framework for metadata. In order to use
this framework, developers need tools to do so. This paper presents a short
comparison of RDF processing tools in Java. The comparison will be made on how
RDF triples are stored, whether the specified tool provides SPARQL3 support, how
well it is documented for developers and it’s copyright. Each of these aspects will be
presented in a separated section of this document, all these sections being preceded by
a section containing a short description of each tool.
In order to comprise the notions of this document, the reader must be accustomed to
the following notions:
    ─   RDF
    ─   RDFS(chema)
    ─   SPARQL
    ─   Java




1 http://www.w3.org/RDF/
2
  http://www.w3.org/2001/sw/
3 http://www.w3.org/TR/rdf-sparql-query/
2       Corneliu Dicusar, Petru Rebeja


2       Java tools for RDF processing

Although there are a lot more tools for RDF processing in Java, this paper presents
only the three most popular of them. These are:
    ─ METAMorphoses4 developed by Martin Švihla5. It is a tool designed for
      transforming data from a relational database into RDF documents, according to
      mapping. It uses schema mappings and template documents written in XML
      languages. It can be used as a common Java Library. This is not an actual RDF
      handling tool, but we have chosen it, as an example of a very useful idea.
    ─ Jena6, from Hewlett-Packard, is a framework designed for building Semantic
      Web applications. It offers the tools to handle RDF, RDFS, OWL, SPARQL,
      and more, including a build in inference engine.
    ─ JRDF7, developed by Andrew Newman, a library that gives a simple user
      interface following RDF standard for creation and management for RDF graphs.


3       Storing the triples

    ─ METAmorphoses transforms data stored in a relation database into RDF triples,
      so it is natural that these triples appear in XML format. It takes the schema of
      the database, and adapts it to an existing ontology. A great example is given by
      the authors [2]. Having a simple database schema:
    PERSON(#id, id_department,username, first_name,
    family_name)
    PROJECT(#id, web)
    PERSON_PROJECT(person_id, project_id)
    DEPARTMENT(#id, name)
    And given the corresponding ontology:
    <rdfs:Classrdf:ID="Person">
    <rdfs:label>Person</rdfs:label>
    </rdfs:Class>

    <rdf:Propertyrdf:ID="surname">
    <rdfs:rangerdf:resource="http://www.w3.org/2001/XMLSche
    ma#
    string"/>
    <rdfs:domainrdf:resource="#Person"/>
    </rdf:Property>
    <rdf:Propertyrdf:ID="hasDepartment">

4
  http://metamorphoses.sourceforge.net/
5 http://www.svihla.net/
6
  http://jena.sourceforge.net/
7 http://jrdf.sourceforge.net/
RDF processing tools in Java      3


 <rdfs:rangerdf:resource="http://www.w3.org/2001/XMLSche
 ma#
 string"/>
 <rdfs:domainrdf:resource="#Person"/>
 </rdf:Property>

 <rdf:Propertyrdf:ID="currentProject">
 <rdfs:rangerdf:resource="#Project"/>
 <rdfs:domainrdf:resource="#Person"/>
 </rdf:Property>

 <rdfs:Classrdf:ID="Project">
 <rdfs:label>Project</rdfs:label>
 </rdfs:Class>

 <rdf:Propertyrdf:ID="participants">
 <rdfs:domainrdf:resource="#Project"/>
 <rdfs:rangerdf:resource="#Person"/>
 </rdf:Property>

  <rdf:Propertyrdf:ID="homepage">
  <rdfs:rangerdf:resource="http://www.w3.org/2001/XMLSche
  ma#
  string"/>
  </rdf:Property>
A corresponding example of mapping would be:
  <Class > <ClasstemplateName="person"rdfLabel="Person"
  sql="SELECT*
  FROM person p, department d WHERE d.id =
  p.id_department">
  <PropertytemplateName="surname"rdfLabel="surname"
  sqlName
  ="family_name"/>
  </Class>
 ─ Jena, creates RDF models, the simplest way is by creating a default one:
   ModelFactory.createDefaultModel(), and these models are stored in
   the memory
 ─ JRDF stores these triples in a manner similar to Hibernate, as Java Object Api.
   Being able to talk directly to a triple store in a common manner with the ability
   to swap differing implementations is one of the key aims of the project.
4         Corneliu Dicusar, Petru Rebeja


4        SPARQL Support

     ─ METAmorphoses does not have a support for SPARQL.
     ─ Jena uses ARQ8, a query engine that supports SPAQRL. ARQ offers support
       for standard SPARQL, and some extensions like SPARQL algebra, also other
       features such as:
                o Free text search via Lucene9
                o SPARQL/Update
                o Support for custom filter functions
                o Property functions for custom processing of semantic relationships
                o Aggregation, GROUP BY and assignment as SPARQL extensions
                o Support for federated query
                o Support for extension to other storage systems
     ─ JRDF offers even a separate GUI that makes handling the SPARQL queries
       easier, the results being displayed in a tabular form. It also contains the package
       org.jrdf.sparql that implements it. And implements the interface
       SPARQLConnection - that offers a connection through which to send the query,
       and extends the class: DefaulSPARQLConnection and SPARQLQueryBuilder,
       which builds queries from string format into Query objects.


5        Support for developers

5.1      Documentation

     ─ METAmorphoses has a small description on the official site, and also some
       examples can be found in the documentation manual. Though the example is
       analyzed in an intuitive manner, and working with the tool is like using a simple
       Java Library, it doesn’t provide enough information for building complex
       applications right away.
     ─ Jena is documented well enough. Detailed information can be found on the site.
       Also they offer support, and if a question appears, one can address it to the
       development team.
     ─ JRDF is also well documented and structured into a tree-like hierarchy
       containing all included packages. A very useful thing for a developer who wants
       to use this tool

5.2      Integration

All of these tools can be used as Java libraries in a common way. In addition, JRDF
offers a simple GUI.


8
    http://jena.sourceforge.net/ARQ/
9   http://lucene.apache.org/
RDF processing tools in Java   5


5.3       Learning curve

The learning curve of these tools is common with the learning of other Java Libraries.
Naturally JRDF and Jena, being much more complex, take more time to get used to.
But once classes and functions are learned, you encounter little problems, also due to
the excellent documentation. If you don’t want to use the JRDF API, you could just
instead use JRDF GUI that shortens the time you need to spend, before using the tool.
Unfortunately, until now, no discussion forums were found for these tools using a
Web search.

5.4       Copyright terms

     ─ METAmorphoses is being developed under the Lesser GPL licence10.
     ─ Jena is under the licence of Hewlett-Packard Development Company
     ─ JRDF is under BSD-Licence11


6         Conclusions

Semantic Web is becoming more and more of a reality, and no technology that is
oriented on building software for the Web (with or without a capital w), can afford
ignoring this fact. RDF is a key concept in Semantic Web so it’s only natural that
tools for RDF processing are developed. Java, being one of the most popular
programming languages nowadays, definitely needs such tools. With the need comes
expectance, with expectance comes evolution. The three tools illustrated in this paper
are the most promising (from the author’s point of view) ones in becoming
indispensable libraries for building applications for Semantic Web.


7         References

1. http://www.w3.org/RDF/
2. METAmorphoses v0.2.1: mapping and template language documentation,
   http://metamorphoses.sourceforge.net/metamorphoses-v0.2.1_doc.pdf




10
     http://www.gnu.org/licenses/lgpl.html
11   http://www.opensource.org/licenses/bsd-license.php

Weitere ähnliche Inhalte

Was ist angesagt?

NISO/DCMI Webinar: International Bibliographic Standards, Linked Data, and th...
NISO/DCMI Webinar: International Bibliographic Standards, Linked Data, and th...NISO/DCMI Webinar: International Bibliographic Standards, Linked Data, and th...
NISO/DCMI Webinar: International Bibliographic Standards, Linked Data, and th...
National Information Standards Organization (NISO)
 
Publishing Linked Data 3/5 Semtech2011
Publishing Linked Data 3/5 Semtech2011Publishing Linked Data 3/5 Semtech2011
Publishing Linked Data 3/5 Semtech2011
Juan Sequeda
 
Spark SQL Tutorial | Spark SQL Using Scala | Apache Spark Tutorial For Beginn...
Spark SQL Tutorial | Spark SQL Using Scala | Apache Spark Tutorial For Beginn...Spark SQL Tutorial | Spark SQL Using Scala | Apache Spark Tutorial For Beginn...
Spark SQL Tutorial | Spark SQL Using Scala | Apache Spark Tutorial For Beginn...
Simplilearn
 
Semantic Technologies and Triplestores for Business Intelligence
Semantic Technologies and Triplestores for Business IntelligenceSemantic Technologies and Triplestores for Business Intelligence
Semantic Technologies and Triplestores for Business Intelligence
Marin Dimitrov
 

Was ist angesagt? (20)

semanticweb
semanticwebsemanticweb
semanticweb
 
morph-LDP: An R2RML-based Linked Data Platform implementation
morph-LDP: An R2RML-based Linked Data Platform implementationmorph-LDP: An R2RML-based Linked Data Platform implementation
morph-LDP: An R2RML-based Linked Data Platform implementation
 
Glossary of Metadata standards
Glossary of Metadata standardsGlossary of Metadata standards
Glossary of Metadata standards
 
NISO/DCMI Webinar: International Bibliographic Standards, Linked Data, and th...
NISO/DCMI Webinar: International Bibliographic Standards, Linked Data, and th...NISO/DCMI Webinar: International Bibliographic Standards, Linked Data, and th...
NISO/DCMI Webinar: International Bibliographic Standards, Linked Data, and th...
 
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."
 
Frances McNamara - Kuali OLE Implementation at University of Chicago
Frances McNamara - Kuali OLE Implementation at University of ChicagoFrances McNamara - Kuali OLE Implementation at University of Chicago
Frances McNamara - Kuali OLE Implementation at University of Chicago
 
Building Linked Data Applications
Building Linked Data ApplicationsBuilding Linked Data Applications
Building Linked Data Applications
 
Fedora Migration Considerations
Fedora Migration ConsiderationsFedora Migration Considerations
Fedora Migration Considerations
 
RDF for PubMedCentral
RDF for PubMedCentral RDF for PubMedCentral
RDF for PubMedCentral
 
Flexible metadata schemes for research data repositories - Clarin Conference...
Flexible metadata schemes for research data repositories  - Clarin Conference...Flexible metadata schemes for research data repositories  - Clarin Conference...
Flexible metadata schemes for research data repositories - Clarin Conference...
 
Publishing Linked Data 3/5 Semtech2011
Publishing Linked Data 3/5 Semtech2011Publishing Linked Data 3/5 Semtech2011
Publishing Linked Data 3/5 Semtech2011
 
Handout for Applying Digital Library Metadata Standards
Handout for Applying Digital Library Metadata StandardsHandout for Applying Digital Library Metadata Standards
Handout for Applying Digital Library Metadata Standards
 
Spark SQL Tutorial | Spark SQL Using Scala | Apache Spark Tutorial For Beginn...
Spark SQL Tutorial | Spark SQL Using Scala | Apache Spark Tutorial For Beginn...Spark SQL Tutorial | Spark SQL Using Scala | Apache Spark Tutorial For Beginn...
Spark SQL Tutorial | Spark SQL Using Scala | Apache Spark Tutorial For Beginn...
 
20131112 Introduction to LaTeX for EndNote Users.docx
20131112 Introduction to LaTeX for EndNote Users.docx20131112 Introduction to LaTeX for EndNote Users.docx
20131112 Introduction to LaTeX for EndNote Users.docx
 
master_thesis_greciano_v2
master_thesis_greciano_v2master_thesis_greciano_v2
master_thesis_greciano_v2
 
Semantic Technologies and Triplestores for Business Intelligence
Semantic Technologies and Triplestores for Business IntelligenceSemantic Technologies and Triplestores for Business Intelligence
Semantic Technologies and Triplestores for Business Intelligence
 
Semantic Web use cases in outcomes research
Semantic Web use cases in outcomes researchSemantic Web use cases in outcomes research
Semantic Web use cases in outcomes research
 
HarishPoojaryCV
HarishPoojaryCVHarishPoojaryCV
HarishPoojaryCV
 
Virtuoso Sponger - RDFizer Middleware for creating RDF from non RDF Data Sources
Virtuoso Sponger - RDFizer Middleware for creating RDF from non RDF Data SourcesVirtuoso Sponger - RDFizer Middleware for creating RDF from non RDF Data Sources
Virtuoso Sponger - RDFizer Middleware for creating RDF from non RDF Data Sources
 
Ontology-based multi-domain metadata for research data management using tripl...
Ontology-based multi-domain metadata for research data management using tripl...Ontology-based multi-domain metadata for research data management using tripl...
Ontology-based multi-domain metadata for research data management using tripl...
 

Ähnlich wie Rdf Processing Tools In Java

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
Richard.Sapon-White
 
Rdf Processing On The Java Platform
Rdf Processing On The Java PlatformRdf Processing On The Java Platform
Rdf Processing On The Java Platform
guestc1b16406
 
Services semantic technology_terminology
Services semantic technology_terminologyServices semantic technology_terminology
Services semantic technology_terminology
Tenforce
 
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
webhostingguy
 

Ähnlich wie Rdf Processing Tools In Java (20)

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
 
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
 
Web Spa
Web SpaWeb Spa
Web Spa
 
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
 
Rdf Processing On The Java Platform
Rdf Processing On The Java PlatformRdf Processing On The Java Platform
Rdf Processing On The Java Platform
 
RDF APIs for .NET Framework
RDF APIs for .NET FrameworkRDF APIs for .NET Framework
RDF APIs for .NET Framework
 
Big_data_analytics_NoSql_Module-4_Session
Big_data_analytics_NoSql_Module-4_SessionBig_data_analytics_NoSql_Module-4_Session
Big_data_analytics_NoSql_Module-4_Session
 
Services semantic technology_terminology
Services semantic technology_terminologyServices semantic technology_terminology
Services semantic technology_terminology
 
State of the Semantic Web
State of the Semantic WebState of the Semantic Web
State of the Semantic Web
 
Data FAIRport Skunkworks: Common Repository Access Via Meta-Metadata Descript...
Data FAIRport Skunkworks: Common Repository Access Via Meta-Metadata Descript...Data FAIRport Skunkworks: Common Repository Access Via Meta-Metadata Descript...
Data FAIRport Skunkworks: Common Repository Access Via Meta-Metadata Descript...
 
eureka09
eureka09eureka09
eureka09
 
eureka09
eureka09eureka09
eureka09
 
dotNetRDF - A Semantic Web/RDF Library for .Net Developers
dotNetRDF - A Semantic Web/RDF Library for .Net DevelopersdotNetRDF - A Semantic Web/RDF Library for .Net Developers
dotNetRDF - A Semantic Web/RDF Library for .Net Developers
 
Bio2RDF presentation at Combine 2012
Bio2RDF presentation at Combine 2012Bio2RDF presentation at Combine 2012
Bio2RDF presentation at Combine 2012
 
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
 
Eclipse RDF4J - Working with RDF in Java
Eclipse RDF4J - Working with RDF in JavaEclipse RDF4J - Working with RDF in Java
Eclipse RDF4J - Working with RDF in Java
 
RDBMS vs Hadoop vs Spark
RDBMS vs Hadoop vs SparkRDBMS vs Hadoop vs Spark
RDBMS vs Hadoop vs Spark
 
Data FAIRport Prototype & Demo - Presentation to Elsevier, Jul 10, 2015
Data FAIRport Prototype & Demo - Presentation to Elsevier, Jul 10, 2015Data FAIRport Prototype & Demo - Presentation to Elsevier, Jul 10, 2015
Data FAIRport Prototype & Demo - Presentation to Elsevier, Jul 10, 2015
 
Producing, publishing and consuming linked data - CSHALS 2013
Producing, publishing and consuming linked data - CSHALS 2013Producing, publishing and consuming linked data - CSHALS 2013
Producing, publishing and consuming linked data - CSHALS 2013
 
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
 

Kürzlich hochgeladen

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Kürzlich hochgeladen (20)

Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 

Rdf Processing Tools In Java

  • 1. RDF processing tools in Java Corneliu Dicusar, Petru Rebeja Web Application Development papers, Faculty of Computer Science, Iasi, Romania {corneliu.dicusar, petru.rebeja}@info.uaic.ro Abstract. This paper presents a comparison of several tools for RDF processing in Java taking in account the following aspects: storage, SPARQL support, support for developers and copyright. Keywords: RDF, Java, RDFSchema, SPARQL, METAMorphoses, Jena, JRDF 1 Introduction RDF1 became a key concept in knowledge interchange on the Web [1] nowadays and one of the briks on which Semantic Web2 will be build. It allows software tools to link data with their semantics rather than just acknowledge their existence without further knowledge of means of data interpretation. Thus, RDF pushes the immense collection of data stored today on the Web to a new, higher level towards Semantic Web. Still, RDF in essence isn’t but just a framework for metadata. In order to use this framework, developers need tools to do so. This paper presents a short comparison of RDF processing tools in Java. The comparison will be made on how RDF triples are stored, whether the specified tool provides SPARQL3 support, how well it is documented for developers and it’s copyright. Each of these aspects will be presented in a separated section of this document, all these sections being preceded by a section containing a short description of each tool. In order to comprise the notions of this document, the reader must be accustomed to the following notions: ─ RDF ─ RDFS(chema) ─ SPARQL ─ Java 1 http://www.w3.org/RDF/ 2 http://www.w3.org/2001/sw/ 3 http://www.w3.org/TR/rdf-sparql-query/
  • 2. 2 Corneliu Dicusar, Petru Rebeja 2 Java tools for RDF processing Although there are a lot more tools for RDF processing in Java, this paper presents only the three most popular of them. These are: ─ METAMorphoses4 developed by Martin Švihla5. It is a tool designed for transforming data from a relational database into RDF documents, according to mapping. It uses schema mappings and template documents written in XML languages. It can be used as a common Java Library. This is not an actual RDF handling tool, but we have chosen it, as an example of a very useful idea. ─ Jena6, from Hewlett-Packard, is a framework designed for building Semantic Web applications. It offers the tools to handle RDF, RDFS, OWL, SPARQL, and more, including a build in inference engine. ─ JRDF7, developed by Andrew Newman, a library that gives a simple user interface following RDF standard for creation and management for RDF graphs. 3 Storing the triples ─ METAmorphoses transforms data stored in a relation database into RDF triples, so it is natural that these triples appear in XML format. It takes the schema of the database, and adapts it to an existing ontology. A great example is given by the authors [2]. Having a simple database schema: PERSON(#id, id_department,username, first_name, family_name) PROJECT(#id, web) PERSON_PROJECT(person_id, project_id) DEPARTMENT(#id, name) And given the corresponding ontology: <rdfs:Classrdf:ID="Person"> <rdfs:label>Person</rdfs:label> </rdfs:Class> <rdf:Propertyrdf:ID="surname"> <rdfs:rangerdf:resource="http://www.w3.org/2001/XMLSche ma# string"/> <rdfs:domainrdf:resource="#Person"/> </rdf:Property> <rdf:Propertyrdf:ID="hasDepartment"> 4 http://metamorphoses.sourceforge.net/ 5 http://www.svihla.net/ 6 http://jena.sourceforge.net/ 7 http://jrdf.sourceforge.net/
  • 3. RDF processing tools in Java 3 <rdfs:rangerdf:resource="http://www.w3.org/2001/XMLSche ma# string"/> <rdfs:domainrdf:resource="#Person"/> </rdf:Property> <rdf:Propertyrdf:ID="currentProject"> <rdfs:rangerdf:resource="#Project"/> <rdfs:domainrdf:resource="#Person"/> </rdf:Property> <rdfs:Classrdf:ID="Project"> <rdfs:label>Project</rdfs:label> </rdfs:Class> <rdf:Propertyrdf:ID="participants"> <rdfs:domainrdf:resource="#Project"/> <rdfs:rangerdf:resource="#Person"/> </rdf:Property> <rdf:Propertyrdf:ID="homepage"> <rdfs:rangerdf:resource="http://www.w3.org/2001/XMLSche ma# string"/> </rdf:Property> A corresponding example of mapping would be: <Class > <ClasstemplateName="person"rdfLabel="Person" sql="SELECT* FROM person p, department d WHERE d.id = p.id_department"> <PropertytemplateName="surname"rdfLabel="surname" sqlName ="family_name"/> </Class> ─ Jena, creates RDF models, the simplest way is by creating a default one: ModelFactory.createDefaultModel(), and these models are stored in the memory ─ JRDF stores these triples in a manner similar to Hibernate, as Java Object Api. Being able to talk directly to a triple store in a common manner with the ability to swap differing implementations is one of the key aims of the project.
  • 4. 4 Corneliu Dicusar, Petru Rebeja 4 SPARQL Support ─ METAmorphoses does not have a support for SPARQL. ─ Jena uses ARQ8, a query engine that supports SPAQRL. ARQ offers support for standard SPARQL, and some extensions like SPARQL algebra, also other features such as: o Free text search via Lucene9 o SPARQL/Update o Support for custom filter functions o Property functions for custom processing of semantic relationships o Aggregation, GROUP BY and assignment as SPARQL extensions o Support for federated query o Support for extension to other storage systems ─ JRDF offers even a separate GUI that makes handling the SPARQL queries easier, the results being displayed in a tabular form. It also contains the package org.jrdf.sparql that implements it. And implements the interface SPARQLConnection - that offers a connection through which to send the query, and extends the class: DefaulSPARQLConnection and SPARQLQueryBuilder, which builds queries from string format into Query objects. 5 Support for developers 5.1 Documentation ─ METAmorphoses has a small description on the official site, and also some examples can be found in the documentation manual. Though the example is analyzed in an intuitive manner, and working with the tool is like using a simple Java Library, it doesn’t provide enough information for building complex applications right away. ─ Jena is documented well enough. Detailed information can be found on the site. Also they offer support, and if a question appears, one can address it to the development team. ─ JRDF is also well documented and structured into a tree-like hierarchy containing all included packages. A very useful thing for a developer who wants to use this tool 5.2 Integration All of these tools can be used as Java libraries in a common way. In addition, JRDF offers a simple GUI. 8 http://jena.sourceforge.net/ARQ/ 9 http://lucene.apache.org/
  • 5. RDF processing tools in Java 5 5.3 Learning curve The learning curve of these tools is common with the learning of other Java Libraries. Naturally JRDF and Jena, being much more complex, take more time to get used to. But once classes and functions are learned, you encounter little problems, also due to the excellent documentation. If you don’t want to use the JRDF API, you could just instead use JRDF GUI that shortens the time you need to spend, before using the tool. Unfortunately, until now, no discussion forums were found for these tools using a Web search. 5.4 Copyright terms ─ METAmorphoses is being developed under the Lesser GPL licence10. ─ Jena is under the licence of Hewlett-Packard Development Company ─ JRDF is under BSD-Licence11 6 Conclusions Semantic Web is becoming more and more of a reality, and no technology that is oriented on building software for the Web (with or without a capital w), can afford ignoring this fact. RDF is a key concept in Semantic Web so it’s only natural that tools for RDF processing are developed. Java, being one of the most popular programming languages nowadays, definitely needs such tools. With the need comes expectance, with expectance comes evolution. The three tools illustrated in this paper are the most promising (from the author’s point of view) ones in becoming indispensable libraries for building applications for Semantic Web. 7 References 1. http://www.w3.org/RDF/ 2. METAmorphoses v0.2.1: mapping and template language documentation, http://metamorphoses.sourceforge.net/metamorphoses-v0.2.1_doc.pdf 10 http://www.gnu.org/licenses/lgpl.html 11 http://www.opensource.org/licenses/bsd-license.php