Project

General

Profile

bug #7745

Subtree filter for dataportal services

Added by Andreas Müller 3 months ago. Updated 3 months ago.

Status:
Resolved
Priority:
Highest
Category:
cdmlib-remote
Target version:
Start date:
09/09/2018
Due date:
% Done:

80%

Severity:
normal
Found in Version:

Description

This is a bit similar to the publish flag filter for data portal (#3560) and other services (#7492)


Related issues

Related to Edit - task #3560: Withheld unpublished taxa from webservice used in E+M dataportal Resolved 09/27/2013
Related to Edit - feature request #7492: Withheld unpublished taxa from webservice used in other webservices New 06/19/2018
Related to Edit - bug #7759: classification subtreefilter settings in portal Closed 09/13/2018

Associated revisions

Revision 185155f8 (diff)
Added by Andreas Müller 3 months ago

ref #7745 implement subtree filter for ClassificationController.rankSpecificRootNotes and .childNodes

Revision cc1a7529 (diff)
Added by Andreas Müller 3 months ago

ref #7745 fix recursive call in deprecated method

Revision 19f1d8b4 (diff)
Added by Andreas Müller 3 months ago

ref #7745 add subtree filter also to ClassificationPortalListController

Revision 26ab7583 (diff)
Added by Andreas Müller 3 months ago

ref #7745 add subtree filter to taxon search (not yet tested for subtree != null)

Revision dce01054 (diff)
Added by Andreas Müller 3 months ago

ref #7745 subtree filter to taxon search (add missing parameter for queries)

Revision bc3200a9 (diff)
Added by Andreas Müller 3 months ago

ref #7745 fix syntax for node.treeindex in query

Revision d2f1dbf2 (diff)
Added by Andreas Müller 3 months ago

ref #7745 fix bug in queries with subtree, some first test and cleanup

Revision 8b00105b (diff)
Added by Andreas Müller 3 months ago

ref #7745 add subtree parameter to freetext search methods

Revision 514ee70c (diff)
Added by Andreas Müller 3 months ago

ref #7745 implement treeindex search in freetext search (untested)

Revision 905f70dc (diff)
Added by Andreas Kohlbecker 3 months ago

ref #7745 harmonizing subtree query parameters

Revision d0df75bd (diff)
Added by Andreas Müller 3 months ago

ref #7745 add subtree filter to missing methods (childNodesOf is still missing implementation)

Revision ba0ae53c (diff)
Added by Andreas Müller 3 months ago

ref #7745 workaround for duplicate TaxonController get Method (for testing if this is the reason) for failing

Revision a6150f24 (diff)
Added by Andreas Müller 3 months ago

ref #7745 workaround for duplicate TaxonController get Method (for testing if this is the reason) for failing

Revision 5f218626 (diff)
Added by Andreas Müller 3 months ago

ref #7745 workaround for duplicate TaxonPortalController getTaxonNodes Method

Revision a8337363 (diff)
Added by Andreas Müller 3 months ago

ref #7745 fixing workaround for override methods

Revision fe2906f6 (diff)
Added by Andreas Kohlbecker 3 months ago

de-dublicating doGetTaxonNodes() controller methods

Revision 3769d06b (diff)
Added by Andreas Müller 3 months ago

ref #7745 some exception handling for subtree filter

Revision 1251ffed (diff)
Added by Andreas Müller 3 months ago

ref #7745 childNodesOf implemented

Revision d3dd860c (diff)
Added by Andreas Müller 3 months ago

ref #7745 switch of required in getTaxonNodes

Revision 4518f4b5 (diff)
Added by Andreas Kohlbecker 3 months ago

ref #7745 upgrading springfox-swagger2 to circumvent bug related to @RequestMappings

Revision 619ccb21 (diff)
Added by Andreas Müller 3 months ago

ref #7745 fix failing pathFrom if subtree is null

Revision 9ee6e0cd (diff)
Added by Andreas Müller 3 months ago

ref #7745 fix failing freetext search in facts freetext search

Revision 24134ae2 (diff)
Added by Andreas Müller 3 months ago

ref #7745 fix failing freetext search in facts freetext search

Revision 9e76e997 (diff)
Added by Andreas Müller 3 months ago

ref #7745 fix failing freetext search in facts freetext search

Revision bc9db6bf (diff)
Added by Andreas Müller 3 months ago

ref #7745 filter getSynonymy for subtree

Revision 2941b4e5 (diff)
Added by Andreas Müller 3 months ago

ref #7745 filter getSynonymy for subtree - fix compile issue in cdmlib print

Revision e739cccb (diff)
Added by Andreas Müller 3 months ago

ref #7745 filter getSynonymy for subtree - fix bug in checkExistsSubtreeAndAccess

History

#1 Updated by Andreas Müller 3 months ago

  • Related to task #3560: Withheld unpublished taxa from webservice used in E+M dataportal added

#2 Updated by Andreas Müller 3 months ago

  • Description updated (diff)

#3 Updated by Andreas Müller 3 months ago

  • Related to feature request #7492: Withheld unpublished taxa from webservice used in other webservices added

#4 Updated by Andreas Müller 3 months ago

  • Status changed from New to In Progress
  • Target version changed from Unassigned CDM tickets to Release 5.3
  • % Done changed from 0 to 20

#5 Updated by Andreas Müller 3 months ago

Subtree filter is now implemented for (rankSpecific)rootNotes and simple taxon search. API exists also for freetext search (but filter not yet implemented)

#6 Updated by Andreas Kohlbecker 3 months ago

  • Related to bug #7759: classification subtreefilter settings in portal added

#7 Updated by Andreas Kohlbecker 3 months ago

the query parameter should be the same in all webservice uris: subtree

#8 Updated by Andreas Kohlbecker 3 months ago

Andreas Kohlbecker wrote:

the query parameter should be the same in all webservice uris: subtree

DONE: 905f70dc

#9 Updated by Andreas Kohlbecker 3 months ago

Also the following webservices need to get a subtree filter:

  • /portal/taxon/{uuid}
  • /portal/taxon/{uuid}/taxonNodes
  • /portal/classification/{uuid}/pathFrom/{uuid}/toRank/{uuid}
  • /classification/{uuid}/childNodesOf/{uuid}

#10 Updated by Andreas Müller 3 months ago

  • Status changed from In Progress to Resolved

#11 Updated by Andreas Müller 3 months ago

  • % Done changed from 20 to 50

#12 Updated by Andreas Müller 3 months ago

  • Status changed from Resolved to Closed

From all what I tested it works. I never got an "external" taxon.

#13 Updated by Andreas Müller 3 months ago

  • Assignee changed from Andreas Müller to Andreas Kohlbecker
  • % Done changed from 50 to 100

#14 Updated by Andreas Müller 3 months ago

  • Status changed from Closed to Feedback
  • Assignee changed from Andreas Kohlbecker to Andreas Müller
  • % Done changed from 100 to 70

Have to reopen. Freetext search on context does not yet work as expected. Searching for "All" returns no result with subtree filter on Ranunculaceae on test.cyprus. Without filter we get a 100% result for Staphisagria macrosperma which is a taxon in Ranunculaceae. Need to check if this is an error in the search itself or has to do with portal code.

(anyway I closed the wrong ticket ;-), I wanted to close the portal ticket )

#15 Updated by Andreas Müller 3 months ago

  • Status changed from Feedback to Resolved
  • Assignee changed from Andreas Müller to Andreas Kohlbecker
  • % Done changed from 70 to 80

Can you please do the final review and close if everything works as expected (but we will probably get user feedback anyway if something does not work such)

#16 Updated by Andreas Müller 3 months ago

  • Tags changed from caryophyllales to caryophyllales, search

#17 Updated by Andreas Kohlbecker 3 months ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Kohlbecker to Andreas Müller

#18 Updated by Andreas Müller 3 months ago

Andreas Kohlbecker wrote:

Open issues:

tested with subtree filter Plumbaginaceae Juss. [#t10#1986#28#] uuid=0ad45274-c5cf-4a95-aa1b-dc698e78f53a

1) http://api.cybertaxonomy.org/caryophyllales_spp/portal/classification/9edc58b5-de3b-43aa-9f31-1ede7c009c2b/childNodesAt/ac470211-1586-4b24-95ca-1038050b618d?subtree=0ad45274-c5cf-4a95-aa1b-dc698e78f53a

returns the taxon set as filter! I think this should be supressesd

Why should it be suppressed? Where does it lead to problems and where is it used. Isn't this the root node for the tree and therefore should appear?

#19 Updated by Andreas Müller 3 months ago

Andreas Kohlbecker wrote:

Open issues:

2) http://api.cybertaxonomy.org/caryophyllales_spp/portal/taxon/7114a8f3-6610-411d-b559-c28e7821cf1c/synonymy?subtree=0ad45274-c5cf-4a95-aa1b-dc698e78f53a'

not yet with filter parameter

I do not understand why this is required. The webservice is not used as primary input for a taxon page or any other portal site. So we do not need to filter it.
However I implemented it (cdmlib|bc9db6bf23) as it was more or less copy and paste from taxon/uuid . Please do review. I did not test with live data

#20 Updated by Andreas Müller 3 months ago

Andreas Kohlbecker wrote:

Open issues:

3) http://api.cybertaxonomy.org/caryophyllales_spp/portal/taxon/7114a8f3-6610-411d-b559-c28e7821cf1c/toNameRelationships?subtree=0ad45274-c5cf-4a95-aa1b-dc698e78f53a

not yet with filter parameter

Again I do not understand why this needs to be filtered. If necessary we can do it the same way as the synonymy (3 lines of code), but it is not necessary. We do not want to filter webservices but data portals. For this it is not needed. Otherwise please give a dataportal link which is not protected because of this service.

#21 Updated by Andreas Müller 3 months ago

  • Status changed from Feedback to Resolved
  • Assignee changed from Andreas Müller to Andreas Kohlbecker

By the way there might be not implemented webservices that need to be protected, e.g. for PolytomousKeys. I think they have an own entry point so should be protected. Can you check this.

But we should open a new ticket for these new issues.

#22 Updated by Andreas Kohlbecker 3 months ago

To the issues 1) - 3) reported in #7745#note-17:

1) You are right, this web service behaves ok.

2) I reported this because the webservice is being used during the composition of the taxon page. It is not really required to protect it at the moment, but it could become more relavant once the data portal taxon pages are more modularized and rendered anynchonously. Anyway, thanks for filtering this webservice also. Implementation looks ok

3) I agree, this is not really needed a the moment.

#23 Updated by Andreas Müller 3 months ago

So can we close the ticket?

#24 Updated by Andreas Kohlbecker 3 months ago

Andreas Müller wrote:

So can we close the ticket?

You were too fast ;-)

#25 Updated by Andreas Kohlbecker 3 months ago

For the polytomous keys the following webservices need to be filtered by the subTree to avoid unpublished taxa showing up in the key:

  • polytomousKey/{uuid}.json --> suppress the whole key if it a) targets any taxon which needs to be suppressed or b) the taxonomic scope includes taxa to be suppressed?
  • polytomousKeyNode/{uuid}/taxon.json --> suppress target taxa per polytomousKeyNode

we need to decide if keys need to be suppressed completely or if only specific nodes are to be shown incompletely? I think the whole key needs to be hidden if it is not 100% included in the classification subtree.

I suggest to open a new ticket for the remaining issues

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)