-
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
Resolve identifier URIs to MarkLogic URIs #794
Conversation
03189bc
to
a64c439
Compare
@@ -0,0 +1,31 @@ | |||
import json |
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.
I'm a bit conflicted about where this file lives -- I think this is better than being in models.identifiers
. Maybe it should be in models.identifier_resolution
?
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.
I agree this isn't a data model - current location seems fine to me.
a64c439
to
9163483
Compare
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.
Needs a touch more in docstrings and I think we should flip a default to the 'safe' choice, otherwise LGTM!
@@ -0,0 +1,31 @@ | |||
import json |
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.
I agree this isn't a data model - current location seems fine to me.
|
||
@staticmethod | ||
def from_marklogic_output(raw_row: str) -> "IdentifierResolution": | ||
row = json.loads(raw_row) |
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 would be a candidate for refactoring in future if we do much more with TDE; possibly one to touch on when we improve how EUI reports on things in various pending states, or when we do exception reporting.
|
||
declare namespace xdmp="http://marklogic.com/xdmp"; | ||
declare variable $identifier_uri as xs:string external; | ||
declare variable $published_only as xs:int? external := 0; |
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.
Is it safer for this to default to being true, so we have to explicitly request that it include unpublished stuff?
fd63e5c
to
5a50e75
Compare
Summary of changes
Functions to take a PUI url matching an identifier's URI and return the MarkLogic URI.
https://national-archives.atlassian.net/browse/FCL-496
Checklist