-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CRDT sync handles semantic domains (#1217)
* Add failing sync test for semantic domains * Implement semantic domain sync - Add GetSemanticDomain() to read API - CreateSemanticDomain now returns the created object - Add UpdateSemanticDomain() to write API - Add DeleteSemanticDomain() to write API - Add UpdateSemanticDomainProxy class - Add SemanticDomainSync class - Sync semantic domains in CRDT-FW sync service * Get sync test passing * Add new test for semdoms syncing in entries * Fix Predefined inconsistency for semantic domains --------- Co-authored-by: Kevin Hahn <[email protected]>
- Loading branch information
Showing
13 changed files
with
325 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
backend/FwLite/FwDataMiniLcmBridge/Api/UpdateProxy/UpdateSemanticDomainProxy.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System.Diagnostics.CodeAnalysis; | ||
using MiniLcm.Models; | ||
using SIL.LCModel; | ||
|
||
namespace FwDataMiniLcmBridge.Api.UpdateProxy; | ||
|
||
public class UpdateSemanticDomainProxy : SemanticDomain | ||
{ | ||
private readonly ICmSemanticDomain _lcmSemanticDomain; | ||
private readonly FwDataMiniLcmApi _lexboxLcmApi; | ||
|
||
public UpdateSemanticDomainProxy(ICmSemanticDomain lcmSemanticDomain, FwDataMiniLcmApi lexboxLcmApi) | ||
{ | ||
_lcmSemanticDomain = lcmSemanticDomain; | ||
Id = lcmSemanticDomain.Guid; | ||
_lexboxLcmApi = lexboxLcmApi; | ||
} | ||
|
||
public override MultiString Name | ||
{ | ||
get => new UpdateMultiStringProxy(_lcmSemanticDomain.Name, _lexboxLcmApi); | ||
set => throw new NotImplementedException(); | ||
} | ||
|
||
public override string Code | ||
{ | ||
get => _lcmSemanticDomain.Abbreviation.BestAnalysisVernacularAlternative.Text; | ||
set => throw new NotImplementedException(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.