Class Reference
IRIS for UNIX 2019.2
InterSystems: The power behind what matters   
Documentation  Search
  [%SYS] >  [Config] >  [NLS] >  [SubTables]
Private  Storage   

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

The objects of this class contain the data points for tables of type XLT, COL, Case and the input side of Mode tables.
The name of a sub-table is a string with three pieces separated by "-": type-from-to

Warning!

Only sub-tables whose names have a "from" or "to" piece beginning with "y" (e.g. "XLT-yEBCDIC-Unicode" or "XLT-Latin1-yPrinter") or that end with a dot followed by 4 digits (e.g. "XLT-CP1250-Unicode.0001") are considered custom sub-tables and are preserved during system upgrades. All other sub-tables are restored to their original state and any changes to them made with methods from this class will be lost in an upgrade.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
4 27 1 1


Summary

Properties
Description FromTo Name Type

Methods
%AddToSaveSet %AddToSyncSet %BMEBuilt %CheckConstraints
%CheckConstraintsForExtent %ClassIsLatestVersion %ClassName %ComposeOid
%ConstructClone %Delete %DeleteExtent %DeleteId
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Exists
%ExistsId %Extends %GUID %GUIDSet
%GetLock %GetParameter %GetSwizzleObject %Id
%InsertBatch %IsA %IsModified %IsNull
%KillExtent %KillExtentData %LoadFromMemory %LockExtent
%LockId %New %NormalizeObject %ObjectIsNull
%ObjectModified %Oid %OnBeforeAddToSync %OnDetermineClass
%Open %OpenId %OriginalNamespace %PackageName
%PhysicalAddress %PurgeIndices %Reload %RemoveFromSaveSet
%ResolveConcurrencyConflict %RollBack %Save %SaveDirect
%SaveIndices %SerializeObject %SetModified %SortBegin
%SortEnd %SyncObjectIn %SyncTransport %UnlockExtent
%UnlockId %ValidateIndices %ValidateObject Create
CreateSkeleton Delete Exists Export
ExportAllToNls ExportDir ExportList ExportToNls
Get Help Import ImportAllFromNls
ImportDir ImportFromNls Modify XMLDTD
XMLExport XMLExportToStream XMLExportToString XMLNew
XMLSchema XMLSchemaNamespace XMLSchemaType


Properties

• property Description as %String(MAXLEN=128);
Description of the SubTable.
• property FromTo as array of %String;
Each node of this array contains one mapping. Both the index and the value of the node can be either a single character code (e.g. "168") or a comma-separated list of codes (e.g. "251,128,65"). For collation tables, the value can contain a disambiguator (e.g. "65,65;1").
• property Name as %String(MAXLEN=64,MINLEN=1) [ Required ];
The name of a sub-table contains 3 parts separated by "-": type, source encoding and target encoding.

Examples: "XLT-Latin2-Unicode", "COL-Latin1-German2"
• property Type as %Integer(MAXVAL=6,MINVAL=0) [ Required ];
Type of sub-table.
  • 0 - SUBSingle
  • 1 - SUBToMulti
  • 2 - SUBFromMulti
  • 3 - SUBMulti
  • 4 - SUBLeadByte
  • 5 - SUBToCol
  • 6 - SUBFromCol

Methods

• classmethod Create(Name, ByRef Properties As %String) as %Status
Creates a SubTable the NLS database.

Parameters:
  • Name - Name of the SubTable to create
  • Properties - Array of properties corresponding to the class properties
• classmethod CreateSkeleton(Name As %String, Maxchar As %Integer, ByRef SubTable As %ObjectHandle) as %Status
Creates a SubTable with common default parameters.
Doesn't require passing a complete subtable specification. Sets each character mapping to itself.

Parameters:
  • Name - Name of the SubTable to create
  • MaxChar - Highest character (0, 255 or 65535)
  • SubTable - Return oref of created object
• classmethod Delete(Name As %String) as %Status
Deletes a SubTable.

Parameters:
  • Name - Name of SubTable to delete
• classmethod Exists(Name As %String, ByRef SubTable As %ObjectHandle, ByRef Status As %Status) as %Boolean
Checks for the existence of a SubTable in the NLS database.

Parameters:
  • Name - Name of the SubTable to check existence of
Return values:
If Value of the method = 0 (SubTable does not exist, or some error occured)
  • SubTable = Null
  • Status = SubTable "x" does not exist, or other error message
If Value of the method = 1 (SubTable exists)
  • SubTable = Object handle to SubTable
  • Status = $$$OK
• classmethod Export(FileName As %String = "SubTablesExport.xml", ByRef NumExported As %Integer, SubTables As %String = "*") as %Status
Exports SubTable Objects to a file in xml format.

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

Parameters:
  • NumExported - Number of exported records
• classmethod ExportDir(Dir As %String, ByRef NumExported As %Integer, SubTables As %String = "*") as %Status
Exports SubTable Objects to separate xml files.

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

    Parameters:
    • FileName - Output file name
    • NumExported - Number of exported SubTables [out]
    • SubTables - Array of SubTables to export
    • classmethod ExportToNls(sub As %String) as %Status
    Exports ONE SubTable record to ^%nls.

    Parameters:
    • Name - SubTable name
    • classmethod Get(Name As %String, ByRef Properties As %String) as %Status
    Gets a SubTable's properties from the NLS database.

    Parameters:
    • Name - Name of the SubTable to get
    • Properties - Array of properties. See the Create() method for a full list
    • classmethod Import(FileName As %String = "SubTablesExport.xml", ByRef NumImported As %Integer, Flags As %Integer = 0) as %Status
    Imports SubTable records from an xml file.

    Parameters:
    • FileName - Filename to import SubTable records from
    • NumImported (byref) - Returns number of records imported
    • Flags - Control import
      • Bit 0 - Do not import records, just return count
    • classmethod ImportAllFromNls(ByRef NumImported As %Integer, Flags As %Integer = 0, Ref As %String = "^%nls") as %Status
    Imports all SubTable 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
    Imports subtable files from a directory.

    Parameters:
    • Dir - Directory to import NLS files from
    • NumImported (byref) - Returns number of subtables imported.
    • classmethod ImportFromNls(Sub As %String, Ref As %String = "^%nls") as %Status
    Imports SubTable record from ^%nls.

    Parameters:
    • Name - SubTable name
    • Ref - Source global reference
    • classmethod Modify(Name As %String, ByRef Properties As %String) as %Status
    Modifies an existing SubTable's properties in the NLS database.

    Parameters:
    • Name - Name of the SubTable to modify
    • Properties - Array of properties to modify.
    • If a specific property is not passed in the properties array, or is the same as the existing value, the value is not modified.

    Queries

    • query List(Names As %String)
    Selects Name As %String, Description As %String

    Indices

    •index (NameIndex on Name) [IdKey];


    Copyright (c) 2019 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.