-
Notifications
You must be signed in to change notification settings - Fork 18
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
chore(standoff): Use Base64-encoded UUIDs in standoff tags #1301
Conversation
@benjamingeer I will do the review on Monday, ok? |
No problem, thanks! |
On Monday, I will have fresh energy and be extra annoying ;-) |
Ich freue mich auf deine Erbsenzählerei. :) |
@@ -774,7 +778,7 @@ object StandoffTagUtilV2 { | |||
case Some(endIndex: String) => Some(endIndex.toInt) | |||
case None => None | |||
}, | |||
uuid = standoffNodes(OntologyConstants.KnoraBase.StandoffTagHasUUID), | |||
uuid = knoraIdUtil.decodeUuid(standoffNodes(OntologyConstants.KnoraBase.StandoffTagHasUUID)), |
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.
This works both with the old string format and the new shorter UUIDs because KnoraIdUtil.decodeUuid
handles both cases:
Is this correct?
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.
Yes, that’s right.
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.
Looks good!
Thanks for the review! |
This PR stores the UUIDs of standoff tags in Base64 encoding to make them shorter. This should make triplestore query results somewhat shorter. The change is backwards-compatible; existing UUIDs will still work.
StandoffTagV2
to store its UUID as ajava.util.UUID
object instead of a string.KnoraIdUtil
to Base64-encode standoff UUIDs.StandoffTagUtilV2
to decode Base64-encoded UUIDs.