From: Matthew H. <mat...@cs...> - 2010-03-24 11:09:31
|
Hi Alan, Please could you file a bug report on the OWL API bug tracker? This would help enormously :) Cheers, Matthew On 22 Mar 2010, at 23:55, Alan Ruttenberg wrote: > I create an ontology with a single named individual, and add an > annotation to an anonymous individual. > I load and immediately save that ontology. In the saved ontology, the > anonymous individual is changed to a named individual. > > To test, load the following functional syntax. Save it as RDF/XML. > Load that RDF/XML. Save it as RDF/XML. The anonymous individual will > now have an IRI. > > Ontology(<http://purl.obolibary.org/obo/obi/test/anonymous.owl> > Declaration(NamedIndividual(<http://purl.obolibrary.org/obo/foony>)) > ClassAssertion(<http://www.w3.org/2002/07/owl#Thing> > <http://purl.obolibrary.org/obo/foony> ) > AnnotationAssertion(rdfs:label <http://purl.obolibrary.org/obo/foony> _:genid1) > Declaration(AnnotationProperty(rdfs:label)) > ) > > Here's some lisp code that does similar. > > (defun test-anonymous () > (let* ((manager (#"createOWLOntologyManager" > 'org.semanticweb.owlapi.apibinding.OWLManager)) > (ont (#"createOntology" manager (to-iri > !<http://purl.obolibary.org/obo/obi/test/anonymous.owl>))) > (factory (#"getOWLDataFactory" manager))) > (#"addAxiom" manager ont > (#"getOWLAnnotationAssertionAxiom" factory > (#"getOWLAnnotationProperty" factory (to-iri !rdfs:label)) > (to-iri !obo:foony) > (#"getOWLAnonymousIndividual" factory))) > (#"saveOntology" manager ont (new 'fileoutputstream (new 'file > "/Users/alanr/Desktop/testout.owl"))) > (let ((manager (#"createOWLOntologyManager" > 'org.semanticweb.owlapi.apibinding.OWLManager))) > > (#"saveOntology" manager > (#"loadOntology" manager (#"create" > 'org.semanticweb.owlapi.model.IRI (new 'java.io.file > "/Users/alanr/Desktop/testout.owl"))) > (new 'fileoutputstream (new 'file > "/Users/alanr/Desktop/testout2.owl"))) > ))) > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Owlapi-developer mailing list > Owl...@li... > https://lists.sourceforge.net/lists/listinfo/owlapi-developer |