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

Implement XmlFilehandler #200

Closed
etj opened this issue Sep 11, 2023 · 6 comments · Fixed by #202
Closed

Implement XmlFilehandler #200

etj opened this issue Sep 11, 2023 · 6 comments · Fixed by #202
Assignees
Labels
estimate needed we need to do an estimate for this ticket master

Comments

@etj
Copy link
Contributor

etj commented Sep 11, 2023

Is your feature request related to a problem? Please describe.

As per GeoNode/geonode#11448 (Errors in metadata upload), the upload of a metadata file is broken since GeoNode/geonode#11363.

Describe the solution you'd like

We need a new handler for the metadata XML files.

@etj etj added the master label Sep 11, 2023
@mattiagiupponi mattiagiupponi transferred this issue from GeoNode/geonode Sep 11, 2023
@mattiagiupponi mattiagiupponi added the estimate needed we need to do an estimate for this ticket label Sep 11, 2023
mattiagiupponi added a commit that referenced this issue Sep 12, 2023
mattiagiupponi added a commit that referenced this issue Sep 12, 2023
@mattiagiupponi mattiagiupponi linked a pull request Sep 12, 2023 that will close this issue
mattiagiupponi added a commit that referenced this issue Sep 12, 2023
mattiagiupponi added a commit that referenced this issue Mar 7, 2024
* Fixes #200: Add XML file handler
* Fixes #200: Remove import_metadata, collapse it to import_resource
* Fixes #200: Remove unused import
---------
Co-authored-by: Giovanni Allegri <giovanni.allegri@gmail.com>
@ridoo
Copy link
Contributor

ridoo commented Mar 8, 2024

@mattiagiupponi as this issue is quite important for thuenen, would it be possible to create a patch release which includes this fix?

What is your opinion on an early integration? Would it make sense only, after the geonode part have been improved?

@mattiagiupponi
Copy link
Contributor

Hi @ridoo
This is not yet fully ready. I am going to merge #203 which refactors the handler. We also need to fix the geoserver-restconfig lib before the merge.

What is your opinion on an early integration? Would it make sense only, after the geonode part has been improved?

If you want to upload XML and SLD files via API and track their status, it is possible to use it even if the front-end part is not yet ready. The API accepts the same parameters as the ones sent by the front end. the dataset_title in the request.data is necessary to identify the dataset.

However, if you intend to allow the user to upload data through the user interface, it's better to wait until the front-end issue is resolved before proceeding. This is because even if the handlers are triggered, the user won't receive any feedback on their completion.

@mattiagiupponi as this issue is quite important for thuenen, would it be possible to create a patch release which includes this fix?

I'll sync with @giohappy when everything is ready and i'll let you know

@ridoo
Copy link
Contributor

ridoo commented Mar 8, 2024

Thanks @mattiagiupponi for the clarification!

@mattiagiupponi
Copy link
Contributor

Hi @ridoo
Both handlers (xml and sld) are merged, i refactored them a bit since they have a common structure.
The UI is not planned for the short time i guess, but they can be used via the upload API mimic the actual XML/SLD upload

@gannebamm
Copy link

@mattiagiupponi thanks for the info. Will the xml be used if I upload a dataset with xml file? The planned UI is for the metadata xml upload for an already existing dataset?

@mattiagiupponi
Copy link
Contributor

@mattiagiupponi thanks for the info. Will the xml be used if I upload a dataset with xml file?

If spatial files are uploaded along with other files, the spatial handler will handle both the files.
For example in the BaseVectorFileHandler during the resource creation in geonode

self.handle_xml_file(saved_dataset, _exec)
self.handle_sld_file(saved_dataset, _exec)

The handler check if the files exists and use them

The planned UI is for the metadata xml upload for an already existing dataset?

Yes, thats why we had to create this two handlers, are used only during the upload for a pre-existing dataset.

Let me know if is clear or some additional detail are needed :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
estimate needed we need to do an estimate for this ticket master
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants