Skip to content
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

Where is the metadata editor source code and language definitions for ISO and other metadata? #470

Closed
karbah-geodata opened this issue Sep 20, 2022 · 3 comments

Comments

@karbah-geodata
Copy link

karbah-geodata commented Sep 20, 2022

This is more of a question to understand how geoportal works and can be edited than a bug. I've been trying to explore the available folders and files, and noticed that it seems only Dublin Core and INSPIRE and maybe ISO-19115-3 is defined locally in the geoportal-server-catalog. E.g. webapp/app/gxe/types only contains folders for 'dc', 'inspire2', and 'iso-19115-3'. This appears to be confirmed in webapp/app/context/metadata-editor.js, where the metadata formats for 'inspire', 'dc', and 'iso-19115-3' have requiredPath: "app/gxe/types/...", while all other formats have requiredPath: "esri/dijit/metadata/types/...". Looking at my browser's DevTools it indeed seems that while some files are loaded from the local app directory, most of the metadata editor and language files appear to be loaded from esri's official servers (see screenshot):

image

This is relevant for instance if I need to override some metadata editor behavior, such as #469 , which won't be possible if the files are loaded from the official esri servers.

Another example, I can't seem to find any nls language files for the metadata editor, even though they seem to successfully load the languages based on locale. Having these locally would be useful e.g. to override or customize the official translations.

If my understanding here is correct, is there a way to change so that metadata files and/or languages are hosted and retrieved from the local geoportal folder? Could you give an example of how to e.g. use the official iso-19115 metadata editor files and languages, but to customize and load it locally?

@mhogeweg
Copy link
Member

mhogeweg commented Sep 20, 2022

hi, as you see in the code, a large portion of the metadata profile definition is coming from the JS API itself. This way we don't have to ship them to everyone deploying geoportal server.

The files are part of the download for the JS API available on the Esri downloads page. Make sure to get JS API 3.x. If you download JS API 3.41, you will find the metadata definition files at:
\arcgis_js_v341_api\arcgis_js_api\library\3.41\3.41\esri\dijit\metadata.

if you want to customize a profile then take a look at the gxe/types folder: https://github.com/Esri/geoportal-server-catalog/tree/master/metadata-editor/app/gxe/types. This folder includes inspire2 and other iso metadata profiles.

@karbah-geodata
Copy link
Author

Thanks, that helps. But as you say, most of the metadata files are gathered from the ESRI JS API, and as far as I can tell the metadata-editor folder isn't really used anywhere in the source code/application. What would I have to change to make geoportal fetch from these locally defined metadata types instead of from the ESRI JS API? Would I have to copy one of the type folders from metadata-editor/app/gxe/types to webapp/app/gxe/types, and then point the corresponding metadata entry in metadata-editor.js to fetch from that folder rather than from the ESRI JS API by setting requiredPath: "app/gxe/types/...", as I described in my post?

@mhogeweg
Copy link
Member

that is correct. the metadata-editor app is a standalone web-based metadata editor, but it implements the same concepts and uses the same approach as the metadata editor included in Geoportal Server. You also nail one of the things needed to create your own type or modify an existing type.

I suggest reading the documentation on this topic available on the wiki: https://github.com/Esri/geoportal-server-catalog/wiki/Customize-Metadata-Profiles

If you have questions after that, please let me know

@mhogeweg mhogeweg closed this as completed Oct 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants