Hi guys,
I'm experimenting with the SPIN API and I'm encountering some problems.
I'm using the same code from the Kennedy example, but the system makes no 
inferences at all, while in Top Braid Composer Free it generated more than 
300 triples:

public static void main(String[] args) {
// Initialize system functions and templates
 SPINModuleRegistry.get().init();


 // Load main file
 Model baseModel = ModelFactory.createDefaultModel();
 String folder="C:\\myfolder\\";
 baseModel.read(Paths.get(folder, "ontology.rdf").toUri().toString()); //load 
ontology
 baseModel.read(Paths.get(folder, "rules.rdf").toUri().toString()); //load 
spin rules created with topbraid composer
 baseModel.read(Paths.get(folder, "data.rdf").toUri().toString()); //load 
ontology instances on which to execute inferences
 
 // Create OntModel with imports
 OntModel ontModel = JenaUtil.createOntologyModel(OntModelSpec.OWL_MEM,
baseModel);
 
 // Create and add Model for inferred triples
 Model newTriples = ModelFactory.createDefaultModel();
 ontModel.addSubModel(newTriples);


 // Register locally defined functions
 SPINModuleRegistry.get().registerAll(ontModel, null);


 // Run all inferences
 SPINInferences.run(ontModel, newTriples, null, null, false, null);
 System.out.println("Inferred triples: " + newTriples.size()); //prints 
zero inferred triples
}

-- 
You received this message because you are subscribed to the Google Group 
"TopBraid Suite Users", the topics of which include Enterprise Vocabulary 
Network (EVN), Reference Data Manager (RDM), TopBraid Composer, TopBraid Live, 
TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to [email protected]
--- 
You received this message because you are subscribed to the Google Groups 
"TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to