-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add annotations model and relations #14
Conversation
@hubsmoke Take a look at the annotations model when you have some time, addressing inside component is particularly weird but not sure how to represent it since it would depend on the type of component 🤷 |
|
||
# A way to identify the location of the annotation in the target component | ||
# payload, for example a JSON path, line number, or coordinates in a pdf | ||
path: String @string(maxLength: 512) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps we should add more fields here like cid, dpidPath, jsonPath and a generic path
i think we also need a "subPath" field... one locator identifies the component and the other navigates to something inside of it.
it would be nice if mimeType is available (perhaps it's already part of ResearchComponent def?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hubsmoke there 0-n ResearchComponent
per ResearchObject
, and an annotation points to a single ResearchComponent
. So this field does just the latter: navigation inside that component. Does that make sense?
There is a makeshift type field that I temporarily yanked from nodes
, but I agree a generic string field for mimeType
makes more sense though. I've been hesitant on this because of the hard-coded alternatives. Feels reasonable for the gateway app to have it's own rules for which subset of mime it consider which views :)
enum ComponentType {
DATA_BUCKET
UNKNOWN
PDF
CODE
VIDEO
DATA
LINK
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CID is already available as field dagNode
on the ResearchComponent
, so this path
on the annotation would be jsonPath
if the mimetype is JSON, page:coordinates
or smt if it's a pdf, et cetera :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed the component type to mimeType
in the PR as well :)
No description provided.