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

JSON-LD metadata structure observation #159

Open
mih opened this issue Jun 3, 2019 · 2 comments
Open

JSON-LD metadata structure observation #159

mih opened this issue Jun 3, 2019 · 2 comments

Comments

@mih
Copy link
Contributor

mih commented Jun 3, 2019

Just reporting it, because I cannot immediately explain it to myself:

@graph.records.prov:Entity contains records on parameter estimate maps like:

          {
            "@id": "http://dx.datalad.org/MD5E-s238304--9f4f0e08cab456757ec71e58166a874f.nii.gz",
            "crypto:sha512": "919a24080fc9dddb3f3825fc7b545824cd3bdb646c10e764872d3ab8bf60eebbfe7bc4bfc32311e1b3b9ad4559bac7d01d1710de689db92028efc5cd6fcd4d05",
            "dct:format": "image/nifti",
            "nidm:NIDM_0000104": {
              "@id": "niiri:d039a830-4d39-4046-8274-21cfdd073b98"
            },
            "nfo:fileName": "ParameterEstimate_018.nii.gz",
            "rdfs:label": "Parameter estimate 18",
            "prov:atLocation": {
              "@type": "xsd:anyURI",
              "@value": "ParameterEstimate_018.nii.gz"
            },
            "prov:wasGeneratedBy": {
              "@id": "niiri:c520976f-62a5-4f29-ba97-6caa2aef7c1e"
            },
            "@type": "ParameterEstimateMap"
          },

but not all such records are in this location. The rest (non-overlapping) is at @graph.records.ParameterEstimateMap, such as:

          {
            "@id": "http://dx.datalad.org/MD5E-s241948--f7674abecd12cefa7a17bc56983f7f81.nii.gz",
            "crypto:sha512": "4485f0fd34322cb4591e08e4354c286345a3c0e09ee84bf189acdff5cb4955c538f0b7d2d9b3a4b71b6adce6495676b96915f4316615f331bb243a0452348691",
            "dct:format": "image/nifti",
            "nidm:NIDM_0000104": {
              "@id": "niiri:d039a830-4d39-4046-8274-21cfdd073b98"
            },
            "nfo:fileName": "ParameterEstimate_005.nii.gz",
            "rdfs:label": "Parameter estimate 5",
            "prov:atLocation": {
              "@type": "xsd:anyURI",
              "@value": "ParameterEstimate_005.nii.gz"
            },
            "prov:wasGeneratedBy": {
              "@id": "niiri:c520976f-62a5-4f29-ba97-6caa2aef7c1e"
            },
            "@type": "prov:Entity"
          },

What is the reason for this difference in placement? Minus the type info they look the same to me, and I wonder why they would be of different type?

@satra
Copy link

satra commented Jun 3, 2019

@mih - this is a quirk of our explicit types of records in the jsonld context.

because jsonld is still a graph, the underlying data structure doesn't change, but the serializer creates lists of entities by type.

one way to fix this is to not assign multiple types to a node unless necessary. in this particular case: ParameterEstimateMap would be a subclass of prov:Entity so it is not necessary to assign two types to it at the document level.

@cmaumet
Copy link
Member

cmaumet commented Jun 4, 2019

@mih: Thanks for reporting this back. As @satra said, we had discussed removing the second (more generic type) to simplify the graph., I've kept a record of this at: incf-nidash/nidm-specs#479 where we have a list of improvements needed for the JSON-LD representation.

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

3 participants