Semantic Web Solutions

Size: px
Start display at page:

Download "Semantic Web Solutions"

Transcription

1 MSc Thesis January 2007 Semantic Web Solutions By Hafiz Hammad Rubbani Supervisors Henning Niss Thomas Hildebrandt

2 ABSTRACT.5 AIM AND GOALS... 6 SCOPE.6 METHODOLOGY... 7 WHO SHOULD READ THIS DOCUMENT... 7 THESIS OUTLINE... 7 TAGS.8 SECTION 1 INTRODUCTION TO SEMANTIC WEB ONTOLOGY PROCESS SEMANTIC WEB TECHNOLOGIES STACK RDF Statements RDF/XML (RDF) Data Types COMMON VOCABULARY BY DUBLIN CORE (DC) RDF SCHEMA (RDFS) Defining a Class, Property and instance RDFS DEFICIENCIES DAML+OIL WEB ONTOLOGY LANGUAGE (OWL) OWL Lite OWL DL (OWL Description Logic) OWL Full Defining a Class Defining a Property Defining an instance SECTION 2 SEMANTIC WEB QUERY LANGUAGE SPARQL SYNTAX OF SPARQL TRIPLE AND GRAPH PATTERN SORTING STRING MATCHING UNION AND OPTIONAL ACCESSING DATA FROM MULTIPLE DATA SOURCES USING CLASSES IN QUERIES FINDING RELATIONS ASK DESCRIBE CONSTRUCT SPARQL QUERY RESULTS XML FORMAT SPARQL PROTOCOL Page 1 of 100

3 SECTION 3 INFERENCE, DATA PUBLISHING & DATA TRANSFORMATION SPARQL AND INFERENCE Inference Using CONSTRUCT Inference using Rule Engine/Reasoner DATA PUBLISHING SPARQL-SQL Mapping RDB-RDF Mapping SECTION 4 CASE STUDY FUNCTIONAL REQUIREMENTS PROPOSED SEMANTIC WEB SYSTEM SYSTEM ARCHITECTURE Client Tier Business Tier Semantic Tier JENA JENA APIs JENA ARQ and Query APIs JENA Inference Engine/ Reasoner Kazuki Data Tier In Memory Model File Model: Database Model Data Publishing on Web TECHNICAL DESIGN Ontology Design Choosing a Model Type Choosing a Reasoner Generating Kazuki Classes Business Components NewsModel NewsBO QueryBO IMPLEMENTATION NewsModel NewsBO QueryBO TESTING SECTION 5 EVALUATION, RECOMMENDATION, WORKING EXPERIENCE RDF/RDFS/ OWL LANGUAGE RDF OWL SPARQL AND INFERENCE TAGGING AND USING RELATIONS WORKING EXPERIENCE OF FRAMEWORKS / EDITORS Jena/ Kazuki Protégé Editor 3.2 beta TopBraid CONCLUSION.63 Page 2 of 100

4 REFERENCES.64 APPENDIX A RSS AND FOAF RSS (REALLY SIMPLE SYNDICATION) DIFFERENT VERSION RSS VERSION RSS FOAF (FRIEND OF A FRIEND) APPENDIX B README APPENDIX C CODE News.owl NewsModel.java SWBase.java QueryBO.java NewsBO.java Constants.java Queries.java Rules.java Page 3 of 100

5 ACKNOWLEDGMENT This MSc thesis was performed at IT University of Copenhagen, Denmark, during the period from 1st May 2005 to 2 nd January The work has been performed by Hafiz Hammad Rubbani and he is the final part of the education that leads to a Master of Science degree in Internet and Software Technology. I would like to thanks Henning Niss and Thomas Hildebrandt, my supervisors at IT University of Copenhagen, Denmark for all their support and guidance during this thesis. Specially thanks for their cooperation and patience because I was in Dublin and they were in Copenhagen and due to so remoteness it was not easy task for them to communicate and provide supervision that was mostly on . I also want to thanks my friends Asad and Rizwan who helped me in submitting this thesis. They performed all print and bind related stuff for me. Hafiz Hammad Rubbani Student of MSc-INT Page 4 of 100

6 Abstract As time is passing, more and more data is available on web and it is becoming more difficult to extract the required data. Keyword search is being used that returns the results based on text of the data but not based on semantics of data. The main reason is all the data on web is organized in such a way that it is understandable for human but not for computers. Semantic web provides a solution for this problem by suggesting the data management with help of meaningful relations and tagging. This thesis provides a good understanding of technologies related to semantic web by giving practical examples and comes up with a proposed solution for a real world problem. In the start it discusses core semantic web technologies like RDF, RDFS, OWL, SPARQL and inferences with examples. Then it identifies a case study, proposes functional requirements for this, describes architectural and technical design including ontology development process for the proposed solution. In the end of case study it gives some implementation details of the prototype. In last it does some evaluation of these technologies and comes up with a conclusion. Page 5 of 100

7 Aim and Goals The aim of this thesis is to explore semantic web technologies, its query language and inference capabilities and implement a semantic web solution for a realistic case study. I formulated the problem as What are semantic web and its core technologies? What is its query language and inference capability? How old data can be make compatible with these languages. How these technologies can be used to build a solution. After sub dividing problem definition the main goals are. To understand semantic web concept and core technologies like RDF, RDFS, OWL, DAML+OIL, Dublin To understand how these technologies can be used for ontology development and data management. To analyze the semantic web query language and see how its can be used for data retrieval. To examine SPARQL inference capability and see what other options are available. To see how see how data, managed by semantics technologies, can be publish on web or share with others. To analyze how existing data can be transferred to semantic data or made compatible with semantic technologies To identify a practical case study like news domain. To use all previously described semantic web technologies in the case study. To use different tools for building a semantic web solution. To make an evaluation based on readings, practical experience and other findings. Achieving all these goals and write a thesis that could help a reader for starting work on semantic web solution would be considered a success for this thesis. Scope This thesis gives a good understanding of semantic web technologies, its query language and inference capability. It also discusses how semantics technologies help in data publishing and sharing. But it only discusses the technologies that are proposed or recommended by the main international standard organization World Wide Web Consortium (W3C). It does not discuss the technologies that are in research status or development status in different academia. For a case study it discusses and uses some open source tools. Although it uses some programming languages like Java, J2ee etc but it does not discuss them at all. Page 6 of 100

8 Methodology The first stage of the thesis was involved exploratory readings of papers, articles and books about semantic web technologies, learns the concepts and to see how these can be used for knowledge management or ontology development process. The main technologies learnt and used are RDF, RDFS, OWL and SPARQL. During this, I also investigated the appropriate tools that supports these technologies and used them in explaining technologies and their examples specially for testing SPARQL queries and inference rules. In the mean while I also investigated how existing data can be transferred to semantic data by reading papers from different academia. Then I identified a case study that is news domain as a problem and made requirements. After this, I started to design a semantic web solution for these requirements. Different papers also studied to see how such solution can be designed. Finally proposed a solution and documented as system architecture, technical design and implementations parts of the case study. During this, architecture of some open source projects like JENA is studied from papers and its official site and specially read the APIs documentation and used them in implementation. I have to also read help files of some editors that I used for query testing and ontology design. Some books also studied during whole thesis. Who Should Read This Document This thesis is targeted to the users who are familiar with XML, have good Java programming knowledge and interested in knowledge management by using semantic web technologies. Users, interested in RDF, RDFS, OWL, SPARQL, JENA and wanted to see how these technologies are beneficial, can get great understanding of these technologies by reading explanation and examples given in this thesis. If some one interested to see an implementation of semantic web solution for a case study then it is also very helpful. Thesis Outline Section 1 This section presents what are semantic web and its related technologies. It gives a good introduction to the user about RDF, RDF Schema, DAML/OIL OWL etc. it gives examples to understand the user what these technologies are. Section 2 This section describes how to query a RDF graph with semantic web query language SPARQL. It discusses different features of SPARQL with examples and in the end discusses SPARQL result document and SPARQL protocol. Section 3 It discusses semantic technologies especially SPARQL provide inference capability. It also describes how data can be published in web and how existing data from relational databases can be used with semantic web technologies. Section 4 Page 7 of 100

9 This section identifies a case study and gives functional requirements, system architecture, technical design and some implementation details of its business components Section 5 This section contains evaluation of all technologies like RDF, OWL, and SPARQL etc. It also describes working experience of working with these technologies and different tools. Tags Thesis, about, semantic, web, ITU, RDF, data types, statements, RDFS, OWL, OWL Lite, OWL DL, OWL full, difference, SPARQL, syntax, triple, pattern, graph, sorting, string, matching, JENA, APIs, examples, inference, engine, reasoner, Kazuki, case study, architecture, implementation, practical, example, news, domain, ontology, development, define, class, instance, individual, how to, MSc, final, knowledge, data, management, transfer, mapping, existing, relational, databases, conversion. Page 8 of 100

10 Section 1 Introduction to Semantic WEB This section presents what are semantic web and its related technologies. It gives a good introduction to the user about RDF, RDF Schema, DAML/OIL OWL etc. it gives examples to understand the user what these technologies are. Currently a huge amount of data is present on World Wide Web that is understandable for the humans but not for the computers. Semantic web is a way of defining data or publishing data on internet in such a way that computers could also understand it and process it in a meaningful manner. The exact definition according to inventor of this concept, Berners-Lee, is The Semantic Web is an extension of the current Web in which information is given well-defined meaning, better enabling computers and people to work in cooperation. [1] A computer can search a text string from a web page by parsing it but can not tell the semantic of the web page. For example, if it is a web page from some news site then it can not tell whether it is some news or something else. Can not tell what type of news is this one. Who are involved in it? How this data (news) is related to some other data (previous news). So, Semantic Web answers to these types of questions by giving semantic to this data with help of metadata (data about data) and making relation between the data. In this way it helps machines or programming agents to process the data and make some inference from the metadata and the relation between them. Here first I will present the main concepts around Semantic Web and then will discuss these concepts with technological point of view. 1.1 Ontology Process An ontology process is the back bone of Semantic Web idea. So it s important to understand what ontology is and how to develop it. Ontology process in Semantic Web is a process of classifying data by making classes and properties. Classes represent concepts in a domain while properties represent relations between these concepts or attributes of classes. So this process develops a data model containing a vocabulary of concepts (classes) and relations (properties). Concepts help to understand the domain and the classification of data while properties help to find relation between different parts of data. The properties that are defined as attributes are used during creation of instances of the classes. Ontology may also contain some extra information about properties, restriction on these property values and some rules etc [2] [3]. When we create instances of classes they also become part of the ontology graph. For example if we have to develop an ontology for a news broadcaster which maintains news according to different categories and areas then different categories like Politics, Sports, Business, Entertainment, Technology could be different classes or concepts of this domain. Different areas like Europe, Asia, Denmark, and Copenhagen can also be concepts while relationship can either be infer from hierarchy of concepts. E.g. news about football will automatically be about sports. This is example of making relationship with hierarchy. Later on we will see how to use properties as relations. Page 9 of 100

11 Figure: Basic News Ontology Ontology is useful in storing or publishing data in an organizational way and help to make searches with help of relations. So searches can also be more specific or more generalize according to user requirements. This type of organization of data with defined relations helps computers to understand the data. 1.2 Semantic Web Technologies Stack This is a stack of technologies helps in an ontology process. In the bottom we have more basic or core technologies like XML and XML schema. As we go up in this layer stack it has more powerful and more expressive language and each layer is built on top of the underlying layer and using concepts from it. [4] Figure: Semantic Web Technology Stack Layer W3C is the organization who is supporting concepts of Semantic Web and responsible for developing these standards about it (except DAML+OIL). Some useful links are in references [4]. Here we discuss the core part of semantic web technologies that start from RDF. Page 10 of 100

12 1.3 RDF Resource Description Framework (RDF) is a language, controlled by W3C, to give meanings to data of any domain and to make it easy for machines to process data and understand data. RDF store data as statements. The main parts of a statement are resource, properties, properties values and statement. In fact every thing could be a resource. Generally XML based syntax is used to define a RDF. Resource: In theory a resource could be any thing with URI but here for simplicity we assume resource as an electronic file exist on web and accessible on web via URL Uniform Resource Locator. An example of such a resource could be a web page like or Properties: Properties define a relation ship for a resource. Like a property reportedby or matchdate of a resource are defining its relationship with others. These properties itself could be a resource like The idea of representing properties as resources is to develop a common vocabulary and naming scheme for relations that are similar to different domains. It makes easy for machines to process the data with help of their common metadata. E.g. if all news sites use the same property reportedby from a common vocabulary to show the reporter of news then it will be very easy for a machine to understand this term from different sites. Properties Values: Properties values are the values of the properties like in above example value of property reportedby will be a name e.g. David. The property values either could be a string literal or a web resource having a URI like Statements In RDF we make statements for organizing data and making relations. A resource, its properties and property values (object-attribute-value triplet) form a statement. E.g. we have a news about a football match from a reporter David so for this one statement could be The football match reported by David can be interpret as a RDF triplet ( football_match reportedby David ) A statement contains a subject, predicate and object and all three could be resources like we wee in above case. A statement can also be represented by a graph like we can show the above statement as graph like. Figure: RDF Statement Example by Graph A more standard way to represent a RDF is xml that called RDF/XML that is basically for machine to understand a resource with its attributes. Page 11 of 100

13 Two technologies RSS and FOAF are using RDF. Appendix A has detailed description about RSS and FOAF and how they are using RDF. 1.4 RDF/XML (RDF) Here is an example describing employees as resources with their attributes. Figure: RDF/XML example In above example the first line is xml declaration. Then a root element <rdf:rdf> which is by default root element of a RDF document and tells that this xml document is a DRF. <Xmlns:rdf> namespace is required to access different elements of rdf language. <rdf:description rdf:about= element is used to define a resource in a RDF document. So there are three resources in this particular rdf document. The description element may have other elements that are properties of the resource. Properties and their values of a resource can also be resources as we have seen, so the third resource description element in above figure is an example of a resource where the property and the property value also point to some resources. <rdf:resource> element can also be used for making pointer to other resources Data Types RDF does not have primitive data types like integer, float, date etc rather it has only one primitive data type that is rdf:xmlliteral. Normally it is a character string. Although there is no other way to define new data types in it but XML-Schema data types can be used with it. An example is here in which I am describing a book item as a web resource. Figure: XML schema data type in RDF Here rdf:datatype attribute is telling that data type of prize element is of XMLSchema:float type. Other XMLSchema data types could be integer, datatime etc. RDF also has some container elements to define a group of things. Page 12 of 100

14 Element <rdf:bag> <rdf:seq> <rdf:alt> Description Describe an unordered list of resources Describe an ordered list of resources Describe an alternate list of values from which one can be selected Table: RDF Collection elements An example of using <RDF:Seq> element is here in which I am describing an ordered list of favorite books by using their URIs. Sub element <rdf:li > automatically ordered the elements as 1,2,3. We can also use rdf:_1, rdf:_2, rdf:_3 etc instead. Both are equivalent in this case. Figure: RDF Seq example A full list of RDF elements, properties and attributes can be seen from w3c site [7] [8]. After writing an RDF document it can be validated through W3C online service [19]. It is more like an assembly language of semantic web on which all other languages or extensions like RDFS, OWL are build. In this way XML is machine language for it. 1.5 Common Vocabulary by Dublin Core (DC) Dublin core is a standard vocabulary of predefined properties to describe properties of a resource in RDF. This vocabulary is maintained by Dublin Core Metadata Initiative [15]. For example in order to describe a simple resource on web different people might use different words for describing same property like title, subject, heading etc. so in order to avoid this situation one can use standard DC meta data. Here is an example in which I am defining RDF of an article with help of DC s predefined properties. Here namespace dc tells from where the tags are coming. Full list of DC properties can be seen from resource [15] Page 13 of 100

15 The definitions of predefined properties are Figure: Example for Dublin core Property title description Publisher Date Type Format Language Definition A name given to the resource An account of the content of the resource An entity responsible for making the resource available A date of an event in the lifecycle of the resource The nature or genre of the content of the resource The physical or digital manifestation of the resource A language of the intellectual content of the resource Table: Dublin Core Definitions Taken from [15] It is a small library and does not have a rich set of predefined properties. With RDF it is possible to describe resources with their properties but there is no way to define them as application specific classes or properties so that we could reuse them later on or even extend them 1.6 RDF Schema (RDFS) RDF's vocabulary description language or RDF-Schema or RDFS helps to define application specific classes and properties. It provides concepts of classes, sub classes, properties and sub properties. It also supports domain and range restrictions on properties. Classes in RDFS are loosely resembles to classes in object oriented programming. The main difference is, in OOP language properties are attached with a particular class while in RDFS properties are defined at global level and then they are connected to classes to show that these classes have these properties and so two classes might have same property defined at only one place. RDFS also made it possible to describe resources as instances of classes or subclasses. There is no similarity between functionality of XML Schema and RDF schema. XML Schema or DTD dictates the order and combination of tags present in an XML document Page 14 of 100

16 while RDF Schema only gives the information about interpretation of statements present in RDF data model and provides new features. It does not say any thing about the tags or their order in RDF Defining a Class, Property and instance In RDFS, A class can be defined with <rdfs:class..> element while its properties can be defined <rdfs:property..> element. In following example I am making a class Country and then creating one property domainname for it. <rdfs:domain..> element here set the class for this property while <rdfs:range..> element restricted the type of the property. By mentioning another <rdfs:domain..> It is possible to connect this property with another class like Continent etc. Figure: Defining a class or a property in RDFS An instance of a class like Country can be created in RDFS like this. Figure: Defining an instance A class can be defined as sub class of another class by property <rdfs:subclassof..>. While a property can be defined a sub property of another property by <rdfs:subpropertyof..>. A full list of RDFS classes and property can be seen from resource [17]. 1.7 RDFS Deficiencies Although RDFS is more powerful than RDF but still it has some limitations. [16] It does not talk about cardinality ("exactly one" one or more ), equality (making two classes or properties equal to each other or same e.g. if productid or productnumber are equal) etc. Page 15 of 100

17 Its enumeration is not closed means enumeration of months names can not have more than twelve values and RDFS can only make enumeration having twelve values but it can not restrict it as a closed set. A class could be a union of other classes or intersection of other classes that is a composed of concept that is also not supported in RDFS. E.g a Vehicle class could be union of Car and Truck class while a Car class could be intersection of Four-Wheeled Vehicle and Vehicle With Internal Combustion Engine With RDFS we can not describe disjointedness e.g. we can express that dinosaur is an extinct carnivore but we can not say that it is NOT herbivore or it is not from currently living species. 1.8 DAML+OIL In order to overcome the deficiencies and limitations of RDF/RDFS, two efforts were made separately by USA-government sponsored project DARPA Agent Markup Language (DAML) [18] and Ontology Inference Layer (OIL) [19] funded by European Union. Finally they come up with a combine extension called DAML+OIL [20]. This new language provides not only elements for covering the feature that were not present in RDFS but it also extra elements like inverseof, complementof, maxcardinality, mincardinality, oneof or many more that can be seen from reference page of reference [29]. In general it provides more sophisticated classification and properties of resource than RDFS. Here is a simple example DAML+OIL by using its element disjointwith. Figure: Example of DAML +OIL After name spaces declaration, <daml:ontology..> tells that it is a DAML+OIL ontology. It may have more elements like <versioninfo..> or <imports..>. Then there are Page 16 of 100

18 three class elements. Here we are using <daml:class..> element that provides expressive power than its counterpart in RDFS class element. In third class Dinosaur I am using disjointwith that states that a dinosaur is a Carnivore but NOT Herbivore. The main problem with DAML+OIL is it is not governed by some common independent part so W3C came with its own OWL language built on RDFS. 1.9 Web Ontology Language (OWL) Its top most language on RDF stack and it has all the features present DAML+OIL, RDFS and RDF. It is governed by W3c so it is independent of any political influence too. As a result it provides more machine interpretability than RDF family. It has three flavors. One can use one of them depending upon the flexibility that he requires OWL Lite OWL Lite is the lighter versions of OWL that provides all basic constructs to build ontology. With this it is possible to make classes, sub classes or collections while properties could also be of object type or data type. Restrictions can also be made on properties. Since its simple version so it is easier to make a developer tool for this as compare to other two flavors. Some of the language constructs of OWL Lite can be seen from the following table - Class - rdf:property - rdfs:subclassof - rdfs:subpropertyof - rdfs:domain - rdfs:range -sameclassas - samepropertyas - sameindividualas - differentindividualfrom - cardinality (restricted to 0 or 1) In addition to this, OWL Lite impose all restrictions that OWL DL imposes. Language constructs like owl:oneof, owl:unionof, owl:complementof can not be used in OWL Lite. Also a class can not be use as an instance in OWL Lite that s why during case study I have to create instances for every category class instead of using same class as an instance OWL DL (OWL Description Logic) It is little more complex version of OWL It supports those users who want the maximum expressiveness while retaining computational completeness (all conclusions are guaranteed to be computable) and decidability (all computations will finish in finite time). OWL DL includes all OWL language constructs, but they can be used only under certain restrictions (for example, while a class may be a subclass of many classes, a class cannot be an instance of another class) [9] Following constructs, that we can not use in OWL Lite, can be used in OWL DL and OWL Full. owl:oneof owl:unionof Page 17 of 100

19 owl:complementof owl:hasvalue owl:disjointwith owl:datarange OWL DL also some restrictions like. A class can not be act as individual at the same time. So one must have to create an instance for a class. Some property characteristics like inverseof are only for object type properties not for data type properties. Most of the RDFS vocabulary is not a part off OWL DL OWL Full OWL Full has every feature of OWL and no restrictions of OWL DL. This is for the user who wants full power of OWL or complete OWL language. The cast of this full expressive power is that it does not give any computational guarantee. Therefore no reasoning software supports every feature of OWL Full. An example of freedom in OWL Full is that a class could be a collection of individuals and an individual with its own rights at the same time. [9] According to W3C, the following sets of relationship exist between these sublanguages. Every legal OWL Lite ontology is a legal OWL DL ontology. [9] Every legal OWL DL ontology is a legal OWL Full ontology. [9] Every valid OWL Lite conclusion is a valid OWL DL conclusion. [9] Every valid OWL DL conclusion is a valid OWL Full conclusion [9] The choice of sublanguage depends upon the needs or requirements of a developer. For full expressive power, use OWL Full but it will not give some computational guarantee. For all maximum expressive power with computational guarantee, use OWL DL. If full or maximum expressive power is not required then use OWL Lite. Here I will show you how to define a class, property or an instance with help of OWL. All examples are taken from the news domain case study developed in the end of this case study Defining a Class Defining a class in OWL is very simple. Here is an example in which I am showing a class News. Figure: Defining a class in OWL The important thing to note that there is no property mentioned with class definition because in OWL we define properties at global level and attach with specific classes at Page 18 of 100

20 property definition time as domain of property so we don t need to mention them during definition of classes A little complex example is definition of class City. In this example I am defining it as subclassof LandArea class. The second <rdfs:subclassof> </rdfs:subclassof> is a way of making restrictions on a property of a class at class level. That means this restriction will not apply on global property definition on same property if it attaches with some other class too. Figure: Defining a class in OWL Defining a Property Here is an example of defining a property in OWL. I am defining the same property iscityof that I m using in above example. Figure: Defining a property in OWL First line state that it is an ObjectType property that means it is a relation to some other instance. Then <rdfs:domain../> element mean class City has this property. <owl:inverseof../> mean it is inverse of property hascity. <rdfs:range../> mean its will be an instance of Country class only. E.g. instance Copenhagen has property iscityof with value Denmark then hascity property of Denmark instance may have value Copenhagen with help of some inference engine because both properties are inverseof to each other. Here is another example of definition date property. Page 19 of 100

21 Figure: Defining a property in OWL We already have discussed how to make restrictions on a property at class level. Here I am making restrictions on property date at its definition level by defining it <owl:functionalproperty../> that means each instance will have one value of type date. <rdfs:range../> states that its range is datetime of XMLSchema and <rdf:type../> states that it is a data type property. A DataTypeProperty is more like an attribute of a class that does not make relation with other classes Defining an instance Here is an example of defining an instance (called individual in OWL) of a class. Figure: Defining an instance in OWL It stats that create an instance of class Sports with name Tennis whose type is string from XMLSchema We have discussed all technologies in the stack. Now I will show you if data is present in an Ontology then how we can access a particular data with semantic web query language SPARQL. Page 20 of 100

22 Section 2 Semantic Web Query Language SPARQL This chapter describes how to query a RDF graph with semantic web query language SPARQL. It discusses different features of SPARQL with examples and in the end discusses SPARQL result document and SPARQL protocol. RDF is the main fundamental ingredient of semantic web and SPARQL is a query language from W3C for RDF [10] or a protocol to extract data from a RDF graph. RDF graph consists of triples (subject, predicate and object) and SPARQL helps to get information from this set of triples. This is a data access language and suitable for both local and remote access. SPARQL Protocol [12] defines its remote access protocol. SPARQL is controlled by W3C and it is moved to proposed recommendation status. Here first we discuss the syntax of SPARQL. Note: I developed an ontology news.owl, is present in Appendix, for practicing SPARQL queries. Here is a figure showing classes and their relations. The same ontology news.owl I redesign during case study and testing all queries again. Page 21 of 100

23 Figure: News Ontology for SPARQL In the figure we can see all classes and relations that can be used in SPARQL queries. Instances are not shown here but a City class have instances like Copenhagen, London, etc, A country have instances like Denmark, England, a Region have instances like Europe, Asia, a Sports have instances like Football, Tennis etc. All instances can be seen from testmynews.owl 2.1 Syntax of SPARQL SPARQL is all about matching graph patterns and the simplest one is triple pattern which is very much like RDF triple but it mostly contains variables instead of terms at subject, object and predicate positions. A very simple example of RDF is PREFIX NewsOWL: < Page 22 of 100

24 SELECT?news FROM <news.owl> WHERE{ NewsOWL:Copenhagen NewsOWL:areasNews?news This is an example of SELECT query. The other types will be discussed later on. This query is trying to retrieve all the news from the city Copenhagen. The main clauses are used here are PREFIX is SPARQL equivalent of XML namespaces. So instead of using whole URL again and again one can use prefix. SELECT keyword is used to select the data items that the query will return. It is like SQL select. This query returns one element.? and $ are used to show a variable in SPARQL. The other keyword that can be used here are ASK, DESCRIBE and CONSTRUCT. I explain these later on. FORM is used to specify the source element against which the query will be executed. This is optional in this case. If we don t mention it, query will be run against the current file. WHERE clause is used to specify the triple/graph pattern that query matches against a RDF graph. WHERE keyword itself is optional. A general form of this clause will be WHERE {?subject?predicate?object The result of the above query when we run against news.owl will be Note: I am showing results of all SPARQL queries as tabular format because these queries are tested with Protégé or TopBraid Editor. In the end of this section we would discuss the standard result format of a SPARQL query. Simply this query will find a node Copenhagen in RDF graph and show the all nodes linked by link areanews. Here is another example in which query is selecting all news and their categories from news.owl. PREFIX NewsOWL: < SELECT?news?category FROM < WHERE {?news NewsOWL:inCategory?category The result of this query is. Page 23 of 100

25 Here since on both side we are using variables so this query will match this against all statements in the graph and returns result by binding them with news and category variables. The one important thing to note is that we can only use those variables in select clause that are present in where clause. In order to get all the news of football category we can use this query. In this query we can only use?news variable in SLECT clause because this is the only variable being used in WHERE clause. PREFIX NewsOWL: < SELECT?news WHERE {?news NewsOWL:inCategory NewsOWL:Football 2.2 Triple and Graph Pattern The previous examples are the simplest examples of triple pattern that contains subject, predicate and object. A graph pattern is a collection of triple pattern or we can say more than one triple pattern are called a graph pattern. In following query the graph pattern consists of two triple patterns. This query will return the all news from Denmark. PREFIX NewsOWL: < SELECT?news?city WHERE{?news NewsOWL:fromArea?city.?city NewsOWL:isCityOf NewsOWL:Denmark The result is The following query with extract all the news from Copenhagen area and in category Mobile. Page 24 of 100

26 PREFIX NewsOWL: < SELECT?news WHERE { NewsOWL:Copenhagen NewsOWL:areasNews?news.?news NewsOWL:inCategory NewsOWL:Mobile * Operator * can also be used to select all the variables defined in the query. For example following query will show the search result of area, news and category PREFIX NewsOWL: < SELECT * WHERE {?area NewsOWL:areasNews?news.?news NewsOWL:inCategory?category The result of this query is In news.owl CNews class has four object type properties. So we can get all news with all object type properties with the following query. PREFIX NewsOWL: < SELECT * WHERE {?news NewsOWL:inCategory?category.?news NewsOWL:text?text.?news NewsOWL:date?date.?news NewsOWL:heading?heading This is more like selecting all attributes of a news table with SQL query. The result is. Page 25 of 100

27 2.3 Sorting In above example we can see that data is not in order. For this an ORDER BY clause also exists in SPARQL. For example PREFIX NewsOWL: < SELECT * WHERE {?area NewsOWL:areasNews?news.?news NewsOWL:inCategory?category ORDER BY?area?category The result of this query is Two functions DESC (descending) and ASC (ascending) also exist that can be used to explicitly mention the way the data has to be sorted. LIMIT and OFFSET Limit function put the restriction on the number of results that a query returns while OFFSET helps to identify the position from which the return results should start. With these keywords pagination can be implemented very easily. Here is an example. PREFIX NewsOWL: < SELECT * WHERE {?area NewsOWL:areasNews?news.?news NewsOWL:inCategory?category ORDER BY?area?category LIMIT 10 OFFSET 0 The main purpose of the LIMIT keyword is to avoid over loading. For example above query would returns 10 result. Without using LIMIT it could return thousands of results. 2.4 String matching SPARQL provides FILTER operation for string matching. It is based on regular expression and works with regex(). Here is an example PREFIX NewsOWL: < SELECT * WHERE {?news NewsOWL:inCategory?category.?news NewsOWL:text?text FILTER regex(str(?text), "football") Page 26 of 100

28 This query will return all the news with their categories and text in which word football will appear. So the results of this query from news.owl are. Here is another example in which query returns all the news elements with their object type properties filtered according to some specific date. PREFIX NewsOWL: < SELECT * WHERE {?news NewsOWL:inCategory?category.?news NewsOWL:text?text.?news NewsOWL:date?date.?news NewsOWL:heading?heading FILTER regex(str(?date), "12-21") The result is. 2.5 Union and Optional We can also make some part of the query optional with keyword OPTIONAL. For example in above query we can make filter part optional. PREFIX NewsOWL: < SELECT * WHERE {?news NewsOWL:inCategory?category.?news NewsOWL:text?text.?news NewsOWL:date?date.?news NewsOWL:heading?heading OPTIONAL{FILTER regex(str(?date), "12-21") This will return the all the news with their object type properties. This is helpful in order to retrieve the objects that miss some property with the objects that has all properties. UNION is used to combine the results of two queries. For example in following query I am using UNION to get the news related to two categories. Using DISTINCT just ensure that that will not be duplicated PREFIX NewsOWL: < SELECT DISTINCT * WHERE {?area NewsOWL:areasNews?news.?news NewsOWL:text?text. {?news NewsOWL:inCategory NewsOWL:Mobile UNION Page 27 of 100

29 {?news NewsOWL:inCategory NewsOWL:Devices The result is 2.6 Accessing Data from Multiple Data Sources It is also possible to execute a SPARQL query at once on multiple data sources existing on different locations. Here is an example of such a query. SELECT DISTINCT * WHERE { {?area news1:areasnews?news UNION {?area news2:areasnews?news PREFIXES I defined with the Protégé Editor that can be seen above the results. In this example we can seen that news are exist at two different locations and one query extracting the data and giving the combine results. Note: Prefixes for rdf, rdfs, owl and xsd can also be seen in above figure and I am not including these prefixes in my queries. But in any query if one use rdfs:subclassof or rdf:type then corresponding prefix must be either in query or in the environment. Page 28 of 100

30 2.7 Using Classes in Queries Until now we only used instances in our queries. We can also use classes in queries. E.g. we can make a query to get all sports news from categories that are instances of CFootball class. PREFIX NewsOWL: < SELECT * WHERE {?news NewsOWL:inCategory?cat.?cat rdf:type NewsOWL:CFootball In the same way we can get all the news from all categories with their classes and super classes. PREFIX NewsOWL: < SELECT * WHERE {?news NewsOWL:inCategory?cat.?cat rdf:type?subclass.?subclass rdfs:subclassof?mainclass 2.8 Finding Relations EJBQL can also be used to find relations between two instances or to determine all the relations of a particular instance with all other instances or even class. Here are few examples of such queries. Following query determine relation between an instance Denmark and an instance Copenhagen. PREFIX NewsOWL: < SELECT * WHERE { NewsOWL:Denmark?relation NewsOWL:Copenhagen Following query determine relation between an instance Football and a class Sports. PREFIX NewsOWL: < SELECT * Page 29 of 100

31 WHERE { NewsOWL:CFootball?relation NewsOWL:CSports Following query determine all relations of an instance with other instances or classes. PREFIX NewsOWL: < SELECT * WHERE { NewsOWL:Denmark?relation?object One thing should be noted that it is showing only relation with directly attached objects. In the same way relation between directly attached objects can be determine with queries that I have presented before. To see all relations between all instances and classes following query can be used. PREFIX NewsOWL: < SELECT * WHERE {?subject?relation?object Until now I only discuss SELECT clause or queries. There are three other types of queries that are ASK, DESCRIBE and CONSTRUCT. 2.9 ASK It is also possible to ask questions to query processor with keyword ASK. The answer would be true or false based on the returned results. PREFIX NewsOWL: < ASK {?news NewsOWL:fromArea?city.?city NewsOWL:isCityOf NewsOWL:Denmark This query asks question is there any news from a city which is a city of Denmark. If there is any such news then answer would be true other wise false 2.10 DESCRIBE DESCRIBE clause is used to get information about particular nodes match in graph pattern. For example in order to get all related nodes or information about a particular news item following query can be used. PREFIX NewsOWL: < PREFIX rdf: < Describe * WHERE {?news rdf:type NewsOWL:CNews FILTER regex(str(?news), "Mobile_tec_news") Page 30 of 100

32 The result would a standard rdf of the news item. Note: For testing queries, I used Protégé and TopBraid editors but no tool support DESCRIBE yet. So above out query I tested with QueryBO component developed during case study CONSTRUCT CONSTRUCT is very important clause and is used to construct a new RDF graph from existing graph based on criteria defined in graph pattern with variable defined in it. In simple words we can say it creates new statements and returns it as a new graph as query result. It substitutes variables in graph template of CONSTRUCT clause with their values resulting from the execution of WHERE clause. Here is a query creating new statements linking news items with countries with property fromarea. PREFIX NewsOWL: < CONSTRUCT{?news NewsOWL:fromArea?country WHERE {?news NewsOWL:fromArea?city.?city NewsOWL:isCityOf?country The result would be a standard rdf. Page 31 of 100

33 Figure: Construct Query Results RDF CONSTRUCT query just creates new news graph and returns it but it does not add it in already existing graph on which it executed the queries. Although, the newly created graph can be added to existing graph with help of some external tools. Creating new graph with CONSTRCT clause is very useful as we will see this later on. SPARQL returns results in a standard format. It is important to understand the result format in order to write clients calling SPARQL queries on remote web services getting results and processing them for internal use SPARQL Query Results XML Format A query processor returns results as SPARQL query result format [24] that is a valid XML document. A returning document for a query looking for news from cities of Denmark, shown in ASK query example, is here. Figure: Standard SPARQL Results Format The first element of the result document is always sparql element with its name space. Its first child element is head having all variable names given in SELECT clause. It might have a link element giving a reference to extra information about results. Second element of sparql is results with two boolean attributes ordered and distinct. Since both clauses were not used in the query so their values are false. Results element would have all the Page 32 of 100

34 query results as result element that uses binding elements to show number of values per result. Its name attribute bind a variable name with its value. [24] A ASK question returns results in following format. Figure: Standard Result of ASK query Result document of DESCRIBE and CONSTRUCT queries are standard RDF format as we have seen during their description. A web service interface of RDF data store can be build that could accept SPARQL queries and returns results. A client program written in any language can process result document for displaying purpose or for further processing. We have seen that SPARQL is a very powerful language and can be used to extract data from a RDF graph. We can say its more like SQL but some of the main differences are. SQL is run on data exist in one or many tables. It gets complex when data its present in many tables. While SPARQL is used to get data from a graph by pattern matching. This graph is more like a one huge table if you compare it with SQL data presentation. Pattern matching is keyword to understand SPARQL SPARQL Protocol SPARQL protocol [12] is way of conveying SPARQL queries from remote clients to a SPARQL processing service. SPARQL protocol is described in two ways. First, as an abstract interface independent of any concrete realization, implementation, or binding to another protocol; second, as HTTP and SOAP bindings of this interface. [12]. This protocol is defined abstractly with WSDL2 and has one interface that is SparqlQuery and this interface has one operation query. With this protocol it is possible to build a HTTP or SOAP server accepting queries in HTTP or SOAP format and returns results as standard result format. Joseki [25] is an example of such a server. Simple query asking for news from a category football from news.owl in standard format and its corresponding HTTP format is given below. PREFIX NewsOWL: < SELECT?news WHERE {?news NewsOWL:inCategory NewsOWL:Football GET /sparql/?query=prefix+newsowl:+& lt; {+?news+newsowl:incategory+newsowl:football+ Page 33 of 100

35 Host: sparql.service.com User-agent: sparql-client/0.1 The sparql.service.com would returns results in Standard result format with http response header. HTTP/ OK Date: Fri, 06 May :55:12 GMT Server: Apache/ (Unix) PHP/4.3.4 DAV/1.0.3 Connection: close Content-Type: application/sparql-results+xml <?xml version="1.0"?> <sparql xmlns=" <head> <variable name="news"/> </head> <results ordered="false" distinct="false"> <result> <binding name="news"> <uri> </binding> </result> </results> A developer implementing SPARQL HTTP server or client must know these formats. More information about the HTTP format or SOAP format can be read from [12]. We have discussed SPARQL syntax, result format and protocol. Now, in next section, we will also see how much it supports inference power of semantic web.. Page 34 of 100

36 Section 3 Inference, Data Publishing & Data Transformation It discusses semantic technologies especially inference capability. It also describes how data can be published in web and how existing data from relational databases can be used with semantic web technologies. 3.1 SPARQL and Inference SPARQL does not have any runtime inference capability. Runtime inference capability means inferring some thing during execution. Only meaning can be induced in relations as we did in our news example. Theses meanings are useful when we make our SPARQL queries but based on these relations SPARQL can not directly inference any thing. Here I elaborate this by our news example. In our news example we can not get any news by using fromarea relation of news in the following query. PREFIX NewsOWL: < SELECT * WHERE {?news NewsOWL:fromArea NewsOWL:Denmark The reason for this during creation of news item, for fromarea relation I specified the cities like Copenhagen or Arhus instead of country Denmark. Even all NewsOWL:City class has property iscityof that links a city e.g. Copenhagen to its country but still there is no connection between country and news itself. That s why above query will not return any result. In the same way we can not get all the news from Europe by using NewsOWL:Europe in above query. But if we replaces NewsOWL:Denmark with NewsOWL:Copenhagen then we will get all the news from Copenhagen. We can say that properties of classes are just meaningful relations between objects and help to write a query in more general way. Two approaches can be used to get this missing functionality. One is through using CONSTRUCT clause of SPARQL and the other is using separate inference engine or reasoner. Both approaches don t introduce a runtime capability in SPARQL for inference rather they just create new graph with more statements that can be added in already existing graph. When same query is executed again it will give results because of assertions in the graph Inference Using CONSTRUCT As we discussed, using CONSTRUCT clause we can construct new graphs. These new graphs could be either totally new, meaning not using any property or class from existing ontology or they just could be new (missing) relations in an already existing graph. Just like in our CONSTRUCT query example we are creating new statements linking news items with corresponding countries. The newly created statements then can be added in existing graph with some tools like JENA. Page 35 of 100

37 3.1.2 Inference using Rule Engine/Reasoner Inference engines or Reasoner can be used to define rules that help to create new relations between objects. A proposal for semantic web rule language SWRL [13] exists to define rules for such reasoners. Here I am defining a rule with SWRL language.[ newsarea: (?news NewsOWL:fromArea?city) (?city NewsOWL:isCityOf?country) -> (?news NewsOWL:fromArea?country)] This rule tells a reasoner that news from a particular city would be from a country if the city is city of that particular country. When we run such a rule it creates new statements that can be inserted in old graph. Here are the new relations that above rule created in old graph. Figure: Results/ Statement By Running a Rule Note: all these examples are run by using Test Version of TopBraid Eclipse plugin for semantic web. That helps to create rules and then run the rules by helping some reasoner. I am using OWL rule based reasoner. In the same way we can define a rule to link news instances to continent level. Following rule defines if news are from a country and the country is a country of continent then those news are from those continent as well. [newsarea: (?news NewsOWL:fromArea?country) (?country NewsOWL:isCountryOf?Continent) -> (?news NewsOWL:fromArea? Continent)] This rule will create new relations between news instances and region (continents) instances. After running this rule we can get all the news from Europe with following query. PREFIX NewsOWL: < SELECT * WHERE{NewsOWL:Europe NewsOWL:areasNews?news Page 36 of 100

38 This is the same thing that we did we CONSTRUCT clause. But with a rule language it is possible to make some general reasoner like OWL reasoner that uses OWL language constructs to define new relations or assertions. For example, if we have one property iscityof that is inverse of hascity property and during RDF graph creation first we create Denmark instance, then Copenhagen and fill iscityof property for Copenhagen only. Then it would be uni-directional relation only. But an OWL reasoner can make it bidirectional, by linking Denmark instance to Copenhagen instance with relation hascity, when it will see that the property iscityof is inverse of hascity. From our above discussion we have seen that SPARQL can not infer any thing during its execution but it can create new graph with CONSTUCT query that can be added in already existing graph. 3.2 Data Publishing Once data is present in a RDF format then we can publish this data on web in a number of ways. 1. The whole data can be publishing as RDF file format. This dump might be too big but users can query this data with their own client using SPARQL. 2. The RDF data file can be stored in database and it can be made accessible through SPARQL interface. Web services can be build to accept the SPARQL queries and returns results in standard format. 3. Some server supporting SPARQL protocol and SPARQL language can be used to deploy the data file. Such server supports HTTP and SOAP protocols so clients can send their SPARQL queries as standard HTTP request or as a SOAP request. These servers execute the query and returns results in standard format to the calling client. We can organize new data semantically with semantic web technologies and publish it on web but one of the main problem with semantic web concept is there is not much semantically enrich data present on web although a huge amount of data is present in databases. One question is how this data can be made useful. A lot of solutions [26] are being discussed or in progress for this purpose. Mostly are open source projects and in development phases. None of the approach is from W3C yet so here I am just discussing main approaches behind these solutions. There are two possible ways. Make this data accessible via SPARQL query language by mapping SPARQL queries to SQL queries. Transfer/Convert this data to RDF/OWL format by mapping, and publish it on web SPARQL-SQL Mapping During our discussion we have seen that SPARQL is very much similar to SQL. Also result format of SPARQL is very much same as SQL result set. So there is a possibility of transferring SPARQL queries into SQL queries and run them as SQL queries on legacy Page 37 of 100

39 databases. This approach requires a successful mapping of SPARQL queries to SQL queries. A successful mapping would be if SQL query could give the same results as its corresponding SPARQL returns results if the same data is present in RDF format. [28]. Attempts [29, 30] are going on based on this idea and transferring SPARQL queries to MySQL queries. Here just showing some of their simple conversion. SPARQL SQL SELECT SELECT ASK SELCT COUNT (*) > 0 OPTIONAL LEFT OUTER JOIN FILTER WHERE These conversions are the easy ones that are implemented. Conversion like construct or describe are not implemented yet. Here I am just giving an example what could be a SQL equivalent of a SPARQL query with this approach. PREFIX NewsOWL: < SELECT?news?city WHERE{?news NewsOWL:fromArea?city.?city NewsOWL:isCityOf NewsOWL:Denmark Converted SELECT *.news, city.name FROM News as news, City as city, Country as country WHERE news.fromarea == city.id AND city.iscityof ==country.id AND country.name= Denmark I feel that this approach is good for transferring simple queries but for complex queries involving constructs of OWL or RDFS like rdf:type, rdfs:subclassof in SPARQL queries make this conversion very difficult RDB-RDF Mapping The second approach is converting/transferring relational database data to RDF/OWL format by mapping of tables and columns to classes and properties. This can be done in a number of ways. During our discussion of OWL we have seen that there are two types of properties in OWL, object type properties and data type properties. While in a table we might have two types of columns, table s own column and foreign keys. With this approach a table can be converted to a Ontology class. Table s own field would be data type properties of the ontology class while foreign keys would be object type properties pointed to other classes in the ontology (that would already have been converted from tables). Here I am explaining this with our news example Let s suppose we have news data in relational database in tabular format and three of the possible tables can be seen here. Page 38 of 100

40 Figure: Database Table Diagram This would be a typical design for storing news items in a database (I didn t try to match it with the ontology). We can find similarities between table/columns and classes/properties in design even if column and table names were different. Here is corresponding relationship diagram from the ontology. Figure: News Relation with other classes Although the categories are not defined separately in database but still most of the columns and properties can be directly mapped to the ontology classes and properties. Page 39 of 100

41 Some open source tools [30] exist that can publish data as RDF directly from relational database after conversion. They also provide some customization for mapping just like for category column. SPARQL CONSTRUCT query can also be used to generate new graphs. So once a tool has generated a graph a CONSTRUCT query can also be run on it to generate new fully compatible graph. The other way of doing this is with programming. It is possible to write a program to read data from database and transfer it into ontology model after making appropriate classes and properties. But this approach might involve a lot of programming effort but it can be done without any third party tool. Page 40 of 100

42 Section 4 Case Study This chapter identifies a case study and gives functional requirements, system architecture, technical design and some implementation details of its business components We have examined all the major technologies related to semantic web. Now we will see how we can implement a small system by using these technologies. A case study is identified for this purpose. 4.1 Functional Requirements News.com is a startup news broadcaster who is coming into news market and need a system that could help them to organize their news data in an efficient way. News.com wants to use such technologies give them an edge on their competitors. They need a system that could fulfill some main functional requirements about their news data and should be flexible enough to accommodate new requirements. Most of their requirements are about publishing news data on web and data retrieval. They want the system to be smart enough to understand the news data in some way so that news retrieval could be more accurate across any particular query. They also want the system to share information with other enterprise application without much hurdle. Here I summarize their key functional requirements. It should be possible to retrieve news for a particular area like for a city, for a country or for a region. It should be possible to retrieve news about particular category like sports, science, business etc or even more specific category like in sports subcategories might be football, tennis, cricket etc. It should be also possible to retrieve news about particular event e.g. football world cup, Iraq war etc. For given news, the system should be able to retrieve all the linked news, all the news from given news s area, all the news from given news s category. It should be possible to tag news items. System should be able to publish data on web and share information with other enterprise applications. The system should be highly flexible to adopt new categorization of data. Possible user of the system could be a reporter inserting data as news in the system, a calling agent requiring news of particular category or about particular area. 4.2 Proposed Semantic Web System A semantic web solution SWS is proposed for News.com. The reasons for this semantic web are here. It is possible to meet all functional requirements with SWS. Page 41 of 100

43 SWS is very helpful in data management and putting semantic in data and relation. SWS is highly flexible for queries for example for News.com it is possible to make queries more generic or more specific for particular categories by using base class and sub class relation. The system supports tagging and rules it is possible to adopt future categorization of data. For example in future, If user say that it is also required to classify the news items according to mood meaning sad news, excited news, funny news etc. If the news items have already tagged with these moods then it is possible to make a rule stating that if funny is present within the tags property of any news then link this news to a new class CFunny derived form CMood. It is always possible to add rules in the system in future so that new meanings could be possible to give to existing data. Minimum input is required during data creation. For example by only giving city name during news item creation like Copenhagen, system is able to infer its country that is Denmark and region that is Europe. With SWS, it is very easy to publish data on web or share it with client. Even client can run their queries remotely and get the results in standard xml format. Here we discuss the system architecture, design and implementation in detail. 4.3 System Architecture The 4-tier architecture is proposed for implementing SWS for News.com. A high level architecture diagram of the system is here. Page 42 of 100

44 Figure: System Architecture The system consists of four tiers. The benefit of using multi tier architecture is that system becomes more flexible and adoptable. Here I elaborate each tier and its functionality and role in the system Client Tier Client tier can consists of JSP/Servlets or ASP/NET while web services can also be added as a client. I decided JSP/Servlets based client for prototype because overall architecture of the system is more java specific rather than.net. The reason for this there is not strong support for semantic web from.net community. The framework JENA that is also a part of this architecture is also build in java and this is the most mature framework supporting semantic web technologies. A web service build in any language can also be used as client. The client layer will interact with business layer and send its request to business layer Business Tier The business tier consists of business specific components like NewsHandler, Query Handler etc. All the clients will interact with this business layer only. Business components will be responsible to get the request from the clients and forward them to semantic tier. Then business tier forwards the results coming from semantic tier to the clients. Page 43 of 100

45 For business tier different approaches can be used but I decided to use J2EE Session Beans with simple java classes. Session beans will be used to inter act clients and simple java classes will be utility classes and will be act as helper. One can argue that what is benefit of using business tier at all. Why not use the semantic tier from presentation tier. The answers are multi tier system provide a number of benefits. 1. Client tier can be replaced with new technologies. For example JSP/Servlets can be replaced by Struts framework or vice versa. 2. Session beans are deployed in some application server that can provide extra services like transaction management, security etc 3. Session management can be done Stateful session beans. 4. Most important multi tier system can be deployed in a distributed way. A big ontology graph can cause problem if system is deployed on one server but with multi tier approach presentation tier can be deployed on one server (web server), business tier can be deployed on second server (application server) Semantic Tier The semantic web tier will consists of JENA and Kazuki framework classes. All the business components can interact with model through semantic tier. Here I am giving some description about JENA and Kazuki frameworks because it is important to understand these frameworks and during design implementation phase we would not discuss them at all. JENA JENA is a framework that helps to build semantic web applications. It has programming APIs for reading and writing RDF, RDFS and OWL. A RDF graph can be build with help of JENA APIs. These APIs also support SPARQL so one can query a RDF graph with help of these APIs. JENA also has rule based inference engine. JENA is the most stable framework that supports semantic web technologies. This was the main reason of choosing JENA. Here is description of JENA major components. JENA APIs JENA APIs provide support to create a RDF model, write in the model and read from the model. The RDF model could be an Ontology model that can support OWL functions or it could be an inference model that builds on an existing model also called base model. Here some of the main interfaces and classes from JENA that are used for creation and manipulation of a RDF Model. Class Description Page 44 of 100

46 ModelFactory Model Resource Property ModelFactory class is used to create different types of models. Its createdefaultmodel() method is used to create default in memory model. Model interface is also used to create resources, properties and statements. It also helps to read and write to a model. It is most important interface. It has sub interfaces for special purposes like OntModel for ontologies. Resource interface has methods like getting subject, object or predicate from the resource. It represents a property in a RDF graph and has methods for dealing with properties. It also has RDF container classes like Bag (unordered collection) Seq (ordered collection) etc and some classes for iteration like StmtIterator etc. JENA ARQ and Query APIs ARQ is the JENA s query engine that supports SPARQL. It also has its own language but that is in experimental stages. Executing a SPARQL query with JENA APIs is very easy. For this just insert query into a String object and create Query object by passing query string into its constructor, set the source of Query object, create QueryEngine by passing query object into its constructor, use exec() method of QueryEngine that returns QueryResult object. Then ResultObject can be iterated to get all results. We will see some real code examples in implementation section. JENA Inference Engine/ Reasoner JENA inference engines help to infer new RDF assertions from existing base assertions and optional ontology definitions. JENA is designed in such a way that different type of inference engines can be plugged in to it. The term inference engine is being used in general way while term reasoner means an object from JENA APIs. We can say Reasoners are inference engines of JENA. Here are typical list of events of how a Reasoner can be used. Page 45 of 100

47 Figure: JENA Inference Model Usage 1. ModelFactory creates a model called base model. 2. ReasonerRegistry creates Reasoner. ReasonerRegistry can also be created with ModelFactory. Different type of reasoners can be created with ReasonerRegistry. 3. Model passes through the Reasoner. 4. Reasoner creates an inference model called InfModel. Reasoner can also use ontology definition during this process. 5. JENA APIs then query on InfModel. JENA has many built in reasoners. Here I am giving short description of some of its reasoners that we can use in proposed system. The general purpose rule engine: JENA has a general rule base reasoner that is also used to build both RDF reasoner and OWL reasoner. But it is also possible to use this reasoner independently. RDFS Reasoner: This reasoner RDFSRuleReasoner supports most of the RDFS entailments. It has three versions full, default and simple. Simple only implements transitive rules like subclassof or subpropertyof. OWL Reasoner: The one major reasoner supplied with JENA is OWL reasoner which is a rule based reasoner and supports OWL Lite. There is no reasoner yet that supports OWL Full. JENA also doesn t have any reasoner for OWL DL but some external reasoner can be used for this purpose. Currently JENA only store Inference model in memory Page 46 of 100

48 Kazuki Kazuki is a framework that works on top of JENA and it provides an object oriented interface of JENA APIs. So a normal user can create OWL instances and properties like traditional java classes but still user must have to know about all concepts related to semantic web Data Tier Data tier consists of RDF graph/model. With JENA, RDF models can be build either in memory or in a file or in a database.. In Memory Model: In memory model means a model in RAM. It is not possible to build a large in memory model due to limitations of RAM size. File Model: A model can also build on physical storage like hard disk. The benefits of using this model over in-memory model is its does not evaporate with computer restart. Database Model: A model can also be built in to a database. JENA supports all major databases like Oracle, Microsoft SQL Server, MySQL, PostgreSQL, etc. A database model could be very large and more efficient way of storing data Data Publishing on Web In order to publish news data on web or share news with other news agencies or clients following approaches can be used. The whole news data can be publishing as RDF/XML file format. This dump might be too big but users can query this data with their own client using SPARQL. The data can be stored in database and it can be made accessible through SPARQL interface. Web services can be build to accept the SPARQL queries and returns results in standard format. News can also be shared with RSS feed. More information about RSS can be seen from appendix A. Besides these, it is also possible to share latest news items via RDF/XML file and archive store old news items in database and make them accessible via web service. 4.4 Technical Design For technical design part I use bottom up approach and first discuss the design of Ontology or data layer and then business components Ontology Design Designing an ontology is more like making a data base design. The difference is, in database design one makes tables and their columns with primary and foreign keys while data is inserted in these tables according to their design. In ontology design one makes classes and properties, called relations, individually and then add these relations to the classes. One relation might be present between more than two classes. Once ontology has been built then instances can be instantiated that store in a model. This model could be in memory, in file or in DB as we discussed. Page 47 of 100

49 I developed news ontology present in appendix as news.owl. I discuss the main classes, properties/relations and their functions. Note: In all figures, I am using C with every class name as a convention to differentiate between classes and their instances during implementation. Here is a figure showing all the classes in the news ontology. Figure: Ontology Class Hierarchy This class Hierarchy would help to meet the functional requirements and classify the news items according to particular area, category or event. Here I elaborate main classes with their relations/properties to other classes. Owl:Thing It is the by default base class of every class. CNews This class represents a news item whenever we will insert a new news item we will create an instance of this class. There is no child class of this class. The properties of CNews class and its relations with other classes can be seen from the following figure. Page 48 of 100

50 Figure: CNews class The main properties of the CNews class and their purposes are here. Property Tags Heading Text Date FromArea incategory aboutevents Description A data type property that helps to tag a particular news item. Tagging allows us further implicit classification of the news item. Tags could be any thing, like personality names involved in news, news nature like funny, excited, sad (death, accidents, terrorism) etc or actions like win, loose, etc. A data type property represents the heading of the news item. An object type property, representing the actual text of a news Representing the date of the news An object type property or relation connects a news to it related area that could be an instance of a CRegion, CCountry or CCity classes. So we can get the related area of the news from this property and from areanews property of CLandArea can get all news for that area. An object type property or relation connects a news with one or more Category classes. So we can get categories with this property and then with categorynews property of CGeneralCategory class can get all news for a particular category. An object type property or relation connects a news with a CEvent class. So we can get categories with this property and then with categorynews property of CGeneralCategory class can get all news for a particular category. CGeneralCategory It is the base class of all general categories like CSports, CHealth and CBusiness etc. New categories can be added by introducing new child classes of this Page 49 of 100

51 class. All the categories are subclass of this class. We can also make these categories as instances of class CGeneralCategory but then it was not possible to make sub categories. e.g. sub categories of sports could be football, tennis and golf etc. So this type of design decision should depend upon the assumption that whether a particular entity type extend more or not. If it is more extensible then make it as class otherwise make it as instance. In news ontology all the categories are ultimately derived from CGeneralCategory class. Here is the figure showing all properties and sub classes of CGeneralCategory class. Figure: CGeneralCategory and sub classes The main properties of the CGeneralCategory class and their purposes are here. Property name categorynews Description A data type property that shows category name. it will be same as class name without C prefix. An object type property makes relation of this category with news instances. With this relation all news for a particular category can be extracted from the model. All the sub categories inherit the same properties from the main class. CLandArea This is base class of all type of areas that could be a big region, a country or a city. So it has three sub classes CRegion, CCountry and CCity. We can also add more sub classes like Town, village etc. It s each subclass has instances only e.g. City might have instances like Copenhagen, Paris, London etc. From the following figure all its properties, relation and sub classes can be seen. Page 50 of 100

52 Figure: CLandArea and sub classes The main properties of the CLandArea class and their purposes are here. Property name areanews Description A data type property that shows area name. An object type property makes relation of this area class with news instances. With this relation all news for a particular area can be extracted from the model. All the sub classes inherit these properties from the main class. Subclasses and their description are here. CRegion Class representing a region in the ontology, regions like Europe, Asia can be instances of this class. With its property hascountry, it has relation with multiple instances of CCountry class. CCountry Class representing a country in the ontology. Denmark, Germany etc could be instances of this class. Its property iscountryof connects it with particular region and property hascity connects it with all of its cities. CCity Class representing a city in the ontology model Copenhagen, London could be instances of this class. Its property iscityof connects it with an instance of CCountry class. Page 51 of 100

53 Figure: CEvent CEvent Class representing an event in the ontology. It has one data type property name and one object type property or relation that is eventnews. This property connects an event with all its related news. Here is a figure showing all its properties and relations Choosing a Model Type I would prefer a database model for the prototype purpose Different databases like Oracle, Microsoft SQL Server, MySQL, PostgreSQL can be used for this purpose. Choosing a database depends on a number of factors like performance, cast etc. Since JENA stores data in all database in same way so there is no performance advantage from any database for news domain except the general performance related advantages of any database. If cast matters then PostgreSQL or MySQL can be used. More information to see how JENA stores RDF model in databases can be read from resource. [22] Note: In my implementation I am using file based model because I could not configure database model although I spend enough time on it Choosing a Reasoner From the JENA reasoner, I am using general rule base engine. The reason for this is it is simple and extensible. It is possible to make all general rules that require for news domain. The problem with using RDF and OWL reasoner is that they only provide the features built in with RDF or OWL syntax and also they are not extensible. They also provide extra feature (that will also create extra statements during creation of InfModel) that even we don t need. With rule base it is possible to make new relation between new classes and already existing data. For example, classification of news items according to mood as we discussed earlier Generating Kazuki Classes Kazuki classes can be generated with help of SWEDE eclipse plugin. It generates a Kazuki class for every corresponding ontology class. For example for CNews ontology class it generates CNews with properties like tags, text, date etc and their getter and setter methods. These classes can be used in business components just like normal java classes Business Components Some of the main business components that are needed for the system are described here. Page 52 of 100

54 NewsModel This will be responsible for all model related functionality. Its main functions are Reading/opening of particular type of model from disk. initialization of the model writing and closing the model executing the rules and returning inference model This is a singleton component so that the system cold have only one model instance for the whole application. The interface of this component is here. Figure: NewsModel NewsBO This will be responsible to handle all operation related to news items in the system. The main operations are. Retrieving all the news with their categories Retrieving all the news from the same area as the given news. Retrieving all the news in the same category as the given news. Creating a new news item in the model. The interface of this component is here. Page 53 of 100

55 Figure: NewsBO QueryBO This will responsible to execute a SPARQL query and returned the results as standard format. A web service interface of this service can be provided so that remote user from any platform could execute queries and get results. The interface of this component is here. Figure: Query BO 4.5 Implementation Here I am giving some code snapshots from code. All the code of developed business components are in appendix C. The pieces of code here are just describing some fundamental steps in ontology handling with JENA APIs. NewsModel This component creates a model and loads it from a file on system in s static block so that it could initialize it with class loading. Page 54 of 100

56 Figure: Code Example Static Block from NewsModel It also has method that creates an inference model by initializing it from generic rule reasoner. Figure: Code Example getinferencemodel() from NewsModel This component does not have any interface for external clients and is only used by other business objects. NewsBO Here just giving how this method getting all news with their categories from the model it uses QueryFactory to create a Query instance. Then creating QueryExecution object and getting results with exeselect() method. Then it iterates through the results and getting categories and news, and putting them in a hashtable to return it to calling program. Page 55 of 100

57 Figure: Code Example from NewsBO This component has a session bean interface as NewsHandler that can be deployed in an application server. QueryBO Code in component is very much similar to above getallnews () of NewsBO but instead of iterating through the result set it just returns results. Here is the code of executing ASK query and returning results. Figure: Code Example from QueryBO This component has two interfaces one is QueryHandler session bean and other one is a web service interface for external clients. Page 56 of 100

58 All the code of session beans and web service is attached as CD. While code of all business objects are in appendix C. The main code is in business objects. Session beans or web service are just delegate requests to business components and generated with help of tools. A high level class diagram of the system can be seen here. Figure: Class Diagram Excluding Kazuki Classes Besides business components it has some utility classes like Queries having all queries, Constants having all constant paths, Rules having all rules used in system etc. SWBase base class has some utility methods and common methods for ontology handling. Besides these classes prototype also has Kazuki generated classes. More details can be read from code documentation. Page 57 of 100

59 4.6 Testing Unit testing of all three business components have been done and code is in appendix C. Although, the best approach for this purpose is using Junit but most of the methods returns results as xml or rdf or write or read from RDF model and it requires a lot of time to verify results from xml files. So instead of doing that, every business class has one main method in which I am testing every business method. All tests returning successful results except inference model functionality in NewsModel component. All code is in attached CD with a readme file that tells how to test different components. Page 58 of 100

60 Section 5 Evaluation, Recommendation, Working Experience This section contains evaluation of all technologies like RDF, OWL, and SPARQL etc. It also describes working experience of working with these technologies and different tools. Semantic web concepts and all its related technologies are relative new and it was very difficult to find information about these technologies. In order to understand new technologies some practical examples are also needed besides specifications but I could not find much useful examples. Mostly examples are more like HelloWolrd programs if we compare them with programming examples. Here I am giving my evaluation and findings based on my working experience, reading specifications and research papers. 5.1 RDF/RDFS/ OWL language RDF technologies or OWL are very powerful languages for data classification and design an Ontology. With RDF it is possible to describe resources, make statements and exchange this information within applications. While with OWL it is possible to classify data and make meaningful relations between different data items. RDF RDF is way of describing resources as statements containing resource (subject), property (predicate) and property value (object). Eventually property and property value could also be resources. Even a statement could be resource. But RDF does not talk how to deal such a situation in which a property value is a statement. Here I am explaining this by example. For example, some statements become facts like USA attacks Iraq, Italy wins WorldCup2006 etc. Now when all these are well known facts or statements then we can describe them as single resource for common use within an application or across applications. A globally accepted fact that everybody use and understand can be marked as a resource. Treating a statement as a resource add more semantic to data. Also more than one domain can use this resource for giving their data more semantics. Here is I am showing it as graphical form of RDF. Page 59 of 100

61 Figure: Statement as a Resource From the figure, we can see that if USAAttacksIraq statement is defined as a resource then multiple domains can use this statement as a resource. For example a Hollywood movie can be made about this, a book can be written about this or a news or article can be about this. A more possibility could be defining more than one statement as a single resource. So we can add one more statement on right side of above figure like BloodshedInIraq. Now about property of all three resources Book, News and Movie can point more than one statement as a single resource. In above example the object part is a statement, there might be some scenario when object might be also a statement resource. RDF is not cleared about all these scenarios and does not cleared how to deal these. OWL In OWL there is no property type of such type that could point to a statement. OWL has properties types like data type property and object type property. There is a possibility to have another type of property that is statement type property. So in my above example we can make about property as a statement type property. Searching can also be made easy and more accurate in this way. Let s suppose a historian is searching a book on a search engine with keyword usa attack iraq with selected option book search only. Now the search engine can make a search on fact statements first and finding one match there can make it very easy to return all the books names that are about the fact that is usa attack iraq. 5.2 SPARQL and Inference SPARQL is very powerful language for extracting data from RDF graphs. It has still working draft status of W3C and not reached yet to recommendation status so changes Page 60 of 100

62 are always expected in it. SPARQL does not have any feature of INSERT, UPDATE or DELETE. This is very strange for me or for all of them who are familiar with SQL. So one can not update or delete some particular node of a graph or insert a new node with SPARQL Most probably its because SPARQL is developed for knowledge extraction from a RDF graph not for creating from scratch or a updating RDF graphs. But one of its similar features is construction of a new RDF graph from existing graphs. Insertion and updation in RDF graph can be done by some RDF creation tools like JENA. But where CONSTRUCT query construct a new RDF graph, if we have also an optional feature of adding new constructed graph in the existing ones then we could save some time. An update feature in SPARQL could help in batch update. Since SPARQL is being built for RDF graphs so it does not use meaning in relations or especially meaning of OWL language constructs. For example if one describe two properties inverseof each other SPARQL can not infer any thing from it or even, from our case study example, it can not infer that a news about football is also a news about sport because football is a base class of sport. External inference engines or reasoner just create more statements in a graph, even they don t put any power to SPARQL language itself. There is no OWL query language from W3C, if we have a query language for OWL then it is possible to use the semantics of OWL language constructs. Then the OWL query itself would infer meaning, like for properties inverseof or base-child class relation, during execution with help if its own constructs. Although there are some OWL query language proposal [11] from some academia but those are on very initial stages. There is a need from W3C to start initiative for such OWL language. Currently inference capability is provided by executing inference engines. When one run such engine it creates inferenced statements that can be inserted into graph. Instead of doing this it could be more appropriate put inference capability in SPARQL query engine which should be able to infer based on the model on which it is executing. For example if two properties are inverseof each other then a query engine should infer it based on model type setting if it is OWL. Even if creation of extra statements is the solution then it should be done when an instance is going to be created in a model. For example during creation of instance Copenhagen with property iscityof, a tool creates a statement like (Copenhagen, NewsOWL:isCityOf, Denmark). It should also create a statement like (Denmark, NewsOWL:hasCity, Copenhagen) for inverse property hascity. 5.3 Tagging and Using Relations One can argue that many of benefits of semantic web technologies can be got with tagging the data just like I tagged this thesis in start. But tagging is more implicit classification while using relation is more explicit classification. Even tags can guide a search engine to wrong results but relations would always return more accurate results. Moreover based on relations it is possible to make concrete rules, so that applications could infer some thing new, while tags are more fragile for making rules. 5.4 Working Experience of Frameworks / Editors Here I am listing some tools and telling which one is best for which purpose. Page 61 of 100

63 5.4.1 Jena/ Kazuki Jena is a great tool that provide programming interface for dealing with RDF or OWL graphs but it does not have great documentation. The APIs documentation is not very illustrative. The main source for its documentation is only its site. Kazuki gives good concept of dealing OWL classes as java language classes but it has almost no documentation at all. Perhaps only documentation that is available is with its APIs. Technically it has also some flaws like it does not derived OWL child classes from their OWL base classes for this reason it is not possible to treat all child classes as base class and polymorphism can not be implemented. It is in alpha state and requires a lot of efforts to be matured. Also there is no strong community behind it. I tried to use Kazuki with database model of ontology but it was throwing exceptions and I had no idea why it is doing this. I surfed through its forums and found same problem other people are facing but no answer to their questions. [23] Protégé Editor 3.2 beta [37] It is best for Ontology design including classes and properties with its visual interface. Have a lot of plugin that can do a lot of things like showing different types of views of an ontology. It is very handy in executing and testing SPARQL queries. But configuration of a rule engine is very difficult or at least I could not configure. Without an editor it is almost impossible to design an ontology TopBraid Developed as plugin for Eclipse, it is very good for SPARQL testing. Setting a rule engine and testing rules is also very easy with it. I used its evaluation version to write and test rule for inference. But for ontology design Protégé that provides a lot of options is better. Page 62 of 100

64 Conclusion First I have presented all major technologies that can be used for a semantic web solution and shown how these can be used for data classification or management. I have shown that RDF is main ingredient of semantic web solution and it helps to store data as RDF statements containing subject object and predicate as resources. I also have described RDFS which adds more language construct to RDF and helps to organize data in form of classes and properties. I also have explained OWL that has three flavors and one can use according to features needs and flexibility required. I have explained SPARQL, the semantic web query language, with examples and shown that it is very much similar to SQL in terms of features but it helps to extract data from RDF graphs instead of tables by using pattern matching technique in graphs. Since it is being built for RDF graph so it can not understand the semantics of OWL language constructs. We can conclude that a language build for OWL may have more benefits because it can use semantics of OWL language construct. I also have cleared that SPARQL does not have any inference capability instead its construct query or external reasoner can be used to extend graphs and same query returns more results because of newly added statements. I also have discussed approaches to publish or share data in form of RDF by putting it on web or by providing an interface that can accept SPARQL queries and returns results as standard xml format. In the end I have implemented a solution by using semantic web technologies and shown how these technologies can be used with other technologies like databases, enterprise java beans, JSP etc. I have shown you some frameworks and tools that support semantic web technologies. From the design of this implementation we can conclude that semantic web solution provide great flexibility to adopt new requirements about data classification. Such flexibility always cause decrease in cast during maintenance and new features implementation. We can say that semantic web is a very powerful concept for knowledge management and data retrieval. With help of concepts and relations we can give meanings to our data and make it acceptable for machine processing. Most of the technologies are in evolving stage so it is difficult to find help for these technologies. While supporting tools are open source, free and in alpha stages. Their development progress is very slow. So people hesitate to invest money on solution involved these tools. It is time for big IT names like IBM, Microsoft to provide more such support within their platforms or softwares so that other people could get confidence to start investment on semantic web solution. Page 63 of 100

65 References [1] Semantic web, a new form of web content that is meaningful to computers will unleash a revolution of new possibilities. By Berners-Lee, T., J. Hendler, and O. Lassila (2001). Available at [2] A Semantic Web Primer by Grigoris Antoniou and Frank van Harmelen, 2004 from The MIT Press Cambridge, Massachusetts London, England [3] The Semantic Web: A Guide to the Future of XML, Web Services, and Knowledge Management by Michael C. Daconta Leo J. Obrst Kevin T. Smith from Wiley Publishing, Inc., [4] Semantic Web from W3C available at [5] Shared workspaces organization based on activity patterns and content analysis using ontologies By Baber Zaman from Aachen University of Technology (RWTH), Aachen, Germany [6] RDF Tutorial available at [7] RDF Concepts available at [8] RDF syntax grammar available at [9] OWL Web Ontology Language Overview available at [10] SPARQL Query Language for RDF [11] OWL-QL Project for the Stanford Knowledge Systems Laboratory at [12] [13] SWRL: A Semantic Web Rule Language available at [14] Jena 2 Inference support at [15] The Dublin Core Metadata Initiative available at [16] A survey report on The Semantic Web: An Overview by unknown author at [17] RDF Vocabulary Description Language, RDFS available at [18] DAML Home at [19] OIL Home at [20] DAML+OIL Home at [21] Web Ontology Language (OWL Lite, OWL DL, and OWL Full) at Page 64 of 100

66 [22] Jena2 Database Interface - Database Layout at [23] kazuki forum at [24] SPARQL Query Results XML Format available at [25] Joseki - A SPARQL Server for Jena available at [26] [27] SPARQL Support In MySQL available at [G] SPARQL-MySQL/XTech [28] RDF Access to Relational Databases, E. Prud'hommeaux, [29] [30] Publishing Relational Databases on the Semantic Web [31] An Architecture for Personal Semantic Web Information Retrieval System By Haibo Yu, Tsunenori Mine, Makoto Amamiya from al.is.kyushuu.ac.jp [32] Jena: Implementing the Semantic Web Recommendations By Jeremy J. Carroll, Ian Dickinson, Chris Dollin, Dave Reynolds, Andy Seaborne, Kevin Wilkinson from HP Laboratories Bristol [33] Manipulation and Exploration of Semantic Web Knowledge By Renaud Delbru From Cognitive Science and Advanced Computer Science 2006 [34] Building Semantic Applications Using Jena By Dave Reynolds & Ian Dickinson, From Hewlett Packard Bristol Labs [35] The Semantic Web: Everything you wanted to know but were too afraid to ask. At [36] Introducing SPARQL: Querying the Semantic Web at [37] Protégé available at Page 65 of 100

67 Appendix A RSS AND FOAF RSS (Really Simple Syndication) Suppose you re a information provider (e.g. a news site) and you want to allow your users to see some of the contents of your information (e.g. news headlines) on their own site or in some other program without visiting your site then for this you will make a RSS document ( a xml-syntax based language having its own tags for describing some information, often know as RSS feed) for your selected content (e.g. news headlines ) and then publish the link of this document on your site. Then interested parties can see the selected contents (e.g. news headlines) by using these public links (or private if you don t want to share with everybody) in their RSS reader software or sites that provide facility to aggregate RSS feeds. For example if you visit BBC or CNN site you can see some small orange color button having labels RSS or XML like in figure. These are actually links to these site s RSS feeds. By using these links one can see news in his own RSS reader software or site. Since mostly RSS feeds use for news sites so it also refers as news feed. One can also make a personalize news site containing RSS feeds of other news sites so saving a lot of time of surfing many sites. On the other hand news sites can attract more users in this way. Figure: RSS and XML Icons Since size of a RSS file is normally very small so it takes less time for loading and hence very useful for mobile devices like mobile phones or PDAs. Different Version There are different versions are available of RSS. RSS 0.1 and RSS 2.0 are mostly because of their simplicity while RSS 1.0 uses RDF standard. RSS version 2.0 Here first I describe RSS 2.0 which is latest and simplest by explaining a real world example of RSS feed from BBC news site. Page 66 of 100

68 Figure: RSS feed BBC News Site The first line tells the xml version and encoding. Second line is about the xslt that transform this RSS document. Then the real RSS elements start. <rss version= 2.0 > tell the version of the RSS. It is followed by a channel element that individually contains all RSS contents and metadata. channel The channel element is the main element in a RSS feed and can contain 3 required and 16 optional elements. The required elements are Page 67 of 100

69 tile It is the name of the RSS feed. Normally it is name of the site. Here in this case it is BBS News. link A link to a resource. Normally it is a link to the main site. description this element should describes RSS feed or channel The other two important elements are image and item. image is used to insert an image in channel element. The url element is the location of the image while its other sub elements make the same sense as corresponding channel elements. item elements are the most important elements of RSS feed. These are optional but without an item element RSS feed do not make any sense. Normally one item element represents one news story. The three most important elements I am describing here. title it is the title of the story news. description is the outline of the story news. link is the link to the particular part of site where this particular news story exists. The information about remaining optional fields can be read from resources [A] [B] RSS 1.0 RSS 1.0 is RDF based that gives a unique URI to each resource in RSS feed. The purpose of using RDF in RSS was to support semantic web concept and to make it more acceptable for machine processing. I transferred the above BBC RSS 2.0 example into RSS 1.0 by reading its specification from resource [C]. Here I describe the major differences or attributes/elements that are not present in RSS 2.0 example. Page 68 of 100

70 Figure: Example of RSS/RDF After the standard xml declaration, the first two lines are the name spaces denoting the RSS version that is 1.0 in this case and RDF name space. Then the standard channel element that we have seen in RSS 1.0 but the difference is here channel attribute has about attribute that uniquely identified this channel resource. In the same way image and item elements also have about attribute that are normally same as their link attribute. The other difference that we can see is all resources image and items are first declared in channel element and then used later on. The resource attribute during their declaration should have same values as their corresponding about attribute later on. Also sequence of items is described during their declaration with <rdf:seq> in channel element. Full detail about RSS 2.0 can be read from resources [A][B]. Page 69 of 100

71 One important thing to note is that its version 0.9 (not describing here) is with without RDF support, version 1.0 is with RDF support and version 2.0 is again without RDF. This is inconsistency with its version. The one reason is there is no central body who is governing RSS and so these versions are from different parties. The other reason is version 1.0 was developed to support semantic web while since this is not some thing every body requires so version 2.0 again came without RDF and enhanced feature of version 0.9. So mostly news sites are using RSS 2.0 but there are a few applications that are using RSS/RDF version 1.0. I am describing such an example later on. Some open source APIs libraries are available for generating RSS from a java application. Also there are some APIs libraries by which it is possible to process a RSS feed. A list of such APIs libraries can be seen from reference [D]. FOAF (Friend OF A Friend) Figure FOAF [E] FOAF language is an open source community project to define RDF vocabulary for describing metadata about people, their interests, activities and relationship. First here I give a small example of FOAF document describing me and my three friends by its Page 70 of 100

72 foaf:knows relation. In above example after namespaces, <foaf:person..> class is the core of FOAF vocabulary. It simple describes a person with other vocabulary elements like name, title, family name, given name etc. Here I am describing myself as <foaf:person..> class. Then <foaf:knows/> element state that there is a knowing relation between <foaf:person..> (me in this case) and the three <foaf:person> (my three friends in this case) inside <foaf:knows/> element. By default this relationship considered as a friendship relation. Yet there is no fine grained relation in FOAF like friendof, parenetof, etc. but that type of fine grained relations we can use some other standard relation schema language. One other important element of FOAF is <foaf:image../> that is used to insert information about an image. FOAF has also elements for defining groups, projects, membership, online account, chat accounts, interests etc. [E] With FOAF documents it is very easy for an application to link people and to form communities in which people know each other through common friends or interests. For Page 71 of 100

73 people it will be easy to know new persons entering into the community. They can share common interests among the community. Although FOAF is a very powerful concept but still it has to address some issue like controlling data to only trusting people, making fine grained relation, how to make some data private, specially how to use it with mailing lists, forums, chatting softwares etc. [30] One example of using FOAF in a commercial application is News Blender References: [A] Developing Feeds with RSS and Atom by By Ben Hammersley by O Reilly [B] RSS tutorial available at [C] RSS 1.0 Specification available at [D] List of Open Source RSS & RDF Tools in Java available at [E] The Friend of a Friend (FOAF) project at solution available at Page 72 of 100

74 Appendix B README This appendix describes hot to install the prototype application and test it. 1. Install IBM Rational Application Developer studio (RAD) Test version can be downloaded from ibm.com/software/awdtools/developer/application/. 2. Unzip the folder PrototypeCode from the attached CD. It contains following folders. 3. Copy the model folder to C:/ drive. After copying path must be c:/model/ 4. Remaining folders are RAD projects, import them in RAD. After importing it should be able to seen them in package explorer. Here I am showing all projects and main source code package. 5. SemanticEJB has all the code containing business objects and session beans. While other packages are clients of session beans. SemanticWeb is a client project of QueryBO web service. 6. After importing, to test any session bean right click on it and run it on server. Page 73 of 100

75 7. In order to test web service, use web service explorer. Page 74 of 100

76 8. If you have any problem in setting environment for session bean then best idea to test QueryBO and NewsBO. All main code is in these two business objects. Session beans and web service are just wrapper pf these objects and generated by RAD. Here showing the package hierarchy. Package Com.ibm.ejs.container Sw.business Sw.ejbs Sw.kazuki.news.base Sw.kazuki.news.custom Sw.ontology Sw.utils Sw.vocab Code RAD generated code for session bean s stub and skeleton Containing the two business objects Contain session beans Kazuki generated interface for every class Kazuki generated class for every ontology class Have ontology related classes like NewsModel All utilities classes Kazuki generated vocabulary class for the model Page 75 of 100

Semantic Web Fundamentals

Semantic Web Fundamentals Semantic Web Fundamentals Web Technologies (706.704) 3SSt VU WS 2018/19 with acknowledgements to P. Höfler, V. Pammer, W. Kienreich ISDS, TU Graz January 7 th 2019 Overview What is Semantic Web? Technology

More information

Contents. G52IWS: The Semantic Web. The Semantic Web. Semantic web elements. Semantic Web technologies. Semantic Web Services

Contents. G52IWS: The Semantic Web. The Semantic Web. Semantic web elements. Semantic Web technologies. Semantic Web Services Contents G52IWS: The Semantic Web Chris Greenhalgh 2007-11-10 Introduction to the Semantic Web Semantic Web technologies Overview RDF OWL Semantic Web Services Concluding comments 1 See Developing Semantic

More information

The Semantic Web. What is the Semantic Web?

The Semantic Web. What is the Semantic Web? The Semantic Web Alun Preece Computing Science, University of Aberdeen (from autumn 2007: School of Computer Science, Cardiff University) What is the Semantic Web, and why do we need it now? How does the

More information

Table of Contents. iii

Table of Contents. iii Current Web 1 1.1 Current Web History 1 1.2 Current Web Characteristics 2 1.2.1 Current Web Features 2 1.2.2 Current Web Benefits 3 1.2.3. Current Web Applications 3 1.3 Why the Current Web is not Enough

More information

Outline RDF. RDF Schema (RDFS) RDF Storing. Semantic Web and Metadata What is RDF and what is not? Why use RDF? RDF Elements

Outline RDF. RDF Schema (RDFS) RDF Storing. Semantic Web and Metadata What is RDF and what is not? Why use RDF? RDF Elements Knowledge management RDF and RDFS 1 RDF Outline Semantic Web and Metadata What is RDF and what is not? Why use RDF? RDF Elements RDF Schema (RDFS) RDF Storing 2 Semantic Web The Web today: Documents for

More information

Querying the Semantic Web

Querying the Semantic Web Querying the Semantic Web CSE 595 Semantic Web Instructor: Dr. Paul Fodor Stony Brook University http://www3.cs.stonybrook.edu/~pfodor/courses/cse595.html Lecture Outline SPARQL Infrastructure Basics:

More information

Semantic Web. RDF and RDF Schema. Morteza Amini. Sharif University of Technology Spring 90-91

Semantic Web. RDF and RDF Schema. Morteza Amini. Sharif University of Technology Spring 90-91 بسمه تعالی Semantic Web RDF and RDF Schema Morteza Amini Sharif University of Technology Spring 90-91 Outline Metadata RDF RDFS RDF(S) Tools 2 Semantic Web: Problems (1) Too much Web information around

More information

Ontological Modeling: Part 2

Ontological Modeling: Part 2 Ontological Modeling: Part 2 Terry Halpin LogicBlox This is the second in a series of articles on ontology-based approaches to modeling. The main focus is on popular ontology languages proposed for the

More information

Semantic Web Fundamentals

Semantic Web Fundamentals Semantic Web Fundamentals Web Technologies (706.704) 3SSt VU WS 2017/18 Vedran Sabol with acknowledgements to P. Höfler, V. Pammer, W. Kienreich ISDS, TU Graz December 11 th 2017 Overview What is Semantic

More information

Semantic Web Technologies: Web Ontology Language

Semantic Web Technologies: Web Ontology Language Semantic Web Technologies: Web Ontology Language Motivation OWL Formal Semantic OWL Synopsis OWL Programming Introduction XML / XML Schema provides a portable framework for defining a syntax RDF forms

More information

RDF. Mario Arrigoni Neri

RDF. Mario Arrigoni Neri RDF Mario Arrigoni Neri WEB Generations Internet phase 1: static contents HTML pages FTP resources User knows what he needs and where to retrieve it Internet phase 2: web applications Custom presentation

More information

Short notes about OWL 1

Short notes about OWL 1 University of Rome Tor Vergata Short notes about OWL 1 Manuel Fiorelli fiorelli@info.uniroma2.it [1] this presentation is limited to OWL 1 features. A new version of OWL (OWL 2), which adds further features

More information

Semantic Web In Depth: Resource Description Framework. Dr Nicholas Gibbins 32/4037

Semantic Web In Depth: Resource Description Framework. Dr Nicholas Gibbins 32/4037 Semantic Web In Depth: Resource Description Framework Dr Nicholas Gibbins 32/4037 nmg@ecs.soton.ac.uk RDF syntax(es) RDF/XML is the standard syntax Supported by almost all tools RDF/N3 (Notation3) is also

More information

Chapter 13: Advanced topic 3 Web 3.0

Chapter 13: Advanced topic 3 Web 3.0 Chapter 13: Advanced topic 3 Web 3.0 Contents Web 3.0 Metadata RDF SPARQL OWL Web 3.0 Web 1.0 Website publish information, user read it Ex: Web 2.0 User create content: post information, modify, delete

More information

Orchestrating Music Queries via the Semantic Web

Orchestrating Music Queries via the Semantic Web Orchestrating Music Queries via the Semantic Web Milos Vukicevic, John Galletly American University in Bulgaria Blagoevgrad 2700 Bulgaria +359 73 888 466 milossmi@gmail.com, jgalletly@aubg.bg Abstract

More information

TRIPLE An RDF Query, Inference, and Transformation Language

TRIPLE An RDF Query, Inference, and Transformation Language TRIPLE An RDF Query, Inference, and Transformation Language Michael Sintek sintek@dfki.de DFKI GmbH Stefan Decker stefan@db.stanford.edu Stanford University Database Group DDLP'2001 Tokyo, Japan, October

More information

Ontologies and The Earth System Grid

Ontologies and The Earth System Grid Ontologies and The Earth System Grid Line Pouchard (ORNL) PI s: Ian Foster (ANL); Don Middleton (NCAR); and Dean Williams (LLNL) http://www.earthsystemgrid.org The NIEeS Workshop Cambridge, UK Overview:

More information

An RDF-based Distributed Expert System

An RDF-based Distributed Expert System An RDF-based Distributed Expert System NAPAT PRAPAKORN*, SUPHAMIT CHITTAYASOTHORN** Department of Computer Engineering King Mongkut's Institute of Technology Ladkrabang Faculty of Engineering, Bangkok

More information

Semantic Web Information Management

Semantic Web Information Management Semantic Web Information Management Norberto Fernández ndez Telematics Engineering Department berto@ it.uc3m.es.es 1 Motivation n Module 1: An ontology models a domain of knowledge n Module 2: using the

More information

OWL a glimpse. OWL a glimpse (2) requirements for ontology languages. requirements for ontology languages

OWL a glimpse. OWL a glimpse (2) requirements for ontology languages. requirements for ontology languages OWL a glimpse OWL Web Ontology Language describes classes, properties and relations among conceptual objects lecture 7: owl - introduction of#27# ece#720,#winter# 12# 2# of#27# OWL a glimpse (2) requirements

More information

RDF Schema. Mario Arrigoni Neri

RDF Schema. Mario Arrigoni Neri RDF Schema Mario Arrigoni Neri Semantic heterogeneity Standardization: commitment on common shared markup If no existing application If market-leaders can define de-facto standards Translation: create

More information

Main topics: Presenter: Introduction to OWL Protégé, an ontology editor OWL 2 Semantic reasoner Summary TDT OWL

Main topics: Presenter: Introduction to OWL Protégé, an ontology editor OWL 2 Semantic reasoner Summary TDT OWL 1 TDT4215 Web Intelligence Main topics: Introduction to Web Ontology Language (OWL) Presenter: Stein L. Tomassen 2 Outline Introduction to OWL Protégé, an ontology editor OWL 2 Semantic reasoner Summary

More information

COMPUTER AND INFORMATION SCIENCE JENA DB. Group Abhishek Kumar Harshvardhan Singh Abhisek Mohanty Suhas Tumkur Chandrashekhara

COMPUTER AND INFORMATION SCIENCE JENA DB. Group Abhishek Kumar Harshvardhan Singh Abhisek Mohanty Suhas Tumkur Chandrashekhara JENA DB Group - 10 Abhishek Kumar Harshvardhan Singh Abhisek Mohanty Suhas Tumkur Chandrashekhara OUTLINE Introduction Data Model Query Language Implementation Features Applications Introduction Open Source

More information

Today: RDF syntax. + conjunctive queries for OWL. KR4SW Winter 2010 Pascal Hitzler 3

Today: RDF syntax. + conjunctive queries for OWL. KR4SW Winter 2010 Pascal Hitzler 3 Today: RDF syntax + conjunctive queries for OWL KR4SW Winter 2010 Pascal Hitzler 3 Today s Session: RDF Schema 1. Motivation 2. Classes and Class Hierarchies 3. Properties and Property Hierarchies 4. Property

More information

Deep integration of Python with Semantic Web technologies

Deep integration of Python with Semantic Web technologies Deep integration of Python with Semantic Web technologies Marian Babik, Ladislav Hluchy Intelligent and Knowledge Technologies Group Institute of Informatics, SAS Goals of the presentation Brief introduction

More information

Semantic Web Systems Querying Jacques Fleuriot School of Informatics

Semantic Web Systems Querying Jacques Fleuriot School of Informatics Semantic Web Systems Querying Jacques Fleuriot School of Informatics 5 th February 2015 In the previous lecture l Serialising RDF in XML RDF Triples with literal Object edstaff:9888 foaf:name Ewan Klein.

More information

RDF /RDF-S Providing Framework Support to OWL Ontologies

RDF /RDF-S Providing Framework Support to OWL Ontologies RDF /RDF-S Providing Framework Support to OWL Ontologies Rajiv Pandey #, Dr.Sanjay Dwivedi * # Amity Institute of information Technology, Amity University Lucknow,India * Dept.Of Computer Science,BBA University

More information

Profiles Research Networking Software API Guide

Profiles Research Networking Software API Guide Profiles Research Networking Software API Guide Documentation Version: March 13, 2013 Software Version: ProfilesRNS_1.0.3 Table of Contents Overview... 2 PersonID, URI, and Aliases... 3 1) Profiles RNS

More information

Adding formal semantics to the Web

Adding formal semantics to the Web Adding formal semantics to the Web building on top of RDF Schema Jeen Broekstra On-To-Knowledge project Context On-To-Knowledge IST project about content-driven knowledge management through evolving ontologies

More information

SPARQL: An RDF Query Language

SPARQL: An RDF Query Language SPARQL: An RDF Query Language Wiltrud Kessler Institut für Maschinelle Sprachverarbeitung Universität Stuttgart Semantic Web Winter 2015/16 This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike

More information

WHY WE NEED AN XML STANDARD FOR REPRESENTING BUSINESS RULES. Introduction. Production rules. Christian de Sainte Marie ILOG

WHY WE NEED AN XML STANDARD FOR REPRESENTING BUSINESS RULES. Introduction. Production rules. Christian de Sainte Marie ILOG WHY WE NEED AN XML STANDARD FOR REPRESENTING BUSINESS RULES Christian de Sainte Marie ILOG Introduction We are interested in the topic of communicating policy decisions to other parties, and, more generally,

More information

BUILDING THE SEMANTIC WEB

BUILDING THE SEMANTIC WEB BUILDING THE SEMANTIC WEB You might have come across the term Semantic Web Applications often, during talks about the future of Web apps. Check out what this is all about There are two aspects to the possible

More information

Web Science & Technologies University of Koblenz Landau, Germany. RDF Schema. Steffen Staab. Semantic Web

Web Science & Technologies University of Koblenz Landau, Germany. RDF Schema. Steffen Staab. Semantic Web Web Science & Technologies University of Koblenz Landau, Germany RDF Schema RDF Schemas Describe rules for using RDF properties Are expressed in RDF Extends original RDF vocabulary Are not to be confused

More information

Mustafa Jarrar: Lecture Notes on RDF Schema Birzeit University, Version 3. RDFS RDF Schema. Mustafa Jarrar. Birzeit University

Mustafa Jarrar: Lecture Notes on RDF Schema Birzeit University, Version 3. RDFS RDF Schema. Mustafa Jarrar. Birzeit University Mustafa Jarrar: Lecture Notes on RDF Schema Birzeit University, 2018 Version 3 RDFS RDF Schema Mustafa Jarrar Birzeit University 1 Watch this lecture and download the slides Course Page: http://www.jarrar.info/courses/ai/

More information

Semantic Web and Linked Data

Semantic Web and Linked Data Semantic Web and Linked Data Petr Křemen December 2012 Contents Semantic Web Technologies Overview Linked Data Semantic Web Technologies Overview Semantic Web Technology Stack from Wikipedia. http://wikipedia.org/wiki/semantic_web,

More information

Opus: University of Bath Online Publication Store

Opus: University of Bath Online Publication Store Patel, M. (2002) Metadata vocabularies and ontologies. In: Ontologies & Communications Working Group Meeting, Agentcities Information Day 2, 2002-09-09-2002-09-10, Lisbon. Link to official URL (if available):

More information

Semantics. Matthew J. Graham CACR. Methods of Computational Science Caltech, 2011 May 10. matthew graham

Semantics. Matthew J. Graham CACR. Methods of Computational Science Caltech, 2011 May 10. matthew graham Semantics Matthew J. Graham CACR Methods of Computational Science Caltech, 2011 May 10 semantic web The future of the Internet (Web 3.0) Decentralized platform for distributed knowledge A web of databases

More information

JENA: A Java API for Ontology Management

JENA: A Java API for Ontology Management JENA: A Java API for Ontology Management Hari Rajagopal IBM Corporation Page Agenda Background Intro to JENA Case study Tools and methods Questions Page The State of the Web Today The web is more Syntactic

More information

Semantic Web Ontologies

Semantic Web Ontologies Semantic Web Ontologies CS 431 April 4, 2005 Carl Lagoze Cornell University Acknowledgements: Alun Preece RDF Schemas Declaration of vocabularies classes, properties, and structures defined by a particular

More information

Extracting knowledge from Ontology using Jena for Semantic Web

Extracting knowledge from Ontology using Jena for Semantic Web Extracting knowledge from Ontology using Jena for Semantic Web Ayesha Ameen I.T Department Deccan College of Engineering and Technology Hyderabad A.P, India ameenayesha@gmail.com Khaleel Ur Rahman Khan

More information

The Semantic Web. Mansooreh Jalalyazdi

The Semantic Web. Mansooreh Jalalyazdi 1 هو العليم 2 The Semantic Web Mansooreh Jalalyazdi 3 Content Syntactic web XML Add semantics Representation Language RDF, RDFS OWL Query languages 4 History of the Semantic Web Tim Berners-Lee vision

More information

Semantic Web. Tahani Aljehani

Semantic Web. Tahani Aljehani Semantic Web Tahani Aljehani Motivation: Example 1 You are interested in SOAP Web architecture Use your favorite search engine to find the articles about SOAP Keywords-based search You'll get lots of information,

More information

Semantic Web Technologies: RDF + RDFS

Semantic Web Technologies: RDF + RDFS Semantic Web Technologies: RDF + RDFS RDF Language RDF Schema The limits of my language are the limits of my world. Ludwig Wittgenstein RDF Expressiveness & Semantics RDF Programming Introduction The Semantic

More information

Semantic Annotations for BPMN models: Extending SeMFIS for supporting ontology reasoning and query functionalities. Dimitraki Katerina

Semantic Annotations for BPMN models: Extending SeMFIS for supporting ontology reasoning and query functionalities. Dimitraki Katerina Semantic Annotations for BPMN models: Extending SeMFIS for supporting ontology reasoning and query functionalities Dimitraki Katerina Thesis submitted in partial fulfillment of the requirements for the

More information

H1 Spring B. Programmers need to learn the SOAP schema so as to offer and use Web services.

H1 Spring B. Programmers need to learn the SOAP schema so as to offer and use Web services. 1. (24 points) Identify all of the following statements that are true about the basics of services. A. If you know that two parties implement SOAP, then you can safely conclude they will interoperate at

More information

Linked data and its role in the semantic web. Dave Reynolds, Epimorphics

Linked data and its role in the semantic web. Dave Reynolds, Epimorphics Linked data and its role in the semantic web Dave Reynolds, Epimorphics Ltd @der42 Roadmap What is linked data? Modelling Strengths and weaknesses Examples Access other topics image: Leo Oosterloo @ flickr.com

More information

SWAD-Europe Deliverable 8.1 Core RDF Vocabularies for Thesauri

SWAD-Europe Deliverable 8.1 Core RDF Vocabularies for Thesauri Mon Jun 07 2004 12:07:51 Europe/London SWAD-Europe Deliverable 8.1 Core RDF Vocabularies for Thesauri Project name: Semantic Web Advanced Development for Europe (SWAD-Europe) Project Number: IST-2001-34732

More information

Helmi Ben Hmida Hannover University, Germany

Helmi Ben Hmida Hannover University, Germany Helmi Ben Hmida Hannover University, Germany 1 Summarizing the Problem: Computers don t understand Meaning My mouse is broken. I need a new one 2 The Semantic Web Vision the idea of having data on the

More information

Semantic Web. Ontology and OWL. Morteza Amini. Sharif University of Technology Fall 95-96

Semantic Web. Ontology and OWL. Morteza Amini. Sharif University of Technology Fall 95-96 ه عا ی Semantic Web Ontology and OWL Morteza Amini Sharif University of Technology Fall 95-96 Outline Introduction & Definitions Ontology Languages OWL (Ontology Web Language) 2 Outline Introduction &

More information

XML and Semantic Web Technologies. III. Semantic Web / 1. Ressource Description Framework (RDF)

XML and Semantic Web Technologies. III. Semantic Web / 1. Ressource Description Framework (RDF) XML and Semantic Web Technologies XML and Semantic Web Technologies III. Semantic Web / 1. Ressource Description Framework (RDF) Prof. Dr. Dr. Lars Schmidt-Thieme Information Systems and Machine Learning

More information

Multi-agent and Semantic Web Systems: Querying

Multi-agent and Semantic Web Systems: Querying Multi-agent and Semantic Web Systems: Querying Fiona McNeill School of Informatics 11th February 2013 Fiona McNeill Multi-agent Semantic Web Systems: Querying 11th February 2013 0/30 Contents This lecture

More information

FOUNDATIONS OF SEMANTIC WEB TECHNOLOGIES

FOUNDATIONS OF SEMANTIC WEB TECHNOLOGIES FOUNDATIONS OF SEMANTIC WEB TECHNOLOGIES Semantics of RDF(S) Sebastian Rudolph Dresden, 25 April 2014 Content Overview & XML Introduction into RDF RDFS Syntax & Intuition Tutorial 1 RDFS Semantics RDFS

More information

Lecture Telecooperation. D. Fensel Leopold-Franzens- Universität Innsbruck

Lecture Telecooperation. D. Fensel Leopold-Franzens- Universität Innsbruck Lecture Telecooperation D. Fensel Leopold-Franzens- Universität Innsbruck First Lecture: Introduction: Semantic Web & Ontology Introduction Semantic Web and Ontology Part I Introduction into the subject

More information

An Introduction to the Semantic Web. Jeff Heflin Lehigh University

An Introduction to the Semantic Web. Jeff Heflin Lehigh University An Introduction to the Semantic Web Jeff Heflin Lehigh University The Semantic Web Definition The Semantic Web is not a separate Web but an extension of the current one, in which information is given well-defined

More information

Making BioPAX SPARQL

Making BioPAX SPARQL Making BioPAX SPARQL hands on... start a terminal create a directory jena_workspace, move into that directory download jena.jar (http://tinyurl.com/3vlp7rw) download biopax data (http://www.biopax.org/junk/homosapiens.nt

More information

From the Web to the Semantic Web: RDF and RDF Schema

From the Web to the Semantic Web: RDF and RDF Schema From the Web to the Semantic Web: RDF and RDF Schema Languages for web Master s Degree Course in Computer Engineering - (A.Y. 2016/2017) The Semantic Web [Berners-Lee et al., Scientific American, 2001]

More information

SEMANTIC WEB AN INTRODUCTION. Luigi De https://elite.polito.it

SEMANTIC WEB AN INTRODUCTION. Luigi De https://elite.polito.it SEMANTIC WEB AN INTRODUCTION Luigi De Russis @luigidr https://elite.polito.it THE WEB IS A WEB OF DOCUMENT FOR PEOPLE, NOT FOR MACHINES 2 THE WEB IS A WEB OF DOCUMENT 3 THE SEMANTIC WEB IS A WEB OF DATA

More information

Semantic Web Update W3C RDF, OWL Standards, Development and Applications. Dave Beckett

Semantic Web Update W3C RDF, OWL Standards, Development and Applications. Dave Beckett Semantic Web Update W3C RDF, OWL Standards, Development and Applications Dave Beckett Introduction Semantic Web Activity RDF - RDF Core OWL - WebOnt Interest Group Query, Calendaring SWAD and Applications

More information

The Semantic Web Revisited. Nigel Shadbolt Tim Berners-Lee Wendy Hall

The Semantic Web Revisited. Nigel Shadbolt Tim Berners-Lee Wendy Hall The Semantic Web Revisited Nigel Shadbolt Tim Berners-Lee Wendy Hall Today sweb It is designed for human consumption Information retrieval is mainly supported by keyword-based search engines Some problems

More information

Chapter 2 AN INTRODUCTION TO THE OWL WEB ONTOLOGY LANGUAGE 1. INTRODUCTION. Jeff Heflin Lehigh University

Chapter 2 AN INTRODUCTION TO THE OWL WEB ONTOLOGY LANGUAGE 1. INTRODUCTION. Jeff Heflin Lehigh University Chapter 2 AN INTRODUCTION TO THE OWL WEB ONTOLOGY LANGUAGE Jeff Heflin Lehigh University Abstract: Key words: 1. INTRODUCTION The OWL Web Ontology Language is an international standard for encoding and

More information

Logic and Reasoning in the Semantic Web (part I RDF/RDFS)

Logic and Reasoning in the Semantic Web (part I RDF/RDFS) Logic and Reasoning in the Semantic Web (part I RDF/RDFS) Fulvio Corno, Laura Farinetti Politecnico di Torino Dipartimento di Automatica e Informatica e-lite Research Group http://elite.polito.it Outline

More information

Analysis Data Transfer Framework "ORIENT" Specification

Analysis Data Transfer Framework ORIENT Specification NPW3C2011-002 Analysis Data Transfer Framework "ORIENT" Specification Revision 1.9 Last update: February 7, 2011 NEC Corporation NEC Corporation 2010 Table of contents 1 Introduction... 5 1.1 Objective...

More information

Design and Implementation of an RDF Triple Store

Design and Implementation of an RDF Triple Store Design and Implementation of an RDF Triple Store Ching-Long Yeh and Ruei-Feng Lin Department of Computer Science and Engineering Tatung University 40 Chungshan N. Rd., Sec. 3 Taipei, 04 Taiwan E-mail:

More information

Using RDF to Model the Structure and Process of Systems

Using RDF to Model the Structure and Process of Systems Using RDF to Model the Structure and Process of Systems Marko A. Rodriguez Jennifer H. Watkins Johan Bollen Los Alamos National Laboratory {marko,jhw,jbollen}@lanl.gov Carlos Gershenson New England Complex

More information

Semantic Web Engineering

Semantic Web Engineering Semantic Web Engineering Gerald Reif reif@ifi.unizh.ch Fr. 10:15-12:00, Room 2.A.10 RDF Schema Trust Proof Logic Ontology vocabulary RDF + RDF Schema XML + NS + XML Schema Unicode URI Digital Signature

More information

KDI OWL. Fausto Giunchiglia and Mattia Fumagallli. University of Trento

KDI OWL. Fausto Giunchiglia and Mattia Fumagallli. University of Trento KDI OWL Fausto Giunchiglia and Mattia Fumagallli University of Trento Roadmap Introduction The OWL Full Language OWL DL and OWL lite Exercises 2 Introduction Chapter 1 3 Requirements for Ontology Languages

More information

CSc 8711 Report: OWL API

CSc 8711 Report: OWL API CSc 8711 Report: OWL API Syed Haque Department of Computer Science Georgia State University Atlanta, Georgia 30303 Email: shaque4@student.gsu.edu Abstract: The Semantic Web is an extension of human-readable

More information

OSM Lecture (14:45-16:15) Takahira Yamaguchi. OSM Exercise (16:30-18:00) Susumu Tamagawa

OSM Lecture (14:45-16:15) Takahira Yamaguchi. OSM Exercise (16:30-18:00) Susumu Tamagawa OSM Lecture (14:45-16:15) Takahira Yamaguchi OSM Exercise (16:30-18:00) Susumu Tamagawa TBL 1 st Proposal Information Management: A Proposal (1989) Links have the following types: depends on is part of

More information

Semantic Web Lecture Part 4. Prof. Do van Thanh

Semantic Web Lecture Part 4. Prof. Do van Thanh Semantic Web Lecture Part 4 Prof. Do van Thanh The components of the Semantic Web Overview XML provides a surface syntax for structured documents, but imposes no semantic constraints on the meaning of

More information

Semantic Web Technologies

Semantic Web Technologies 1/57 Introduction and RDF Jos de Bruijn debruijn@inf.unibz.it KRDB Research Group Free University of Bolzano, Italy 3 October 2007 2/57 Outline Organization Semantic Web Limitations of the Web Machine-processable

More information

RDF(S) Resource Description Framework (Schema)

RDF(S) Resource Description Framework (Schema) RDF(S) Resource Description Framework (Schema) Where are we? OWL Reasoning DL Extensions Scalability OWL OWL in practice PL/FOL XML RDF(S) Practical Topics 2 Where are we? PL, FOL, XML Today: RDF Purposes?

More information

Day 2. RISIS Linked Data Course

Day 2. RISIS Linked Data Course Day 2 RISIS Linked Data Course Overview of the Course: Friday 9:00-9:15 Coffee 9:15-9:45 Introduction & Reflection 10:30-11:30 SPARQL Query Language 11:30-11:45 Coffee 11:45-12:30 SPARQL Hands-on 12:30-13:30

More information

Semantic Web Tools. Federico Chesani 18 Febbraio 2010

Semantic Web Tools. Federico Chesani 18 Febbraio 2010 Semantic Web Tools Federico Chesani 18 Febbraio 2010 Outline A unique way for identifying concepts How to uniquely identified concepts? -> by means of a name system... SW exploits an already available

More information

SPARQL QUERY LANGUAGE WEB:

SPARQL QUERY LANGUAGE   WEB: SPARQL QUERY LANGUAGE JELENA JOVANOVIC EMAIL: JELJOV@GMAIL.COM WEB: HTTP://JELENAJOVANOVIC.NET SPARQL query language W3C standard for querying RDF graphs Can be used to query not only native RDF data,

More information

Efficient Querying of Web Services Using Ontologies

Efficient Querying of Web Services Using Ontologies Journal of Algorithms & Computational Technology Vol. 4 No. 4 575 Efficient Querying of Web Services Using Ontologies K. Saravanan, S. Kripeshwari and Arunkumar Thangavelu School of Computing Sciences,

More information

RDF. Charlie Abela Department of Artificial Intelligence

RDF. Charlie Abela Department of Artificial Intelligence RDF Charlie Abela Department of Artificial Intelligence charlie.abela@um.edu.mt Last Lecture Introduced XPath and XQuery as languages that allow for accessing and extracting node information from XML Problems?

More information

Introducing Linked Data

Introducing Linked Data Introducing Linked Data (Part of this work was funded by PlanetData NoE FP7/2007-2013) Irini Fundulaki 1 1 Institute of Computer Science FORTH & W3C Greece Office Manager EICOS : 4th Meeting, Athens, Greece

More information

RDF AND SPARQL. Part III: Semantics of RDF(S) Dresden, August Sebastian Rudolph ICCL Summer School

RDF AND SPARQL. Part III: Semantics of RDF(S) Dresden, August Sebastian Rudolph ICCL Summer School RDF AND SPARQL Part III: Semantics of RDF(S) Sebastian Rudolph ICCL Summer School Dresden, August 2013 Agenda 1 Motivation and Considerations 2 Simple Entailment 3 RDF Entailment 4 RDFS Entailment 5 Downsides

More information

Lars Schmidt-Thieme, Information Systems and Machine Learning Lab (ISMLL), University of Hildesheim, Germany, Course on XML and Semantic Web

Lars Schmidt-Thieme, Information Systems and Machine Learning Lab (ISMLL), University of Hildesheim, Germany, Course on XML and Semantic Web Course on XML and Semantic Web Technologies, summer term 2012 0/45 XML and Semantic Web Technologies XML and Semantic Web Technologies II. Semantic Web / 3. SPARQL Query Language for RDF Lars Schmidt-Thieme

More information

Semantic Web. MPRI : Web Data Management. Antoine Amarilli Friday, January 11th 1/29

Semantic Web. MPRI : Web Data Management. Antoine Amarilli Friday, January 11th 1/29 Semantic Web MPRI 2.26.2: Web Data Management Antoine Amarilli Friday, January 11th 1/29 Motivation Information on the Web is not structured 2/29 Motivation Information on the Web is not structured This

More information

Semantic Technologies and CDISC Standards. Frederik Malfait, Information Architect, IMOS Consulting Scott Bahlavooni, Independent

Semantic Technologies and CDISC Standards. Frederik Malfait, Information Architect, IMOS Consulting Scott Bahlavooni, Independent Semantic Technologies and CDISC Standards Frederik Malfait, Information Architect, IMOS Consulting Scott Bahlavooni, Independent Part I Introduction to Semantic Technology Resource Description Framework

More information

SPARQL. Dr Nicholas Gibbins

SPARQL. Dr Nicholas Gibbins SPARQL Dr Nicholas Gibbins nmg@ecs.soton.ac.uk Semantic Web Applications Technologies considered so far allow us to create representation schemes (RDFS, OWL) and to represent data (RDF) We can put data

More information

CHAPTER 1 INTRODUCTION

CHAPTER 1 INTRODUCTION 1 CHAPTER 1 INTRODUCTION Most of today s Web content is intended for the use of humans rather than machines. While searching documents on the Web using computers, human interpretation is required before

More information

Web Services: OWL-S 2. BPEL and WSDL : Messages

Web Services: OWL-S 2. BPEL and WSDL : Messages OWL-S BPEL and WSDL : Messages Web s: OWL-S 2 Messaging and Message-Oriented Modeling Fundamental in composition: how and when the processes communicate Synchronous, asynchronous Conversations However,

More information

FOUNDATIONS OF SEMANTIC WEB TECHNOLOGIES

FOUNDATIONS OF SEMANTIC WEB TECHNOLOGIES FOUNDATIONS OF SEMANTIC WEB TECHNOLOGIES Semantics of RDF(S) Sebastian Rudolph Dresden, 16 April 2013 Agenda 1 Motivation and Considerations 2 Simple Entailment 3 RDF Entailment 4 RDFS Entailment 5 Downsides

More information

Linked Data: What Now? Maine Library Association 2017

Linked Data: What Now? Maine Library Association 2017 Linked Data: What Now? Maine Library Association 2017 Linked Data What is Linked Data Linked Data refers to a set of best practices for publishing and connecting structured data on the Web. URIs - Uniform

More information

Teiid Designer User Guide 7.5.0

Teiid Designer User Guide 7.5.0 Teiid Designer User Guide 1 7.5.0 1. Introduction... 1 1.1. What is Teiid Designer?... 1 1.2. Why Use Teiid Designer?... 2 1.3. Metadata Overview... 2 1.3.1. What is Metadata... 2 1.3.2. Editing Metadata

More information

Implementing and extending SPARQL queries over DLVHEX

Implementing and extending SPARQL queries over DLVHEX Implementing and extending SPARQL queries over DLVHEX Gennaro Frazzingaro Bachelor Thesis Presentation - October 5, 2007 From a work performed in Madrid, Spain Galway, Ireland Rende, Italy How to solve

More information

The Semantic Web DEFINITIONS & APPLICATIONS

The Semantic Web DEFINITIONS & APPLICATIONS The Semantic Web DEFINITIONS & APPLICATIONS Data on the Web There are more an more data on the Web Government data, health related data, general knowledge, company information, flight information, restaurants,

More information

Web Ontology Language: OWL

Web Ontology Language: OWL Web Ontology Language: OWL Bojan Furlan A Semantic Web Primer, G. Antoniou, F. van Harmelen Requirements for Ontology Languages Ontology languages allow users to write explicit, formal conceptualizations

More information

Proposal for Implementing Linked Open Data on Libraries Catalogue

Proposal for Implementing Linked Open Data on Libraries Catalogue Submitted on: 16.07.2018 Proposal for Implementing Linked Open Data on Libraries Catalogue Esraa Elsayed Abdelaziz Computer Science, Arab Academy for Science and Technology, Alexandria, Egypt. E-mail address:

More information

Developing markup metaschemas to support interoperation among resources with different markup schemas

Developing markup metaschemas to support interoperation among resources with different markup schemas Developing markup metaschemas to support interoperation among resources with different markup schemas Gary Simons SIL International ACH/ALLC Joint Conference 29 May to 2 June 2003, Athens, GA The Context

More information

Knowledge Representation RDF Turtle Namespace

Knowledge Representation RDF Turtle Namespace Knowledge Representation RDF Turtle Namespace Jan Pettersen Nytun, UiA 1 URIs Identify Web Resources Web addresses are the most common URIs, i.e., uniform Resource Locators (URLs). RDF resources are usually

More information

Knowledge Representations. How else can we represent knowledge in addition to formal logic?

Knowledge Representations. How else can we represent knowledge in addition to formal logic? Knowledge Representations How else can we represent knowledge in addition to formal logic? 1 Common Knowledge Representations Formal Logic Production Rules Semantic Nets Schemata and Frames 2 Production

More information

Open Geospatial Consortium Inc.

Open Geospatial Consortium Inc. OGC 09-010 Open Geospatial Consortium Inc. Date: 2009-07-27 Reference number of this OGC project document: OGC 09-010 Version: 0.3.0 Category: OGC Discussion Paper Editor: Kristin Stock OGC Catalogue Services

More information

Semantic Web Knowledge Representation in the Web Context. CS 431 March 24, 2008 Carl Lagoze Cornell University

Semantic Web Knowledge Representation in the Web Context. CS 431 March 24, 2008 Carl Lagoze Cornell University Semantic Web Knowledge Representation in the Web Context CS 431 March 24, 2008 Carl Lagoze Cornell University Acknowledgements for various slides and ideas Ian Horrocks (Manchester U.K.) Eric Miller (W3C)

More information

Semantic Information Retrieval: An Ontology and RDFbased

Semantic Information Retrieval: An Ontology and RDFbased Semantic Information Retrieval: An Ontology and RDFbased Model S. Mahaboob Hussain Assistant Professor, CSE Prathyusha Kanakam Assistant Professor, CSE D. Suryanarayana Professor, CSE Swathi Gunnam PG

More information

DEVELOPING AN OWL ONTOLOGY FOR E- TOURISM

DEVELOPING AN OWL ONTOLOGY FOR E- TOURISM Chapter 4 DEVELOPING AN OWL ONTOLOGY FOR E- TOURISM Jorge Cardoso Department of Mathematics and Engineering, University of Madeira, 9000-390, Funchal, Portugal jcardoso@uma.pt 1. INTRODUCTION Currently,

More information

Semantic Web Test

Semantic Web Test Semantic Web Test 24.01.2017 Group 1 No. A B C D 1 X X X 2 X X 3 X X 4 X X 5 X X 6 X X X X 7 X X 8 X X 9 X X X 10 X X X 11 X 12 X X X 13 X X 14 X X 15 X X 16 X X 17 X 18 X X 19 X 20 X X 1. Which statements

More information

Library of Congress BIBFRAME Pilot. NOTSL Fall Meeting October 30, 2015

Library of Congress BIBFRAME Pilot. NOTSL Fall Meeting October 30, 2015 Library of Congress BIBFRAME Pilot NOTSL Fall Meeting October 30, 2015 THE BIBFRAME EDITOR AND THE LC PILOT The Semantic Web and Linked Data : a Recap of the Key Concepts Learning Objectives Describe the

More information