You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Dennis Patzer <pa...@googlemail.com> on 2011/10/06 14:17:05 UTC
Big problem with InfModel
Hello folks,
I have a nasty problem with having some InfModel as a base for another
new model.
I do it the following way:
OntModel x = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM,
infModel)
Now when adding some properties to x, it seems, that this properties are
added to infModel as well, which I don't want. I want to have an
ontology based on an infModel, not a composition of both.
What I try to have, is the following:
OntModel x = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM,
infModel.clone())
But I'm not able to do that cloning of infModel :-(
Any fast help would be great.
Thanks for your great support!!!
Bye Dennis
Re: Big problem with InfModel
Posted by Dennis Patzer <pa...@googlemail.com>.
Big thanks, that worked just great!!!
Bye Dennis
Am 06.10.2011 14:23, schrieb Ian Dickinson:
> OntModel x = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM );
> x.addSubModel( infModel );
Re: Big problem with InfModel
Posted by Ian Dickinson <ia...@epimorphics.com>.
Hi Dennis,
On 06/10/11 13:17, Dennis Patzer wrote:
> Hello folks,
>
> I have a nasty problem with having some InfModel as a base for another
> new model.
>
> I do it the following way:
> OntModel x = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM,
> infModel)
So that's passing infModel as the base model to the OntModel, and it is
indeed the base model that receives updates.
What I suspect you want is:
OntModel x = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM );
x.addSubModel( infModel );
Ian
--
____________________________________________________________
Ian Dickinson Epimorphics Ltd, Bristol, UK
mailto:ian@epimorphics.com http://www.epimorphics.com
cell: +44-7786-850536 landline: +44-1275-399069
------------------------------------------------------------
Epimorphics Ltd. is a limited company registered in England
(no. 7016688). Registered address: Court Lodge, 105 High St,
Portishead, Bristol BS20 6PT, UK