%iKnow.Matching.Formats.SimplePrefixFormat
deprecated class %iKnow.Matching.Formats.SimplePrefixFormat extends %iKnow.Matching.Formats.Format
This sample %iKnow.Matching.Formats.Format implementation checks whether a string starts with a given character sequence, offering a meaningful MatchAll() example.
Format parameters:
- prefix (%String, no default) - the prefix to check for, with no double, starting or trailing spaces
- outputType (%Integer, default 0) - what to supply in terms of output:
- 0: no output
- 1: the remainder of the word following the (first occurrence of the) prefix
- 2: same as 1, but if there is a space following the prefix, returns the next word
- 3: the whole entity starting right after the (first occurrence of the) prefix
Method Inventory
Methods
This method loops through @stringsGlobalName@(" "_string) = id and matches all global entries, storing the results in @resultGlobalName@(id) = $lb(matchScore, matchedWordBits, isScattered, formatOutput). The implementation should ignore all ids < minEntUniId and should not store any results if the matchScore is 0.
Implementing this method only makes sense if the specific format this class represents can exploit the inverse global structure of @stringsGlobalName.
Note: entries in @stringsGlobalName are all in lowercase and prefixed with a space
Warning: an implementation for this method does not replace MatchSingle(). There should still be a MatchSingle alternative, for example to process strings longer than $$$IKHASHSIZE that would not appear in @stringsGlobalName.
Implementations of this method check whether an individual string complies with the format this class represents, returning a matchScore (0..1) and optional matchedWordBits, isScattered and formatOutput through output parameters.
Inherited Members
Inherited Properties
Inherited Methods
- %AddToSaveSet()
- %ClassIsLatestVersion()
- %ClassName()
- %ConstructClone()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Extends()
- %GetParameter()
- %IsA()
- %IsModified()
- %New()
- %NormalizeObject()
- %ObjectModified()
- %OriginalNamespace()
- %PackageName()
- %RemoveFromSaveSet()
- %SerializeObject()
- %SetModified()
- %ValidateObject()
- Finalize()
- MatchAllHashes()
- TestParams()