-
-
Notifications
You must be signed in to change notification settings - Fork 489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Metadata data store improvements to customise folder naming #7711
Open
josegar74
wants to merge
19
commits into
main
Choose a base branch
from
44-datastoreimprovements
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
…names - support renaming of metadata folders and refactor code to calculate folder names
…names - configuration folder for draft metadata
…names - allow to use different base folders for public / non-public metadata
josegar74
force-pushed
the
44-datastoreimprovements
branch
from
February 7, 2024 10:10
ed2b441
to
37ed44c
Compare
josegar74
force-pushed
the
44-datastoreimprovements
branch
from
February 7, 2024 10:14
37ed44c
to
a47494f
Compare
…names - hide visibility button in the metadata editor if 'datastore.folderPrivilegesStrategy' is set to NONE
…store.folderStructureFallbackNonPublic
…config.properties.
…d be done on other characters?
…nfigured a different folder for non-published metadata
Quality Gate failedFailed conditions See analysis details on SonarCloud Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
By default, GeoNetwork uses the following folder structure to store the metadata files:
This pull request allows to customise the naming of folders to store the metadata files, for example instead of using the internal metadata id, using the metadata uuid or the metadata resource identifier.
Custom folder structure allows user to be able to connect to an externally managed data store which has to follow convention about naming. Quite often data are well organized on file system and this facilitate interaction between the catalogue and external datastore avoiding duplication of files. Externally managed data store also support in general large data file upload.
Use case
For example, at EEA, all datasets are identified using a unique resource identifier eg. eea_v_4258_100_k_msfd-marine-regions_p_2010-2017_v01_r00 following this convention. All data files, reports and documentation about those datasets are published in a datastore with an internal and public area (https://sdi.eea.europa.eu/webdav/datastore/public/). Connecting the catalogue to that storage allow to easily reference files in metadata records.
Configuration in
config.properties
datastore.folderStructureType
. Values:DEFAULT
(default value),CUSTOM
DEFAULT
uses the default structure to store the metadata filesCUSTOM
allows to customise the naming of folders to store the metadata files, for example instead of usingthe internal metadata id, using the metadata uuid or the metadata resource identifier.datastore.folderPrivilegesStrategy
. Values:DEFAULT
(default value),NONE
DEFAULT
uses the PRIVATE / PUBLIC subfolder structureNONE
stores all the files in the same metadata folderdatastore.folderStructure
: folder structure to store published metadata. Example to use the metadata resource identifier:datastore/$.resourceIdentifier[0].code/
datastore.folderStructureFallback
: folder structure to store published metadata if the criteria for previous property doesn't match (in the previous example, when the metadata has no resource identifier, use the metadata uuid instead:datastore/$.uuid/
)datastore.folderStructureNonPublic
: folder structure to store non published metadata (if don't want to store the files in the same folder structure asdatastore.folderStructure
for non published metadata)datastore.folderStructureFallbackNonPublic
: analog todatastore.folderStructureFallback
The
datastore.folderStructure...
values support JSON Path to refer to Elasticsearch index properties (for example, the resource identifier, the metadata uuid, etc.).Testing
Tested only with the Filesystem store.
Changes
Checklist
main
branch, backports managed with labelREADME.md
filespom.xml
dependency management. Update build documentation with intended library use and library tutorials or documentationFunded by EEA