Professional Documents
Culture Documents
The classes of Area, Person, Precautions and Symptoms can be considered as Named Classes. In
addition, the Area can be of two sub classes such as DeseasedArea and NonDeseasedArea. The
person is the super class, and we can have sub classes for person such as CoronaPatient and
NonCoronaPatient (Refer figure 3.0). Further, we can have classes to classify the CoronaPatient
as a DeadPerson, InfectedPerson or RecoveredPerson. The below graph shows the classes and
the sub classes hierarchy. When we consider the above classes, the recovered person cannot be
included in the dead person class. Hence, the classes DeadPerson and RecoveredPerson are
disjoint classes (Refer figure 4.0).
Figure 2: The Class Hierarchy of the ontology
The class hierarchy is comprised of 5 main classes and including 11 sub classes and totally
making 16 classes. The parent class can include firstName, LastName, age, marietalStatus,
address, contactNo in which this is utilized in the declaration of metadata where it is easier to
identify and specify an individual in the system. Most of these classes uses rdfs:label annotation
to declare them in a standard way. rfds:comment is used to describe the class and the
representing items. In addition, the other class names are self-explanatory in the ontology
system.
In an ontology, the hierarchy of classes could be more extended with more relationships which
are called as object and data properties. The Object properties connect two individuals with a
predicate and a data property connects a single subject with some form of attribute data. This
ontology contains 13 object properties and 20 data properties. The below figure 6 shows the
object properties that are included in the ontology.
Query 5
Query individuals with text filter
In this query for an example if we need to filter all the individuals having the name Amali the
below query can be used.
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX ont: <http://www.semanticweb.org/davidogolo/ontologies/2022/5/untitled-ontology-
6#>
SELECT ?subject ?name
WHERE
{
{
?subject ?r ont:DeadPerson.
?subject ont:firstname ?name.
}
union
{
?subject ?r ont:InfectedPerson.
?subject ont:firstname ?name
}
union
{
?subject ?r ont:RecoveredPerson.
?subject ont:firstname ?name
}
union
{
?subject ?r ont:Doctor.
?subject ont:firstname ?name
}
FILTER (?name = "David").
}
Order by ASC(?name)
Query 6
In this, lets say if we want to get the list of doctors who are working in private hospitals and
treating the covid patients and the names of the doctors and patients, we can use the below query.
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX ont: <http://www.semanticweb.org/davidogolo/ontologies/2022/5/untitled-ontology-
6#>