I am using "call n10s.onto.import.fetch" to import the ontology which I generated from Protege. In that ontology file, I refer to some existing ontology files on the internet, as shown below.
I found that I can't import this indirect ontology with "call n10s.onto.import.fetch" function, can anybody help me?
The n10s.*.import methods don't follow import links but you can do it with a couple of lines.
All you got to do is do a second pass with the n10s.rdf.stream.* method that returns the triples in your RDF file, extract the subject, predicate, object where the predicate is owl:imports and for use the object as the URL for an n10s.onto.import.fetch request.
Here's how:
call n10s.rdf.stream.inline('http://your.onto.with.imports',"RDF/XML") yield subject, predicate, object
where predicate = "http://www.w3.org/2002/07/owl#imports"
with object as importedOntoUri
call n10s.onto.import.fetch(importedOntoUri,"RDF/XML") yield terminationStatus, triplesLoaded, extraInfo
return importedOntoUri, terminationStatus, triplesLoaded, extraInfo
I've tried it with your capabilityModel onto and I get this result: