%DeepSee.TermList
Class %DeepSee.TermList Extends %RegisteredObject [ System = 4 ]
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.
Methods
%GetTermLists
ClassMethod %GetTermLists(Output pList As %List) As %Status
Get a list of currently defined term lists. This is returned as:
pList(NAME) = $LB(name,caption,moddate,type)
%GetTermListArray
ClassMethod %GetTermListArray(ByRef pParameters, Output pMetaData, Output %pData) As %Status [ Final, Internal ]
Return an array of all currently defined DeepSee TermLists in a format that can be used by a finderDialog.
%TermListExists
ClassMethod %TermListExists(pTermList As %String, Output pSC As %Status) As %Boolean
Test if the given term list exists.
%DeleteTermList
ClassMethod %DeleteTermList(pTermList As %String) As %Status
Delete the specified term list.
%Lookup
ClassMethod %Lookup(pTermList As %String, pKey As %String, pField As %String = "", pDefault As %String = "") As %String
Lookup a single value within the term list pTermList. pKey is the unique key for the item in the term list.
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.
%GetValueArray
ClassMethod %GetValueArray(pTermList As %String, Output pArray As %String, pField As %String = "") As %Status
Lookup all values (the "value" field) from the term list pTermList and copy them into a local array. The output is:
pArray(key) = value
If pField is supplied, then use the value of that field.
%CreateTermList
ClassMethod %CreateTermList(pTermList As %String, pCaption As %String = "", pFieldList As %String = "", pPattern As %String = "", pDescription As %String = "", pSubjectArea As %String = "", pHideValue As %Boolean = 0) As %Status
Create (or update if present) the given term list.
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.
%SetValue
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.
%GetTermListNameFromStream
ClassMethod %GetTermListNameFromStream(pFileName As %String, ByRef pTermListName As %String = "") As %Status
%ImportCSV
ClassMethod %ImportCSV(pFileName As %String, ByRef pTermListName As %String = "", pVerbose As %Boolean = 1) As %Status
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.
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
%ExportCSV
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
%WriteCSVRecord
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.
%ParseCSVRecord
ClassMethod %ParseCSVRecord(pText As %String, Output pValues)
Parse a CSV record and split it into an ordinally index array.
%ToObj
ClassMethod %ToObj(pTermList As %String, Output pSC) As %DeepSee.UserLibrary.TermList
%FromObj
ClassMethod %FromObj(pObject As %DeepSee.UserLibrary.TermList) As %Status