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

Property to link parent with child experiments #116

Open
simontaurus opened this issue Jan 24, 2025 · 4 comments · May be fixed by OpenSemanticLab/TheELNFileFormat#1
Open

Property to link parent with child experiments #116

simontaurus opened this issue Jan 24, 2025 · 4 comments · May be fixed by OpenSemanticLab/TheELNFileFormat#1

Comments

@simontaurus
Copy link
Contributor

with #113 (seel also #98) changing the spec to

If a Dataset references other Datasets (e.g. a parent experiment with child experiments), they must also be present in the hasPart of ./ if they are meant to be imported. A Dataset MUST not contain other Datasets in its hasPart section.

ELNFileFormat is limited to option 2 / explicitly prohibits option 1 of the RO-Crate spec for nested directory structures

Directory hierarchies MAY be represented with nested Dataset Data Entities, or the Root Dataset MAY refer to files anywhere in the hierarchy using hasPart.

If hasPart is not allowed to link parent with child experiments, ELNFileFormat should define an alternative vocabulary term to do so.
One option would be isPartOf, pointing from the child to the parent element, which would at least to change the overall semantics in reference to option 1 ( hasPart pointing from the parent to the child element).

@SteffenBrinckmann
Copy link
Collaborator

As far as I understood: children and parents are linked by hasPart. @FlorianRhiem: #95 (comment)

  1. All nodes that should be included in the import, have to be inside hasPart of ./
  2. Additionally, hasPart can be used to link children and parents (Pasta does it like that)

@simontaurus
Copy link
Contributor Author

okay, but if both child and parent are Datasets we have to remove

A Dataset MUST not contain other Datasets in its hasPart section.

https://github.com/TheELNConsortium/TheELNFileFormat/blob/master/SPECIFICATION.md?plain=1#L114C178-L114C245

@SteffenBrinckmann
Copy link
Collaborator

I guess we have to give an example of datasets in the specification:

{
    "@graph": [
      {
        "@id": "./",
        "@type": "Dataset",
        "hasPart": [
          {  "@id": "./Dataset1/"},
          {  "@id": "./Dataset2/"},
          {  "@id": "./Dataset3/"},
          {  "@id": "./Dataset4/"}
        ]
      },
      {
        "@id": "./Dataset1/",
        "@type": "Dataset",
        "hasPart": [ ]
      },
      {
        "@id": "./Dataset2/",
        "@type": "Dataset",
        "hasPart": [
            {  "@id": "./Dataset3/"}
         ]
      },
      {
        "@id": "./Dataset4/",
        "@type": "Dataset",
        "hasPart": [
            {  "@id": "./Dataset5/"}
         ]
      }
    ]
}

Here, Dataset1 to Dataset 4 are meant to be imported (there are hasPart of ./) and can form an arbitrary structure, aka. be each others hasPart. Only dataset5 is not meant to be imported.

@simontaurus
Copy link
Contributor Author

Always good to have an example - which makes perfect sense to me 👍

The current specification (as I interpret it) would invalidate both Dataset2 and Dataset4, strictly speaking even ./.

Therefor I would suggest to replace

A Dataset MUST not contain other Datasets in its hasPart section.

with

A Dataset SHOULD refer to child Datasets in its hasPart section.

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

Successfully merging a pull request may close this issue.

2 participants