Skip to content
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

[FCL-309] Add the ability for documents to store abstract identifiers in MarkLogic properties #778

Conversation

jacksonj04
Copy link
Collaborator

@jacksonj04 jacksonj04 commented Nov 18, 2024

Summary of changes

  • New IdentifierSchema and Identifier abstract classes which define interfaces for how we think about what any given type of identifier looks like (IdentifierSchema), and how we might be able to interact with specific instances of that identifier (Identifier)
  • New NeutralCitationSchema and NeutralCitation concretions of the above abstract classes, defining NCN-specific implementations of methods where necessary.
  • Identifiers can compile themselves down to a URL slug, used for simplifying retrieval at any given URL.
  • New methods for a Document which allow CRUD operations on its identifiers, using the above classes to turn identifier concepts into serialisations which can be stashed in the MarkLogic properties for a document.

Checklist

  • I have created/updated method docstrings (if necessary)
  • I have considered if this is a breaking change
  • I have updated the changelog (if necessary)

Jira

FCL-309

@jacksonj04 jacksonj04 force-pushed the FCL-309-implement-framework-for-storing-multiple-identifiers-against-documents branch 6 times, most recently from e70ea20 to 9611d5a Compare November 19, 2024 19:00
@jacksonj04 jacksonj04 force-pushed the FCL-309-implement-framework-for-storing-multiple-identifiers-against-documents branch from d931400 to 6d49bb0 Compare November 25, 2024 13:01
@dragon-dxw
Copy link
Collaborator

I'm a touch concerned about the properties being used because they might be stale if overwritten, but that's a risk anyway at the moment.

Do we want more general properties parsing and editing? (Probably not)

@jacksonj04 jacksonj04 force-pushed the FCL-309-implement-framework-for-storing-multiple-identifiers-against-documents branch 5 times, most recently from 63c0ad6 to 090f194 Compare November 29, 2024 11:06
@dragon-dxw dragon-dxw force-pushed the FCL-309-implement-framework-for-storing-multiple-identifiers-against-documents branch 2 times, most recently from caef3e7 to b326df2 Compare November 29, 2024 18:17
@jacksonj04 jacksonj04 force-pushed the FCL-309-implement-framework-for-storing-multiple-identifiers-against-documents branch from b326df2 to 2d5a816 Compare November 29, 2024 19:02
…l Citation schema

In this framework both the schema defining an identifier and the identifiers themselves are implemented as abstract classes. This is because we know that some types of identifier (such as Neutral Citations) may have places in the codebase where we require additional type-specific functionality. By using type-specific concretions of those abstract classes we can guarantee we're doing so in a type-safe manner, whilst still keeping a generic framework for the underlying storage.
This is necessary for our identifier to document mapping table, which speeds up retrieval of a document for any given identifier scheme.
This helps us identify the type of thing we're looking at if the context isn't clear during debugging operations
@jacksonj04 jacksonj04 force-pushed the FCL-309-implement-framework-for-storing-multiple-identifiers-against-documents branch from 2d5a816 to deb72ae Compare December 2, 2024 14:48
@dragon-dxw dragon-dxw marked this pull request as ready for review December 3, 2024 10:26
@jacksonj04 jacksonj04 added this pull request to the merge queue Dec 3, 2024
Merged via the queue into main with commit 1dc5934 Dec 3, 2024
11 of 14 checks passed
@jacksonj04 jacksonj04 deleted the FCL-309-implement-framework-for-storing-multiple-identifiers-against-documents branch December 3, 2024 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants