Hi Claudia,

I need more info - which rules does your file contain? Maybe the rules rely on rdfs:subClassOf triples? TopBraid automatically infers some additional rdfs:subClassOf triples that may not be present if you just load a file in a stand-alone app.

Holger



On 2/26/2015 0:08, Claudia Grieco wrote:
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:

|
publicstaticvoidmain(String[]args){
// Initialize system functions and templates
SPINModuleRegistry.get().init();


// Load main file
ModelbaseModel =ModelFactory.createDefaultModel();
Stringfolder="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
OntModelontModel =JenaUtil.createOntologyModel(OntModelSpec.OWL_MEM,baseModel);

// Create and add Model for inferred triples
ModelnewTriples =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] <mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.

--
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