class %iKnow.Matching.DictionaryAPI
extends %iKnow.Queries.AbstractAPI
Main entry point for managing Dictionary contents to be used by the Matching APIs
parameter GetDictionariesRT = "dictId:%Integer,name:%String,description:%String,defaultLanguage:%String";
parameter GetDictionaryItemsAndTermsRT = "dictItemId:%Integer,name:%String,URI:%String,dictTermId:%Integer,string:%String,language:%String,isProcessed:%Boolean";
parameter GetDictionaryItemsRT = "dictItemId:%Integer,name:%String,URI:%String,defaultLanguage:%String";
parameter GetDictionaryTermsByItemRT = "dictTermId:%Integer,string:%String,language:%String,isProcessed:%Boolean";
classmethod CreateDictionary(domainId As %Integer, name As %String, description As %String = "", defaultLanguage As %String = "en", defaultProfileId As %Integer = "", Output sc As %Status = $$$OK)
as %Integer
Creates a Dictionary and returns its ID.
classmethod CreateDictionaryFormat(domainId As %Integer, formatClass As %String, formatParams As %List = "", Output sc As %Status = $$$OK)
as %Integer
Creates a Dictionary Format instance of the supplied formatClass and returns its ID.
classmethod CreateDictionaryItem(domainId As %Integer, dictId As %Integer, name As %String, URI As %String, defaultLanguage As %String = "en", Output sc As %Status = $$$OK)
as %Integer
Creates a Dictionary Item and returns its ID.
classmethod CreateDictionaryItemAndTerm(domainId As %Integer, dictId As %Integer, name As %String, URI As %String, language As %String = "en", Output sc As %Status = $$$OK)
as %Integer
Shorthand method for creating a Dictionary Item and Term using the Items name. Returns the Items ID.
classmethod CreateDictionaryTerm(domainId As %Integer, dictItemId As %Integer, string As %String, language As %String = "en", Output sc As %Status = $$$OK, isProcessed As %Boolean = 0)
as %Integer
Creates a Dictionary Term and returns its ID.
If isProcessed is 1 (default 0), the term will be marked as processed upon creation
and no Dictionary Elements will be created. This parameter is for internal use only.
classmethod CreateDictionaryTermFormat(domainId As %Integer, dictItemId As %Integer, formatClass As %String, formatParams As %List = "", Output sc As %Status = $$$OK)
as %Integer
Creates a Dictionary Term composed of a single Dictionary Format and returns the Terms ID.
classmethod DropAllDictionaryData(domainId As %Integer)
as %Status
classmethod DropDictionary(domainId As %Integer, dictId As %Integer)
as %Status
Deletes a Dictionary and all related items, terms, elements and matches.
classmethod DropDictionaryItem(domainId As %Integer, dictItemId As %Integer)
as %Status
Deletes a Dictionary Item with all related terms, elements and matches.
classmethod DropDictionaryTerm(domainId As %Integer, dictTermId As %String)
as %Status
Drops a single Dictionary Term and its matching results
classmethod GetDictionaries(ByRef result, domainId As %Integer, page As %Integer = 1, pageSize As %Integer = 10)
as %Status
Returns a list of all Dictionaries in this domain.
classmethod GetDictionaryId(domainId As %Integer, name As %String, Output sc As %Status = $$$OK)
as %Integer
Looks up the Dictionary ID corresponding to the supplied Dictionary name.
classmethod GetDictionaryItemIdByURI(domainId As %Integer, URI As %String, Output sc As %Status = $$$OK)
as %Integer
Looks up the Dictionary Item ID corresponding to the supplied Dictionary Item URI.
classmethod GetDictionaryItems(ByRef result, domainId As %Integer, dictId As %Integer, page As %Integer = 1, pageSize As %Integer = 10)
as %Status
Returns a list of all Dictionary Items for the given Dictionary ID.
classmethod GetDictionaryItemsAndTerms(ByRef result, domainId As %Integer, dictId As %Integer, page As %Integer = 1, pageSize As %Integer = 10)
as %Status
Returns a list of all Dictionary Items and their Terms for the given Dictionary ID.
classmethod GetDictionaryTermsByItem(ByRef result, domainId As %Integer, dictItemId As %Integer, page As %Integer = 1, pageSize As %Integer = 10)
as %Status
Returns a list of all the Dictionary Terms for the given Dictionary Item ID.
classmethod GetFormatDetails(pDomainId As %Integer, pDictionaryFormatId As %Integer, Output pFormatClass As %String, Output pFormatParams As %List)
as %Status
Retrieves the Dictionary format class and parameters for a given pDictionaryFormatId