Geoportal Browse Tree customization help

4415
1
02-24-2016 12:27 AM
Muqit_Zoarder
Occasional Contributor

Dear all, i hope you all are fine. I have installed Esri Geoportal 1.2.2 version. I have already integrated my arcgis server rest services in geoportal. The data is now linked with my geoportal. I can find the data in search option. But the problem is I cannot view or link the data in Browser Tree (in catalog). I read a lot of documentation and help file. Basic things are there but i could not find any real example thus I can follow and customize my portal. For example I have Soil data and how I can link it into browser tree? Please give me an example thus i can do the rest.

Thanking you

With best regards

Muqit

Tags (1)
0 Kudos
1 Reply
GianniCampanile
Esri Contributor

Hi Muqit,

the browse tree can be customized editing the <geoportal>\WEB-INF\classes\gpt\search\browse\browse-catalog.xml file. In this file you can add queries using the rest API of GPT (REST API Syntax · Esri/geoportal-server Wiki · GitHub ).

For example, if you need to display a leaf of the tree showing all records contating the word "Soil", you should add something like:

<item>

                    <id>38</id>

                    <name>Search for Soil</name>

                    <query>searchText=Soil</query>

</item>

There are several things to take care of:

- the Id must be unique within the file

- the <name> can be a string literal (as in this case) or it can refer to a key in the gpt.properties file:

     <name resourceKey="catalog.mdParam.somelabel"></name>

In the latter case you can handle multilingual

- also folders in the tree can be clicked, so the query of these elements should include all leaf cases

One additional clue: a very smart way for a one-click search is to use Collections. Collections are a user-defined grouping of metadata, that can be queried with the keyword isPartOf. This gives the ability to "assign" a metadata to a concept indipendently from his content. In your case, for example, you could define a "Soil" collection and assign records to that collection even if they do not contain the Soil keyword.

Regards

Gianni