On Tuesday, December 5, 2017 at 8:31:09 AM UTC+1, Jörn Hees wrote: > > > > On 4 Dec 2017, at 17:31, Boris Metodiev <boris...@gmail.com > <javascript:>> wrote: > > > > <owl:Class rdf:about="http://human.owl#NCI_C12308"><rdfs:label > rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Clitoris</rdfs:label><rdfs:subClassOf > > rdf:resource="http://human.owl#NCI_C13039"/><rdfs:subClassOf><owl:Restriction><owl:onProperty > > rdf:resource="http://human.owl#UNDEFINED_part_of"/><owl:someValuesFrom > rdf:resource="http://human.owl#NCI_C12408"/></owl:Restriction></rdfs:subClassOf><oboInOwl:hasRelatedSynonym > > rdf:resource="http://human.owl#genid2595"/></owl:Class> > > As very often with RDF+XML it helps to just rewrite as N-Triples: > > <http://human.owl#NCI_C12308> < > http://www.w3.org/1999/02/22-rdf-syntax-ns#type> < > http://www.w3.org/2002/07/owl#Class> . > <http://human.owl#NCI_C12308> <http://www.w3.org/2000/01/rdf-schema#label> > "Clitoris" . > <http://human.owl#NCI_C12308> < > http://www.w3.org/2000/01/rdf-schema#subClassOf> < > http://human.owl#NCI_C13039> . > <http://human.owl#NCI_C12308> < > http://www.w3.org/2000/01/rdf-schema#subClassOf> _:b1 . > <http://human.owl#NCI_C12308> <http://ex.com/hasRelatedSynonym> < > http://human.owl#genid2595> . > _:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> < > http://www.w3.org/2002/07/owl#Restriction> . > _:b1 <http://www.w3.org/2002/07/owl#onProperty> < > http://human.owl#UNDEFINED_part_of> . > _:b1 <http://www.w3.org/2002/07/owl#someValuesFrom> < > http://human.owl#NCI_C12408> . > > The restriction doesn't have an rdfs:label as you're querying for! > > The following will also return the BNode... > > querytrial1=graph.query("""SELECT ?node ?nodeLabel ?othernodes > ?othernodesLabel where { > bind (<http://human.owl#NCI_C12308> as ?node ) > ?node ?y ?othernodes . > ?node rdfs:label ?nodeLabel . > OPTIONAL { ?othernodes rdfs:label ?othernodesLabel } > } > LIMIT 100""") > > Best, > Jörn >
Thanks for clearing that up ! -- http://github.com/RDFLib --- You received this message because you are subscribed to the Google Groups "rdflib-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to rdflib-dev+unsubscr...@googlegroups.com. To post to this group, send email to rdflib-dev@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rdflib-dev/e9396972-668a-47c0-ab9d-d7f7a81b0f91%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.