Union (query directive)
From WandoraWiki
Description
Joins the results of inner directives by concatenating them. If the results from different directives have different roles, new columns will be added with null values to make roles of each row identical. Duplicate rows are not removed.
Constructor
Union(Directive d1,Directive d2,...)
Examples
Following example gets all instances and subclasses of the input topic and concatenates the results. The reason for Roles directive on line 5 is to remove the default column which will still be present from Players directive.
importPackage(org.wandora.query2); importPackage(org.wandora.topicmap); new Union( new Instances().as("#instance"), new Roles("#instance").from( new Players( XTMPSI.SUPERCLASS_SUBCLASS, XTMPSI.SUBCLASS).whereInputIs(XTMPSI.SUPERCLASS).as("#instance") ) )