-
-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Morph types are limited in FieldWorks, the name can be customized, but there's a limited set of them. To handle that we will use an enum on the entry to indicate it's morph type. Something like this:
enum MorphTypeKind
{
Unknown,
bound root
bound stem
circumfix
clitic
discontiguous phrase
enclitic
infixing interfix
particle
phrase
prefix
prefixing interfix
proclitic
root
simulfix
suffixing interfix
suprafix
Other
}
class Entry
{
MorphTypeKind MorphType {get;set;}
}
(feel free to suggest a better enum name).
That covers the entry side, but we also need to model the object as well in order to use the correct names/labels that users specified.
class MorphType
{
MorphTypeKind Kind {get;set;}
MultiString Name {get;set;}
MultiString Abbreviation {get;set;}
RichMultiString Description {get;set;}
string LeadingToken {get;set;}
string TrailingToken {get;set;}
int SecondaryOrder {get;set;} //there might be a primary order? but it's not in the UI
}
take a look at ComplexFormType and copy that for the rest. It should have an Id and other properties that our normal entities have. The kind should be determined by comparing the IMoMorphType.Guid
against the well know GUIDs in MoMorphTypeTags
when mapping to and from FW.
Included in this issue is implementing the mapping from the FW Data API. There should be APIs for Create, delete update, List, GetByKind, for the morph type. And the morph type should be mapped into entries.
The CRDT API can throw for now and will be done in another issue.