implement method to get parent Uuid

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

implement method to get parent Uuid

Chiara Scaini-2
Hi all! I'm trying to retrieve all children for a parent record. The aim is to embed a search url that allows users to see all children listed in the search page.

The url would be something like:

http://***/geonetwork/srv/eng/catalog.search#/search?resultType=details&sortBy=relevance&fast=index&_content_type=json&from=1&to=20&any={{mdView.current.record.getParent()}}

and the getParent methold would get the parentUuid somehow. However, I noticed that the parent uuid is not stored in the geonet:info. How can I add it there? Do you have any example? Or, is there a suggested workaround (ex. creating a category with the parent name, and using that for the search)?

Btw, categories are not stored in the geonet:info either, so maybe at this point the parent is more useful.

Thanks a lot for your time,

Chiara



--
Chiara Scaini


_______________________________________________
GeoNetwork-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: implement method to get parent Uuid

Chiara Scaini-2
Btw, I saw that there's a piece of code that extracts the parents for the grid view in resultsView... maybe I could use that one? any suggestions on how to call 'relations' object from the html template?

Thanks again!
Chiara

On Wed, 17 Oct 2018 at 13:38, Chiara Scaini <[hidden email]> wrote:
Hi all! I'm trying to retrieve all children for a parent record. The aim is to embed a search url that allows users to see all children listed in the search page.

The url would be something like:

http://***/geonetwork/srv/eng/catalog.search#/search?resultType=details&sortBy=relevance&fast=index&_content_type=json&from=1&to=20&any={{mdView.current.record.getParent()}}

and the getParent methold would get the parentUuid somehow. However, I noticed that the parent uuid is not stored in the geonet:info. How can I add it there? Do you have any example? Or, is there a suggested workaround (ex. creating a category with the parent name, and using that for the search)?

Btw, categories are not stored in the geonet:info either, so maybe at this point the parent is more useful.

Thanks a lot for your time,

Chiara



--
Chiara Scaini


--
Chiara Scaini


_______________________________________________
GeoNetwork-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: implement method to get parent Uuid

Francois Prunayre
Hi Chiara,
You could have a look to the API doc

And there is 2 operations for that :
GET/api/0.1/records/{metadataUuid}/related?type=children
Get record related resources

GET/api/0.1/related
Get record related resources for all requested metadatas

HTH

Francois


Le mer. 17 oct. 2018 à 15:40, Chiara Scaini <[hidden email]> a écrit :
Btw, I saw that there's a piece of code that extracts the parents for the grid view in resultsView... maybe I could use that one? any suggestions on how to call 'relations' object from the html template?

Thanks again!
Chiara

On Wed, 17 Oct 2018 at 13:38, Chiara Scaini <[hidden email]> wrote:
Hi all! I'm trying to retrieve all children for a parent record. The aim is to embed a search url that allows users to see all children listed in the search page.

The url would be something like:

http://***/geonetwork/srv/eng/catalog.search#/search?resultType=details&sortBy=relevance&fast=index&_content_type=json&from=1&to=20&any={{mdView.current.record.getParent()}}

and the getParent methold would get the parentUuid somehow. However, I noticed that the parent uuid is not stored in the geonet:info. How can I add it there? Do you have any example? Or, is there a suggested workaround (ex. creating a category with the parent name, and using that for the search)?

Btw, categories are not stored in the geonet:info either, so maybe at this point the parent is more useful.

Thanks a lot for your time,

Chiara



--
Chiara Scaini


--
Chiara Scaini
_______________________________________________
GeoNetwork-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork


_______________________________________________
GeoNetwork-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork