-
Notifications
You must be signed in to change notification settings - Fork 4
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
ICAT to PaNOSC Data Model Conversion #265
Comments
I think in our discussion on this last week we decided that an ICAT Dataset is a PaNOSC Dataset, and that an Investigation is a Document |
@louise-davies thanks for the clarification, I've just updated the list to reflect that :) |
@louise-davies @agbeltran @RKrahl @axelboc-esrf @andygotz @antolinos I have been looking at how the PaNOSC data model can be mapped to ICAT. At STFC, ISIS is our primary use case so my suggested mappings are mostly based for that facility. Since other facilities in the ICAT collaboration may wish to use our implementation of the search API, we would like your thoughts on the specific field mappings that I have suggested below. Feel free to comment here with your thoughts, this could also be a good discussion to have at this week's ICAT collaboration meeting? AffiliationThe mapping for this entity is based on icatproject/icat.server#248. I haven't been following the schema discussions closely so apologies if that is not the most current implementation for ICAT Server.
Dataset
Document
File
Instrument
Member
Parameter
Person
Sample
Technique
|
- Comments represent mappings to ICAT data model - This commit also adds a base class for a search API entity (`PaNOSCAttribute`) which has two abstract methods, which will be used to convert between data models when implemented
- Comments represent mappings to ICAT data model - This commit also adds a base class for a search API entity (`PaNOSCAttribute`) which has two abstract methods, which will be used to convert between data models when implemented
Hi @MRichards99 Thanks for this. I got a question about the mapping of the dataset:
Does it mean that all datasets need to have a DOI to be exported via panosc API? We are not minting a DOI for each dataset and will not happen because we got too many of them. Besides I was wondering, can not this mapping be configurable? Even if what you propose has lot of sense it does not exactly corresponds to what we need and I can imagine that it will happen to others too. |
Hi @antolinos
No. Just because that attribute in the ICAT schema is named |
Then, am I supposed to fill the column |
If your dataset does not have a DOI, but any other PID, yes. Where else would you put it? Btw. that attribute name in the ICAT schema is legacy. We discussed it several times and agreed that it would better be named
The attribute names are invisible to users. The admins that are the only ones to see them should be professionals enough to be able to deal with such legacy names. |
- Entity name will be the format used in the mapping json file
- I've added TODOs where there are things I'm still slightly unsure about
- Added filename of the 'actual' mapping file to git ignore
A Document cannot have parameters that have dataset
Co-authored-by: Matthew Richards <32678030+MRichards99@users.noreply.github.com>
Description:
Once the data model for the Search API has been created, there needs to be some way of converting between the PaNOSC and ICAT data models. I believe we will need to convert both ways (i.e. from PaNOSC to ICAT and from ICAT to PaNOSC) to support query filters and then to convert the data from ICAT into a format suitable to be outputted in the Search API.
The current plans of converting from ICAT to PaNOSC (large credits to @louise-davies):
The property
isPublic
exists on the Dataset and Document entities in the PaNOSC data model. Since the anon user will be used in ICAT to get data, we can assume this value will always be true. However, thereleaseDate
could be used in ICAT to determine is a piece of data is actually public or not.I'm not entirely sure how we go about converting between data models, perhaps we have a function in each PaNOSC entity class called
convert_to_icat()
and this constructs an ICAT entity in Python ICAT (usingclient.create()
)? Then there needs to be something similar to convert from ICAT to PaNOSC although I'm less sure how that would work at this stage.There should also be tests to verify that the conversion works correctly.
Acceptance criteria:
The text was updated successfully, but these errors were encountered: