This class contains the APIs for DeepSee Term Lists. A Term List is a simple lookup table that can be used to translate values when creating DeepSee models or can be referenced at run-time.
Create (or update if present) the given term list. classmethod %DeleteTermList(pTermList As %String) as %Status
pTermList is the name of the term list.
pCaption is the optional caption (display name) of the term list.
pFieldList is an optional ^-delimited list of fields.
pPattern is an optional pattern to apply to the "value" field.
pDescription is the description of the term list.
pSubjectArea is the optional name of the subject area the term list applies to.
Delete the specified term list. classmethod %ExportCSV(pTermList As %String, pFileName As %String = "", pIncludeEncoding As %Boolean = 1) as %Status
Export a TermList to the CSV-file, pFileName. The meta-data for the term list is written to the starting lines of the file using %% as a prefix for key values. + WAL044 -- add pIncludeEncoding; this is not needed in %DeepSee.UI.TermListExport classmethod %FromObj(pObject As %DeepSee.UserLibrary.TermList) as %Status
classmethod %GetTermListNameFromStream(pFileName As %String, ByRef pTermListName As %String = "") as %Status
classmethod %GetTermLists(Output pList As %List) as %Status
Get a list of currently defined term lists. This is returned as: classmethod %GetValueArray(pTermList As %String, Output pArray As %String, pField As %String = "") as %Status
pList(NAME) = $LB(name,caption,moddate,type)
Lookup all values (the "value" field) from the term list pTermList and copy them into a local array. The output is: classmethod %ImportCSV(pFileName As %String, ByRef pTermListName As %String = "", pVerbose As %Boolean = 1) as %Status
pArray(key) = value
If pField is supplied, then use the value of that field.
Load a TermList from the CSV-file, pFileName. The first value on each line is used as a key value, the second as the "value" field. All other values are ignored unless there is a field list defined. In this case, the field list determines how the values within each record are used. classmethod %Lookup(pTermList As %String, pKey As %String, pField As %String = "", pDefault As %String = "") as %String
If pTermListName is supplied, use it. Otherwise use the %%NAME field found in the file.
If pFileName is a stream, then import from it. WAL041 -- pTermListName is returned
Lookup a single value within the term list pTermList. pKey is the unique key for the item in the term list. classmethod %ParseCSVRecord(pText As %String, Output pValues)
pField is the name of the value field to use; if not supplied, "value" is used.
pDefault is a value to return if the key or property value do not exist.
If the termlist has a pattern associated with it, and the requested field is the "value" field, then the pattern is applied to value before it is returned.
Parse a CSV record and split it into an ordinally index array. classmethod %SetValue(pTermList As %String, pKey As %String, pValue As %String, pField As %String = "") as %Status
Set a value within the term list pTermList using the given key value. If pField is provided, then set the value of that field. classmethod %TermListExists(pTermList As %String, Output pSC As %Status) as %Boolean
Test if the given term list exists. classmethod %ToObj(pTermList As %String, Output pSC) as %DeepSee.UserLibrary.TermList
classmethod %WriteCSVRecord(ByRef pRecord, pEncode As %Boolean)
Write out the contents of the integer-indexed array pRecord in csv format. There should be no gaps in the array.