You can explore what is expected by these templates if you open the file
teamwork.topbraidlive.org\taxonomy\spin\skostemplates.spin.ttl
in TBC. You can see that skostemplate:RootConcepts has the following
spin:body:
SELECT DISTINCT ?result
WHERE {
?type (rdfs:subClassOf)* skos:Concept .
?result a ?type .
FILTER NOT EXISTS {
?result skos:broader ?parent .
} .
}
So if you have zero results then there is no instance of skos:Concept
that does not have any skos:broader values. Some SKOS files that I have
seen declare root concepts to have a ConceptScheme as their
skos:broader, so maybe this is what's going on for your examples.
HTH
Holger
On 8/04/2017 1:28, sanjeev devireddy wrote:
Thanks Pat, for the suggestion.
By following the documentation given in the link
http://uispin.org/swon.html , we are able to implement our own REST
services, which can return the JSON output type in a desired structure.
But We are facing an issue with the service
*skostemplate:RootConcepts *and the*SPARQL *associated with it*. *This
service/SPARQL returns the expected results(root concepts) with the
EVN's example vocabularies like Geography Vocabulary, IPTC News Codes.
But the same service/SPARQL returns the empty result set when tried
with our Vocabularies.
At the same time, the *skostemplate:BroaderConcepts
(spin:SelectTemplate) *service and the SPARQL associated with**returns
the expected results**with our Vocabularies also.
So I just want to check that, is there any protocol/standard need to
be followed while creating the vocabularies? So that the available
REST services/SPARQLs return expected results for all the vocabularies.
*
*Thanks,
*
*On Tuesday, April 4, 2017 at 12:43:29 AM UTC+5:30, Pat Doyle wrote:
Sanjeev,
The swa:GetLabel call allows you to return a user friendly label
for a specific property. This is listed under the 'SWA SPIN
Modules' heading on the Available Web Services page.
Once you have the result from the DESCRIBE servlet, you could
build a URI and make a call like this to get the user friendly label:
http://localhost:8083/tbl/template?_template=http%3A%2F%2Ftopbraid.org%2Fswa%23GetLabel&resource=http://topquadrant.com/ns/examples/geography%23areaKM
<http://localhost:8083/tbl/template?_template=http%3A%2F%2Ftopbraid.org%2Fswa%23GetLabel&resource=http://topquadrant.com/ns/examples/geography%23areaKM>
http://localhost:8083/tbl/template?_template=http%3A%2F%2Ftopbraid.org%2Fswa%23GetLabel&resource=http%3A%2F%2Fwww.w3.org%2F2003%2F01%2Fgeo%2Fwgs84_pos%23lat
<http://localhost:8083/tbl/template?_template=http%3A%2F%2Ftopbraid.org%2Fswa%23GetLabel&resource=http%3A%2F%2Fwww.w3.org%2F2003%2F01%2Fgeo%2Fwgs84_pos%23lat>
With that being said, you also have full capabilities to write
your own web services to return data in exactly the format you'd
like. Instead of using the DESCRIBE servlet, you could create a
reusable SPIN template with a SPARQL query like this:
SELECT * WHERE {
GRAPH <urn:x-evn-master:geo> {
<http://topquadrant.com/ns/examples/geography#Japan
<http://topquadrant.com/ns/examples/geography#Japan>> ?p ?o .
BIND (ui:label(?p) AS ?label)
}
}
This would return the results for Japan in a format with the more
user-friendly predicate labels already associated with the
specific values. This could be extended to, instead of having
Japan hardcoded in - allow for a resource parameter to be passed
in at runtime. More information on the SPIN template service can
be found in the help under *TopBraid Composer *--> *TopBraid Live
Integration *--> *SPIN Template Service*.
Regards,
Pat
On Mon, Apr 3, 2017 at 10:58 AM, sanjeev devireddy
<[email protected] <javascript:>> wrote:
Pat,
Regarding the DESCRIBE servlet, the service
http://localhost:8083/tbl/describe?_resource=http://topquadrant.com/ns/examples/geography%23Japan&_format=application%2Frdf%2Bxml&_base=urn:x-evn-master:geo
<http://localhost:8083/tbl/describe?_resource=http://topquadrant.com/ns/examples/geography%23Japan&_format=application%2Frdf%2Bxml&_base=urn:x-evn-master:geo>
returns some property names with prefixes (as shown below). So
it is bit difficult to remove those prefixes and then to
display those property names to the end users .
I just want to check that is there a way to get the property
names with out the prefixes(as displayed in the screen shot of
EVN UI below).
On Tuesday, March 28, 2017 at 2:35:23 AM UTC+5:30, Pat Doyle
wrote:
Sanjeev,
This can be done with a combination of a few of our
different built in services. All of our services allow for
a _base parameter, which denotes the base graph upon which
to run the service against - so they can be run
generically against any graph we choose.
skostemplate:RootConcepts will return all of the root
concepts for you. For 5.3 - we've added
skosTemplate:TopConcepts - which will return the same
result for Taxonomies in a slightly more performant manner.
skostemplate:NarrowerConcepts will return all of the
children of a specific concept for you.
Information on the skostemplate services can be found here
(with TBCME running):
http://localhost:8083/tbl/swp?_viewClass=servicedoc:Index
<http://localhost:8083/tbl/swp?_viewClass=servicedoc:Index>
The ones we're interested in are under the 'TopBraid SKOS
Templates' heading.
the DESCRIBE servlet can be used to return all of the
information about a specific concept - so we can use this
to get all of the predicates/objects for a specific item.
More information on this can be found in TBCME Help under
TopBraid Composer -> TopBraid Live Integration -> The
DESCRIBE servlet.
Ultimately, you could do something like this:
1) get all roots
2) get all info about a root
3) get all children of the root
4) get all info about each child and go back to 3
1 would be achieved with skostemplate:RootConcepts, 3
would be achieved with skostemplate:NarrowerConcepts, and
2 and 4 would be achieved with the DESCRIBE servlet. If
you want to user a smaller number of services, you also
have the option of writing your own.
Hope it helps,
Pat
On Mon, Mar 27, 2017 at 10:18 AM, sanjeev devireddy
<[email protected]> wrote:
Hi,
There is a requirement to generate a HTML page as
shown below for a given vocabulary. So I just want
check that, are there any SPARQL / REST services to
traverse through all the Subjects/Nodes with
predicates and objects of a given vocabulary.
In specific, we are looking for SPARQL/REST service(s)
to achieve the following,
1) One SPARQL/REST service to get all Top-level/Root
Subjects with all of their Predicates and Objects
2) One SPARQL/REST service to get Descendant Subjects
with all of their Predicates and Objects of a given
parent.
We want to make this implementation as much as
generic. I means by passing the name/Graph URI of a
given vocabulary, the same SPARQL/REST services should
be able to return the respective vocabulary's desired
data.
Thanks,
*_EVN Vocabulary
_*
_*
*_
<https://lh3.googleusercontent.com/-ge7e3HLT5uA/WNkaoLMGa-I/AAAAAAAAAU4/Zfqs7olvXg8aMtzMnkWDnjgkD5uLp1qwACLcB/s1600/HTML_Page.bmp>
_*
*_
<https://lh3.googleusercontent.com/-ge7e3HLT5uA/WNkaoLMGa-I/AAAAAAAAAU4/Zfqs7olvXg8aMtzMnkWDnjgkD5uLp1qwACLcB/s1600/HTML_Page.bmp>
_*
*_
<https://lh3.googleusercontent.com/-ge7e3HLT5uA/WNkaoLMGa-I/AAAAAAAAAU4/Zfqs7olvXg8aMtzMnkWDnjgkD5uLp1qwACLcB/s1600/HTML_Page.bmp>
_*Desired HTML Page
*_
_*
*_
<https://lh3.googleusercontent.com/-ge7e3HLT5uA/WNkaoLMGa-I/AAAAAAAAAU4/Zfqs7olvXg8aMtzMnkWDnjgkD5uLp1qwACLcB/s1600/HTML_Page.bmp>
_*
*_
<https://lh3.googleusercontent.com/-ge7e3HLT5uA/WNkaoLMGa-I/AAAAAAAAAU4/Zfqs7olvXg8aMtzMnkWDnjgkD5uLp1qwACLcB/s1600/HTML_Page.bmp>
<https://lh3.googleusercontent.com/-ge7e3HLT5uA/WNkaoLMGa-I/AAAAAAAAAU4/Zfqs7olvXg8aMtzMnkWDnjgkD5uLp1qwACLcB/s1600/HTML_Page.bmp>_*
*_
<https://lh3.googleusercontent.com/-ge7e3HLT5uA/WNkaoLMGa-I/AAAAAAAAAU4/Zfqs7olvXg8aMtzMnkWDnjgkD5uLp1qwACLcB/s1600/HTML_Page.bmp>
--
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
<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] <javascript:>
---
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]
<javascript:>.
For more options, visit https://groups.google.com/d/optout
<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]
<mailto:[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.