The Scientific World Journal / 2015 / Article / Alg 1

Research Article

A Novel Way to Relate Ontology Classes

Algorithm 1

Pseudo code of our UnionIntersectionMatch algorithm.
Input:   is advertised ontology dataset and is required ontology. Ontologies are described
   using individuals, classes, attributes/properties, relations, restrictions, rules and axioms like
   components. Ontology is in the format A[Classes, P roperties] and R[classes, properties]
Output: Matching type of two classes of Ontology
Assumption: Ontology dataset is homogenous
(1)Ontology class match_algo
   obA-advertisement and obR-Requested resource concepts
UnionIntersectionMatch
(2)function  UNIONINTERSECTIONMATCHCLASSES(obA, obR)
(3)  
(4)  if () != “no-match” then return  
(5)  else if () != “no-match” then return  
(6)  else if () != “no-match”) then return  
   plug-in match
(7)  else if calculatesub classes(obR).contains(obA) then return “plug-in”
   subsume match
(8)  else if calculatesub classes(obA).contains(obR) then return “subsume”
(9)  else if  obA.equals(obR) then return (1)
(10)else if  obA.listEquivalentClasses().contains(obR) then return (1)
(11)  else  return -(1)
(12)  end if
(13) end function
isUnionOf
(14) function  ISUNIONOF(obA, obR)
(15)  if obA.isUnionClass() then
(16)   
(17)   if  operands.contains(obR) then return “plug-in”
(18)   else if calculatesub classes(obA).contains(obR) then return “subsume”
(19)   end if
(20)  else if  obR.isUnionClass() then
(21)   
(22)   if  operands.contains(obA) then return “subsume”
(23)   else if calculatesub classes(obR).contains(obA) then return “plug-in”
(24)   end if
(25)  end ifreturn “no-match”
(26) end function
isComplementOf
(27) function  ISCOMPLEMENTOF(obA, obR)
(28)  if  obA.isComplementClass() then
(29)   
(30)   if  operands.contains(obR) then return “complement”
(31)    if calculatesub classes(operands).contains(obR) then return “complement”
(32)    end if
(33)   end if
(34)  end if
(35)  if  obR.isComplementClass() then
(36)   
(37)   if  operands.contains(obA) then return “complement”
(38)    if calculatesub classes(operands).contains(obA) then return “complement”
(39)    end if
(40)   end if
(41)  end ifreturn  != “no-match”
(42) end function
isIntersectionOf
(43) function  ISINTERSECTIONOF(obA, obR)
(44)  if  obA.isIntersectionClass() then
(45)   
(46)   if  operands.contains(obR) or calculatesub classes(operands).contains(obR) then return “subsume”;
(47)   end if
(48)  else if  obR.isIntersectionClass() then
(49)   
(50)   if  operands.contains(obA) or calculatesub classes(operands).contains(obA) then return “plug-in”
(51)   end if
(52)  elsereturn “no-match”
(53)  end if
(54) end function

Article of the Year Award: Outstanding research contributions of 2020, as selected by our Chief Editors. Read the winning articles.