Skip to content

Commit 00b6e2f

Browse files
committed
issue planetfederal#235 : enhancements CSW: add configurable URL template and button to show full metadata record (missing CatalogueSource.js)
1 parent 2f12b42 commit 00b6e2f

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

src/script/plugins/CatalogueSource.js

+22-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* Copyright (c) 2008-2011 The Open Planning Project
3-
*
3+
*
44
* Published under the GPL license.
55
* See https://github.com/opengeo/gxp/raw/master/license.txt for the full text
66
* of the license.
@@ -32,6 +32,13 @@ gxp.plugins.CatalogueSource = Ext.extend(gxp.plugins.WMSSource, {
3232
*/
3333
url: null,
3434

35+
/** api: config[fullMetadataUrlTpl]
36+
* ``String`` Ext XTemplate String with 'id' as parameter for URL to full metadata,
37+
* e.g. custom URL to website for CSW.
38+
* Example: 'http://www.nationaalgeoregister.nl/geonetwork/srv/dut/search?uuid={id}'
39+
*/
40+
fullMetadataUrlTpl: null,
41+
3542
/** api: config[yx]
3643
* ``Object`` Members in the yx object are used to determine if a CRS URN
3744
* corresponds to a CRS with y,x axis order. Member names are CRS URNs
@@ -51,7 +58,7 @@ gxp.plugins.CatalogueSource = Ext.extend(gxp.plugins.WMSSource, {
5158

5259
/** api: config[hidden]
5360
* ``Boolean`` Normally we do not want these sources to show up in the
54-
* AddLayers dialog for the source combobox. Set to false for a certain
61+
* AddLayers dialog for the source combobox. Set to false for a certain
5562
* source to show up anyway whenever that makes sense, e.g. by using a
5663
* catalogue source to retrieve all the layers for a capabilities grid.
5764
*/
@@ -64,6 +71,17 @@ gxp.plugins.CatalogueSource = Ext.extend(gxp.plugins.WMSSource, {
6471
*/
6572
proxyOptions: null,
6673

74+
/** private: method[constructor]
75+
*/
76+
constructor: function(config) {
77+
gxp.plugins.CatalogueSource.superclass.constructor.apply(this, arguments);
78+
79+
// Possible full catalog MD record URL
80+
if (config && config.fullMetadataUrlTpl) {
81+
this.fullMetadataUrlTpl = new Ext.XTemplate(config.fullMetadataUrlTpl);
82+
}
83+
},
84+
6785
/** api: method[describeLayer]
6886
* :arg rec: ``GeoExt.data.LayerRecord`` the layer to issue a WMS
6987
* DescribeLayer request for
@@ -121,10 +139,10 @@ gxp.plugins.CatalogueSource = Ext.extend(gxp.plugins.WMSSource, {
121139
*
122140
* .. list-table::
123141
* :widths: 20 80
124-
*
142+
*
125143
* * - ``queryString``
126144
* - the search string
127-
* * - ``limit``
145+
* * - ``limit``
128146
* - the maximum number of records to retrieve
129147
* * - ``filters``
130148
* - additional filters to include in the query

0 commit comments

Comments
 (0)