$k. Registry

Global object registry API for accessing objects by internal name / ID

Methods

(static) element(internalName) → {$k.SemanticElement}

Gets the semantic element with the internal name

Parameters:
NameTypeDescription
internalNamestring

The internal name of the element

Throws:

If no such element exists

Type
$k.exception.ObjectNotFound
Returns:

The element identified by the internal name

Type: 
$k.SemanticElement

(static) elementAtValue(type, value, languageopt) → {$k.SemanticElement}

Returns the semantic element with an attribute with the specified value, or undefined if there is either no such attribute or more than one

Parameters:
NameTypeAttributesDescription
type

AttributeType or internal name

value

The value to search for

languagestring<optional>

Either an ISO 639-1 or ISO 639-2B language code (e.g. "en" or "eng"), or a locale name without encoding (e.g. "en_US"). Locale names and language codes are not interchangeable, e.g. the values for "de" and "de_DE" are separated. If not defined, the locale/language of the process will be used. Ignored if the attribute is not translated.

Throws:

If the value is not in the range of allowed values of the attribute

Type
$k.exception.InvalidValue
Returns:
Type: 
$k.SemanticElement

(static) elementByLocator(locator) → {$k.SemanticElement|$k.Domain}

Get the semantic element / domain with the element locator

Parameters:
NameTypeDescription
locatorstring
Since
  • 4.0.2
Throws:
Returns:
Type: 
$k.SemanticElement | $k.Domain

(static) elementWithID(id) → {$k.SemanticElement}

Get the semantic element with the element ID

Parameters:
NameTypeDescription
idstring

ID string, e.g. the return value of idString(). Do not pass ID numbers returned by idNumber() anymore, due to representation problems for numbers larger than 2^53 in JavaScript.

Throws:
Returns:
Type: 
$k.SemanticElement

(static) folder(folderID) → {$k.Folder}

Get the registered folder

Parameters:
NameTypeDescription
folderIDstring

Registered ID

Throws:

If no folder with the ID exists

Type
$k.exception.ObjectNotFound
Returns:
Type: 
$k.Folder

(static) mapping(mappingID) → {$k.Mapping}

Get the registered mapping

Parameters:
NameTypeDescription
mappingIDstring

A registered ID

Throws:

If no mapping with the ID exists

Type
$k.exception.ObjectNotFound
Returns:

The found mapping

Type: 
$k.Mapping

(static) query(queryID) → {$k.Query}

Get the registered query

Parameters:
NameTypeDescription
queryIDstring

Registered ID

Throws:

If no expert query with the ID exists

Type
$k.exception.ObjectNotFound
Returns:
Type: 
$k.Query

(static) registeredFolders() → {Array.<$k.Folder>}

Returns all registered folders

Returns:
Type: 
Array.<$k.Folder>

(static) registeredMappings() → {Array.<$k.Mapping>}

Returns all registered mappings

Since
  • 5.6.1
Returns:
Type: 
Array.<$k.Mapping>

(static) registeredObject(registryType, objectID) → {object}

Get the registered folder element with the ID from the registry

Parameters:
NameTypeDescription
registryTypestring

Name of the registry. Corresponds to the value returned by registryType()

objectIDstring
Deprecated
  • Use specific registry accessors, like query() or folder()
Throws:

If no object with the ID exists

Type
$k.exception.ObjectNotFound
Returns:
Type: 
object

(static) registeredQueries() → {Array.<$k.Query>}

Returns all registered queries

Returns:
Type: 
Array.<$k.Query>

(static) registeredScriptIDs() → {Array.<string>}

Returns the IDs of all registered scripts

Version
  • Experimental feature, might be removed at any time
Since
  • 5.1.1
Returns:
Type: 
Array.<string>

(static) registeredSemanticCollections() → {Array.<$k.SemanticCollection>}

Returns all registered semantic collections

Returns:
Type: 
Array.<$k.SemanticCollection>

(static) semanticCollection(collectionID) → {$k.SemanticCollection}

Get the registered semantic collection

Parameters:
NameTypeDescription
collectionIDstring

Registered ID

Throws:

If no topic collection with the ID exists

Type
$k.exception.ObjectNotFound
Returns:
Type: 
$k.SemanticCollection

(static) type(type) → {$k.Type}

Gets the type with the internal name

Parameters:
NameTypeDescription
typestring

The internal name of the type

Throws:

If no such type exists

Type
$k.exception.ObjectNotFound
Returns:

The type identified by the internal name

Type: 
$k.Type