-
-
Notifications
You must be signed in to change notification settings - Fork 489
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extend ElasticSearch proxy to filter out elements defined in the sche…
…ma filters configurations (#6869) * Extend ElasticSearch proxy to filter out fields with the withheld information from the query response * Extend XmlSerializer to support 'authenticated' operation and filter out the xml elements * Fix ifNotOperation typo in enumeration element in schema-ident.xsd * MEF export - withheld elements in additional formats export * Search / Avoid NPE when filtering withheld elements. We always need the documentStandard field to check the schema config. * Indexing / Store nilReason attribute value instead of only withheld. Add nilReason for links (and not only contact). --------- Co-authored-by: Francois Prunayre <fx.prunayre@gmail.com>
- Loading branch information
1 parent
b45a697
commit 9f43df8
Showing
14 changed files
with
431 additions
and
202 deletions.
There are no files selected for viewing
199 changes: 105 additions & 94 deletions
199
core/src/main/java/org/fao/geonet/kernel/SchemaManager.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
core/src/main/java/org/fao/geonet/kernel/schema/MetadataSchemaOperationFilter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/* | ||
* Copyright (C) 2001-2023 Food and Agriculture Organization of the | ||
* United Nations (FAO-UN), United Nations World Food Programme (WFP) | ||
* and United Nations Environment Programme (UNEP) | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or (at | ||
* your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, but | ||
* WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA | ||
* | ||
* Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2, | ||
* Rome - Italy. email: geonetwork@osgeo.org | ||
*/ | ||
package org.fao.geonet.kernel.schema; | ||
|
||
import org.jdom.Element; | ||
|
||
public class MetadataSchemaOperationFilter { | ||
private String xpath; | ||
private String jsonpath; | ||
private String ifNotOperation; | ||
private Element markedElement; | ||
|
||
|
||
public MetadataSchemaOperationFilter(String xpath, String jsonpath, String ifNotOperation) { | ||
this(xpath, jsonpath, ifNotOperation, null); | ||
} | ||
|
||
public MetadataSchemaOperationFilter(String xpath, String jsonpath, String ifNotOperation, Element markedElement) { | ||
this.xpath = xpath; | ||
this.jsonpath = jsonpath; | ||
this.ifNotOperation = ifNotOperation; | ||
this.markedElement = markedElement; | ||
|
||
} | ||
|
||
public String getXpath() { | ||
return xpath; | ||
} | ||
|
||
public String getJsonpath() { | ||
return jsonpath; | ||
} | ||
|
||
public String getIfNotOperation() { | ||
return ifNotOperation; | ||
} | ||
|
||
public Element getMarkedElement() { | ||
return markedElement; | ||
} | ||
} |
Oops, something went wrong.