On querying taxonomies with imported/included taxonomies

12 views
Skip to first unread message

William Ramos

unread,
Jul 17, 2019, 8:08:38 AM7/17/19
to TopBraid Suite Users
Hi, community;

I have a SPARQL query that I utilize on a SWON application to retrieve the first children/node of all taxonomies; like this:

SELECT ?nodeURI
                WHERE {
                    rdf:nil <http://topbraid.org/teamwork#graphsUnderTeamControl> ( ?projectGraph ?teamGraph ) .
                    GRAPH ?projectGraph {
                        ?projectGraph a taxonomies:Taxonomy .
                        ?projectGraph <http://topbraid.org/metadata#identifier> ?i .
                        ?nodeURI <http://www.ibm.com/standards/vocabulary/common#code> ?c .
                    } .
                }

... and this works for normal taxonomies that do not have other included/imported taxonomies.

Graphically, within the EDG web interface, an imported taxonomy looks like a common node however... when attempting to do a SPARQL query on a taxonomy that is including/importing another one, the root node for the included taxonomy is not being taken thus I get no results for it.

Can someone please help me to understand how I can get the nodes for both kind of taxonomies?

Thanks.

Richard Cyganiak

unread,
Jul 17, 2019, 10:51:45 AM7/17/19
to topbraid-users list
Try something like:

    BIND (ui:graphWithImports(?projectGraph) AS ?projectGraphWithImports)
    GRAPH ?projectGraphWithImports {
        ?taxonomy a taxonomies:Taxonomy .
        ?taxonomy <http://topbraid.org/metadata#identifier> ?i .
        ...
    }

This includes imported graphs into the query graph, and matches taxonomy nodes other than ?projectGraph .

Hope that helps,
Richard


--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/1b0056b3-1413-4908-ba0f-2e4d43d8832d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages