Learning
Documentation
Community
Open Exchange
Global Masters
Home / Class Reference / ENSLIB namespace / %DeepSee.TermList
Private  Storage   

%DeepSee.TermList


class %DeepSee.TermList extends
%RegisteredObject

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.

Inventory


Parameters Properties Methods Queries Indices ForeignKeys Triggers
15


Summary


Methods
%AddToSaveSet %ClassIsLatestVersion %ClassName %ConstructClone
%CreateTermList %DeleteTermList %DispatchClassMethod %DispatchGetModified
%DispatchGetProperty %DispatchMethod %DispatchSetModified %DispatchSetMultidimProperty
%DispatchSetProperty %ExportCSV %Extends %FromObj
%GetParameter %GetTermListNameFromStream %GetTermLists %GetValueArray
%ImportCSV %IsA %IsModified %Lookup
%New %NormalizeObject %ObjectModified %OriginalNamespace
%PackageName %ParseCSVRecord %RemoveFromSaveSet %SerializeObject
%SetModified %SetValue %TermListExists %ToObj
%ValidateObject %WriteCSVRecord


Methods


• 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.
• classmethod %DeleteTermList(pTermList As %String) as %Status
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:
pList(NAME) = $LB(name,caption,moddate,type)
• 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.
• 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
• 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.
• classmethod %ParseCSVRecord(pText As %String, Output pValues)
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.