Re: [topbraid-users] Abridged summary of topbraid-users@googlegroups.com - 2 updates in 1 topic

9 views
Skip to first unread message

Jack Hodges

unread,
Jan 29, 2015, 2:48:31 PM1/29/15
to topbrai...@googlegroups.com
Absolutely. In fact, I am copying the SPARQL out of the SPIN rule window for the rule that I created. I am also attaching the screen grab.

SELECT DISTINCT ?plabel
WHERE {
    ?cls (rdfs:subClassOf)* act:ASActivity .
    ?cls rdfs:subClassOf ?par .
    ?par rdfs:label ?plabel .
    ?cls rdfs:label ?clabel .
    {
        FILTER fn:contains(fn:upper-case(?plabel), fn:upper-case(?arg1)) .
    }
    UNION
    {
        FILTER fn:contains(fn:upper-case(?clabel), fn:upper-case(?arg1)) .
    }
    UNION
    {
        ?cls skos:altLabel ?alabel .
        FILTER fn:contains(fn:upper-case(?alabel), fn:upper-case(?arg1)) .
    } .
}

where ?arg1 is a spin:constraint Argument sp:arg1 : xsd:string

I expected that in the Variables and Arguments window I would see every variable and be allowed, as I was for plabel, to associated them with constraints.

This is using V4.2 ME by the way.

Jack

On Thu, Jan 29, 2015 at 2:26 AM, <topbrai...@googlegroups.com> wrote:
Jack Hodges <jhodg...@gmail.com>: Jan 28 05:01PM -0800

As a SPIN noobie I was reading the documentation on SPIN rules and noted
(never knew before) that I can right-click on a functional SPARQL query and
TBC will try to extract a SPIN rule from it. ...more
Holger Knublauch <hol...@topquadrant.com>: Jan 29 11:06AM +1000

Hi Jack,
 
could you send along an example SPARQL query so that we can make this
discussion precise?
 
Thanks
Holger
 
 
On 1/29/2015 11:01, Jack Hodges wrote:
...more
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to topbraid-user...@googlegroups.com.



--
Jack
ExtractSPINRuleFromSPARQL-NoParams.PNG

Holger Knublauch

unread,
Jan 29, 2015, 5:59:04 PM1/29/15
to topbrai...@googlegroups.com
Thanks, this clarifies it. You have selected the whole query, including the SELECT statement, which means that it tries to create a nested SELECT for the function. However, the SELECT only returns a single variable, and nested SELECTs cannot take arguments from the outside. What you need to do instead is just select the part inside of the WHERE clause that you want to generalize, then click Extract SPIN function.

(BTW you may need a large screen resolution for the dialog to see all arguments - I will change this now to also work better with lower resolutions).

HTH
Holger
--
You received this message because you are subscribed to the Google Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary Network (EVN), Reference Data Manager (RDM), TopBraid Composer, TopBraid Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to topbrai...@googlegroups.com
---
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.
For more options, visit https://groups.google.com/d/optout.

Jack Hodges

unread,
Jan 30, 2015, 9:58:14 AM1/30/15
to topbrai...@googlegroups.com
Great! Thanks. I thought the instructions said to select a valid SPARQL query but maybe it did say only the WHERE clause. I like this feature!

Jack

Sent from my iPad

On Jan 30, 2015, at 2:24 AM, topbrai...@googlegroups.com wrote:


Absolutely. In fact, I am copying the SPARQL out of the SPIN rule window
for the rule that I created. I am also attaching the screen grab.
 
SELECT DISTINCT ?plabel
WHERE {
?cls ...more
Holger Knublauch <hol...@topquadrant.com>: Jan 30 08:58AM +1000

Thanks, this clarifies it. You have selected the whole query, including
the SELECT statement, which means that it tries to create a nested
SELECT for the function. However, the SELECT only returns ...more

Jack Hodges

unread,
Jan 30, 2015, 1:47:39 PM1/30/15
to topbrai...@googlegroups.com
Sweet, works great! Thanks.


On Thursday, January 29, 2015 at 11:48:31 AM UTC-8, Jack Hodges wrote:
Absolutely. In fact, I am copying the SPARQL out of the SPIN rule window for the rule that I created. I am also attaching the screen grab.

SELECT DISTINCT ?plabel
WHERE {
    ?cls (rdfs:subClassOf)* act:ASActivity .
    ?cls rdfs:subClassOf ?par .
    ?par rdfs:label ?plabel .
    ?cls rdfs:label ?clabel .
    {
        FILTER fn:contains(fn:upper-case(?plabel), fn:upper-case(?arg1)) .
    }
    UNION
    {
        FILTER fn:contains(fn:upper-case(?clabel), fn:upper-case(?arg1)) .
    }
    UNION
    {
        ?cls skos:altLabel ?alabel .
        FILTER fn:contains(fn:upper-case(?alabel), fn:upper-case(?arg1)) .
    } .
}

where ?arg1 is a spin:constraint Argument sp:arg1 : xsd:string

I expected that in the Variables and Arguments window I would see every variable and be allowed, as I was for plabel, to associated them with constraints.

This is using V4.2 ME by the way.

Jack
Jack Hodges <jhodg...@gmail.com>: Jan 28 05:01PM -0800

As a SPIN noobie I was reading the documentation on SPIN rules and noted
(never knew before) that I can right-click on a functional SPARQL query and
TBC will try to extract a SPIN rule from it. ...more
Holger Knublauch <hol...@topquadrant.com>: Jan 29 11:06AM +1000

Hi Jack,
 
could you send along an example SPARQL query so that we can make this
discussion precise?
 
Thanks
Holger
 
 
On 1/29/2015 11:01, Jack Hodges wrote:
...more
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to topbraid-users+unsubscribe@googlegroups.com.



--
Jack
Reply all
Reply to author
Forward
0 new messages