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

Model: refact data/datetype fields #12659

Open
etj opened this issue Oct 18, 2024 · 2 comments
Open

Model: refact data/datetype fields #12659

etj opened this issue Oct 18, 2024 · 2 comments
Milestone

Comments

@etj
Copy link
Contributor

etj commented Oct 18, 2024

The ResourceBase model at the moment handles the two date fields (related to data, not to metadata):

  • date
  • date_type (creation|revision|publication)

Since CSW ISO AP defines "CreationDate", "RevisionDate", "PublicationDate" as queriables, we may replace the fields date and date_type with:

  • csw_data_creation_date
  • csw_data_revision_date
  • csw_data_publication_date

where

  • csw because they are only used in CSW output
  • data because they refer to data, and not to the metadata document (there are other fields for that purpose)

The migration should populate the new fields using the date and date_type fields:

  • if date_type=='creation' --> set csw_data_creation_date = date
  • if date_type=='revision' --> set csw_data_revision_date = date
  • if date_type=='publication' --> set csw_data_publication_date = date

Once the migrations are done,

  • change the pyCSW mappings to point to the new fields
  • change the ISO XML template to use the new fields
@etj etj added this to the 5.0.0 milestone Oct 18, 2024
@gannebamm
Copy link
Contributor

I do not understand why the publication and revision also should set other fields. Did I misunderstand your post?

Why should the creation and revision date be set to the publication date? For me this seems semantically incorrect.

@etj
Copy link
Contributor Author

etj commented Oct 21, 2024

@gannebamm oky, I was badly recalling some directives, I updated the doc of the migration part to only keep the pre-existing data without any forcing.

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