Hi Holger,

 

  That is
really good news. When is the 3.6.0 final going to be available

 

  Would
something like this work in SWP then?

 

 <ui:if
ui:condition="{= bound(?Graph1) }">

    <sml:ImportRDFFromWorkspace sm:baseURI=
"{= ?Graph1}" sml:ignoreImports="false">

        <ui:if
ui:condition="{= bound(?Graph2) }">

               <sml:ImportRDFFromWorkspace
sm:baseURI= "{= ?Graph2}" sml:ignoreImports="true"> 

                   <sml:Merge>

                        <sml:ApplyTopSPIN>

                                <sml:ApplyConstruct sml:constructQuery =
"{= 

                                                                                
              CONSTRUCT {                                                       
                                      ?sGraph1
Graph1:prop1 Graph1:thing1

                                                                                
             ?Graph1 Graph1:prop2 Graph2:thing2



                                                                                
              }

                                                                                
             WHERE { 
                                                                                
             ?sGraph1
Graph1:prop1 Graph1:thing1

                                                                                
              ?Graph1 Graph1:prop2 Graph2:thing2
                                                                                
              }                                                                 
                                      }"/>                        
</sml:ApplyTopSPIN>
                </sml:Merge>
           </sml:ImportRDFFromWorkspace >
        </ui:if>
    </sml:ImportRDFFromWorkspace >
 </ui:if> Before the 3.6.0 is available, can I test this by making the 
sm:Modules subclass of ui:element? Regards,Guil

Guil Scomparim 
+61413997827


> Subject: Re: [topbraid-users] Re: How to call a SPARQL Motion Script from SWP 
> page without ui:createLink
> From: [email protected]
> Date: Thu, 8 Mar 2012 10:43:45 +1000
> To: [email protected]
> 
> Hi Guil,
> 
> getting back to this old thread just to let you know that we have integrated 
> SPARQLMotion into SWP so that the syntax below is working in 3.6.0 final. In 
> a nutshell, SPARQLMotion scripts can now be written either stand-alone with 
> the graphical notation, or embedded into SWP pages. SWP can then also be used 
> for the control logic such as ui:if, ui:forEach etc. I believe this creates a 
> very powerful combination that will open us SWP for many new use cases. It 
> also means that writing SM modules remains a good investments, as the code 
> will be more easily reusable within web applications.
> 
> Regards
> Holger
> 
> 
> On Feb 16, 2012, at 5:32 PM, Holger Knublauch wrote:
> 
> > 
> > On Feb 15, 2012, at 9:33 PM, Guilherme Scomparim wrote:
> > The approach that I am trying to get to is to increase the flexibility so 
> > that SWP itself can be the control structure, e.g. using ui:if to branch 
> > into "behavior". For this reason I believe something like the following 
> > should work:
> > 
> > <ui:if ui:condition="{= bound(?fileName) }">
> >    <sml:ImportTextFile sm:outputVariable="text" sml:sourceFileName="{= 
> > ?fileName }">
> >        <div>Here is your file: <textarea>{= ?text }</textarea></div>
> >    </sml:ImportTextFile>
> > </ui:if>
> > 
> > If the SML modules were instances of ui:Element then they could be used 
> > just like that, because they follow the same syntax. I would need to 
> > implement a wrapper that can invoke the corresponding SM code when such an 
> > element is used. The children of such sml: nodes would see all the new 
> > variable bindings as would have the output RDF graph as SWP context graph.
> > 
> > 
> >> I am going to explain a bit of what I am trying to do, and you can
> >> even point me to another direction if what I am doing is not correct.
> >> 
> >> Now, I am designing a portal application that is all based in SWP,
> >> using HTML5 and Javascript. Really looking forward to use SVG when
> >> inline becomes available.
> >> 
> >> The reason I am using SWP is because  my entire logic is dynamically
> >> captured in my executable models and I really need to have access to
> >> resources like SPIN Functions, Templates, Magic Variables and SM to
> >> run inferences
> > 
> > Would be
> > 
> > <ui:setContext ui:queryGraph="...">
> >    <sml:ApplyTopSPIN>
> >        <div>Now the inferences are visible, we are in queryGraph + 
> > inferences</div>
> >    </sml:ApplyTopSPIN>
> > </ui:setContext>
> > 
> > 
> >> because the entire sequence of pages, the content of
> >> pages  and events are going to be dynamically created using SPARQL
> >> Queries { } based in state changes. I am also not an experienced Java
> >> programmer to build an application using APIs, so I am keen t wait for
> >> its full development.
> >> 
> >> This application has some similarities of what TQ have developed in
> >> Flex for ensemble, where I defined HTML  components like Forms,
> >> Fields, Buttons, Menus, Events, Session, LoginForm etc . The meta-data
> >> views instances are then stored in each separated executable models by
> >> domain that import the components in the .ui model.
> 
> -- 
> You received this message because you are subscribed to the Google
> Group "TopBraid Suite Users", the topics of which include Enterprise 
> Vocabulary Network (EVN), 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
                                          

-- 
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary 
Network (EVN), 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