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

Formatting issue with jsonld returned from service #12

Open
gecage952 opened this issue Mar 18, 2024 · 0 comments
Open

Formatting issue with jsonld returned from service #12

gecage952 opened this issue Mar 18, 2024 · 0 comments

Comments

@gecage952
Copy link
Contributor

gecage952 commented Mar 18, 2024

When attempting to update a model using the service-catalog-api, I've run into multiple errors pretty much all related to the formatting of the jsonld. While, I've been able to work around some of these issues, because they keep popping up, it makes me feel like there might be a more general formatting issue here.

For example, here is a part of my input that I am sending to the file-converter:

{"title":"Soddyite","created":"03-18-24 16:31:45","modified":"03-18-24 16:31:45","description":"DESCRIPTION: Pale yellow consolidated earthy powder;LOCALITY: Palette, Northern Territory, Australia;STATUS: The identification of this mineral has been confirmed by X-ray diffraction and chemical analysis","sources":[{"citation":"Highlights in Mineralogical Crystallography 2015 1-30","reftype":"journal article","doi":"10.1515/9783110417104-003","url":"https://doi.org/10.1515/9783110417104-003"},{"citation":"RRUFF project database entry","url":"https://rruff.info/R060407"}],"scidata":{"methodology":{"techniqueType":"cao:spectroscopy","technique":"Raman Spectroscopy","instrumentType":"Raman Spectrometer","settings":[{"@id":"setting/1/","@type":"sdo:setting","quantity":"length","property":"Wavelength","value":{"@id":"setting/1/value/","@type":"sdo:value","number":"532","unitref":"qudt:NanoM"}}]},"system":{"material":{"name":"Soddyite","materialType":"(UO_2_)_2_SiO_4_·2H_2_O"},"compound":{"formula":"(UO2)2SiO4 · 2H2O","name":"soddyite"},"functionalgroup":[{"atoms":"U","multiplicity":2},{"atoms":"H2O","multiplicity":2},{"atoms":"SiO","multiplicity":1}],"structuretype":{"structure type":"framework"}

and here is a part of the response from the file-converter service:

{"@context":["https://stuchalk.github.io/scidata/contexts/scidata.jsonld",{"sdo":"https://stuchalk.github.io/scidata/ontology/scidata.owl#"},{}],"@id":"","generatedAt":"03-18-24 18:28:18","version":"","@graph":{"@type":"sdo:scidataFramework","uid":"scidata:jsonld:Soddyite","description":"DESCRIPTION: Pale yellow consolidated earthy powder;LOCALITY: Palette, Northern Territory, Australia;STATUS: The identification of this mineral has been confirmed by X-ray diffraction and chemical analysis","toc":["dc:source","sdo:dataseries","sdo:dataset","sdo:measurement","sdo:methodology","sdo:scidataFramework","sdo:scientificData","sdo:undefined"],"ids":["cao:spectroscopy","dc:source","sdo:measurement"],"scidata":{"@id":"scidata/","@type":"sdo:scientificData","methodology":{"@id":"methodology/","@type":"sdo:methodology","aspects":[{"@id":"measurement/1/","@type":"sdo:measurement","techniqueType":"cao:spectroscopy"}]},"dataset":{"@id":"dataset/","@type":"sdo:dataset","dataseries":[{"@id":"dataseries/1/","@type":"sdo:dataseries","parameter":{"@id":"dataseries/1/undefined/

The title is missing from the response, there's an empty @id property, as well as a par of braces with nothing inside.
I've been taking this output and trying to send it to the service-catalog, however eventually I get 500 error saying org.apache.jena.riot.RiotException: com.github.jsonldjava.core.JsonLdError: invalid term definition: empty key for value '{@id=https://www.w3.org/2001/XMLSchema#@type#}', which definitely seems like a formatting issue.

I don't know for sure that the issue lies here, but I want to just raise attention to any potential issues.

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

1 participant