Wednesday, 31 May 2017

ONTOLOGY EXERCISE


Student name :
Muhammad Firdaus bin Che Mat (CI 140012)
Pavithra A/P Ganisan (CI 140064)
Salmiyanti binti Sulaman @ Sulaiman (CI 140029)


Ontology : Data Integration

First exercise :

Change the Dataset Z into a set of relations. 


After that, we try to merge both of the set of relations.




Second exercise :

Set of relation.

RDFS
: Herbivorerdfs:subClassOf:Animal.
: Carnivorerdfs:subClassOf:Animal.
: Omnivorerdfs:subClassOf:Animal.
: Personrdfs:subClassOf:Omnivore.
: hasNamerdfs:domain:Person.
: hasNamerdfs:domain:Person.
: Vegetarian rdfs:subClassOf:Person.
: Vegetarianrdfs:subClassOf:Herbivore.
: eats rdfs:domain: Animal.
: eats rdfs:range:Food.
: Meat df:type:Food.
: Meat rdf:type:Food.
: Veggies rdf:type:Food.

OWL
Class(: Herbivore partial : Animal)
Class(:Carnivore partial : Animal)
Class(:Omnivorepartial : Animal)
Class(: Person partial : Omnivore)
Restriction (: hasNameallValuesFrom(xsd:string))
DatatypeProperty(:hasName)



ONTOLOGY


Student name :
Muhammad Firdaus bin Che Mat (CI 140012)
Pavithra A/P Ganisan (CI 140064)
Salmiyanti binti Sulaman @ Sulaiman (CI 140029)


Building the Ontology

2.1 Creating the classes

· Start protege and start a new Ontology

· Enter an Ontology IRI,We used the following IRI

· Save it in local file as “lab-ontology-3”

· Go to the Classes tab

· The empty class tree contains one class called Thing, which is superclass of everything

· Create class Person as subclass of Thing

· Create Lecturer and Student as the subclasses of Person

· Create class Module as subclass of Thing

· Create CSModule and MathModule as the subclasses of Module

· Our classes should look like Figure 1

Figure 1 : Basic Classes

2.2 Creating the Object Properties


· Switch to the Object Properties tab

· Use Add subProperty button to create a new object property (notice that all object properties are subproperties of topObjectProperty)

· Create a new object property studies and select Student and Module as its domain and range respectively

· Create another new object property teaches and select Lecturer and Module as its domain and range respectively

· Our object properties should look like Figure 2

Figure 2 : Object Properties

2.3 Adding Data Properties


· Switch to the Data Properties tab

· Use add sub property button to create a new data property (notice that all data peroperties are subproperties of topDataProperty)

· Create a new data property first_name and select Person and string as its domain and range respectively

· Create a new data property last_name and select Person and string as its domain and range respectively

· Create another new data property staffID and select Lecturer and integer as its domain and range respectively

· Create another new data property studentID and select Student and integer as its domain and range respectively

· Our data properties should look like Figure 3

Figure 3: Data Properties

2.4 Adding some Individuals (Instances)


· Switch to the individuals tab

· Create new individuals CS101 and CS103. Click on Types and choose CSModule for each of them

· Create new individuals M201 and M204. Click on Types and choose MathModule for each of them

· Create new individuals Lecturer1, Lecturer2. Click on Types and choose Lecturer for each of them

· Click on Lecturer1 and:

· add Data property assertions: first_name of type string and value Larisa

· add another Data property assertions: last_name of type string and value Soldatova

· add another Data property assertions: staffID of type integer and value 417686

· Click on Lecturer2 and add Object property assertions: teaches CS103 and teaches M201

· We add Data properties for Lecture2 in our wish

· Create new individuals Student1, Student2 and Student3. Click on Types and choose Student for each of them

· Click on Student1 and add Object property assertions: studies M204, studies M201 and studies CS101

· Click on Student1 and:

· add Data property assertions: first_name of type string and value Josef

· add another Data property assertions: last_name of type string and value Baker

· add another Data property assertions: studentID of type integer and value 226814

· Click on Student2 and add Object property assertions: studies M204

· Click on Student3 and add Object property assertions: studies M201 and studies CS103

· We add Data properties for Student2 and Student3 in our wish

· Our individuals should look like Figure 4

Figure 4 : Individuals Data

2.5 Saving and Publishing Ontology


· Save it in our local file lab-ontology-3.owl

· Make it available online

Our URL (http://www.semanticweb.org/pavithrag/ontologies/2017/4/lab-ontology-3)


LABORATORY 3 (SEMANTIC WEB)




Student name :
Muhammad Firdaus bin Che Mat (CI 140012)
Pavithra A/P Ganisan (CI 140064)
Salmiyanti binti Sulaman @ Sulaiman (CI 140029)





Tuesday, 7 March 2017

LABORATORY 2 (SEMANTIC WEB)



STUDENT NAME :
PAVITHRA A/P GANISAN (CI140064)
SALMIYANTI BINTI SULAMAN @ SULAIMAN (CI140029)
MUHAMMAD FIRDAUS BIN CHE MAT (CI140012)


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

RDF description and graph of the model

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

RDF description and graph of the model


3.  By using container element rdf:Bag,  give an RDF description that states the following: Aisy and Bob own the car JPQ2225



4.  By using the ”collection” value of the rdf : parseType attribute, give an RDF description that states the following: Aisy and Bob own the car JPQ2225.







Tuesday, 21 February 2017

LABORATORY 1 (Semantic Web)

Student Name 1: Pavithra A/P Ganisan (Ci140064)
Student Name 2: Salmiyanti Binti Sulaman @ Sulaiman (Ci140029)
Student Name 3: Muhammad Firdaus Bin Che Mat (Ci140012)


Answer Q1.

<?xml version="1.0">
<CompanyName>Adharizq Enterprise</CompanyName>
<PhoneBook>
<Department>
        <DepartmentName>Finance</DepartmentName>
        <DepartmentPhone>089-234543</DepartmentPhone>
<DepartmentFax>089-645335</DepartmentFax>
<DepartmentEmail>finance@gmail.com<DepartmentEmail>
        <Staff>
<FirstName>Pavithra</FirstName>
<LastName>Ganisan</LastName>
<Phone>011-3581890</Phone>
<Email>pavee@gmail.com</Email>
</Staff>
<Staff>
<FirstName>Salmiyanti</FirstName>
<LastName>Sulaiman</LastName>
<Phone>014-4544466</Phone>
<Email>salmi@gmail.com</Email>
        </Staff>
</Department>
</PhoneBook>



Answer Q2 (a).

<?xml version="1.0">
<Information>
<FirstName>Zahra</FirstName>
<LastName>Adib</LastName>
<Profession>
<Profession>Doctor</Profession>
<Profession>Therapist</Profession>
<Profession>Surgeon</Profession>
</Profession>
</Information>



Answer Q2 (b).


Tree Diagram of the document given in Q2 (a)



Answer Q2 (c).

<?xml version="1.0">
<Information element="name">
<First>Zahra</First>
<Last>Adib</Last>
<Profession>
<Profession>Doctor</Profession>
<Profession>Therapist</Profession>
<Profession>Surgeon</Profession>
</Profession>
</Information>



Answer Q3 (a).

<?xml version="1.0"?>
<information>
<social_sec_numb>123456789A</social_sec_numb>
<firstname>Adha</firstname>
<lastname>Hadif</lastname>
<address>
<postcode>86400</postcode>
<city>Batu Pahat</city>
<street>Jalan Puding</street>
</address>
<telephone_number>
<number>12345</number>
<number>67890</number>
</telephone_number>
</information>


Answer Q3 (b).

Tree Diagram for document given in Q3 (a)


Answer Q3 (c).

<?xml version="1.0"?>
<!DOCTYPE Information 
[
<!ELEMENT information 
(social_security-number,first_name,last_name,address,telephone_number)>
<!ELEMENT social_security_number (#PCDATA)>
<!ELEMENT first_name (#PCDATA)>
<!ELEMENT last_name (#PCDATA)>
<!ELEMENT address (#PCDATA)>
<!ELEMENT telephone_number (#PCDATA)>
]>
<information>
<social_security_number>123456789A</social_security_number>
<first_name>Adha</first_name>
<last_name>Hadif</last_name>
<address>
<postcode>86400</postcode>
<city>Batu Pahat</city>
<street>Jalan Puding</street>
</address>
<telephone_number>
<no>12345</no>
<no>67890</no>
</telephone_number>
</information>


Answer Q3 (d).

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http;//www.w3.org/2001/XMLSchema">

<xs:information>
<xs:social_sec_num>123456789A</xs:social_sec_num>
<xs:first_name>Adha</xs:first_name>
<xs:last_name>Hadif</xs:last_name>
<xs:address>
<xs:postcode>86400</xs:postcode>
<xs:city>Batu pahat</xs:city>
<xs:street>jalan Puding</xs:street>
</xs:address>
<xs:telephone_number>
<no>12345<no>
<no>67890<no>
</xs:telephone_number>
</xs:information>
</xs:schema>