From e2f54ad209042d4e727656654058ce86d976b230 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Prunayre?= Date: Tue, 6 May 2014 17:06:24 +0200 Subject: [PATCH 1/5] CSW / Make the distinction between 'own' and 'http://www.isotc211.org/2005/gmd' for outputSchema. When adding a new schema (eg. ISO19115-1), user may require backward compatibility with ISO19139. In that case CSW request using 'csw:IsoRecord' or 'http://www.isotc211.org/2005/gmd' should return the record in ISO19139: ``` cecd1ebf-719e-4b1f-b6a7-86c17ed02c62 brief ``` If user wants to retrieve the original document in its own schema, then 'own' outputSchema could be used. For a schema plugin which should return the same document in both cases (like iso19139), copy the iso19139 schema csw/own-*.xsl. --- .../kernel/csw/services/getrecords/SearchController.java | 8 ++++---- .../schema_plugins/iso19139/present/csw/own-brief.xsl | 4 ++++ .../schema_plugins/iso19139/present/csw/own-full.xsl | 4 ++++ .../schema_plugins/iso19139/present/csw/own-summary.xsl | 4 ++++ 4 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 web/src/main/webapp/WEB-INF/data/config/schema_plugins/iso19139/present/csw/own-brief.xsl create mode 100644 web/src/main/webapp/WEB-INF/data/config/schema_plugins/iso19139/present/csw/own-full.xsl create mode 100644 web/src/main/webapp/WEB-INF/data/config/schema_plugins/iso19139/present/csw/own-summary.xsl diff --git a/csw-server/src/main/java/org/fao/geonet/kernel/csw/services/getrecords/SearchController.java b/csw-server/src/main/java/org/fao/geonet/kernel/csw/services/getrecords/SearchController.java index b2a4a179909..cca116fd51c 100644 --- a/csw-server/src/main/java/org/fao/geonet/kernel/csw/services/getrecords/SearchController.java +++ b/csw-server/src/main/java/org/fao/geonet/kernel/csw/services/getrecords/SearchController.java @@ -290,11 +290,11 @@ private static Element applyElementSetName(ServiceContext context, SchemaManager String prefix ; if (outputSchema == OutputSchema.OGC_CORE) { prefix = "ogc"; - } - else if (outputSchema == OutputSchema.ISO_PROFILE || outputSchema == OutputSchema.OWN) { + } else if (outputSchema == OutputSchema.ISO_PROFILE) { prefix = "iso"; - } - else { + } else if (outputSchema == OutputSchema.OWN) { + prefix = "own"; + } else { throw new InvalidParameterValueEx("outputSchema not supported for metadata " + id + " schema.", schema); } diff --git a/web/src/main/webapp/WEB-INF/data/config/schema_plugins/iso19139/present/csw/own-brief.xsl b/web/src/main/webapp/WEB-INF/data/config/schema_plugins/iso19139/present/csw/own-brief.xsl new file mode 100644 index 00000000000..b5cf4fe4316 --- /dev/null +++ b/web/src/main/webapp/WEB-INF/data/config/schema_plugins/iso19139/present/csw/own-brief.xsl @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/web/src/main/webapp/WEB-INF/data/config/schema_plugins/iso19139/present/csw/own-full.xsl b/web/src/main/webapp/WEB-INF/data/config/schema_plugins/iso19139/present/csw/own-full.xsl new file mode 100644 index 00000000000..e7185d95030 --- /dev/null +++ b/web/src/main/webapp/WEB-INF/data/config/schema_plugins/iso19139/present/csw/own-full.xsl @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/web/src/main/webapp/WEB-INF/data/config/schema_plugins/iso19139/present/csw/own-summary.xsl b/web/src/main/webapp/WEB-INF/data/config/schema_plugins/iso19139/present/csw/own-summary.xsl new file mode 100644 index 00000000000..5661bff9a1a --- /dev/null +++ b/web/src/main/webapp/WEB-INF/data/config/schema_plugins/iso19139/present/csw/own-summary.xsl @@ -0,0 +1,4 @@ + + + + \ No newline at end of file From 3052e772a717e0f56aa746f54c6a11dc3f4ecaae Mon Sep 17 00:00:00 2001 From: Jose Garcia Date: Tue, 10 Jun 2014 08:19:22 +0200 Subject: [PATCH 2/5] #436 Reports module. Restored service security config --- .../WEB-INF/config-security/config-security-mapping.xml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/web/src/main/webapp/WEB-INF/config-security/config-security-mapping.xml b/web/src/main/webapp/WEB-INF/config-security/config-security-mapping.xml index 2ab6ef05d11..b560a2f3e5d 100644 --- a/web/src/main/webapp/WEB-INF/config-security/config-security-mapping.xml +++ b/web/src/main/webapp/WEB-INF/config-security/config-security-mapping.xml @@ -480,7 +480,14 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans - + + + + + + + + From 232205756ec24a10f7c8524557a5ad8db29e05fe Mon Sep 17 00:00:00 2001 From: Jose Garcia Date: Tue, 10 Jun 2014 10:27:45 +0200 Subject: [PATCH 3/5] #544 Allow to disable free text keywords in thesaurus directive --- .../catalog/components/thesaurus/ThesaurusDirective.js | 5 ++++- .../components/thesaurus/partials/thesaurusselector.html | 2 +- .../config/schema_plugins/iso19139/layout/config-editor.xml | 4 ++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/web-ui/src/main/resources/catalog/components/thesaurus/ThesaurusDirective.js b/web-ui/src/main/resources/catalog/components/thesaurus/ThesaurusDirective.js index 62e5093aee6..49d2c4a471f 100644 --- a/web-ui/src/main/resources/catalog/components/thesaurus/ThesaurusDirective.js +++ b/web-ui/src/main/resources/catalog/components/thesaurus/ThesaurusDirective.js @@ -26,7 +26,9 @@ mode: '@gnThesaurusSelector', elementName: '@', elementRef: '@', - domId: '@' + domId: '@', + tagName: '@', + paramName: '@' }, templateUrl: '../../catalog/components/thesaurus/' + 'partials/thesaurusselector.html', @@ -34,6 +36,7 @@ scope.thesaurus = null; scope.snippet = null; scope.snippetRef = null; + scope.allowFreeTextKeywords = (scope.paramName === undefined) || (scope.paramName === 'true'); // TODO: Remove from list existing thesaurus // in the record ? diff --git a/web-ui/src/main/resources/catalog/components/thesaurus/partials/thesaurusselector.html b/web-ui/src/main/resources/catalog/components/thesaurus/partials/thesaurusselector.html index 3ebd7c486c1..d330b7e3566 100644 --- a/web-ui/src/main/resources/catalog/components/thesaurus/partials/thesaurusselector.html +++ b/web-ui/src/main/resources/catalog/components/thesaurus/partials/thesaurusselector.html @@ -1,6 +1,6 @@
- diff --git a/web/src/main/webapp/WEB-INF/data/config/schema_plugins/iso19139/layout/config-editor.xml b/web/src/main/webapp/WEB-INF/data/config/schema_plugins/iso19139/layout/config-editor.xml index fc72b99f898..f27a1c78097 100644 --- a/web/src/main/webapp/WEB-INF/data/config/schema_plugins/iso19139/layout/config-editor.xml +++ b/web/src/main/webapp/WEB-INF/data/config/schema_plugins/iso19139/layout/config-editor.xml @@ -71,6 +71,10 @@ + + From 4bdee658be9df09948103d42e7d95cac4990d048 Mon Sep 17 00:00:00 2001 From: Jose Garcia Date: Tue, 10 Jun 2014 12:16:36 +0200 Subject: [PATCH 4/5] #544 Allow to disable free text keywords in thesaurus directive. Simplified directive configuration --- .../catalog/components/thesaurus/ThesaurusDirective.js | 9 ++++++--- .../components/thesaurus/partials/thesaurusselector.html | 2 +- .../schema_plugins/iso19139/layout/config-editor.xml | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/web-ui/src/main/resources/catalog/components/thesaurus/ThesaurusDirective.js b/web-ui/src/main/resources/catalog/components/thesaurus/ThesaurusDirective.js index 49d2c4a471f..29a839b0522 100644 --- a/web-ui/src/main/resources/catalog/components/thesaurus/ThesaurusDirective.js +++ b/web-ui/src/main/resources/catalog/components/thesaurus/ThesaurusDirective.js @@ -27,8 +27,7 @@ elementName: '@', elementRef: '@', domId: '@', - tagName: '@', - paramName: '@' + allowFreeTextKeywords: '=' }, templateUrl: '../../catalog/components/thesaurus/' + 'partials/thesaurusselector.html', @@ -36,7 +35,11 @@ scope.thesaurus = null; scope.snippet = null; scope.snippetRef = null; - scope.allowFreeTextKeywords = (scope.paramName === undefined) || (scope.paramName === 'true'); + + scope.areAllowedFreeTextKeywords = function() { + return ((scope.allowFreeTextKeywords === undefined) || + (scope.allowFreeTextKeywords)); + } // TODO: Remove from list existing thesaurus // in the record ? diff --git a/web-ui/src/main/resources/catalog/components/thesaurus/partials/thesaurusselector.html b/web-ui/src/main/resources/catalog/components/thesaurus/partials/thesaurusselector.html index d330b7e3566..cffc1ac35eb 100644 --- a/web-ui/src/main/resources/catalog/components/thesaurus/partials/thesaurusselector.html +++ b/web-ui/src/main/resources/catalog/components/thesaurus/partials/thesaurusselector.html @@ -1,6 +1,6 @@
- diff --git a/web/src/main/webapp/WEB-INF/data/config/schema_plugins/iso19139/layout/config-editor.xml b/web/src/main/webapp/WEB-INF/data/config/schema_plugins/iso19139/layout/config-editor.xml index f27a1c78097..b470a3da9c9 100644 --- a/web/src/main/webapp/WEB-INF/data/config/schema_plugins/iso19139/layout/config-editor.xml +++ b/web/src/main/webapp/WEB-INF/data/config/schema_plugins/iso19139/layout/config-editor.xml @@ -73,7 +73,7 @@ From ba37f4d4878a8b0411e56687fcae8017bdc7b259 Mon Sep 17 00:00:00 2001 From: Jose Garcia Date: Tue, 10 Jun 2014 12:34:04 +0200 Subject: [PATCH 5/5] #544 Allow to disable free text keywords in thesaurus directive. Use scope attribute instead of method call to display the add free text keywords button. The method call is invoked several times in angular digest cycle, not good for performance --- .../catalog/components/thesaurus/ThesaurusDirective.js | 8 ++------ .../components/thesaurus/partials/thesaurusselector.html | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/web-ui/src/main/resources/catalog/components/thesaurus/ThesaurusDirective.js b/web-ui/src/main/resources/catalog/components/thesaurus/ThesaurusDirective.js index 29a839b0522..9d5cd9d79f7 100644 --- a/web-ui/src/main/resources/catalog/components/thesaurus/ThesaurusDirective.js +++ b/web-ui/src/main/resources/catalog/components/thesaurus/ThesaurusDirective.js @@ -26,8 +26,7 @@ mode: '@gnThesaurusSelector', elementName: '@', elementRef: '@', - domId: '@', - allowFreeTextKeywords: '=' + domId: '@' }, templateUrl: '../../catalog/components/thesaurus/' + 'partials/thesaurusselector.html', @@ -36,10 +35,7 @@ scope.snippet = null; scope.snippetRef = null; - scope.areAllowedFreeTextKeywords = function() { - return ((scope.allowFreeTextKeywords === undefined) || - (scope.allowFreeTextKeywords)); - } + scope.allowFreeTextKeywords = (attrs.allowFreeTextKeywords === undefined) || (attrs.allowFreeTextKeywords == 'true'); // TODO: Remove from list existing thesaurus // in the record ? diff --git a/web-ui/src/main/resources/catalog/components/thesaurus/partials/thesaurusselector.html b/web-ui/src/main/resources/catalog/components/thesaurus/partials/thesaurusselector.html index cffc1ac35eb..d330b7e3566 100644 --- a/web-ui/src/main/resources/catalog/components/thesaurus/partials/thesaurusselector.html +++ b/web-ui/src/main/resources/catalog/components/thesaurus/partials/thesaurusselector.html @@ -1,6 +1,6 @@
-