InterSystems IRIS Data Platform 2020.4 > Class Reference > %SYS namespace > Config.NLS.Tables

Config.NLS.Tables

persistent class Config.NLS.Tables extends %Library.Persistent, %XML.Adaptor, %SYSTEM.Help

SQL Table Name: Config_NLS.Tables

This class describes the basic properties of a table and, depending on its type, can also contain the table data itself.

For types XLT, COL, and Case, the data points are stored in a SubTable object. For types Patcode, Ident and XY, the data points are kept in the Table object itself. Mode tables use a hybrid mechanism, with the modal escape sequences kept in the Table and the data points in a Mode SubTable. Pattern tables keep the pattern code ranges but also point to a Patcode Table.

Warning!

Only tables which have a "NameFrom" or "NameTo" property beginning with "y" (e.g. "yPrinterXYZ" or "yMytable") are considered custom tables and are preserved during system upgrades. All other tables are restored to their original state and any changes to them made with methods from this class will be lost in an upgrade.

Property Inventory

Method Inventory

Parameters

parameter DOMAIN = %Utility;
Default Localization Domain

Properties

property COLRules as %List;
For Collation tables only.
$LB(collation #,local encoding rule,global encoding rule)
Property methods: COLRulesGet(), COLRulesGetStored(), COLRulesIsValid(), COLRulesLogicalToOdbc(), COLRulesLogicalToXSD(), COLRulesOdbcToLogical(), COLRulesSet(), COLRulesXSDToLogical()
property Description as %String (MAXLEN = 128);
Description of the Table.
Property methods: DescriptionDisplayToLogical(), DescriptionGet(), DescriptionGetStored(), DescriptionIsValid(), DescriptionLogicalToDisplay(), DescriptionLogicalToOdbc(), DescriptionNormalize(), DescriptionSet()
property Identifiers as %List;
For Identifier tables only.
$LB("start:num","start:num",...)
Property methods: IdentifiersGet(), IdentifiersGetStored(), IdentifiersIsValid(), IdentifiersLogicalToOdbc(), IdentifiersLogicalToXSD(), IdentifiersOdbcToLogical(), IdentifiersSet(), IdentifiersXSDToLogical()
property Modes as array of %String;
For Mode tables only.
array({mode-index})="mode-name:mode-bytes:mode-seq"
Property methods: ModesBuildValueArray(), ModesCollectionToDisplay(), ModesCollectionToOdbc(), ModesDisplayToCollection(), ModesDisplayToLogical(), ModesGet(), ModesGetObject(), ModesGetObjectId(), ModesGetStored(), ModesGetSwizzled(), ModesIsValid(), ModesLogicalToDisplay(), ModesLogicalToOdbc(), ModesNormalize(), ModesOdbcToCollection(), ModesSet(), ModesSetObject(), ModesSetObjectId()
property NameFrom as %String (MAXLEN = 64, MINLEN = 1) [ Required ];
For XLT tables this corresponds to the source encoding or character set. For the other types this is the character set used by the current locale.
Property methods: NameFromDisplayToLogical(), NameFromGet(), NameFromGetStored(), NameFromIsValid(), NameFromLogicalToDisplay(), NameFromLogicalToOdbc(), NameFromNormalize(), NameFromSet()
property NameTo as %String (MAXLEN = 64, MINLEN = 1) [ Required ];
For XLT tables this corresponds to the target encoding or character set. For the other types is is usually the name of the table.
Property methods: NameToDisplayToLogical(), NameToGet(), NameToGetStored(), NameToIsValid(), NameToLogicalToDisplay(), NameToLogicalToOdbc(), NameToNormalize(), NameToSet()
property PatAliases as %List;
For Patcode tables only.
$LB("alias:codes","alias:codes",...)
Property methods: PatAliasesGet(), PatAliasesGetStored(), PatAliasesIsValid(), PatAliasesLogicalToOdbc(), PatAliasesLogicalToXSD(), PatAliasesOdbcToLogical(), PatAliasesSet(), PatAliasesXSDToLogical()
property PatCodes as %List;
For Patcode tables only.
$LB("code:num","code:num",...)
Property methods: PatCodesGet(), PatCodesGetStored(), PatCodesIsValid(), PatCodesLogicalToOdbc(), PatCodesLogicalToXSD(), PatCodesOdbcToLogical(), PatCodesSet(), PatCodesXSDToLogical()
property PatternRanges as array of %List;
For pattern tables only.
array("A")=$LB("start:num","start:num",...)
Property methods: PatternRangesBuildValueArray(), PatternRangesCollectionToDisplay(), PatternRangesCollectionToOdbc(), PatternRangesDisplayToCollection(), PatternRangesGet(), PatternRangesGetObject(), PatternRangesGetObjectId(), PatternRangesGetStored(), PatternRangesGetSwizzled(), PatternRangesIsValid(), PatternRangesLogicalToOdbc(), PatternRangesLogicalToXSD(), PatternRangesOdbcToCollection(), PatternRangesOdbcToLogical(), PatternRangesSet(), PatternRangesSetObject(), PatternRangesSetObjectId(), PatternRangesXSDToLogical()
property SubTableName as %String;
For LowerCase, UpperCase, TitleCase, XLT, COL and Pattern tables.
Property methods: SubTableNameDisplayToLogical(), SubTableNameGet(), SubTableNameGetStored(), SubTableNameIsValid(), SubTableNameLogicalToDisplay(), SubTableNameLogicalToOdbc(), SubTableNameNormalize(), SubTableNameSet()
property Type as %String (MAXLEN = 10, MINLEN = 1) [ Required ];
Type of table:
Lowercase, UpperCase, TitleCase,
XLT, COL, Mode, Pattern, Ident, XY, Patcode
Property methods: TypeDisplayToLogical(), TypeGet(), TypeGetStored(), TypeIsValid(), TypeLogicalToDisplay(), TypeLogicalToOdbc(), TypeNameFromNameToIndexCheck(), TypeNameFromNameToIndexDelete(), TypeNameFromNameToIndexExists(), TypeNameFromNameToIndexOpen(), TypeNameFromNameToIndexSQLCheckUnique(), TypeNameFromNameToIndexSQLExists(), TypeNameFromNameToIndexSQLFindPKeyByConstraint(), TypeNameFromNameToIndexSQLFindRowIDByConstraint(), TypeNormalize(), TypeSet()
property XLTDefaultAction as %Integer;
For XLT tables only.
XLT Default actions:
0 - Generate error
1 - Replace with replacement string/value
2 - Replace with original string/value (ignore)
Property methods: XLTDefaultActionDisplayToLogical(), XLTDefaultActionGet(), XLTDefaultActionGetStored(), XLTDefaultActionIsValid(), XLTDefaultActionLogicalToDisplay(), XLTDefaultActionNormalize(), XLTDefaultActionSet(), XLTDefaultActionXSDToLogical()
property XLTModeTableName as %String;
For XLT modal tables only.
XLT Name of mode table.
Property methods: XLTModeTableNameDisplayToLogical(), XLTModeTableNameGet(), XLTModeTableNameGetStored(), XLTModeTableNameIsValid(), XLTModeTableNameLogicalToDisplay(), XLTModeTableNameLogicalToOdbc(), XLTModeTableNameNormalize(), XLTModeTableNameSet()
property XLTReplacementValue as %String;
For XLT tables only.
XLT Replacement value.
Property methods: XLTReplacementValueDisplayToLogical(), XLTReplacementValueGet(), XLTReplacementValueGetStored(), XLTReplacementValueIsValid(), XLTReplacementValueLogicalToDisplay(), XLTReplacementValueLogicalToOdbc(), XLTReplacementValueNormalize(), XLTReplacementValueSet()
property XLTReversibility as %Integer;
For XLT tables only.
XLT Reversibility:
0 - Non-reversible (ambiguous)
1 - Reversible
2 - Generated from a reversible table
Property methods: XLTReversibilityDisplayToLogical(), XLTReversibilityGet(), XLTReversibilityGetStored(), XLTReversibilityIsValid(), XLTReversibilityLogicalToDisplay(), XLTReversibilityNormalize(), XLTReversibilitySet(), XLTReversibilityXSDToLogical()
property XLTType as %Integer;
For XLT tables only.
XLT Table type:
0 - Non-modal to non-modal
1 - Non-modal to modal
2 - Modal to modal
Property methods: XLTTypeDisplayToLogical(), XLTTypeGet(), XLTTypeGetStored(), XLTTypeIsValid(), XLTTypeLogicalToDisplay(), XLTTypeNormalize(), XLTTypeSet(), XLTTypeXSDToLogical()
property XYActions as array of %List;
For XY table only.
array({xytype})=$LB("start:num","start:num",...)
xytype:
0 - Normal printing character
1 - Full width character
2 - Non printing character
3 - Backspace character
4 - Line feed character
5 - Form feed character
6 - Carriage return character
7 - Escape sequence character
Property methods: XYActionsBuildValueArray(), XYActionsCollectionToDisplay(), XYActionsCollectionToOdbc(), XYActionsDisplayToCollection(), XYActionsGet(), XYActionsGetObject(), XYActionsGetObjectId(), XYActionsGetStored(), XYActionsGetSwizzled(), XYActionsIsValid(), XYActionsLogicalToOdbc(), XYActionsLogicalToXSD(), XYActionsOdbcToCollection(), XYActionsOdbcToLogical(), XYActionsSet(), XYActionsSetObject(), XYActionsSetObjectId(), XYActionsXSDToLogical()

Methods

classmethod Compile(Type As %String, NameFrom As %String, NameTo As %String) as %Status [ Language = objectscript ]
Compiles a single Table

Parameters:
  • Type - Table type (eg: "LowerCase", "COL", "XLT", etc.)
  • NameFrom - Source character set (eg: "Unicode", "CP1250", "DTM-J", "etc.)
  • NameTo - Target character set (eg: "Unicode", "CP1251", "Latin2", etc.)
classmethod Create(Type As %String, NameFrom As %String, NameTo As %String, ByRef Properties As %String) as %Status [ Language = objectscript ]
Creates a Table the NLS database.

Parameters:
  • Type - Table type (eg: "LowerCase", "COL", "XLT", etc.)
  • NameFrom - Source character set (eg: "Unicode", "CP1250", "DTM-J", "etc.)
  • NameTo - Target character set (eg: "Unicode", "CP1251", "Latin2", etc.)
  • Properties - Array of properties corresponding to the class properties
classmethod CreateSkeleton(Type As %String, From As %String, To As %String, Maxchar As %Integer, ByRef Table As %ObjectHandle) as %Status [ Language = objectscript ]
Creates a Table with common default parameters
Doesn't require passing a complete table specification.

Parameters:
  • Type - Table type (eg: "LowerCase", "COL", "XLT", etc.)
  • From - Source character set (eg: "Unicode", "CP1250", "DTM-J", "etc.)
  • To - Target character set (eg: "Unicode", "CP1251", "Latin2", etc.)
  • Maxchar - Highest character: 0 (empty), 255 (8-bit), 65535 (Unicode)
  • Table - Return oref of the created object
classmethod Delete(Type As %String, NameFrom As %String, NameTo As %String, Deep As %Integer = 0) as %Status [ Language = objectscript ]
Deletes a Table.

Parameters:
  • Type - Table type (eg: "LowerCase", "COL", "XLT", etc.)
  • NameFrom - Source character set (eg: "Unicode", "CP1250", "DTM-J", "etc.)
  • NameTo - Target character set (eg: "Unicode", "CP1251", "Latin2", etc.)
classmethod Exists(Type As %String, NameFrom As %String, NameTo As %String, ByRef Table As %ObjectHandle, ByRef Status As %Status) as %Boolean [ Language = objectscript ]
Checks for the existence of a Table in the NLS database.

Parameters:
  • Type - Table type (eg: "LowerCase", "COL", "XLT", etc.)
  • NameFrom - Source character set (eg: "Unicode", "CP1250", "DTM-J", "etc.)
  • NameTo - Target character set (eg: "Unicode", "CP1251", "Latin2", etc.)
Return values:
If Value of the method = 0 (Table does not exist, or some error occured)
  • Table = Null
  • Status = Table "x" does not exist, or other error message
If Value of the method = 1 (Table exists)
  • Table = Object handle to Table
  • Status = $$$OK
classmethod Export(FileName As %String = "TablesExport.xml", ByRef NumExported As %Integer, Types As %String = "*", NamesFrom As %String = "*", NamesTo As %String = "*") as %Status [ Language = objectscript ]
Exports Table Objects to a file in xml format.

Parameters:
  • FileName - Output file name
  • NumExported (byref) - Returns number of Table records exported.
  • Tables - Comma separated list of Tables to export, "*" = All
  • classmethod ExportAllToNls(ByRef NumExported As %Integer, Deep As %Integer = 0) as %Status [ Language = objectscript ]
    Exports all Table records to ^%nls.

    Parameters:
    • Return values: Status
    • NumExported - Number of exported tables
    classmethod ExportDir(Dir As %String, ByRef NumExported As %Integer, Types As %String = "*", NamesFrom As %String = "*", NamesTo As %String = "*") as %Status [ Language = objectscript ]
    Exports Table Objects to separate xml files.

    Parameters:
  • Dir - Directory where the files will be created
  • NumExported (byref) - Returns number of Table records exported.
  • Types/NamesFrom/NamesTo - Comma separated list of Tables to export, "*" = All
  • classmethod ExportList(FileName As %String = "TablesExport.xml", ByRef NumExported As %Integer, ByRef Tables As %String) as %Status [ Language = objectscript ]
    Similar to Export() but uses a list of Tables to export rather than a query. Used internally by Locales.ExportList() and other utilities.

    Parameters:
    • FileName - Output file name
    • NumExported - Number of exported SubTables [out]
    • Tables - Array of Tables to export
    classmethod ExportToNls(Type As %String, NameFrom As %String, NameTo As %String, Deep As %Integer = 0) as %Status [ Language = objectscript ]
    Exports one Table record to ^%nls.

    Parameters:
    • Type - Table type (eg: "LowerCase", "COL", "XLT", etc.)
    • NameFrom - Source character set (eg: "Unicode", "CP1250", "DTM-J", "etc.)
    • NameTo - Target character set (eg: "Unicode", "CP1251", "Latin2", etc.)
    • Deep - If true export associated SubTable(s)
    classmethod FromToDeleteRow(Type As %String, NameFrom As %String, NameTo As %String, FromCode As %String) as %Status [ Language = objectscript ]
    Deletes a single row in a "FromTo" table (XLT, COL or Case).

    Parameters:
    • Type - Table type (eg: "LowerCase", "COL", "XLT")
    • NameFrom - Source character set (eg: "Unicode", "CP1250", "DTM-J", "etc.)
    • NameTo - Target character set (eg: "Unicode", "CP1251", "Latin2", etc.)
    • FromCode - Source character or sequence
    classmethod FromToEditRow(Type As %String, NameFrom As %String, NameTo As %String, FromCode As %String, ToCode As %String) as %Status [ Language = objectscript ]
    Edits a single row in a "FromTo" table (XLT, COL or Case).

    Parameters:
    • Type - Table type (eg: "LowerCase", "COL", "XLT")
    • NameFrom - Source character set (eg: "Unicode", "CP1250", "DTM-J", "etc.)
    • NameTo - Target character set (eg: "Unicode", "CP1251", "Latin2", etc.)
    • FromCode - Source character or sequence
    • ToCode - Target character or sequence
    classmethod Get(Type As %String, NameFrom As %String, NameTo As %String, ByRef Properties As %String) as %Status [ Language = objectscript ]
    Gets a Table's properties from the NLS database.

    Parameters:
    • Name - Name of the Table to get
    • Properties - Array of properties. See the Create() method for a full list
    classmethod GetPropertiesFromNls(Type As %String, NameFrom As %String, NameTo As %String, ByRef Properties As %String, Ref As %String = "^%nls") as %Status [ Language = objectscript ]
    Gets a Table's properties from the ^%nls global.

    Parameters:
    • Type - Type of table ("XLT", "COL", etc.)
    • From - Source character set ("Latin1", "Unicode", etc)
    • To - Destination character set
    • Properties - Reference to array where properties will be stored
    • Ref - Source global reference
    See the Create method for more information on properties returned
    classmethod Import(FileName As %String = "TablesExport.xml", ByRef NumImported As %Integer, Flags As %Integer = 0) as %Status [ Language = objectscript ]
    Imports Table records from an xml file.

    Parameters:
    • FileName - Filename to import Table records from
    • NumImported (byref) - Returns number of records imported
    • Flags - Control import
      • Bit 0 - Do not import records, just return count
    Note: On failure, no records will be imported
    classmethod ImportAllFromNls(ByRef NumImported As %Integer, Flags As %Integer = 0, Deep As %Integer = 0, Ref As %String = "^%nls") as %Status [ Language = objectscript ]
    Imports Table records from ^%nls.

    Parameters:
    • NumImported (byref) - Returns number of records imported
    • Flags - Control import
      • Bit 0 - Do not import records, just return count
    • Ref - Source global reference
    classmethod ImportDir(Dir As %String, ByRef NumImported As %String, forcemulticompile As %Boolean = "") as %Status [ Language = objectscript ]
    Imports table files from a directory.

    Parameters:
    • Dir - Directory to import NLS files from
    • NumImported (byref) - Returns number of tables imported.
    classmethod ImportFromNls(Type As %String, NameFrom As %String, NameTo As %String, Deep As %Integer = 0, Ref As %String = "^%nls") as %Status [ Language = objectscript ]
    Imports one Table record from ^%nls.

    Parameters:
    • Type - Table type (eg: "LowerCase", "COL", "XLT")
    • NameFrom - Character set or name (eg: "Unicode", "DTM-J")
    • NameTo - Character set or name (eg: "Unicode", "DTM-J")
    • Deep - If true also import associated SubTables
    • Ref - Source global reference
    classmethod IsLoadable(Type As %String, NameFrom As %String, NameTo As %String, ByRef Table As %ObjectHandle, ByRef Errors As %String) as %Boolean [ Language = objectscript ]
    Verifies whether a table can be loaded

    Parameters:
    • Type - Table type (eg: "LowerCase", "COL", "XLT")
    • NameFrom - Character set or name (eg: "Unicode", "DTM-J")
    • NameTo - Character set or name (eg: "Unicode", "DTM-J")
    • Table - Returned Table reference
    • Errors - Returned list of errors
    Returns: True if table has been compiled and can be loaded
    False otherwise
    classmethod IsValid(Type As %String, NameFrom As %String, NameTo As %String, ByRef Errors As %String, ByRef Warnings As %String) as %Boolean [ Language = objectscript ]
    Verifies validity of table

    Parameters:
    • Type - Table type (eg: "LowerCase", "COL", "XLT")
    • NameFrom - Character set or name (eg: "Unicode", "DTM-J")
    • NameTo - Character set or name (eg: "Unicode", "DTM-J")
    • Errors - Returned list of errors
  • Warnings - Returned list of warnings
  • Returns: True if the table has a consistent definition
    False otherwise
    classmethod Load(loc As %String, typ As %String, nam As %String) as %Status [ Language = objectscript ]
    Loads a Table from a Locale.

    Parameters:
    • loc - Name of locale that contains table (eg: "jpnw")
    • typ - Type of table (eg: "XLT", "UpperCase", "XY")
    • nam - Name of table in locale (eg: "CP1252", "UnicodeBig")
    If typ="COL" or typ="XLT", loads both input and output sides.
    If loc = current locale, changes defaults if necessary
    classmethod Modify(Type As %String, NameFrom As %String, NameTo As %String, ByRef Properties As %String) as %Status [ Language = objectscript ]
    Modifies an existing Table's properties in the NLS database.

    Parameters:
    • Type - Table type (eg: "LowerCase", "COL", "XLT", etc.)
    • NameFrom - Source character set (eg: "Unicode", "CP1250", "DTM-J", "etc.)
    • NameTo - Target character set (eg: "Unicode", "CP1251", "Latin2", etc.)
    • Properties - Array of properties to modify.
    See the Create() method for a description of the Properties parameter.
    If a specific property is not passed in the properties array, or is the same as the existing value, the value is not modified.
    classmethod SetPropertiesToNls(ByRef Properties As %String) as %Status [ Language = objectscript ]
    Sets a Table's properties in ^%nls.

    Parameters:
    • Properties - Array with locale properties

    Queries

    query Detail(Types As %String, NamesFrom As %String, NamesTo As %String)
    Selects Type As %String, NameFrom As %String, NameTo As %String, Description As %String
    List all Table records, brief display.
    Names - Comma separated list of Table names, "*" = All
    Types - Comma separated list of Table types, "*" = All
    NamesFrom - Comma separated list of source character set names, "*" = All
    NamesTo - Comma separated list of target character set names, "*" = All
    Note: This query may change in future versions
    query FromToTable(Type As %String, NameFrom As %String, NameTo As %String)
    Selects FromCode As %String, ToCode As %String
    query List(Types As %String = "*", NamesFrom As %String = "*", NamesTo As %String = "*")
    Selects Type As %String, NameFrom As %String, NameTo As %String, Description As %String

    Indexes

    index (TypeNameFromNameToIndex on Type,NameFrom,NameTo) [IdKey, Type = key];
    Index methods: TypeNameFromNameToIndexCheck(), TypeNameFromNameToIndexDelete(), TypeNameFromNameToIndexExists(), TypeNameFromNameToIndexOpen(), TypeNameFromNameToIndexSQLCheckUnique(), TypeNameFromNameToIndexSQLExists(), TypeNameFromNameToIndexSQLFindPKeyByConstraint(), TypeNameFromNameToIndexSQLFindRowIDByConstraint()

    Inherited Members

    Inherited Methods

    Storage

    Storage Model: Storage (Config.NLS.Tables)

    ^|"^^"_$ZU(12)|SYS("NLS","TablesD")(ID,"Modes",n)
    =
    Modes(n)

    Storage Model: Storage (Config.NLS.Tables)

    ^|"^^"_$ZU(12)|SYS("NLS","TablesD")(ID,"PatternRanges",n)
    =
    PatternRanges(n)

    Storage Model: Storage (Config.NLS.Tables)

    ^|"^^"_$ZU(12)|SYS("NLS","TablesD")(ID)
    =
    %%CLASSNAME
    Description
    Identifiers
    SubTableName
    Type
    XLTDefaultAction
    XLTModeTableName
    XLTReplacementValue
    XLTReversibility
    XLTType
    Patcodes
    PatAliases
    PatCodes
    COLRules

    Storage Model: Storage (Config.NLS.Tables)

    ^|"^^"_$ZU(12)|SYS("NLS","TablesD")(ID,"XYActions",n)
    =
    XYActions(n)
    Feedback