import { Id } from '../shared'; import { EndpointNode } from './node'; import { ModelType } from './universe'; import { FieldSet, ModelSet } from './util'; /** * Model inside a modeling. */ export declare class Model { private readonly _name; private readonly _base; private readonly _target; /** * Description of this model. */ description?: string; /** * Object ID of the corresponding object. */ object?: Id; /** * Type of this model. See also {@linkcode ModelType}. */ type?: ModelType; /** * Map mapping names of abstracts (aka parents) of this model to their model instances. */ abstracts: Map; /** * Map mapping names of specials (aka extensions) of this model to their model instances. */ specials: Map; /** * Target fields of this model. */ targetFields: Map; /** * Origin fields of this model. */ originFields: Map; /** * Reference to a field instance, if this model is a field, `undefined` otherwise. */ field?: Field; /** * Nodes which are suited to represent this model. */ nodes: Map; constructor(name: string, base: string, target: string); /** * Name of this model. */ get name(): string; /** * Name of the modeling this model was originally defined. */ get base(): string; /** * Name of the modeling this model resides in. */ get target(): string; /** * Obtains the fully qualified name of this model. * @returns identifier of this model */ getIdentifier(): string; /** * Returns abstract models. * @param self specifies whether to include this model in the result set * @param direct specifies whether to include direct abstracts in the result set * @param indirect specifies whether to include indirect abstracts (e.g., abstracts of abstracts) in the result set */ getAbstracts(self?: boolean, direct?: boolean, indirect?: boolean): ModelSet; /** * Returns special models. * @param self specifies whether to include this model in the result set * @param direct specifies whether to include direct specials in the result set * @param indirect specifies whether to include indirect specials (e.g., specials of specials) in the result set */ getSpecials(self?: boolean, direct?: boolean, indirect?: boolean): ModelSet; } /** * Field of a model. */ export declare class Field { private readonly _origin; private readonly _relation; private readonly _target; constructor(origin: Model, relation: Model, target: Model); /** * Model instance this field is attached to. * Should appear in its {@linkcode Model.fields}. */ get origin(): Model; /** * Field model. * Should have this instance as {@linkcode Model.field}. */ get relation(): Model; /** * Instance of the model this field points to. */ get target(): Model; /** * Name of the field without the origin model prefix. */ get name(): string; /** * Object ID of the corresponding relation. */ get object(): Id | undefined; /** * Obtains the fully qualified name of this field. * @returns identifier of this field */ getIdentifier(): string; /** * Returns abstract fields. * @param self specifies whether to include this model in the result set * @param direct specifies whether to include direct abstracts in the result set * @param indirect specifies whether to include indirect abstracts (e.g., abstracts of abstracts) in the result set */ getAbstracts(self?: boolean, direct?: boolean, indirect?: boolean): FieldSet; /** * Returns special fields. * @param self specifies whether to include this model in the result set * @param direct specifies whether to include direct specials in the result set * @param indirect specifies whether to include indirect specials (e.g., specials of specials) in the result set */ getSpecials(self?: boolean, direct?: boolean, indirect?: boolean): FieldSet; } //# sourceMappingURL=model.d.ts.map