import { DataFrame } from './data/DataFrame'; import { TransformationSpace } from './data/object/space/TransformationSpace'; import { DataService } from './service/DataService'; import { Service } from './service/Service'; import { Graph } from './graph/Graph'; import { Serializable } from './data/decorators'; /** * This model contains multiple {@link Node}s, {@link Service}s to sample * {@link DataFrame}s that are pushed or pulled from this model. * * ## Usage * ### Creation * Please refer to {@link ModelBuilder} for creating a new model * * ### Pushing and Pulling * Pushing or pulling on a model is possible, but only recommended for prototyping. * Instead, developers should use a {@link SourceNode} that automatically pushes new {@link DataFrame}s * or pushes new frames when receiving a pull. */ export interface Model extends Graph { /** * Find service * @returns {Service} Found service */ findService(uid: string): S; findService(serviceClass: Serializable): S; /** * Find data service * @returns {DataService} Found data service */ findDataService = DataService>(uid: string): F; findDataService = DataService>(dataType: Serializable): F; findDataService = DataService>(object: D): F; /** * Find all services and data services * @param {typeof Service} [serviceClass] Service class * @returns {Service[]} Array of all services */ findAllServices(serviceClass?: Serializable): S[]; /** * Find all data services by data type * @param {Serializable} [dataType] data type class * @returns {Service[]} Array of all services */ findAllDataServices>(dataType?: Serializable): S[]; /** * Destroy the model, added nodes and services * Equivalent of model.emitAsync('destroy'); */ destroy(): Promise; /** * Model reference space */ referenceSpace: TransformationSpace; }