Arthur, the overall idea of Ensemble is to build applications for end users. Things like inferences should happen automatically when needed. In Composer, chances are you ran inferences then performed some operation. It's really the same in Ensemble, except an inference (or other data processing) happens as part of a script called on the user action.
One key piece to do this are event rules. The will listen for an event (Listen > Input) and relay a different event (Post > Relayed Event). Let's say you have an event "Post Tree Click" on single click of a tree component. Wire this event to the Input of a SPARQLMotion Relay. Create an event named "Relayed Tree Click" to its Relayed Event. Then have the Grid component listen to "Relayed Tree Click" (Listen > Tree Click). You can run this event now. Clicking on something in your tree passes the resource to the Grid. Now add the name of a registered script to the SPARQLMotion Relay. This can run any SPARQLMotion script, including ones with TopSPIN or OWIM modules for inferencing. Other operations can be run as well, but as Irene states, make sure that the information is inserted into the graph Ensemble uses for display - http://tb-session. The SPARQL Rule works the same way. It listens to an event an passes a new event after running a query. But since that query can have SPIN function statements, then any SPARQLMotion script can be executed as a side-effect. If that script inserts triples into http://tb-session, that data will appear in Ensemble. Two examples of this will follow... -- Scott On Apr 27, 12:48 am, "Irene Polikoff" <[email protected]> wrote: > Arthur, > > Yes, you would need to have a script that runs inferences. It would be a > fairly simple script. For example, two steps: run inferences and insert them > into a tbl-session. > > Running of the script could be triggered by a user pressing a button in a > TBE app. It could also happen at the session startup by using a deep linking > component (under Event Rules) to post an event that would trigger running of > the script. In this option, inferences would run for each user which, of > course, has an overhead if there is a lot of data and inferences are broad > and/or complex. > > Alternatively, inferences could run on a scheduled or triggered basis. In > this option, inferences would run for a set of data and would be available > to all users of an application. This could be more efficient. > > It is hard to say which approach makes more sense without knowing more about > the nature of the application and the overall workflow. > > Regards, > > Irene > > -----Original Message----- > From: [email protected] > > [mailto:[email protected]] On Behalf Of Arthur Keen > Sent: Monday, April 26, 2010 10:21 PM > To: [email protected] > Subject: Re: [topbraid-users] Re: magic properties as columns in composer > instances pane or ensemble results grid > > Thanks Scott. > > Part of the reason I gravitated to a magic property to do this instead of > inference, which would have been my first preference, is because while I use > SPIN inference a lot in Composer, I find that configuration and control of > inferencing in Ensemble is unclear to me. For example, how do you cause a > model to run inferences when it is opened, so that the triples inferred by > spin rules on the opened model are available to the grid? Do I need to > write an SMS to trigger inferencing as a result of a user action as an > analog to "run inferences", or is this something that can be configured to > happen automatically. > > regards > > Arthur > > On Apr 26, 2010, at 5:37 PM, Scott Henninger wrote: > > > Arthur; There may be an expectation mismatch with what is meant by > > "magic property" - > > seehttp://composing-the-semantic-web.blogspot.com/2009/11/magic-properti... > -spin.html. > > > Magic properties are best thought of as a kind of SPIN function that > > returns more than one value, ala a graph match instead of a function > > return. It may or may not define values for the property used in the > > definition. This depends on the definition in the magic property's > > spin:body. > > > The Ensemble grid will display values of properties for each instance > > of the grid. You can infer these values, but you will need a direct > > triple - i.e. "<instance> <property> <value>", where <property> is the > > property in the Grid column. I.e. you can populate the property from > > a magic property definition, but you will need to run a query to > > compute the values and assert them as values of the properties you are > > displaying in the Grid. > > > A more concrete example may be needed... > > > -- Scott > > > On Apr 26, 5:16 pm, Arthur Keen <[email protected]> wrote: > >> I need to display the status of a parent object in columns in the > Ensemble Grid, where the status of the parent is derived from the status of > it's children. > > >> I assumed that the instance view and ensemble grid use sparql under the > covers to query for the tabular data displayed, so I decided to use magic > properties and created a set of magic properties that summarize the status > of a parent object based on status property values on it's children. I > verified that they worked, and then added the magic properties to columns > of the instance panel. The columns show up in the instance panel and the > Ensemble grid, however the values returned by the magic property do not make > it into the instances panel or grid. Do magic properties work on the > instance panel and ensemble grid view components? > > >> Arthur -- You received this message because you are subscribed to the Google Group "TopBraid Suite Users", the topics of which include TopBraid Composer, TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/topbraid-users?hl=en
