$k. SemanticCollection

new SemanticCollection()

A collection of topics

Extends

Methods

addElement(newElement)

Adds the element to the collection.

Parameters:
NameTypeDescription
newElement$k.SemanticElement

The element to add to the collection.

Since
  • 5.3.3

deregister()

Deregisters the element. The id will be undefined afterwards. Equivalent to setId(undefined)

See
  • setId

elements() → {Array.<$k.SemanticElement>}

Returns the elements of the collection

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

id() → {string}

Returns the registered ID, or undefined if not registered.

Inherited From
Returns:
Type: 
string

name() → {string}

Returns the name

Returns:
Type: 
string

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

Returns the folders that contain this element

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

registryType() → {string}

Returns the name of the registry that contains elements of this type

Returns:
Type: 
string

removeAll()

Removes all elements from the collection

Since
  • 5.3.3

removeElement(element)

Removes the element from the collection.

Parameters:
NameTypeDescription
element$k.SemanticElement

The element to remove from the collection.

Since
  • 5.3.3

setId(id, replaceScriptReferences)

Registers the element with the given ID. If the element has already been registered, then the id changes. If the id is undefined, then the element will be deregistered.

Parameters:
NameTypeDescription
idstring

The ID

replaceScriptReferencesboolean

True if ID references in scripts should be replaced. Only done when the old and the new ID is not undefined.