Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
ttrapp
Active Contributor
0 Kudos
1,069

In the last instalment of my blog I introduced a Linked Data prototype application that exposes data of an SAP application as REST web service in semantic web standards so that it can be browsed with linked Data Browsers. My attempt was to link online documentation of an ABAP application server to external, official documentation. This kind of links can help SAP users to navigate through the jungle of different documentation types.

The most important aspect of this is that those links used for navigation are “typed” so that express a certain “meaning”. This can be a label that makes the property human readable. They can say that this is a link to normative and or perhaps non-normative documentation and much more.

Adding additional information, sometimes called semantics, is possible because the most important cornerstone are vocabularies defined by ontologies. Using them you can link two web resources using qualified links, called properties. These are far more than HTML hyperlinks that provide no further information about the kind of link. And last but not least: these metadata are readable by machines which can lead to much more sophisticated retrieval processes.

The Interplay of Linked Data and Ontologies

If do you want to know how my prototype works you should have a look at the RDF data that is visualized using the Linked Data browser. I’m an XML guy so I hope you don’t mind the XML syntax. In fact there is a different syntax (N3, Turtle...) and it's easy to switch from one format to another. Neverthelesse you should have at least basic knowledge about ontologies to understand the technical details of this weblog instalment.

In fact I used the DOAP Ontology that allows to express facts about the ECH project in NetWeaver Release 7.01. So please the XML elements doap:Project and doap:Version :

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns="http://xmlns.com/foaf/0.1/"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:doap="http://usefulinc.com/ns/doap#"
  xmlns:abap="http://http://nsp:8920/zdocu/ontology#"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
  xmlns:tab="http://www.w3.org/2007/ont/link#">

  <doap:Project rdf:about="#ECH">
    <doap:description>You use this component to control the system response in
      the case of errors and conflicts in Service Operations. You can define wether
      Service Operations are executed again after errors and conflicts or
      terminated.</doap:description>
    <doap:homepage
      rdf:resource="http://wiki.sdn.sap.com/wiki/display/ABAPConn/
Error+and+Conflict+Handler+%28ECH%29"/>
    <doap:name>Error and Conflict Handler</doap:name>
    <doap:programming-language>ABAP</doap:programming-language>
    <doap:release rdf:resource="#NW7.01"/>
    <doap:shortdesc>Error and Conflict Handler</doap:shortdesc>
  </doap:Project>

  <doap:Version rdf:about="#NW7.01">
    <webpage
      rdf:resource="http://help.sap.com/saphelp_crm70/helpdata/en
/99/39092d836a4145b185cf574046c18a/frameset.htm"/>
    <abap:containsReportDocu
      rdf:resource="http://nsp:8920/zdocu/report/ECH_R_CUSTOMISING_HDS" />
    <abap: containsReportDocu
      rdf:resource="http://nsp:8920/zdocu/report/ECH_R_CUSTOMISING_HDS_COMP" />
    <abap:containsReportDocu
      rdf:resource="http://nsp:8920/zdocu/report/ECH_R_CUSTOMISING_HDS_COMP_SYS" />
    <abap:containsReportDocu
      rdf:resource="http://nsp:8920/zdocu/report/ECH_R_CUSTOMISING_HDS_SYS" />
  </doap:Version>
</rdf:RDF>

So I used a common vocabulary for describing software projects. You can think of those ontologies as basis or foundational ontologies of the Semantic Web. But how does the Linked Data browser knows that vocabulary? This is easy: the app followed an URL. In fact I linked to an ontology that is defined using an XML-namespace xmlns:doap="http://usefulinc.com/ns/doap#" and can be found at http://usefulinc.com/ns/doap# .

In the Linked Data approach I’m not only linking a resource to other resources – these links are qualified using an ontology. I used webpage and doap:homepage elements to link to external resources. And with abap:report elements I wanted to link to internal documentation of ABAP reports. Therefore I used a property that is used in another ontology:

  xmlns:abap=”http://nsp:8920/zdocu/ontology#

In my prototype this ontology is exposed using a REST web service within AS ABAP in the following URL path http://nsp:8920/zdocu/ontology . In this ontology I defined property #containsReportDocu that realizes a link to an ABAP internal link documentation:

<rdf:RDF 
  xmlns="http://www.w3.org/2000/01/rdf-schema#"   
  xmlns:owl="http://www.w3.org/2002/07/owl#" 
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <owl:Ontology rdf:about="">
    <description xmlns="http://purl.org/dc/elements/1.1/">
    Ontology for SAP data</description>
    <title xmlns="http://purl.org/dc/elements/1.1/">
    Ontology for Linked Data</title>
  </owl:Ontology>
  <rdf:Property rdf:about="#containsReportDocu">
    <comment>SE38 report</comment>
    <isDefinedBy rdf:resource=""/>
    <label>examples and test data</label>
  </rdf:Property>
</rdf:RDF>

Of course the ontology can be visualized by a double click in a linked data browser:

In my opinion this AJAX-frontend is very useful and well-thought. The green light says that the described item can be resolved (which is trivial because it is part of the ontology). But in a linked data approach there are lots of references to resources in the internet and the link may be broken perhaps due to connection difficulties. In this case a red light would appear. If you click on the arrow symbol the linked object will be loaded in displayed in place. So a linked browser can display those information – perhaps even complex ontologies – in a way people can understand them more easily.

From RDF/XML to Microformats

In my opinion this display possibility is great for the display of complex artefacts like  ontologies. But in other cases the strict separation between RDF/XML is cumbersome because you always have to provide multiple representations of the same resource. Therefore the W3C recommendation RDFa makes it possible to integrate RDF metadata into existing XHTML data and even into the intrinsic XHTML hyperlinks.

As a result you achieve metadata that is both readable and contains semantic metadata. This is exactly the same idea like Adobes XMP format that allows to insert metadata like geolocations, date, time and much more into existing binary-pictures.

In fact there exist more sophisticated Linked Data browsers like the Open Link Data Explorer Extension that has perspectives that show those metadata of an existing web page. Those browser sometimes use external services like http://www.uriburner.com/ to extract the semantic knowledge. At the moment I’m experimenting with my Linked Data prototype and those browsers.

Summary

In this weblog instalment I explained the following:

  • Linked Data means emphasize to context of an infomation.
  • Linking Data is more than just exposing knowledge as RDF – you have the possibility to link RDF vocabulary to ontologies.
  • Ontologies are available on the internet so they can read on thy fly. This is a different use case compared to RDF and OWL datasets I used as data silos
  • The RDF vocabulary can be easily extended by defining other own ontologies.
  • One use case of ontologies is the definition of labels that are additional information that make Linked Data human readable.
  • RDF and Ontologies are hard to understand. Fortunately there are powerful JavaScript libraries and browser add ons that make them easier to understand.
  • With Microformats like RDFa you can embed RDF into existing XHTML documents.
3 Comments