[Pellet-users] Follow-up to "Odd problem on classifying file with no/minimal changes"

Matt Williams matthew.williams at cancer.org.uk
Thu Sep 20 10:13:35 UTC 2007


Dear All,

There is clearly something a little odd going on. When I load the file 
into Jena, and change the name of the resource using the API, the 
reasoner then hangs.  Code below.

It's the renameResource() method that seems to cause the problem, but I 
can't really see why this should be - and because this is all done in 
memory, I know it's not the serialisation that is causing the problem (I 
thought it might be that yesterday).

FWIW, I also tried editing the text file by hand and ended up with a 
similar result.

Any ideas/ insight would be gratefully received.

Matt


String ont = "http://acl.icnet.uk/~mw/MDM0.40.owl";
String ns = "http://acl/BMV#";

OntModel model = ModelFactory.createOntologyModel( 
PelletReasonerFactory.THE_SPEC );

model.read( ont );

ValidityReport report = model.validate();
printIterator( report.getReports(), "Validation Results" );

OntClass c = model.getOntClass( ns + "Tamoxifen" );

printIterator(c.listSubClasses(), "All sub classes of " + c.getLocalName());

printIterator(c.listSuperClasses(true), "Direct superclasses of " + 
c.getLocalName());


ResourceUtils r = new ResourceUtils();
r.renameResource(c, ns+ "NewTamoxifen");
OntClass d = model.getOntClass(ns+ "NewTamoxifen");
//c.remove();



printIterator(d.listSubClasses(), "All sub classes of " + d.getLocalName());
printIterator(d.listSuperClasses(true), "Direct superclasses of " + 
d.getLocalName());



-- 
http://acl.icnet.uk/~mw
+44 (0)7834 899570


More information about the Pellet-users mailing list