How to specify other relation content in schema

Forum is for miscellaneous user help requests.

How to specify other relation content in schema

Postby mordenkainen » Tue Feb 17, 2015 6:35 pm

Suppose, I have a universal association type ConsistOf. Space rocket consists of three stages, each consist of engine and propellant. A phrase consists of subject and predicate. "Space rocket", "stage", "engine", "propellant", "subject", "prediacate" are all content types.

But a rocket consisting of subject and predicate has no sense. As well as a phrase consisting of engine and propellant. So, how can I restrict association with the scheme so rockets and phrases get not mixed?
mordenkainen
 
Posts: 24
Joined: Fri Feb 13, 2015 5:11 pm

Re: How to specify other relation content in schema

Postby akivela » Tue Feb 17, 2015 9:44 pm

Hi Mordenkainen

If you want to use universal ConsistOf association type, Wandora's schema has no mechanism to make difference between rockets and phrases, and their parts, I am afraid.

I suggest you create different part-of relations for both phrases and rockets. I have created a simple example project that shows how different part-of relations work. You can download the file from

http://wandora.org/download/exampleprojects/parts_of_rockets_and_phrases.wpr

Main points:
  • Part of a phrase topic collects all phrase parts. Similarly part of a rocket has rocket parts as instances.
  • Actual phrase topics are instances of a phrase topic. Similarly actual rockets are instances of a rocket topic.
  • A phrase topic has a schema specification that says that you can add instances of a phrase parts as phrase parts into the phrase.
  • A rocket topic has a schema specification that says that you can add instances of a rocket parts as rocket parts into the rocket.
Notice, although there is a schema, Wandora doesn't warn you if you create a rocket that has the subject as a part. The schema just helps you creating associations.

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

Re: How to specify other relation content in schema

Postby mordenkainen » Sun Feb 22, 2015 2:52 am

I searched for more documentation and found a way:

http://www.isotopicmaps.org/tmcl/tmcl.h ... ombination

How can that be integrated with wandora?
mordenkainen
 
Posts: 24
Joined: Fri Feb 13, 2015 5:11 pm

Re: How to specify other relation content in schema

Postby akivela » Mon Feb 23, 2015 4:06 pm

Unfortunately Wandora doesn't support Topic Maps Constraint Language (TMCL) at the moment. Also, Wandora's schema has no similar construct to Role Combination Constraint.
akivela
Site Admin
 
Posts: 260
Joined: Tue Sep 18, 2007 10:20 am
Location: Helsinki, Finland

Re: How to specify other relation content in schema

Postby akivela » Mon Feb 23, 2015 4:15 pm

What one could do, is to write small TMQL (http://wandora.org/wiki/TMQL) or Query language (http://wandora.org/wiki/Query_language) scripts that validate your topic map and report if wrong roles are used with the association type, for example. The solution is not real-time but a batch you run now and then just for validation.
akivela
Site Admin
 
Posts: 260
Joined: Tue Sep 18, 2007 10:20 am
Location: Helsinki, Finland

Re: How to specify other relation content in schema

Postby akivela » Thu Feb 26, 2015 11:00 am

After some tests, I have figured that building a TMQL or Wandora Query language script for detecting required roles in associations is rather difficult or even impossible at the moment.

But I figured another, much simpler and easier way of detecting required roles in associations of given type. The solution is almost embarrassingly simple:
  • Open the association type topic with Tradional topic panel (http://wandora.org/wiki/Traditional_topic_panel)
  • Look at the association table under Associations where type. This table lists all associations that are typed with the topic you opened into the Traditional topic panel.
  • Look at the column labels. They represent role topics used in the table associations. If you see only two columns in the association table, you have used two role topics. Similarly, if you see three columns in the table, you have used three role topics in listed associations.Three columns doesn't necessarily mean, you have all three roles in one association. It just states that three roles were used in all listed association. Now it is simple to check that column labels are required role topics. Also, finding illegal associations is easy as they are listed in the table.

Kind Regards,
Aki / Wandora Team
akivela
Site Admin
 
Posts: 260
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 24 guests