W3C home > Mailing lists > Public > semantic-web@w3.org > September 2007

How to eliminate bnode from N3QL query result

From: <helen.chen@agfa.com>
Date: Sat, 8 Sep 2007 07:37:40 -0400
To: semantic-web@w3.org
Message-ID: <OF73F0A3AB.E683BF21-ON85257350.003E7992-85257350.003FDFE9@agfa.com>
Dear List

I am using N3QL to get anatomic structures and relationship from an 

When query for subclasses of a concept, some bnodes are returned, as a 
result of restriction on that class, for example:

In the ontology:
:Hip  a       owl:Class ;
      rdfs:subClassOf :BodyJunctionalBodyPart ;
              [ a       owl:Restriction ;
                owl:onProperty :hasBetaConnection ;
                owl:someValuesFrom :Thigh
              ] .

So a query 

[] select {?A ?B}
   where {?A rdfs:subClassOf ?B}.

will give results

:Hip    :BodyJunctionalBodyPart
:Hip    var:_123456 (bnode).

Is there a way to eliminate the bnodes in the query result, i.e by using a 
filter clause maybe?

Thanks for your help. 

Received on Saturday, 8 September 2007 11:37:52 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 08:45:02 UTC