You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Trevor Donaldson <tm...@gmail.com> on 2015/01/29 15:09:50 UTC

Clear Graph using Model api

Is there an easy way to clear the entire graph using DatasetAccessor /
Model in the Jena Api? I would like to clear a graph without iterating over
all nodes in a graph. Thanks.

Re: Clear Graph using Model api

Posted by Rob Vesse <rv...@dotnetrdf.org>.
Assuming you just want to delete it from your remote store completely then
call deleteModel() on your DatasetAccessor instance, this avoids the need
for a local load of the graph first

Rob

On 29/01/2015 06:11, "Trevor Donaldson" <tm...@gmail.com> wrote:

>Whoops, answered my own question. model.removeAll(). My bad.
>
>On Thu, Jan 29, 2015 at 9:09 AM, Trevor Donaldson <tm...@gmail.com>
>wrote:
>
>> Is there an easy way to clear the entire graph using DatasetAccessor /
>> Model in the Jena Api? I would like to clear a graph without iterating
>>over
>> all nodes in a graph. Thanks.
>>





Re: Clear Graph using Model api

Posted by Trevor Donaldson <tm...@gmail.com>.
Whoops, answered my own question. model.removeAll(). My bad.

On Thu, Jan 29, 2015 at 9:09 AM, Trevor Donaldson <tm...@gmail.com>
wrote:

> Is there an easy way to clear the entire graph using DatasetAccessor /
> Model in the Jena Api? I would like to clear a graph without iterating over
> all nodes in a graph. Thanks.
>