Skip to content

LT-10590: Include all metadata fields in flextext export#485

Merged
jtmaxwell3 merged 19 commits into
release/9.3from
LT-10590
Oct 20, 2025
Merged

LT-10590: Include all metadata fields in flextext export#485
jtmaxwell3 merged 19 commits into
release/9.3from
LT-10590

Conversation

@jtmaxwell3

@jtmaxwell3 jtmaxwell3 commented Oct 10, 2025

Copy link
Copy Markdown
Collaborator

I extended FlextextInterlinear.xsd to allow items to have guid attributes that can point to structured data in the element. I then changed BirdInterlinearImport.cs and InterlinearExport.cs to import and export all of the metadata, including the notebook record and genres. The notebook record is stored in , but only the fields that are visible in the info field. Genres and other possibilities are stored with a guid and a name, but the possibilities themselves are not stored in . InterlinearObjects contains the mapping between ICmObjects and xml. It is shared between BirdInterlinearImport.cs and InterlinearExport.cs.


This change is Reviewable

@jasonleenaylor

Copy link
Copy Markdown
Contributor

Src/LexText/Interlinear/LinguaLinksImport.cs line 294 at r2 (raw file):

			BIRDDocument doc;
			int initialProgress = progress.Position;
			bool canStartUow = ((IActionHandlerExtensions)m_cache.ActionHandlerAccessor).CanStartUow;

Why was this necessary now?

@jtmaxwell3

Copy link
Copy Markdown
Collaborator Author

I needed it in order to do an end-to-end unit test (TestMetaDataRoundtrip). The test framework already had a unit of work.

@jasonleenaylor

Copy link
Copy Markdown
Contributor

Src/LexText/Interlinear/LinguaLinksImport.cs line 295 at r2 (raw file):

			int initialProgress = progress.Position;
			bool canStartUow = ((IActionHandlerExtensions)m_cache.ActionHandlerAccessor).CanStartUow;
			try

Ok, this code is very old and pre-dates the nice way of doing this. Instead of the try\finally We want to wrap all this code in a UndoableUnitOfWorkHelper.DoUsingNewOrCurrentUOW() That will eliminate the need for your variable and make this consistent with the current state of the art.

@jasonleenaylor jasonleenaylor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

@jasonleenaylor reviewed 6 of 11 files at r1, 2 of 2 files at r2, 1 of 1 files at r3, all commit messages.
Reviewable status: 9 of 11 files reviewed, all discussions resolved

@jtmaxwell3 jtmaxwell3 enabled auto-merge (squash) October 20, 2025 14:55
@jtmaxwell3 jtmaxwell3 merged commit 8bb6506 into release/9.3 Oct 20, 2025
4 of 5 checks passed
@jtmaxwell3 jtmaxwell3 deleted the LT-10590 branch October 20, 2025 15:10
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