[Nepomuk] Review Request 108838: Check super typer for ResourceWatcher resourceCreated/resourceRemoved

Vishesh Handa me at vhanda.in
Wed Feb 13 15:05:06 UTC 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/108838/#review27374
-----------------------------------------------------------


The TypeCache parents stuff isn't really required. You can just directly use the ClassAndPropertyTree. If you look at its implementation, it stores all the parents of all the classes it has. So fetching them isn't computationally expensive.


services/storage/resourcewatchermanager.cpp
<http://git.reviewboard.kde.org/r/108838/#comment20601>

    If this is actually required, then it might make sense to combine all the super types in one set and then check the m_typeHash. I say this cause a lot of types have common super types, specially rdfs:Resource.



services/storage/resourcewatchermanager.cpp
<http://git.reviewboard.kde.org/r/108838/#comment20600>

    This loop doesn't seem to be doing anything. You're now using the 'superType' variable anywhere.



services/storage/test/resourcewatchertest.cpp
<http://git.reviewboard.kde.org/r/108838/#comment20599>

    I feel as though this should pass without your patch. Hmmm.



services/storage/typecache.cpp
<http://git.reviewboard.kde.org/r/108838/#comment20598>

    I'm a little confused. Shouldn't this query give all the super types as well?
    
    I just tested this query out, and it does give me all the super types.


- Vishesh Handa


On Feb. 7, 2013, 6:18 p.m., Jörg Ehrichs wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/108838/
> -----------------------------------------------------------
> 
> (Updated Feb. 7, 2013, 6:18 p.m.)
> 
> 
> Review request for Nepomuk and Vishesh Handa.
> 
> 
> Description
> -------
> 
> If the resource watcher is configured to watch a super type and a sub
> type is created/removed the proper signal is emitted now.
> 
> For example nco:Contact is watched and nco:PersonContact is created
> 
> To implement this, the TypeCache was extended to call and cache the
> parent type/classes.
> 
> The resourcewatcher unit test was extended for these cases.
> 
> 
> Diffs
> -----
> 
>   services/storage/datamanagementmodel.cpp f516369 
>   services/storage/resourcewatchermanager.cpp 73d31c3 
>   services/storage/test/resourcewatchertest.h 2a0c066 
>   services/storage/test/resourcewatchertest.cpp 0613c40 
>   services/storage/typecache.h 642191a 
>   services/storage/typecache.cpp 99d88f9 
> 
> Diff: http://git.reviewboard.kde.org/r/108838/diff/
> 
> 
> Testing
> -------
> 
> resourcewatcher Unit test work without error
> 
> 
> Thanks,
> 
> Jörg Ehrichs
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/nepomuk/attachments/20130213/8bfbd8d8/attachment.html>


More information about the Nepomuk mailing list