-
Notifications
You must be signed in to change notification settings - Fork 3
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
Use Predicates instead of Use Classes? #43
Comments
Isn't this contrary to #44? Or are you proposing both hasFileSet and hasOriginalFile statements? |
Both. hasFileSet / hasFile for the direct containers to look after the content, and then additional predicates to clarify use within the parent. |
So you would use both That seems like good functionality on the read side of things, but adds to the overhead on the create side of things. I'm fine with that tradeoff (since I expect most repositories get a lot more reads than writes), but it's worth noting that it's a tradeoff. |
Agree that it's a tradeoff. Hopefully the number of changes to these would be low, and possible to do after the initial load. The POST would go to the hasFile container, then a PATCH on the object to add the hasThumbnail (or whatever) predicate. And yes, if it's just a file, then no subsequent PATCH. |
Mmph. I didn't even think about the extra PATCH. That would be pretty unpleasant. |
Talked through the current postcard model with @jcoyne and @mjgiarlo this morning, and this came from that discussion.
It would be easier to use predicates for the relationship between Object and FileSet, and between FileSet and Files than to look for classes on the child resource.
In particular, the clinching use case was an Object with two FileSets, one for Image depiction and one for TEI transcription. The question came up: How do I know that I can display the TEI file (or likely a pre-processed derivative) as the text of the Object? With Use, the TEI file would need to be both OriginalFile and ExtractedText, and all derivatives would be ExtractedText. So the processing requirement would be:
It seemed easier to link from the Object to the TEI FileSet with a relationship, rather than filtering like this. Similarly, filtering the Files for the OriginalFile rather than following a "hasOriginalFile" relationship seemed significantly easier.
So, the proposal is to continue with a single container for Files (and FileSets, issue forthcoming) and also add a relationship from the parent to the child.
The text was updated successfully, but these errors were encountered: