You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Andy Seaborne (JIRA)" <ji...@apache.org> on 2013/01/15 18:42:13 UTC

[jira] [Commented] (JENA-381) Composed graphs do no generate listener event for deletion on iterator.

    [ https://issues.apache.org/jira/browse/JENA-381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13554040#comment-13554040 ] 

Andy Seaborne commented on JENA-381:
------------------------------------

The test AbstractTestGraph.testEventDeleteByFind() is now intercepted by TestDyadic and made a no-op.  This allows the test to be used elsewhere and the test suite to pass.  

(If the test suite is not passing, we don't notice newly introduced errors)
                
> Composed graphs do no generate listener event for deletion on iterator.
> -----------------------------------------------------------------------
>
>                 Key: JENA-381
>                 URL: https://issues.apache.org/jira/browse/JENA-381
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: Jena
>    Affects Versions: Jena 2.7.4, Jena 2.10.0
>            Reporter: Claude Warren
>
> Composed graphs do no generate listener event for deletion on iterator as indicated by failure of testEventDeleteByFind() in AbstractTestGraph
> Analysis:
> returned iterator is a composite of the iterators on the base graph. e.g. AIter.andThen( BIter ).  When remove is called it is executed against the base graph.  The composed graph does not listen to the base graphs and thus does not broadcast the subgraph deletion to its listeners.
> Potential Solution:
> Have the composite graph register as a listener to the base graphs and rebroadcast all events to its listeners.  I expect that this will cause duplicate notification for currently broadcast events and that several methods that modify the graph and broadcast the change will have to be modified so as not to announce the change but let the underlying graph announce it.
> Alternative Solution:
> Modify the iterator so that it wraps the currently returned iterator trap the delete method and announces the deletion to its listeners after calling the delete on the wrapped iterator.
> The alternative solution is probably easier to implement.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira