Closed karbah-geodata closed 1 year ago
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.
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?
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
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 inwebapp/app/context/metadata-editor.js
, where the metadata formats for 'inspire', 'dc', and 'iso-19115-3' haverequiredPath: "app/gxe/types/..."
, while all other formats haverequiredPath: "esri/dijit/metadata/types/..."
. Looking at my browser's DevTools it indeed seems that while some files are loaded from the localapp
directory, most of the metadata editor and language files appear to be loaded from esri's official servers (see screenshot):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?