-
-
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 resources #1385
Metadata resources #1385
Conversation
…ommitcomment-15316106), preserved the landscape mode and prefer a square shape for thumbnail.
…data record. The thumbnail and online source are now managed in the same interface. Some standard (eg. ISO19115-3) allows to add documents in different places in the record and not only 2 types. This needs to be configurable by schema.
…after generating thumbnail using mapprint.
Very good work, looks promising ! |
That looks very nice - just one thing, i dont see what triggers the database migration for urls ... i suppose it should be run only once ? |
How compatible will this be with |
The FileSystemStore using the same "private", "public" folder structure this will be the same. But at some point it could be more relevant to always use the store to access those resources. |
…humbnail is the first one in a record. Simplify call to XSL process.
|
…rce manager will add the link.
…ncrease highlight of selected layers.
Regarding private/public, if you can make sense of the workflow in the formatter cache at the same time.. the use of PRIVATE and PUBLIC in https://github.com/geonetwork/core-geonetwork/blob/3.0.x/services/src/main/java/org/fao/geonet/services/metadata/format/cache/FormatterCache.java is all voodoo to me. |
With this PR the visibility of a resource is not anymore in the resource id so I don't think the formatter will be affected. URL remains the same.
:) for me too ! |
Hi, Great improvement for managing attachments and thumbnails. Just some issues I had using other schema. Schema config added/copied to OnlineSrcDirective.js didn't work on it's own. I also needed to define my schema in Geonetwork admin settings (metadata/editor/schemaConfig). If the schema is not defined here the widget is hidden on the edit page.
Came accross this in core-geonetwork\web-ui\src\main\resources\catalog\templates\editor\editor.html
However I couldn't find the directive gnAddThumbnail, is this now obsolete? The other issue i'm having is importing MEF2 files from older Geonetworks (2.10.3). Now we only have one image file (not previous _s version) and the complete URL to the image is stored in the XML gmd:graphicOverview . I can write some scripts to get around this, or even modify the old Geonetwork MEF2 export, could addressing this on the MEF2 import be a consideration for future improvements of this functionaity? Thanks |
Yes. Dropped in 36999bf
When you edit a record, the URL should be updated no (from filename to complete URL) ? Another option is maybe to run the migration task for this. See #1509 |
A metadata can have a set of resources uploaded to the catalog. Those documents are stored in 2 folders in the data directory in
data/metadata/{{folder-group-sequence}}/{{metadata_id}}/
:public
folder where no security checks are made to download the resourcesprivate
folder where only users member of a group withdownload
privileges can download the resources.Uploaded resources can be files to link to the metadata record (eg. a ZIP containing the data in Shapefile, PDF) or overviews.
Motivations & current limitations
There is some limitations with current implementation which can cause trouble with uploaded files.
If an editor remove in the XML view (or editor view) a section with a reference to an uploaded document, the uploaded document may remain in the metadata directory without any references in the XML. This file can't be manage anymore and is lost because no UI provides access to this file.
There is no possiblity to set if the file is in the public or private folder to restrict its access.
Only one thumbnail can be uploaded (with the large and small version).
Only 2 types of related document can be associated to a record:
Some other standards have the capability to reference document in many places (eg. in ISO19115-3, reference can be created in all CI_Citation - link to a feature catalogue, a data quality report, ...)
CFV 22 January 2016
Proposal
This proposal add a concept of a file store which takes care of managing resources related to a metadata record. It allows to:
The file store provides URLs for all resources than can be used in the metadata document to link to a specific resource. Those URLs can be used for any kind of links in the metadata document (eg. gmd:linkage, gmx:Anchor/@href, gmd:graphicOverview).
Improvements:
Changes:
User interface
To link a document to a metadata record, choose the
Add document
menu from the related resources panel:The add document panel is composed of 2 panels:
The file store panel allows to:
To add a document, choose the type of document. For ISO19139, 2 types of document can be added:
This may be customized on a per schema basis using the configuration (eg. https://github.com/fxprunayre/core-geonetwork/blob/improvement/metadata/resources/web-ui/src/main/resources/catalog/components/edit/onlinesrc/OnlineSrcDirective.js#L155).
Once the document is uploaded, the editor is updated and the new document display in the list of resources:
API
This PR introduce Springfox and Swagger to generate API document. In the move to Spring MVC, it sounds relevant to improve the API documentation and make it easier to maintain at the code level.
Annotations are used to document the API eg. https://github.com/fxprunayre/core-geonetwork/blob/improvement/metadata/resources/services/src/main/java/org/fao/geonet/services/api/metadata/resources/ResourcesApi.java#L121.
Springfox take care of generating swagger API document cf. https://github.com/fxprunayre/core-geonetwork/blob/improvement/metadata/resources/services/src/main/java/org/fao/geonet/services/api/SwaggerConfig.java.
Then API can be easily published. Eg.
http://apps.titellus.net/gnmdr/swagger-ui/
Migration:
Future improvements not part of that PR
@PreAuthorize
annotation instead of intercept-url