-
Notifications
You must be signed in to change notification settings - Fork 149
Browse Tree
In the geoportal interface, users can browse the geoportal resource catalog. User access the browsing structure through a Browse tab (see How to Browse for Resources) in the user interface. The browsing structure that appears on this tab is fully customizable to suit the categorization needs of your organization. The steps necessary to customize the browse structure are described below.
By default, the browse displays Content Type and ISO Topic Category.The structure of the browse tree is established through REST URLs in the \\geoportal\WEB-INF\classes\gpt\search\browse\browse-catalog.xml file. Each heading in the Browse user interface is established by an item section in the browse-catalog.xml file. Within the item section there are three tags: id, name, and query (Note: if you have version 1.1.1 or below, you will not have the id tag, and duplicate <name></name> elements are not supported). The <id></id> tag assigns a unique id to each item node, such that duplicate <name></name> tags can be used in the tree. The <name></name> tag can be used to reference a string in the \\geoportal\WEB-INF\classes\gpt\resources\gpt.properties file to provide the label that will display for the node in the user interface. The query tag establishes the parameter that will be appended to the REST URL to define the query.
When you modify browse categories, you will need to add or alter the <item></item> elements in the browse-catalog.xml file. For example, to filter by Application, the tags within the item tags would read:
<item>
<id>2</id>
<name resourceKey="catalog.search.filterContentTypes.application"></name>
<query>contentType=application</query>
</item>
To add a sub-heading to a parent heading, embed another item section. For example, to filter Live Data and Map services by continent - North America and South America, respectively - add the following items. Note that the <id></id> values are 32 and 33 for the new <items></items> because they must be unique and id values 0-31 are already used in this configuration:
<item>
<id>8</id>
<name resourceKey="catalog.search.filterContentTypes.liveData"></name>
<query>contentType=liveData</query>
<item>
<id>32</id>
<name resourceKey="catalog.search.filterContentTypes.liveData.nAmerica" />
<query>bbox=-169.3864,6.3096,-44.1136,82.8652</query>
</item>
<item>
<id>33</id>
<name resourceKey="catalog.search.filterContentTypes.liveData.sAmerica" />
<query>bbox=-118.6966,-56.9329,-2.9177,13.8209</query>
</item>
</item>
Another example shows searching a specific field from the Lucene index. Here we are configuring the browse tree according to the keyword "water":
<item>
<name resourceKey="catalog.search.customBrowseTree.keywords.water"></name>
<query>searchText=keywords:"water"</query>
</item>
Note: In addition to adding these elements to the browse-catalog.xml file, you also have to add text values that correspond to the resourceKey to the gpt.properties file. For example, the North America key would be added to the gpt.properties file, as shown below.
catalog.search.filterContentTypes.liveData.nAmerica = North America
Back to Customizations