Set theory in selectors

Support questions relating to the actifsource Template Editor

Set theory in selectors

Postby actifsource » Mon Sep 12, 2011 3:11 pm

Writing actifsource templates you define one selector per context. A selector lets you navigate through your model starting from a resource of your meta model and following any relation.

In some complex cases you might need to combine the results from different paths using the set theory. At the moment we have implemented three different commands:

union (OR)
All elements reached through A.b orC.d.

A.b union C.d


AS_Union.png
AS_Union.png (2.64 KiB) Viewed 33966 times


intersect (AND)
Only elements which are reached through A.b and C.d.

A.b intersect C.d


AS_Intersect.png
AS_Intersect.png (2.57 KiB) Viewed 33966 times


except (AND NOT)
All elements which are reached through A.b without the ones reached through C.d.

A.b except C.d


AS_Except.png
AS_Except.png (1.53 KiB) Viewed 33966 times


String type system
Note that the result of any set action is always strongly typed. The returned type is the most common type of all involved types. If there is no inheritance hierarchy between the types the result is at least of type Resource or NamedResource.

Screenshot of an example using reverse navigation, type cast an the intersect command

AS_SetTheory.png
AS_SetTheory.png (30.66 KiB) Viewed 33970 times
actifsource
Site Admin
 
Posts: 173
Joined: Thu Aug 05, 2010 2:17 pm
Location: Switzerland

Re: Set theory in selectors

Postby actifsource » Fri Oct 11, 2013 5:00 pm

There is a new else operator now for sets which behaves like expected:

else.png
else.png (32.75 KiB) Viewed 32938 times
actifsource
Site Admin
 
Posts: 173
Joined: Thu Aug 05, 2010 2:17 pm
Location: Switzerland


Return to Template Editor

Who is online

Users browsing this forum: No registered users and 1 guest