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
- COLRules
- Description
- Identifiers
- Modes
- NameFrom
- NameTo
- PatAliases
- PatCodes
- PatternRanges
- SubTableName
- Type
- XLTDefaultAction
- XLTModeTableName
- XLTReplacementValue
- XLTReversibility
- XLTType
- XYActions
Method Inventory
- Compile()
- Create()
- Delete()
- Exists()
- Export()
- ExportAllToNls()
- ExportDir()
- ExportList()
- ExportToNls()
- FromToDeleteRow()
- FromToEditRow()
- Get()
- GetPropertiesFromNls()
- Import()
- ImportAllFromNls()
- ImportDir()
- ImportFromNls()
- IsLoadable()
- IsValid()
- Load()
- Modify()
- SetPropertiesToNls()
Parameters
parameter DOMAIN = %Utility;
Default Localization Domain
Properties
property COLRules as %List;
For Collation tables only.
$LB(collation #,local encoding rule,global encoding rule)
$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",...)
$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"
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",...)
$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",...)
$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",...)
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
Lowercase, UpperCase, TitleCase,
XLT, COL, Mode, Pattern, Ident, XY, Patcode
Property methods: TypeDisplayToLogical(), TypeGet(), TypeGetStored(), TypeIsValid(), TypeLogicalToDisplay(), TypeLogicalToOdbc(), 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)
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.
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.
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
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
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
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
Compiles a single Table
Parameters:
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
Creates a Table the NLS database.
Parameters:
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 Delete(Type As %String, NameFrom As %String, NameTo As %String, Deep As %Integer = 0) as %Status
Deletes a Table.
Parameters:
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
Checks for the existence of a Table in the NLS database.
Parameters:
If Value of the method = 0 (Table does not exist, or some error occured)
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.)
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
- 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
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
Parameters:
Exports all Table records to ^%nls.
Parameters:
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
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
Parameters:
classmethod ExportList(FileName As %String = "TablesExport.xml", ByRef NumExported As %Integer, ByRef Tables As %String) as %Status
Similar to Export() but uses a list of Tables to export rather than a
query. Used internally by Locales.ExportList() and other utilities.
Parameters:
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
Exports one Table record to ^%nls.
Parameters:
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
Deletes a single row in a "FromTo" table (XLT, COL or Case).
Parameters:
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
Edits a single row in a "FromTo" table (XLT, COL or Case).
Parameters:
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
Gets a Table's properties from the NLS database.
Parameters:
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
Gets a Table's properties from the ^%nls global.
Parameters:
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
classmethod Import(FileName As %String = "TablesExport.xml", ByRef NumImported As %Integer, Flags As %Integer = 0) as %Status
Imports Table records from an xml file.
Parameters:
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
classmethod ImportAllFromNls(ByRef NumImported As %Integer, Flags As %Integer = 0, Deep As %Integer = 0, Ref As %String = "^%nls") as %Status
Imports Table records from ^%nls.
Parameters:
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 table files from a directory.
Parameters:
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
Imports one Table record from ^%nls.
Parameters:
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
Verifies whether a table can be loaded
Parameters:
False otherwise
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
False otherwise
classmethod IsValid(Type As %String, NameFrom As %String, NameTo As %String, ByRef Errors As %String, ByRef Warnings As %String) as %Boolean
Verifies validity of table
Parameters:Warnings - Returned list of warnings
Returns: True if the table has a consistent definition
False otherwise
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
False otherwise
Loads a Table from a Locale.
Parameters:
If loc = current locale, changes defaults if necessary
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 loc = current locale, changes defaults if necessary
classmethod Modify(Type As %String, NameFrom As %String, NameTo As %String, ByRef Properties As %String) as %Status
Modifies an existing Table's properties in the NLS database.
Parameters:
If a specific property is not passed in the properties array, or is the same as the existing value, the value is not modified.
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.
If a specific property is not passed in the properties array, or is the same as the existing value, the value is not modified.
Sets a Table's properties in ^%nls.
Parameters:
Parameters:
- Properties - Array with locale properties
Queries
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
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
Indexes
index (TypeNameFromNameToIndex on Type,NameFrom,NameTo) [IdKey, Type = key];
Index methods: TypeNameFromNameToIndexCheck(), TypeNameFromNameToIndexDelete(), TypeNameFromNameToIndexExists(), TypeNameFromNameToIndexOpen(), TypeNameFromNameToIndexSQLCheckUnique(), TypeNameFromNameToIndexSQLExists(), TypeNameFromNameToIndexSQLFindPKeyByConstraint(), TypeNameFromNameToIndexSQLFindRowIDByConstraint()
Inherited Members
Inherited 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()
- Help()
- XMLDTD()
- XMLExport()
- XMLExportToStream()
- XMLExportToString()
- XMLNew()
- XMLSchema()
- XMLSchemaNamespace()
- XMLSchemaType()
Storage
Storage Model: CacheStorage (Config.NLS.Tables)
^|"^^"_$ZU(12)|SYS("NLS","TablesD")(ID,"Modes",n) | = | Modes(n) |
^|"^^"_$ZU(12)|SYS("NLS","TablesD")(ID,"PatternRanges",n) | = | PatternRanges(n) |
^|"^^"_$ZU(12)|SYS("NLS","TablesD")(ID) | = | %%CLASSNAME
Description
Identifiers
SubTableName
Type
XLTDefaultAction
XLTModeTableName
XLTReplacementValue
XLTReversibility
XLTType
Patcodes
PatAliases
PatCodes
COLRules
|
^|"^^"_$ZU(12)|SYS("NLS","TablesD")(ID,"XYActions",n) | = | XYActions(n) |