Hi Pat,
Here is one more observation. We developed a service to get the Root
Concepts & their properties as shown below. With out the SERVICE keyword it
returns the expected results. But when using the SERVICE keyword it doesn't
return expected results.
With the SERVICE keyword..
1)If the graphURI (urn:x-evn-master:geo) value is hard coded then only
Root/Top concepts uri's are returned but no properties.
2)If a placeholder is used for graphURI then interestingly some junk
results are returned.
It seems there are some changes to be done when using SERVICE keyword or
may be there is something wrong with the way that I use the SERVICE
keyword. Please check and let me know.
<swon:Array>
<ui:forEach ui:resultSet="{#
SELECT DISTINCT ?result
WHERE {
SERVICE ?sparqlEndPoint {
GRAPH ?graphURI {
?type (rdfs:subClassOf)* skos:Concept .
?result a ?type .
FILTER NOT EXISTS {
?result skos:broader ?parent .
} .
} .
} .
} }" ui:separator=",">
<swon:Object>
<swon:Value arg:name="uri" arg:value="{= ?result }"/>
<swon:Value arg:name="properties">
<swon:RSObjectArray arg:resultSet="{#
SELECT ?p ?o
WHERE {
SERVICE ?sparqlEndPoint {
GRAPH ?graphURI {
?s ?p ?o .
FILTER (?s = ?result) .
} .
} .
} }"/>
</swon:Value>
</swon:Object>
</ui:forEach>
</swon:Array>
Thanks,
sanjeev
On Friday, April 14, 2017 at 7:22:36 PM UTC+5:30, sanjeev devireddy wrote:
>
> Hi Pat,
> That gives the HTTP Error 500 as shown in the below screen shot. And
> when I look at the stack trace(at the bottom of the page) interestingly
> there is HTTP 401 error as shown below.
>
> Caused by: HttpException: 401
> at
> org.apache.jena.sparql.engine.http.HttpQuery.rewrap(HttpQuery.java:411)
> at
> org.apache.jena.sparql.engine.http.HttpQuery.execGet(HttpQuery.java:355)
> at org.apache.jena.sparql.engine.http.HttpQuery.exec(HttpQuery.java:292)
> at org.apache.jena.sparql.engine.http.Service.exec(Service.java:183)
>
>
>
>
>
>
>
> Thanks,
> sanjeev
>
>
>
>
> On Friday, April 14, 2017 at 6:45:42 PM UTC+5:30, Pat Doyle wrote:
>>
>> Sanjeev,
>>
>> This is just a guess - but what happens if you move the FILTER outside of
>> the service call? In other words, do you get better results with something
>> like this?:
>> <ui:forEach ui:resultSet="{#
>> SELECT ?p ?o
>> WHERE {
>> SERVICE ?sparqlEndPoint {
>> GRAPH ?graphURI {
>> ?s ?p ?o .
>> } .
>> } .
>> FILTER (?s = ?conceptURI) .
>> } }" ui:separator=",">
>>
>> Let me know,
>> Pat
>>
>>
>> On Fri, Apr 14, 2017 at 9:09 AM, sanjeev devireddy <[email protected]
>> > wrote:
>>
>>> Hello,
>>> By following the examples given at http://uispin.org/swon.html, a
>>> service is developed to get the properties(Predicates & Objects) of a
>>> Concept as shown below. This code snippet works fine without the SERVICE
>>> Keyword. But when the SERVICE keyword is used then the concept URI value
>>> has to be hard coded otherwise zero results are returned.
>>>
>>> <swon:Array>
>>> <ui:forEach ui:resultSet="{#
>>> SELECT ?p ?o
>>> WHERE {
>>> SERVICE ?sparqlEndPoint {
>>> GRAPH ?graphURI {
>>> ?s ?p ?o .
>>> FILTER (?s = ?conceptURI) .
>>> } .
>>> } .
>>> } }" ui:separator=",">
>>> <swon:Object>
>>> <swon:Value arg:name="result" arg:value="{= ui:label(?p) }"/>
>>> <swon:Value arg:name="label" arg:value="{= ui:label(?o) }"/>
>>> </swon:Object>
>>> </ui:forEach>
>>> </swon:Array>
>>>
>>>
>>> *URL to invoke the REST service*
>>>
>>> http://localhost:8083/tbl/swp?_viewClass=g:getProperties&graphURI=urn:x-evn-master:geo&conceptURI=http://topquadrant.com/ns/examples/geography%23Asia&sparqlEndPoint=
>>> <sparqlEndPoint_URI>
>>>
>>> I hope it is something to do with the way the URI is placed/passed
>>> dynamically at the line FILTER (?s = ?conceptURI), when the SERVICE keyword
>>> is used. Could some one please help us here?
>>>
>>>
>>> Thanks,
>>> sanjeev
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google Group
>>> "TopBraid Suite Users", the topics of which include the TopBraid Suite
>>> family of products and its base technologies such as SPARQLMotion, SPARQL
>>> Web Pages and SPIN.
>>> To post to this group, send email to [email protected]
>>> ---
>>> 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 [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
--
You received this message because you are subscribed to the Google Group
"TopBraid Suite Users", the topics of which include the TopBraid Suite family
of products and its base technologies such as SPARQLMotion, SPARQL Web Pages
and SPIN.
To post to this group, send email to [email protected]
---
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 [email protected].
For more options, visit https://groups.google.com/d/optout.