WEB SEMANTIC ONTOLOGY (24.04.2016)

PROTEGE INSTALLATION

Part I: Installing Protege


1.      1. Download Protege software in this link.

You will be directed to a page as shown in figure 1 below.


Figure 1: Download Page

1.       2.  Next, open folder containing the installer. Double click on the installer and
        click Run on the popup windows. 


Figure 2: Protege Installer

1.      3.  An installation wizard will appear with a complete step by step installation 
       process.

a)      Click Next in the Introduction.


Figure 3: Introduction Step

b)  Choose the installation folder. It’s best to choose the default folder which is "C:\\Program\Program Files\Protege_4.3". Click Next.


Figure 4: Choose Installation Folder

c)      Choose where to place shortcut folder. We choose to place it
  on the desktop and click Next.


Figure 5: Choose Shortcut Folder Location

   d)      Next, choose Java Virtual Machine that is suitable and click 
     Next.


Figure 6: Choose Java Virtual Machine


e)      A pre-installation summary will be shown, click Install so it can  start installing.



Figure 7: Pre-installation summary

      f)      Installing protege.


Figure 8:  Installation Start

       g)      Installation complete.


Figure 9: Installation Completed

4.     Now, you can start using protege to make and edit an ontology.


Part II: Using Protege


Open the protege software to start using it. Figure 1 shows the interface of protege.


Figure 1: Protege Interface


Part III: Protege Tutorial



This protege tutorial are based on a series of video by Dr. Noureddin Sadawi.


A.      Introduction to Ontology

       1.       Figure 2 shows an ontology of Person where its
              subclasses are Student and Lecturer.  
           
             Student studiesModule
             Lecturer teachesModule



Figure 2: Person Subclasses



Figure 3: Module Subclasses

2.       Figure 3 shows other example of ontology where both CSModule and MathModule are subclasses of Module.

  B.      Creating Ontology Class

       1.       Click on classes tab to create class.


Figure 4: Classes Tab Selected

       2.       Add a new class. We add a new class named Person.


Figure 5: Person Class Added

          3.    Next, add another two classes named Student and 
                Lecturer under Person class.


Figure 6: Student Class Added


Figure 7: Lecturer Class Added


4.    Repeat the process of adding class with a new Module class. Then, add two new class  under Module named CSModule and MathModule.



Figure 8:  Created Person and Module Class With Their Subclasses

5.     Click on any of the module and click Disjoint with at the 
       description


Figure 9: Disjoint With Option

6.      Click ctrl and click on MathModule, Lecturer, and Student to be   Disjoint with.



Figure 10:Disjoint of MathModule, Lecturer and Student

Reason for the Disjoint:

  •      To avoid overlapping between classes, ie subclass, or an instances or an individual can only be an instances of one class so we can avoid multiple inheritances.

C.      Adding Object Properties.

1.       Save the previous file. We named our file as Ontology IRI.


Figure 1: Saving File

2.       Open the object properties.


Figure 2: Object Properties Pop Up

3.       Create a sub-properties, named as teaches and studies as in Figure 3.


Figure 3: Teaches and Studies Sub-Properties Created


              
             4.       Then, set the domain for the studies is the student 
                     and the range is the module.


                         
                5.    Meanwhile, the domain teaches is teacher and the 
                       range is module.


D.      Adding Data Properties

      1.       Data properties is used to add details to the classes. Add 
         data properties such as first name or anything.



Figure 4: Add Data Properties


  2.      Add data properties student_id, domain set is lecturer and  
         the range is an integer.


  3.       Next, data properties staff_id, domain set is student and the 
          range is an integer


  4.       After that, last_name and first_name domain is a person 
          class and the range is string.


Figure 5: Completed Setting

   5.       Then, test it by starting the reasoner to see whether there 
            is any error.


Figure 6: Reasoner Started

    6.       If the reasoner did not show any error, yo can stop the 
            reasoner.


Figure 7: Reasoner Stopped


Part IV: Protege Tutorial


E.      Adding Individuals.

1.       Create new individual for the classes.


Figure 1: Add New Individual

2.       Key in as many individual that fit your ontology
  then key in the possible description for each   
  individuals


Figure 2: Add Description According To the Individuals

3.      Key in the object property assertions and data
  property assertions that fits that individuals


Figure 3: Add Data Property Assertions


Figure 4: Add Object Property Assertions



Part V: Protege Tutorial


F.      Publish and SPARQL.

      As we do not have the specified host for our Ontology so, we decided just to watch the video for the publishing and run a simple SPARQL. So here are the following videos from Dr. Noureddin Sadawi


  •     Simple Protege Tutorial 6- Publishing the Ontology 
          (make it available online)
         
         https://www.youtube.com/watch?v=QY9M_j2Ta14

  •     Simple Protege Tutorial 7- Downloading and Running Jena Fuseki Server

https://www.youtube.com/watchv=JZp70uFsZS0&list=PLea0WJq13cnAfCC0azrCyquCN_tPelJN1&index=7


  •     Simple Protege Tutorial 8- Running Simple SPARQL Queries

https://www.youtube.com/watchv=0zUos1zWB5k&list=PLea0WJq13cnAfCC0azrCyquCN_tPelJN1&index=8


  •     Simple Protege Tutorial 9- Creating and Publishing Another Ontology         

 https://www.youtube.com/watchv=Pn7oiDrtHmc&list=PLea0WJq13cnAfCC0azrCyquCN_tPelJN1&index=9


  •     Simple Protege Tutorial 10- Running SPARQL Queries on both Ontologies

https://www.youtube.com/watch?v=U_SfRJAXfs&list=PLea0WJq13cnAfCC0azrCyquCN_tPelJN1&index=10



G.      What we learn from Protege.

      We learn ways to add the classes, subclasses, properties, individual and many more and create the connection between the classes, subclasses, properties, individual and so on. Then using the hosted site you can see the XML viewed after publishing the Ontology in the web. Also how to download the Jena Fuseki Server and run a simple SPARQL


  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

WEB SEMANTIC LAB 3 (27.03.2016)

Give an RDF description that states the following:

1. Resource  http://www.haneena.com/~haneena/homepage is a homepage and it is owned by Haneena.


2. Resource  http://www.haneena.com/haneena-ns/#T-999”> is a course named C-programming and is lectured by Adib Razi at room BT1.


3. By using container element rdf:Bag,  give an RDF description that states the following: Faizah and Din own the car ABZ-88


4. By using the ”collection” value of the rdf : parseType attribute, give an RDF description that states the following: Faizah and Din own the car ABZ-88.



  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

WEB SEMANTIC LAB 1 (09.03.2016)

Question 1

Haneena and Co. has a telephone directory that records the first and last name, telephone number and email address of everyone working in the company. Departments are the main organizing unit of the company so the telephone directory is typically displayed in department order and shows for each department the contact phone and fax number and email address.
Create an XML file containing some directory data.



Question 2

a.  Give an XML-document (by not using attributes), which includes the information that the first name of a person is Adi, his last name is Maulud, and his professions are doctor, therapist and surgeon.



b.  Give the tree diagram of the document given in 2a.


c.  Modify the document given in exercise 1 such that the “first” and “last” are the attributes of the name element



Question 3

a.  Give an XML-document (by not using attributes), which includes the following information: the social security number (123456789A), the first name of a person is Adha, and his last name is Hadif, his address is composed of postcode (86400), city (Batu Pahat) and street (Jalan Puding), and his telephone numbers are 12345 and 67890.



b.  Give the tree diagram of the document given in exercise 3a.


c.  Give a DTD (Document Type Definition) for the XML-document specified  in 3a.



d.  Give an XML Schema for the information specified  in exercise 3a.



  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

Pacific Trails Resort (Lab 3)

Pacific Trails Resort (Home)




















Pacific Trails Resort (Yurt)



















Pacific Trails Resort (Activities)


  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

Pacific Trails Resort-Home (Lab 3)

<!DOCTYPE html>
<html>

<head>
<title>Pacific Trails Resort</title>
</head>
<body>

<h1>Pacific Trails Resort</h1>
<h3><a href="file:///C:/Users/Acer/Desktop/Pacific%20Trails%20Resort.html">Home</a> | <a href="file:///C:/Users/Acer/Desktop/Yurts%20section.html">Yurts</a> | <a href="file:///C:/Users/Acer/Desktop/Pacific%20Trails%20Resort.html">Activities</a> | <a href="file:///C:/Users/Acer/Desktop/Pacific%20Trails%20Resort.html">Reservations</a></h3>
<h2>Enjoy Nature in Luxury</h2>
<p>Pacific Trails Resort offers a special lodging experience on the California North Coast. Relax in serenity with panaromic views of the Pacific Ocean.</p>

<ul>
<blockquote>
<li>Private yurts with decks overlooking the ocean</li>
<li>Activities lodge with fireplace ang gift shop</li>
<li>Nightly fine dining at the Overlook Cafe</li>
<li>Heated outdoor pool and whirlpool</li>
<li>Guided hiking tours of the redwoods</li>
</blockquote>          
</ul>

<div>Pacific Trails Resort</div>
<div>12010 Pacific Trails Road</div>
<div>Zephyr, CA 95555</div>

<br>888-555-5555</br>

<br>
<div><i>Copyright&copy 2014 Pacific Trails Resort</i></div>
<div><i>Carlotta Eaton <a  href="mailto:ceaton@nr.edu">ceaton@nr.edu</a></i></div>
</br>

</body>
</html>


OUTPUT:





  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

Pacific Trails Resort-Yurt (Lab 3)

<!DOCTYPE html>
<html>

<head>
<title>Pacific Trails Resort</title>
</head>
<body>
<h1>Pacific Trails Resort</h1>
<h3><a href="file:///C:/Users/Acer/Desktop/Pacific%20Trails%20Resort.html">Home</a> | <a href="file:///C:/Users/Acer/Desktop/Yurts%20section.html">Yurts</a> | <a href="file:///C:/Users/Acer/Desktop/Pacific%20Trails%20Resort.html">Activities</a> | <a href="file:///C:/Users/Acer/Desktop/Pacific%20Trails%20Resort.html">Reservations</a></h3>
<h2>The Yurts at Pacific Trails</h2>
<div style="font-weight:bold">What is a yurt?</div>
<div style="padding-left:30px;">Our luxury yurts are permanent structures four feet off the ground.</div>
<div style="padding-left:30px;">Each yurt has canvas walls, a wooden floor, and roof dome that can be opened.</div>
<div style="font-weight:bold">How are the yurts furnished?</div>
<div style="padding-left:30px;">Each yurt is furnished with a queen-size bed with down quilt and gas-fire stove</div>
<div style="padding-left:30px;">The luxury camping experience also includes electricity and sink with hot and cold running water.Shower and restroom</div>
<div style="padding-left:30px;">facilities are located in a lodge</div>
<div style="font-weight:bold">What should I bring?</div>
<div style="padding-left:30px;">Bring a sense of adventure and some time to relax! Most guests also</div>
<div style="padding-left:30px;">pack comfortable walking shoes and plan to dress for changing</div>
<div style="padding-left:30px;">weather with layers of clothing</div>

<br>
<div><i>Copyright&copy 2014 Pacific Trails Resort</i></div>
<div><i>Carlotta Eaton <a  href="mailto:ceaton@nr.edu">ceaton@nr.edu</a></i></div>
</br>

</body>
</html>


OUTPUT:



  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

Habitat for Humanity (Lab 2)

<!DOCTYPE html>
<html>
    
<head>
<title>Laboratory 2</title>
</head>
<body>
<img src="math-games.jpg" alt="math-games">
<h4>Simple, decent, affordable housing</h4>

<ul>
<blockquote>
<li><a href="http://www.habitat.org/asiapacific/who_we_are" target="_blank">Learn More</a></li>
<li><a href="http://www.habitat.org/asiapacific/support_habitat/volunteer_default.aspx" target="_blank">Volunteer</a></li>  
<li><a href="http://www.habitat.org/asiapacific/support_habitat/partner_default.aspx" target="_blank">Advocate</a></li>
<li><a href="http://www.habitat.org/asiapacific/support_online.aspx" target="_blank">Donate</a></li>
</blockquote>               

</ul>
<h2>Our Mission</h2>
<p>Habitat for Humanity believes that every man, woman and child should have a decent, safe and affordable place to live. We build and repair house all over the world using volunteer labor and donations. Our partner families purchase these houses through no-profit, no-interest mortgage loans or innovative financing methods.</p>
<img src="math-games.jpg" alt="math-games">

<h2>Why We Build</h2>
<p>These are nearly 2 billion people around the world who live in slum housing and more than 100 million are homeless. Families left homeless by natural disasters, war and civil unrest often face dire housing situations as they struggle to rebuild their lives. We provide shelter and housing assistance to help these families recover.</p>
    
<h2>Advocacy in Action</h2>
<p>Volunteer Amy Miles lends her voice in support of Habitat's advocacy efforts and Global Village trips. Use the audio controls below to hear her stories.</p>
    
<h4>Build Your Community</h4>
<img src="math-games.jpg" alt="math-games">

<p><a href="http://www.habitat.org/getinv" target="_blank">Start today</a> to become the leaders of Habitat tomorrow!</p>

<p><a href="http://www.habitat.org/habitat_learns" target="_blank">Learn About Habitat</a> | <a href="http://www.habitat.org/where-we-build" target="_blank">Where We Build</a> | <a href="http://www.habitat.org/support" target="_blank">Support Habitat</a> | <a href="http://www.habitat.org/stories_multimedia" target="_blank">Stories and Multimedia</a></p>
<br>&copy2014 Habitat for Humanity&reg International. All rights reserved. "Habitat for Humanity&reg" is a registered service mark owned by Habitat for Humanity International. Habitat&reg is a service mark of Habitat for Humanity International.</br>

</body>
</html>


OUTPUT:







  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS