Change the default type-instance association in Wandora

Forum is for miscellaneous user help requests.

Change the default type-instance association in Wandora

Postby athanassios » Thu Aug 02, 2012 2:33 am

Hi, I am trying to redefine the type-instance relation in wandora

I wrote the following ltm

[WNDR = "Wandora class" @"http://www.wandora.org/core/wandoraclass"]
[person : WNDR = " A person" @"http://xmlns.com/foaf/0.1/Person"]
[me : person ="Athanassios" @"http://athanassios.gr"]

[isa = "isa" @"http://psi.topicmaps.org/iso13250/model/type-instance" @"http://www.wandora.org/core/default-association"]
[instance = "instance" @"http://psi.topicmaps.org/iso13250/model/instance"]
[type = "type" @"http://psi.topicmaps.org/iso13250/model/type"]

isa(person:type, me:instance)

That works but I would like to merge the instance and isa relation, this way the coloring of nodes will continue to work with the newly defined isa relation as well as the counting of instances and classes on the traditional topic panel. In other words I want to use the binary predicate isa to assert binary relations not the class:instance notation.

Thanks for any assistance you can provide
athanassios
 
Posts: 47
Joined: Wed Sep 07, 2011 12:16 pm
Location: Greece

Re: Change the default type-instance association in Wandora

Postby akivela » Thu Aug 02, 2012 12:46 pm

Hi Athanassios

Unfortunately Wandora's data model implements default type-instance relation without actual associations and topics. This means that Wandora user can not merge or extend the default type-instance relation. This is a true limitation of Wandora's data model. To get rid of the limitation, Wandora user has to introduce and implement her *own* type-instance relation -- association type and association roles -- and then use it instead of the default relation.

I had an impression that Wandora contains a tool that transforms default type-instance relations to any associations but didn't find it in Wandora. In any case Wandora *should* have such a conversion tool, I'll add it to my to-do list.

Kind Regards,
Aki / Wandora Team
akivela
Site Admin
 
Posts: 256
Joined: Tue Sep 18, 2007 10:20 am
Location: Helsinki, Finland

Re: Change the default type-instance association in Wandora

Postby mordenkainen » Sun Feb 15, 2015 8:45 pm

I had an impression that Wandora contains a tool that transforms default type-instance relations to any associations but didn't find it in Wandora. In any case Wandora *should* have such a conversion tool, I'll add it to my to-do list.

Is it available now?
mordenkainen
 
Posts: 24
Joined: Fri Feb 13, 2015 5:11 pm

Re: Change the default type-instance association in Wandora

Postby akivela » Mon Feb 16, 2015 1:36 pm

Yes. Wandora can transform class-instance relations to associations:

  • First, ensure that you have intended association type topic, class-role-topic and instance-role-topic in Wandora.
  • Open topic which has instances to Traditional topic panel. At the very bottom of Traditional topic panel you'll see a list of instance topics.
  • Select all instance topics.
  • Right mouse click the selection and choose popup menu option Topics > Associations > Make associations with class-instances.
  • Next Wandora asks you to select association type topic. Selected topic will be an association type of created associations.
  • Next Wandora asks you to select role topic for class-topics. Selected topic will be a role for classes.
  • Finally Wandora asks you to select role topic for instances.
  • Wandora creates binary associations between class-topic and it's instance. Associations are given type and have given roles. Wandora doesn't remove original instances. If you wish to remove original class-instance relations, right click the instance topic selection again and choose popup menu option Delete instances...
akivela
Site Admin
 
Posts: 256
Joined: Tue Sep 18, 2007 10:20 am
Location: Helsinki, Finland

Re: Change the default type-instance association in Wandora

Postby athanassios » Thu Nov 19, 2015 1:46 pm

Hi Aki,
I have just read your reply, this is helpful indeed, but I am interested in the other way around,
Let me explain this with a simple example

Code: Select all
[ WNDR = "Wandora class"  @"http://wandora.org/si/core/wandora-class"]

[PRO : WNDR = "Product"]
[WIN = "Wine Product"]
[CEL : WNDR = "My Cellar"]
[ros = "Sattui Winery Gamay Rouge"]

[isa = "Instantiation" @"http://psi.topicmaps.org/iso13250/model/type-instance"]
[type = "Type" @"http://psi.topicmaps.org/iso13250/model/type"]
[inst = "Instance"  @"http://psi.topicmaps.org/iso13250/model/instance"]

[ gen = "Generalization"  @"http://www.topicmaps.org/xtm/1.0/core.xtm#superclass-subclass"
  @"http://psi.topicmaps.org/iso13250/model/supertype-subtype"]
[ bro = "Superclass" @"http://www.topicmaps.org/xtm/1.0/core.xtm#superclass"
  @"http://psi.topicmaps.org/iso13250/model/supertype"]
[ nar = "Subclass" @"http://www.topicmaps.org/xtm/1.0/core.xtm#subclass"
  @"http://psi.topicmaps.org/iso13250/model/subtype"]

gen(PRO: bro, WIN: nar)

isa(WIN: type, ros01: inst)
isa(CEL: type, ros01: inst)


O.K. I have tested this with the latest version of Wandora, 2015-11-13.
In this case, the "gen" association type replaced the default Wandora "Superclass-Subclass" Association type. In this way
the WIN topic is displayed as a subclass of product in the topics tree panel. This is fine.

Now, the problem is how to achieve a similar functionality with the Class-Instance Association, I assume this is Wandora "Default association" Association type ?
My isa association type is not considered to be functionally equivalent to your Class-Instance default association type.
Is it possible to make Wandora to display classes and instances on the tree panel in the case of user-defined instantiation and type, instance roles ?
Do I have to replace Wandora default Class-Instance association type and roles like I did with the Generalization association, how is that possible ?
Last edited by athanassios on Thu Nov 19, 2015 7:55 pm, edited 1 time in total.
athanassios
 
Posts: 47
Joined: Wed Sep 07, 2011 12:16 pm
Location: Greece

Re: Change the default type-instance association in Wandora

Postby athanassios » Thu Nov 19, 2015 5:52 pm

Regarding to the visual appearance of user-defined association types I have just discovered that
you can right-click the tabs of the tree panel to access two relevant options
"configure types" and "configure topic tree tab"

With the first one you can modify or add your user-defined association types on the tree panel.
I think it is better not to mess up with Wandora association, so I decided to add my own.

right-click on the Topics tab select "configure types"
Add the following two

Type-Instance - inst - isa - type
Broader-Narrower - nar - gen - bro

right-click on the Topics tab again select "configure topic tree-tab" and check
Type-Instance
Broader-Narrower

Click OK and then right-click inside the Topics panel and select
refresh tree

My last question is whether I am missing something in terms of the overall functionality
if I decide to add my user-defined generalization and instantiation types with this option instead of overriding
"Instances" and "Subclasses" fields there ?
athanassios
 
Posts: 47
Joined: Wed Sep 07, 2011 12:16 pm
Location: Greece

Re: Change the default type-instance association in Wandora

Postby akivela » Fri Nov 20, 2015 8:23 pm

Hello Athanassios

Yes, I would probably proceed as you have, if I needed specific class-instance and superclass-subclass relations. That is, I would create my own association types (and roles) for these relations instead of over riding default association types. And the default class-instance relation is really a problem as it's implementation doesn't rely on topics, as the discussion above.

If you use your specific class-instance and superclass-subclass relations frequently, you could add relation topics into Wandora's base topic map. This way the topics are loaded during Wandora startup. The base topic map file is located in build/resources/conf/wandora.xtm.

Wandora stores topic tree settings including the tree relations into the build/resources/conf/options.xml. The xml element to look for is "trees". Advanced user may even edit the tree relation settings directly in the xml.

Notice also, you can use several topic trees elements simultaneously. To add new topic tree select menu option View > New panel > Tree. Each tree can be configured separately: Each tree may have different root node and different relations. Added tree is configured by selecting menu option View > Tree > Configure and View > Tree > Set root. The Tree submenu appears under View after you have created new tree panel.

Kind Regards,
Aki
akivela
Site Admin
 
Posts: 256
Joined: Tue Sep 18, 2007 10:20 am
Location: Helsinki, Finland


Return to How to... and problems

Who is online

Users browsing this forum: No registered users and 1 guest