Thanks for the example.
I download the example, then try it.
1, I open the kennedysEnsembleExample.ttl in TBC and I use the run
inference button on the toolbar. Then I found that the label will be
inference (Tucker, Alfred).
2, I select the reset inferences button, makes the label (Tucker,
Alfred) disappear.
3, I follow the steps in TBE which you provide and the labels(Tucker,
Alfred) will appear.
the problem is:
I back to TBC and check the  kennedysEnsembleExample file in TBC. I
found the labels are appear. Then I select the reset inferences
button. But the labels are still there.
Do I make some mistakes??

On Apr 28, 3:05 am, Scott Henninger <[email protected]>
wrote:
> I am hijacking this thread, as its contents are not relevant to magic 
> properties.
> This is the first of a couple of examples on how inferences (and scripts) can 
> be integrated into Ensemble   This example will tie execution of a script to 
> a user action via a relay.  Copy the three files into your workspace.  Then 
> open Ensemble, Default Application, and choose the file 
> kennedysEnsembleExample.  Click on Person.  Note that the label is empty.
> Now create a new SPARQLMotion Relay (Add component > Add Event Rules > 
> SPARQLMotion Relay) and do the following:
> 1) In the tree component (named "Select Class to Begin" in 3.3.1), note that 
> the single-click selection event is "Tree Click"
> 2) In the SPARQLMotion Relay, add that event, "Tree Click" to the Input 
> (Listen > Input)
> 3) In Post > Relayed Event, create a new event, let's call it "Relayed Tree 
> Click"
> 4) Modify the Listen > Refresh Grid Object event in the grid so it listens to 
> "Relayed Tree Click" instead of "Tree Click"
> At this point, note that the event works as before.  Clicking on the Person 
> class displays instances in the grid, with missing labels.  But this is 
> passed through the relay, which can call a SPARQLMotion script before 
> relaying the event.  That's the next step.
> 5) Configure the SPARQLMotion Relay to call CreateKennedyLabels (Attributes > 
> SM Script ID, enter CreateKennedyLabels), a SPIN function defined in 
> CreateKennedysLabels.sms.n3.
> Now click on the class Person and the labels will appear.  This is because 
> the script entered in step 5 run inferences to assert values for rdfs:label.
> You can look at the script in CreateKennedysLabels.sms.n3 to see how this 
> works.  The script simply imports the current RDF, runs TopSPIN, inserts the 
> inferred triples into thehttp://tb-sessiongraph, and uses ReturnText to 
> terminate the script.  OWLIM inferences could replace the TopSPIN module, and 
> in fact any script modules could be used.  The key is that for the triples to 
> appear in Ensemble, they need to be inserted intohttp://tb-session.
> There are tradeoffs to this approach, of course. You may not want to run the 
> script every time a class instance is entered.  That will be the next post…
> -- Scott
> On 4/27/10 1:55 PM, Scott Henninger wrote: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 
> intohttp://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]: 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...-- 
> ScottOn Apr 26, 5:16 pm, Arthur Keen<[email protected]>wrote:I need to 
> display the status of a parent object in columns in theEnsemble 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 thecovers 
> 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...
>
> read more »
>
>  kennedysEnsembleExample.ttl
> 51KViewDownload
>
>  kennedysEnsembleExample.ttl.tbc
> 1KViewDownload
>
>  CreateKennedysLabels.sms.ttl
> 2KViewDownload

-- 
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

Reply via email to