Namespace: Registry

$k. Registry

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

Methods

static$k.Registry.elementAtValue(internalName, value, language) : $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

Name Type Description
internalName string

The internal name of the attribute

value string

The value to search for

language string optional

Language of the value. Either ISO 639-1 (2-letter code, e.g. "en") or ISO 639-2B (3-letter code, e.g. "eng"). If not defined, the current language will be used.
Ignored if the attribute is not translated

Throws:
Type Description
$k.exception.InvalidValue

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

Returns:
Type Description
$k.SemanticElement

static$k.Registry.elementByLocator(locator) : $k.SemanticElement|$k.Domain

Get the semantic element / domain with the element locator

Name Type Description
locator string
Since:
  • 4.0.2
See:
Throws:
Type Description
$k.exception.ObjectNotFound

If no element with the locator exists

$k.exception.InvalidValue

If the locator is not valid

Returns:
Type Description
$k.SemanticElement | $k.Domain

static$k.Registry.elementWithID(id) : $k.SemanticElement

Get the semantic element with the element ID

Name Type Description
id string
See:
Throws:
Type Description
$k.exception.ObjectNotFound

If no element with the ID exists

$k.exception.InvalidValue

If the ID is not valid

Returns:
Type Description
$k.SemanticElement

static$k.Registry.folder(folderID) : $k.Folder

Get the registered folder

Name Type Description
folderID string

Registered ID

Throws:
Type Description
$k.exception.ObjectNotFound

If no folder with the ID exists

Returns:
Type Description
$k.Folder

static$k.Registry.mapping(mappingID) : $k.Mapping

Get the registered mapping

Name Type Description
mappingID string

A registered ID

Throws:
Type Description
$k.exception.ObjectNotFound

If no mapping with the ID exists

Returns:
Type Description
$k.Mapping The found mapping

static$k.Registry.query(queryID) : $k.Query

Get the registered query

Name Type Description
queryID string

Registered ID

Throws:
Type Description
$k.exception.ObjectNotFound

If no expert query with the ID exists

Returns:
Type Description
$k.Query

static$k.Registry.registeredFolders() : Array.<$k.Folder>

Returns all registered folders

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

static$k.Registry.registeredObject(registryType, objectID) : object

Get the registered folder element with the ID from the registry

Name Type Description
registryType string

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

objectID string
Deprecated
  • Use specific registry accessors, like query() or folder()
    See:
    Throws:
    Type Description
    $k.exception.ObjectNotFound

    If no object with the ID exists

    Returns:
    Type Description
    object

    static$k.Registry.registeredQueries() : Array.<$k.Query>

    Returns all registered queries

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

    static$k.Registry.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 Description
    Array.<string>

    static$k.Registry.registeredSemanticCollections() : Array.<$k.SemanticCollection>

    Returns all registered semantic collections

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

    static$k.Registry.semanticCollection(collectionID) : $k.SemanticCollection

    Get the registered semantic collection

    Name Type Description
    collectionID string

    Registered ID

    Throws:
    Type Description
    $k.exception.ObjectNotFound

    If no topic collection with the ID exists

    Returns:
    Type Description
    $k.SemanticCollection

    static$k.Registry.type(type) : $k.Type

    Gets the type with the internal name

    Name Type Description
    type string

    The internal name of the type

    Throws:
    Type Description
    $k.exception.ObjectNotFound

    If no such type exists

    Returns:
    Type Description
    $k.Type The type identified by the internal name