Help with inheritance in semantic hierarchies

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view

Help with inheritance in semantic hierarchies


Looking for help/advice on how to implement Option 1 of the 2 workarounds offered to the problem of inheritance in semantic hierarchies as discussed here:

.. my system is new and so I can setup my schema's to support the requirements of option 1

I've never used the "subsumes" and would like to ask here for advice

Given three classes: Building, Room, Spot
(each with dedicated Category, Template, and Form as made by "Create a Class" page)

Page "MyBuilding1" is in "Category:Building" with Property:Has Building Number=123

Page "MyRoom1" is in "Category:Room" and has Property:Belongs to Building=MyBuilding1 along with Property:Has-Room-Number=456

Page "MySpot1" is on "Category:Spot" and has Property:Belongs-to-Room=MyRoom1

How do I use the #SET and "Subsumes" syntax to cause MySpot1 to inherit the properties available to both the MyRoom1 and MyBuilding1 pages...

ultimately.. I'd like to create a semantic query that finds all pages in Category:Spot whose inherited building number is 123

I think Option 1 is very doable for me to achieve this, but I just need a little coaching.

Who knows how to do this? :-)

As always, thanks in advance!
Reply | Threaded
Open this post in threaded view

Re: Help with inheritance in semantic hierarchies

for example. when it says:

In the same template, include something like the following

|Subsumes items={{FULLPAGENAME}}
|Subsumes items={{#ask: [[-Subsumes items::<q>[[Member of::{{FULLPAGENAME}}]]</q>]]|format=list|link=none}}|+sep=,

would I add this code to the Template:Spot to import all the room properties to the new spot page when the user chooses the page value for Property:Has-Room-Number,

... and then would I also add it to the Template:Room to import all the building properties of the building page pointed to by the property:Belongs-to-Building

I just need one concrete example