bug #6220
closedImprove definition of orphaned taxon and synonym
80%
Description
Currently taxa are only orphaned if they have no taxon node AND no concept relationships. The later is critical as taxa with concept relationships may still be handled as orphaned except for misapplied names (a concept relationship that is more synonym relationship like). Later also pro parte and partial synonym relationships may be added to this list.
Also synonyms were unclear when they are orphaned. They should be orphaned if not belonging to an accepted taxon or if the accepted taxon is orphaned.
Related issues
Updated by Andreas Müller almost 8 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 50
Applied in changeset cdmlib|4b80789a6d183956c922de22091164555d2ef442.
Updated by Andreas Müller almost 8 years ago
- Status changed from Resolved to Feedback
- Assignee changed from Andreas Müller to Katja Luther
- % Done changed from 50 to 80
The fix works so far that search result in TaxEditor allow only opening in TaxEditor now. However, an orphaned taxon as described in #5616 still shows the wrong symbol (black for accepted).
Is there also another algorithm that determines orphaned in the search results?
Also orphaned synonyms are not found in TaxEditor taxon bulk editor anymore.
Katja, can you have a look on this? If necessary create a new ticket.
Updated by Katja Luther almost 8 years ago
Andreas Müller wrote:
The fix works so far that search result in TaxEditor allow only opening in TaxEditor now. However, an orphaned taxon as described in #5616 still shows the wrong symbol (black for accepted).
Is there also another algorithm that determines orphaned in the search results?
The editor uses the uuidAndTitleCache object and for a misapplied name the orphaned flag is set to false, so the used image is the one for a not orphaned taxon -> black square.
Also orphaned synonyms are not found in TaxEditor taxon bulk editor anymore.
There is a problem with partial and proparte. If there is no values for these attibutes, an exception is thrown because a boolean attribute can not be null.
If I replace NULL with 0 then all synonyms and taxa are found. We need to add this to the update script, if it is not included already.
Katja, can you have a look on this? If necessary create a new ticket.
Updated by Andreas Müller almost 8 years ago
Katja Luther wrote:
Andreas Müller wrote:
The fix works so far that search result in TaxEditor allow only opening in TaxEditor now. However, an orphaned taxon as described in #5616 still shows the wrong symbol (black for accepted).
Is there also another algorithm that determines orphaned in the search results?The editor uses the uuidAndTitleCache object and for a misapplied name the orphaned flag is set to false, so the used image is the one for a not orphaned taxon -> black square.
But it is NOT a misapplied name as far as I remember but only has concept relations. Therefore the "Open in" works correctly now.
Updated by Andreas Müller almost 8 years ago
Katja Luther wrote:
Andreas Müller wrote:
Also orphaned synonyms are not found in TaxEditor taxon bulk editor anymore.
There is a problem with partial and proparte. If there is no values for these attibutes, an exception is thrown because a boolean attribute can not be null.
If I replace NULL with 0 then all synonyms and taxa are found. We need to add this to the update script, if it is not included already.
This should already be fixed in the update script. However, the test server was updated before this fix. I thought I did update all test server databases manually. If not, please let me know where you found this problem. Definitely it is not on the example database I mentioned above (cdm_rem_conf_am). I tested with
SELECT * FROM TaxonBase WHERE DTYPE = 'Synonym' AND (proParte IS NULL OR partial IS NULL)
Also, if this is the problem, the exception should be thrown (and shown to the user) and not be swallowed by the system.
Updated by Katja Luther almost 8 years ago
Andreas Müller wrote:
Katja Luther wrote:
Andreas Müller wrote:
The fix works so far that search result in TaxEditor allow only opening in TaxEditor now. However, an orphaned taxon as described in #5616 still shows the wrong symbol (black for accepted).
Is there also another algorithm that determines orphaned in the search results?The editor uses the uuidAndTitleCache object and for a misapplied name the orphaned flag is set to false, so the used image is the one for a not orphaned taxon -> black square.
But it is NOT a misapplied name as far as I remember but only has concept relations. Therefore the "Open in" works correctly now.
The open in works correctly now. The wrong symbol for taxa with conceptrelationships/misapplied names is because the orphaned flag is set by the hql query not by the isOrphaned() method.
Updated by Andreas Müller almost 8 years ago
Katja Luther wrote:
The open in works correctly now. The wrong symbol for taxa with conceptrelationships/misapplied names is because the orphaned flag is set by the hql query not by the isOrphaned() method.
This is what I expected. So the critical question is here, how we can keep the java based definition of "isOrphaned" in sync with any hql based methods. Or should we simply leave a warning in the according javadoc that some hql also needs to be adapted.
Also exact tests may help for both methods.
Updated by Katja Luther almost 8 years ago
Andreas Müller wrote:
Katja Luther wrote:
The open in works correctly now. The wrong symbol for taxa with conceptrelationships/misapplied names is because the orphaned flag is set by the hql query not by the isOrphaned() method.
This is what I expected. So the critical question is here, how we can keep the java based definition of "isOrphaned" in sync with any hql based methods. Or should we simply leave a warning in the according javadoc that some hql also needs to be adapted.
Also exact tests may help for both methods.
I found this http://stackoverflow.com/questions/25382840/loading-transient-field-of-jpa-entity,
I tried to add a transient attribute isOrphaned and add a method which should be called after loading the entity (with PostLoad annotation).
But the first test did not work. But I think this could be a solution to keep it in sync.
Updated by Andreas Müller over 7 years ago
Katja Luther wrote:
Andreas Müller wrote:
Katja Luther wrote:
The open in works correctly now. The wrong symbol for taxa with conceptrelationships/misapplied names is because the orphaned flag is set by the hql query not by the isOrphaned() method.
This is what I expected. So the critical question is here, how we can keep the java based definition of "isOrphaned" in sync with any hql based methods. Or should we simply leave a warning in the according javadoc that some hql also needs to be adapted.
Also exact tests may help for both methods.I found this http://stackoverflow.com/questions/25382840/loading-transient-field-of-jpa-entity,
I tried to add a transient attribute isOrphaned and add a method which should be called after loading the entity (with PostLoad annotation).
But the first test did not work. But I think this could be a solution to keep it in sync.
This might be a solution but not very nice as it runs the check whenever a taxon is loaded so the performance is going down. We may think about caching this data. Once cache updating works better this might be a solution to keep it more or less in sync and also to retrieve the data directly from database which makes some queries faster (e.g. if you don't want to show orphaned taxa at all)
Updated by Patrick Plitzner over 6 years ago
- Target version changed from Release 4.4 to Release 5.1
moving to current milestone while closing #5616
Updated by Patrick Plitzner over 6 years ago
- Copied from feature request #5616: Add the"Open in..." menu to taxon search added
Updated by Andreas Müller over 6 years ago
- Target version changed from Release 5.1 to Release 4.4
I don't understand why you moved this to the current milestone. The ticket is mostly fixed. The open issues are more about how to guarantee that thinks stay in sync in future which is a minor part of this ticket. We may want to move these open issues to a new ticket.
Updated by Andreas Müller over 6 years ago
Katja, can you please extract the open issues to a new ticket and close this one?
Updated by Katja Luther almost 3 years ago
- Status changed from Feedback to Closed
Andreas Müller wrote:
Katja, can you please extract the open issues to a new ticket and close this one?
created a new ticket #9845 and close this one