You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Ralph Perniciaro <ra...@eagles.usm.edu> on 2013/09/20 19:03:41 UTC

Best method to get reference to OntModel from TDB

Is this the best way to get a reference to OntModel from TDB?

        Dataset d = TDBFactory.createDataset("some_location");

        Model m = d.getDefaultModel();
        OntModelSpec spec = new
OntModelSpec(OntModelSpec.OWL_MEM_TRANS_INF);
        OntModel om = ModelFactory.createOntologyModel(spec, m);

Thanks!

Ralph

Re: Best method to get reference to OntModel from TDB

Posted by Ralph Perniciaro <ra...@eagles.usm.edu>.
Thanks!

I have verified this as well.


On Mon, Sep 23, 2013 at 3:36 PM, Dave Reynolds <da...@gmail.com>wrote:

> On 23/09/13 17:25, Ralph Perniciaro wrote:
>
>> So it I wanted to used om.CreateIndividual(), then will the individual get
>> stored in the TDB or just in memory?
>>
>
> In TDB.
>
> Dave
>
>  On Sat, Sep 21, 2013 at 6:19 AM, Andy Seaborne <an...@apache.org> wrote:
>>
>>  On 20/09/13 18:03, Ralph Perniciaro wrote:
>>>
>>>  Is this the best way to get a reference to OntModel from TDB?
>>>>
>>>>           Dataset d = TDBFactory.createDataset("****some_location");
>>>>
>>>>
>>>>           Model m = d.getDefaultModel();
>>>>           OntModelSpec spec = new
>>>> OntModelSpec(OntModelSpec.OWL_****MEM_TRANS_INF);
>>>>           OntModel om = ModelFactory.****createOntologyModel(spec, m);
>>>>
>>>> Thanks!
>>>>
>>>> Ralph
>>>>
>>>>
>>>>  That looks OK - the inference engine will use memory for it's workspace
>>> and additonal triples inferred.
>>>
>>>          Andy
>>>
>>>
>>>
>>
>

Re: Best method to get reference to OntModel from TDB

Posted by Dave Reynolds <da...@gmail.com>.
On 23/09/13 17:25, Ralph Perniciaro wrote:
> So it I wanted to used om.CreateIndividual(), then will the individual get
> stored in the TDB or just in memory?

In TDB.

Dave

> On Sat, Sep 21, 2013 at 6:19 AM, Andy Seaborne <an...@apache.org> wrote:
>
>> On 20/09/13 18:03, Ralph Perniciaro wrote:
>>
>>> Is this the best way to get a reference to OntModel from TDB?
>>>
>>>           Dataset d = TDBFactory.createDataset("**some_location");
>>>
>>>           Model m = d.getDefaultModel();
>>>           OntModelSpec spec = new
>>> OntModelSpec(OntModelSpec.OWL_**MEM_TRANS_INF);
>>>           OntModel om = ModelFactory.**createOntologyModel(spec, m);
>>>
>>> Thanks!
>>>
>>> Ralph
>>>
>>>
>> That looks OK - the inference engine will use memory for it's workspace
>> and additonal triples inferred.
>>
>>          Andy
>>
>>
>


Re: Best method to get reference to OntModel from TDB

Posted by Ralph Perniciaro <ra...@eagles.usm.edu>.
So it I wanted to used om.CreateIndividual(), then will the individual get
stored in the TDB or just in memory?


On Sat, Sep 21, 2013 at 6:19 AM, Andy Seaborne <an...@apache.org> wrote:

> On 20/09/13 18:03, Ralph Perniciaro wrote:
>
>> Is this the best way to get a reference to OntModel from TDB?
>>
>>          Dataset d = TDBFactory.createDataset("**some_location");
>>
>>          Model m = d.getDefaultModel();
>>          OntModelSpec spec = new
>> OntModelSpec(OntModelSpec.OWL_**MEM_TRANS_INF);
>>          OntModel om = ModelFactory.**createOntologyModel(spec, m);
>>
>> Thanks!
>>
>> Ralph
>>
>>
> That looks OK - the inference engine will use memory for it's workspace
> and additonal triples inferred.
>
>         Andy
>
>

Re: Best method to get reference to OntModel from TDB

Posted by Andy Seaborne <an...@apache.org>.
On 20/09/13 18:03, Ralph Perniciaro wrote:
> Is this the best way to get a reference to OntModel from TDB?
>
>          Dataset d = TDBFactory.createDataset("some_location");
>
>          Model m = d.getDefaultModel();
>          OntModelSpec spec = new
> OntModelSpec(OntModelSpec.OWL_MEM_TRANS_INF);
>          OntModel om = ModelFactory.createOntologyModel(spec, m);
>
> Thanks!
>
> Ralph
>

That looks OK - the inference engine will use memory for it's workspace 
and additonal triples inferred.

	Andy