-
Notifications
You must be signed in to change notification settings - Fork 71
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
Modified and created dates are serialized as literals #661
Comments
hi @dannylamb, If I wanted to test this ticket/work on it is the issue happening on the 8.x-1.x branch or is it on the commit that the CLAW repo uses, https://github.com/Islandora-CLAW/jsonld/tree/eeec5aada39480615aa328eff2b0d5390dd75309? Which branch should I work off of? |
@kimpham54 you should work off of 8.x-1.x. But so you are aware @ajs6f was looking at this too and I thought that @DiegoPino had done some work on this. So he may have a simple solution up his sleeve. |
@kimpham54 Eventually, the commit hashes that the CLAW repo uses will be for releases. So if you wanted to work off a commit tied to particular release version, that'd be the way to go. But mainline development should go off of the 8.x-1.x branch as @whikloj suggested. FWIW we're not keeping up on updating the CLAW repo very well. Ideally it'd be some sort of automated process, but for now, I wouldn't trust them. |
Yes, @DiegoPino definitely has some ideas here and should be pinged before work goes forward. |
Thanks all for the information. I'll still try to take a look out of interest |
For the reference of whomever might take this on. I noted that if you alter the rdf mapping you can add a See Islandora IRC logs 2017-06-15 starting at 09:52 |
@whikloj @ajs6f wonder about the |
@DiegoPino just wondering if you are still in here. I was doing some digging around and using the getFieldsRdf inside FieldItemNormalizer (right after this
to this
I had to stop adding the Still need to expand the namespaces, but I wanted to see how you were doing. If you're close then I'll move on, but if you have more tasks than time I might be able to figure this out. |
@whikloj go for it, no worries. I had this open question
and then i forgot about it because i'm a flawed, over-committed, and flawed (again) human being. Do you plan to remove language at all? |
And @whikloj yep, my approach was exactly that, use the context generator code, so cool |
@DiegoPino I had left In the Spec I read this:
So I guess we could leave |
That "no language for a non-string-typed literal" rule comes right out of RDF, so it's even more general than JSON-LD. |
Resolved via Islandora/jsonld@36f37cb |
Fix typo in code comment.
When serializing an entity as jsonld, the modified and created dates are being written as literals with the sites default language. They should be serialized as instances of http://www.w3.org/2001/XMLSchema#dateTime instead.
To reproduce:
?_format=jsonld
to the end of its URL and visiting/cURLing it. If cURLing, you'll need to provide an authentication token. If you're visiting it in the browser, you will have to enable cookie authentication through the restui interface at/admin/config/services/rest
If you do a lookup in Gemini and track down the resource in Fedora, it'll be a little more obvious it's not a date when compared to the Fedora created and modified dates:
Returned
d9/51/33/3b/d951333b-8b7e-429c-92ee-d161af59e401
. So you can look in up in Fedora withThe scope of this ticket is to modify the https://github.com/Islandora-CLAW/jsonld module to properly serialize dates. It can be tested by performing the same steps as above, and the date should not be given a language and it should appear as a http://www.w3.org/2001/XMLSchema#dateTime in Fedora.
The text was updated successfully, but these errors were encountered: