Hi,, I have a DBT dataset contains several named graphs and ontology file. I would like to apply the same reasoning on all graphs in the dataset. I tried this code to apply reasoning on one named graph.
OntModel ontmodel = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM, null); File filePath = new File(OntologyPath); URL filePathURL = filePath.toURI().toURL(); ontmodel.read(filePathURL.toString()); Dataset dataset = TDBFactory.createDataset(datasetLocation); dataset.begin(ReadWrite.WRITE) ; Model model = dataset.getNamedModel(graphName); Reasoner reasoner = ReasonerRegistry.getOWLMicroReasoner(); reasoner= reasoner.bindSchema(ontmodel); InfModel infmodel = ModelFactory.createInfModel(reasoner, model); Should I apply the reasoning on the graphs one by one? Is there any method to apply the reasoning on all graphs and they stay separate as they are? Is there any method which can be used as for the default graphs below? Model model = dataset.getDefaultModel(); Thanks Abdul
