Open masium opened 5 years ago
Hi masium, apologies for the embarrassingly late reply.
I'm not giving this project the love it deserves :(
Anyway, I've loaded your ontology and here's what I see.
If you set the typesToLabels
param to true
, then your types will be represented as labels in Neo4j so the way to get all NamedIndividuals
and their types would be:
MATCH (n:owl__NamedIndividual) RETURN n.rdfs__label as label, labels(n) as types
And this in your dataset returns:
I hope this helps.
JB.
Hi Jesus,
I have a sample ontology that contains classes and instances, modeled in Protege:
I import the RDF into neo4j using:
CALL semantics.importRDF("file:///ontologies/resources/protege/automobile/volkswagen-inferred.owl", "Turtle", {shortenUrls: true, typesToLabels: true})
I'd like the query to return an instance and it's type (e.g. "Golf GTI S" and "Golf GTI") but am unable to formulate a query to do so. I've tried the following which returns no results:
MATCH (n:owlNamedIndividual)-[*..3]->(m:owlClass) WHERE n.rdfs__label = 'Golf GTI S' RETURN n, m LIMIT 25
Is there a way to get the type (rdf:type) of the instance?
Sample RDF, zipped:
volkswagen-inferred.owl.zip