{"id":1637,"date":"2023-11-21T15:21:41","date_gmt":"2023-11-21T14:21:41","guid":{"rendered":"http:\/\/oopm.org\/?page_id=1637"},"modified":"2025-02-05T15:37:14","modified_gmt":"2025-02-05T14:37:14","slug":"7-4-more-on-representing-classification-hierarchies","status":"publish","type":"page","link":"https:\/\/oopm.org\/?page_id=1637","title":{"rendered":"11.4 More on representing classification hierarchies"},"content":{"rendered":"<div class=\"pdfprnt-buttons pdfprnt-buttons-page pdfprnt-top-right\"><a href=\"https:\/\/oopm.org\/index.php?rest_route=wpv2pages1637&print=pdf\" class=\"pdfprnt-button pdfprnt-button-pdf\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/oopm.org\/wp-content\/plugins\/pdf-print\/images\/pdf.png\" alt=\"image_pdf\" title=\"View PDF\" \/><\/a><a href=\"https:\/\/oopm.org\/index.php?rest_route=wpv2pages1637&print=print\" class=\"pdfprnt-button pdfprnt-button-print\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/oopm.org\/wp-content\/plugins\/pdf-print\/images\/print.png\" alt=\"image_print\" title=\"Print Content\" \/><\/a><\/div>\n<p class=\"wp-block-paragraph\">In section <script>mkRef(\"Representing classification hierarchies\")<\/script>, we discussed how to use subclasses to represent classification hierarchies.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Virtual method and virtual classes provide a further mechanism for representing classification hierarchies. A virtual method or class makes it possible to represent a specialization of a property of a given concept.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Representing specialization using virtual methods<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In section <script>mkRef(\"A travel booking system\")<\/script>, we have an example of representing a travel booking system. A booking has properties like registration of the booking, cancelation of the booking and confirmation of the booking. These three properties may be represented by methods.<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7387b849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:40%\">\n<p class=\"wp-block-paragraph\">As discussed in section <script>mkRef(\"A travel booking system\")<\/script>, registration of the booking is the same for all bookings, but cancelation and confirmation depends on whether the booking is a flight booking, train booking, or hotel booking. Cancelation and confirmation may thus be organised in a specialisation hierarchy being nested within the booking hierarchy as shown in the figure.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image aligncenter size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"913\" height=\"472\" src=\"https:\/\/oopm.org\/wp-content\/uploads\/2025\/01\/BookingAndConfirmHierarchy.jpg\" alt=\"\" class=\"wp-image-11160\" srcset=\"https:\/\/oopm.org\/wp-content\/uploads\/2025\/01\/BookingAndConfirmHierarchy.jpg 913w, https:\/\/oopm.org\/wp-content\/uploads\/2025\/01\/BookingAndConfirmHierarchy-300x155.jpg 300w, https:\/\/oopm.org\/wp-content\/uploads\/2025\/01\/BookingAndConfirmHierarchy-768x397.jpg 768w\" sizes=\"(max-width: 913px) 100vw, 913px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">As can be seen, each booking class\/concept has a nested specialization of the confirm method. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Representing specialization using virtual classes<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">As discussed in section <script>mkRef(\"Representing contextualized concepts\")<\/script>, contextualised concepts may be represented by nested classes. As for properties representing activities, such concepts may be specialized in subclasses of the enclosing class.<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7387b849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p class=\"wp-block-paragraph\">For the booking system, a travel booking is characterised by local concept of travel information (class <code>TravelInfo<\/code>), which is specialized in the specializations of travel booking. In section <script>mkRef(\"Self-constrained\u00a0virtual class\")<\/script>, we have shown how to represent such a contextualized concept by means of a virtual class. This is illustrated by the figure.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"781\" height=\"460\" src=\"https:\/\/oopm.org\/wp-content\/uploads\/2025\/01\/BookingAndTravelinfoHierarchyAndNesting.jpg\" alt=\"\" class=\"wp-image-11163\" srcset=\"https:\/\/oopm.org\/wp-content\/uploads\/2025\/01\/BookingAndTravelinfoHierarchyAndNesting.jpg 781w, https:\/\/oopm.org\/wp-content\/uploads\/2025\/01\/BookingAndTravelinfoHierarchyAndNesting-300x177.jpg 300w, https:\/\/oopm.org\/wp-content\/uploads\/2025\/01\/BookingAndTravelinfoHierarchyAndNesting-768x452.jpg 768w\" sizes=\"(max-width: 781px) 100vw, 781px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">As for the method example, above, each travel booking has a nested specialisation of the travel information concept.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In general we may represent two dimensions of specialization: (1) by means of subclasses, and (2) by means of nested virtual classes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n<div style=\"display:flex; gap:10px;justify-content:center\" class=\"wps-pgfw-pdf-generate-icon__wrapper-frontend\">\n\t\t<a  href=\"https:\/\/oopm.org?action=genpdf&amp;id=1637\" class=\"pgfw-single-pdf-download-button\" ><img src=\"https:\/\/oopm.org\/wp-content\/plugins\/pdf-generator-for-wp\/admin\/src\/images\/PDF_Tray.svg\" title=\"Generate PDF\" style=\"width:auto; height:45px;\"><\/a>\n\t\t<\/div>","protected":false},"excerpt":{"rendered":"<p>In section , we discussed how to use subclasses to represent classification hierarchies. Virtual method and virtual classes provide a further mechanism for representing classification hierarchies. A virtual method or class makes it possible to represent a specialization of a property of a given concept. Representing specialization using virtual methods In section , we have [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1410,"menu_order":4,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1637","page","type-page","status-publish","hentry"],"mb":[],"mfb_rest_fields":["title","gutenberg_elementor_mode"],"_links":{"self":[{"href":"https:\/\/oopm.org\/index.php?rest_route=\/wp\/v2\/pages\/1637","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oopm.org\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/oopm.org\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/oopm.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oopm.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1637"}],"version-history":[{"count":36,"href":"https:\/\/oopm.org\/index.php?rest_route=\/wp\/v2\/pages\/1637\/revisions"}],"predecessor-version":[{"id":11363,"href":"https:\/\/oopm.org\/index.php?rest_route=\/wp\/v2\/pages\/1637\/revisions\/11363"}],"up":[{"embeddable":true,"href":"https:\/\/oopm.org\/index.php?rest_route=\/wp\/v2\/pages\/1410"}],"wp:attachment":[{"href":"https:\/\/oopm.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1637"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}