API Reference
classes
Subject

@coasys/ad4m / Exports / Subject

Class: Subject

Represents a subject in the perspective. A subject is an entity that has properties and collections.

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new Subject(perspective, baseExpression, subjectClass)

Constructs a new subject.

Parameters

NameTypeDescription
perspectivePerspectiveProxyThe perspective that the subject belongs to.
baseExpressionstringThe base expression of the subject.
subjectClassstringThe class of the subject.

Defined in

subject/Subject.ts:19 (opens in a new tab)

Properties

#baseExpression

Private #baseExpression: string

Defined in

subject/Subject.ts:9 (opens in a new tab)


#perspective

Private #perspective: PerspectiveProxy

Defined in

subject/Subject.ts:11 (opens in a new tab)


#subjectClass

Private #subjectClass: string

Defined in

subject/Subject.ts:10 (opens in a new tab)

Accessors

baseExpression

get baseExpression(): string

Gets the base expression of the subject.

Returns

string

Defined in

subject/Subject.ts:28 (opens in a new tab)

Methods

init

init(): Promise<void>

Initializes the subject by validating it and defining its properties and collections dynamically.

NOTE: This method should be called before using the subject. All the properties and collections of the subject defined are not type-checked.

Returns

Promise<void>

Defined in

subject/Subject.ts:37 (opens in a new tab)