UNPKG

@finos/legend-application-pure-ide

Version:
146 lines 4.27 kB
/** * Copyright (c) 2020-present, Goldman Sachs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { Diagram } from '@finos/legend-extension-dsl-diagram/graph'; import { Class, PureModel } from '@finos/legend-graph'; import { SourceInformation } from './SourceInformation.js'; declare class PURE__Profile { package: string; name: string; tags: string[]; stereotypes: string[]; } declare class PURE__Steoreotype { profile: string; value: string; } declare class PURE__Tag { profile: string; value: string; } declare class PURE__TaggedValue { tag: PURE__Tag; value: string; } declare class PURE__GenericType { rawType?: string; typeParameter?: string; } declare class PURE__Property { name: string; stereotypes: PURE__Steoreotype[]; taggedValues: PURE__TaggedValue[]; aggregation: string; multiplicity: string; genericType: PURE__GenericType; } declare class PURE__PackageableElementPointer { package: string; name: string; sourceInformation: SourceInformation; } declare class PURE__Class { package: string; name: string; sourceInformation: SourceInformation; stereotypes: PURE__Steoreotype[]; taggedValues: PURE__TaggedValue[]; generalizations: PURE__GenericType[]; properties: PURE__Property[]; qualifiedProperties: PURE__Property[]; } declare class PURE__Enumeration { package: string; name: string; enumValues: string[]; } declare class PURE__Point { x: number; y: number; } declare class PURE__Rectangle { height: number; width: number; } declare class PURE__Geometry { points: PURE__Point[]; } declare class PURE__GeneralizationView { id: string; source: string; target: string; geometry: PURE__Geometry; } declare class PURE__PropertyViewPropertyPointer { name: string; owningType: string; } declare class PURE__PropertyView { id: string; source: string; target: string; property: PURE__PropertyViewPropertyPointer; geometry: PURE__Geometry; } declare class PURE__TypeView { id: string; type: string; position: PURE__Point; rectangleGeometry: PURE__Rectangle; } declare class PURE__Diagram { package: string; name: string; stereotypes: PURE__Steoreotype[]; taggedValues: PURE__TaggedValue[]; generalizationViews: PURE__GeneralizationView[]; propertyViews: PURE__PropertyView[]; typeViews: PURE__TypeView[]; sourceInformation: SourceInformation; } declare class DiagramDomainInfo { classes: PURE__Class[]; enumerations: PURE__Enumeration[]; profiles: PURE__Profile[]; } export declare class DiagramInfo { name: string; diagram: PURE__Diagram; domainInfo?: DiagramDomainInfo; } export declare class DiagramClassInfo { class: PURE__Class; enumerations: PURE__Enumeration[]; profiles: PURE__Profile[]; specializations: PURE__PackageableElementPointer[]; } /** * Serialize the diagram in Studio to Pure grammar for M2 DSL Diagram * so we can persist it. */ export declare const serializeDiagram: (diagram: Diagram) => string; export interface DiagramClassMetadata { isStubbed: boolean; sourceInformation: SourceInformation | undefined; } /** * Since the diagram renderer uses Studio metamodel, here we build * Studio metamodel graph and diagram from the Pure IDE diagram info * to make use of the renderer. */ export declare const buildGraphFromDiagramInfo: (diagramInfo: DiagramInfo) => [Diagram, PureModel, Map<string, DiagramClassMetadata>]; export declare const addClassToGraph: (diagramClassInfo: DiagramClassInfo, graph: PureModel, diagramClasses: Map<string, DiagramClassMetadata>) => Class; export {}; //# sourceMappingURL=DiagramInfo.d.ts.map