ECA rules will only execute after changes to an existing asset collection, but you will need something to execute while the asset collection is being created.
For this we have a notion of project constructors. See the rdfs:comment at teamwork:projectConstructor. Basically you need to define an SWP file that links defines an SWP element, e.g. ex:MyMethod as subclass of ui:Methods that adds the extra teamwork:viewer triples, and then add
taxonomies:ProjectType teamwork:projectConstructor ex:MyMethod
to make sure it gets executed whenever a new Taxonomy gets created.
The ui:prototype of ex:MyMethod could be as simple as
<ui:group let:teamGraph="{= teamwork:currentTeamGraph() }">
<ui:setContext ui:queryGraph="{= ?teamGraph }">
<ui:update ui:updateQuery="{! INSERT { ?teamGraph
teamwork:viewer <WHOEVER> } WHERE { } }"/>
</ui:setContext>
</ui:group>
(This is untested)
--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/e49cedbb-cbdb-4506-94fa-135d29c2344bn%40googlegroups.com.
Yes. You'd just need to replace taxonomies:ProjectType with the target ProjectType that you want from
taxonomies:ProjectType
teamwork:projectConstructor """
<ex:ExampleProjectConstructor/>
"""^^ui:Literal ;
.
For example, owl:import ontologyprojects.ui.ttlx and then use
ontologyprojects:ProjectType instead.
Holger
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/4e338d7a-33ef-4543-bceb-4e95624fd7bbn%40googlegroups.com.
Thanks, Holger. Could you please check my following queries also?
1. Where can I find the allowed ProjectType literals(taxonomies:ProjectType, ontologyprojects:ProjectType)?
2. Both dash:js & ui:prototype seem having same logic. Is that true? If yes then is that needed to have both?
3. I see other triples/definitions in SWP Element Form but not ProjectType triple. Is it possible to view/update the 'ProjectType' triple/declaration/definition from the SWP Element Form/User Interface?
taxonomies:ProjectType
teamwork:projectConstructor """
<ex:ExampleProjectConstructor/>
"""^^ui:Literal ;
.
When you import the corresponding graph (e.g. by importing the EVERYTHING graph above) you should see these links from the ProjectType on the forms.
HTH
Holger
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/4b58d41e-f82b-4a61-a2a3-a634de5297c1n%40googlegroups.com.