Home > Class Reference > %SYS namespace > %iKnow.Matching.DictionaryAPI

%iKnow.Matching.DictionaryAPI

class %iKnow.Matching.DictionaryAPI extends %iKnow.Queries.AbstractAPI

Main entry point for managing Dictionary contents to be used by the Matching APIs

Method Inventory

Parameters

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;
parameter GetItemsByNameRT = dictId:%Integer,dictName:%String,itemId:%Integer,itemName:%String,URI:%String,language:%String;
parameter GetTermsByNameRT = dictId:%Integer,dictName:%String,itemId:%Integer,itemName:%String,URI:%String,termId:%Integer,term:%String,language:%String;

Methods

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 [ Language = objectscript ]
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 [ Language = objectscript ]
Creates a Dictionary Format instance of the supplied formatClass and returns its ID.
classmethod CreateDictionaryItem(domainId As %Integer, dictId As %Integer, name As %String, ByRef URI As %String, defaultLanguage As %String = "en", Output sc As %Status = $$$OK) as %Integer [ Language = objectscript ]
Creates a Dictionary Item and returns its ID.
classmethod CreateDictionaryItemAndTerm(domainId As %Integer, dictId As %Integer, name As %String, ByRef URI As %String, language As %String = "en", Output sc As %Status = $$$OK) as %Integer [ Language = objectscript ]
Shorthand method for creating a Dictionary Item and Term using the Item's 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 [ Language = objectscript ]

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 and deprecated in 2013.1.

classmethod CreateDictionaryTermFormat(domainId As %Integer, dictItemId As %Integer, formatClass As %String, formatParams As %List = "", Output sc As %Status = $$$OK) as %Integer [ Language = objectscript ]
Creates a Dictionary Term composed of a single Dictionary Format and returns the Terms ID.
classmethod CreateRegularExpression(pDomainId As %Integer, pDictItemId As %Integer, pRegularExpression As %String, pReplace As %String = "", Output pSC As %Status) as %Integer [ Language = objectscript ]
Shorthand method to create a Dictionary Term composed of a single Dictionary Format of type %iKnow.Matching.Formats.RegularExpression, matching pRegularExpression and optionally producing output by replacing the matched parts of an entity with pReplace.
classmethod DropAllDictionaryData(domainId As %Integer) as %Status [ Language = objectscript ]
Drops all dictionary data, including matching results. This method will fail if there are managed dictionaries in this domain.
classmethod DropDictionary(domainId As %Integer, dictId As %Integer) as %Status [ Language = objectscript ]
Deletes a Dictionary and all related items, terms, elements and matches.
classmethod DropDictionaryItem(domainId As %Integer, dictItemId As %Integer) as %Status [ Language = objectscript ]
Deletes a Dictionary Item with all related terms, elements and matches.
classmethod DropDictionaryTerm(domainId As %Integer, dictTermId As %String) as %Status [ Language = objectscript ]
Drops a single Dictionary Term and its matching results
classmethod GetDictionaries(ByRef result, domainId As %Integer, page As %Integer = 1, pageSize As %Integer = 10, pIncludeCrossDomain As %Boolean = 0) as %Status [ Language = objectscript ]
Returns all Dictionaries in this domain. If pIncludeCrossDomain = 1, any cross-domain dictionaries registered in "domain 0" are also included in the result, using a negative value for their ID.
classmethod GetDictionaryCount(pDomainId As %Integer, Output pSC As %Status = $$$OK) as %Integer [ Language = objectscript ]
classmethod GetDictionaryId(domainId As %Integer, name As %String, Output sc As %Status = $$$OK) as %Integer [ Language = objectscript ]
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 [ Language = objectscript ]
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 [ Language = objectscript ]
Returns 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 [ Language = objectscript ]
Returns 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 [ Language = objectscript ]
Returns 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 [ Language = objectscript ]
Retrieves the Dictionary format class and parameters for a given pDictionaryFormatId
classmethod GetItemCount(pDomainId As %Integer, pDictIds As %List = "", Output pSC As %Status) as %Integer [ Language = objectscript ]
classmethod GetItemsByName(ByRef pResult, pDomainId As %Integer, pString As %String, pPage As %Integer = 1, pPageSize As %Integer = 10, pFilter As %iKnow.Filters.Filter = "", pDictIds As %List = "", pMode As %Integer = $$$USEPARTS, pCheck As %String(VALUELIST="NAME,URI")="NAME", pLang As %String = "en") as %Status [ Language = objectscript ]
Note: pFilter is ignored when looking at cross-domain dictionaries
classmethod GetTermCount(pDomainId As %Integer, pDictIds As %List = "", Output pSC As %Status = $$$OK) as %Integer [ Language = objectscript ]
classmethod GetTermCountByItem(pDomainId As %Integer, pDictItemIds As %List = "", Output pSC As %Status = $$$OK) as %Integer [ Language = objectscript ]
classmethod GetTermsByName(ByRef pResult, pDomainId As %Integer, pString As %String, pPage As %Integer = 1, pPageSize As %Integer = 10, pFilter As %iKnow.Filters.Filter = "", pDictIds As %List = "", pMode As %Integer = $$$USEPARTS, pLang As %String = "en") as %Status [ Language = objectscript ]
Note: pFilter is ignored when looking at cross-domain dictionaries
classmethod HasDictionaries(pDomainId As %Integer) as %Boolean [ Language = objectscript ]
Returns whether or not there are any dictionaries in the domain

Inherited Members

Inherited Methods

Feedback