ITree

interface ITree

Consists of INodes.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract fun addNewChild(parentId: Long, role: String?, index: Int, childId: Long, concept: IConcept?): ITree
abstract fun addNewChild(parentId: Long, role: String?, index: Int, childId: Long, concept: IConceptReference?): ITree

Creates and adds a new child of the given concept to this tree.

Link copied to clipboard
abstract fun addNewChildren(parentId: Long, role: String?, index: Int, newIds: LongArray, concepts: Array<IConcept?>): ITree
abstract fun addNewChildren(parentId: Long, role: String?, index: Int, newIds: LongArray, concepts: Array<IConceptReference?>): ITree

Creates and adds multiple new children of the given concepts to this tree.

Link copied to clipboard
abstract fun containsNode(nodeId: Long): Boolean

Checks if the given node is contained in this tree.

Link copied to clipboard
abstract fun deleteNode(nodeId: Long): ITree

Deletes the given node.

Link copied to clipboard
abstract fun deleteNodes(nodeIds: LongArray): ITree

Deletes the given nodes.

Link copied to clipboard
abstract fun getAllChildren(parentId: Long): Iterable<Long>

Returns all children of the given node in this tree.

Link copied to clipboard
open fun getAllChildrenAsFlow(parentId: Long): Flow<Long>
Link copied to clipboard
Link copied to clipboard
abstract fun getChildren(parentId: Long, role: String?): Iterable<Long>

Returns the children of the child link for the given node in this tree.

Link copied to clipboard
open fun getChildrenAsFlow(parentId: Long, role: String): Flow<Long>
Link copied to clipboard
abstract fun getChildRoles(sourceId: Long): Iterable<String?>

Returns all child link roles for the given node in this tree.

Link copied to clipboard
abstract fun getConcept(nodeId: Long): IConcept?

Returns the concept of the given node in this tree.

Link copied to clipboard

Returns a reference to the concept of the given node in this tree.

Link copied to clipboard
open fun getDescendantsAsFlow(nodeId: Long, includeSelf: Boolean = false): Flow<Long>
Link copied to clipboard
abstract fun getId(): String?

Returns the id of this tree.

Link copied to clipboard
abstract fun getParent(nodeId: Long): Long

Returns the id of the parent node of the given node in this.

Link copied to clipboard
open fun getParentAsFlow(nodeId: Long): Flow<Long>
Link copied to clipboard
abstract fun getProperty(nodeId: Long, role: String): String?

Returns the property value of the given property role for the given node in this tree.

Link copied to clipboard
abstract fun getPropertyRoles(sourceId: Long): Iterable<String>

Returns all property roles for the given node in this tree.

Link copied to clipboard
open fun getPropertyValueAsFlow(nodeId: Long, role: String): Flow<String?>
Link copied to clipboard
abstract fun getReferenceRoles(sourceId: Long): Iterable<String>

Returns all reference roles for the given node in this tree.

Link copied to clipboard
abstract fun getReferenceTarget(sourceId: Long, role: String): INodeReference?

Returns the target of the given reference role for the given node in this tree.

Link copied to clipboard
open fun getReferenceTargetAsFlow(nodeId: Long, role: String): Flow<INodeReference>
Link copied to clipboard
abstract fun getRole(nodeId: Long): String?

Returns the role of the given node within its parent node in this tree.

Link copied to clipboard
abstract fun moveChild(newParentId: Long, newRole: String?, newIndex: Int, childId: Long): ITree

Moves a node within this tree.

Link copied to clipboard
abstract fun setConcept(nodeId: Long, concept: IConceptReference?): ITree
Link copied to clipboard
abstract fun setProperty(nodeId: Long, role: String, value: String?): ITree

Sets the value of the given node for the given property role to the specified value.

Link copied to clipboard
open fun setReferenceTarget(sourceId: Long, role: String, targetId: Long): ITree

abstract fun setReferenceTarget(sourceId: Long, role: String, target: INodeReference?): ITree

Sets the reference target of the given node for the given reference role to the specified target.

Link copied to clipboard
abstract fun usesRoleIds(): Boolean

Checks whether this tree uses uids or names for roles.

Link copied to clipboard
abstract fun visitChanges(oldVersion: ITree, visitor: ITreeChangeVisitor)

Propagates changes to the given visitor.