UNPKG

@finos/legend-graph

Version:
80 lines 2.59 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. */ export class MappedEntityInfo { __PROPERTIES_INDEX = new Map(); classPath; isRootEntity; subClasses; constructor(classPath, isRootEntity, subClasses) { this.isRootEntity = isRootEntity; this.subClasses = subClasses; this.classPath = classPath; } } export class MappedEntity { __PROPERTIES_INDEX = new Map(); path; properties; info; constructor(path, properties, info) { this.path = path; this.properties = properties; this.info = info; properties.forEach((property) => this.__PROPERTIES_INDEX.set(property.name, property)); } } export class MappedProperty { name; constructor(name) { this.name = name; } } export class EntityMappedProperty extends MappedProperty { entityPath; /** * If this attribute is set, we need to understand this `mapped property` slightly differently * as this will represent a subtype of the class corresponding to the parent mapped entity. * * For example: class A extends B, assuming that A is mapped and B is mapped, in the list of * mapped properties of B, we should see a mapped property with subtype A. */ subType; constructor(name, entityPath, subType) { super(name); this.entityPath = entityPath; this.subType = subType; } } export class EnumMappedProperty extends MappedProperty { enumPath; constructor(name, enumPath) { super(name); this.enumPath = enumPath; } } export class MappingModelCoverageAnalysisResult { __ENTITIES_INDEX = new Map(); mapping; mappedEntities; entities; constructor(mappedEntities, mapping, entities) { this.mappedEntities = mappedEntities; this.mapping = mapping; mappedEntities.forEach((entity) => this.__ENTITIES_INDEX.set(entity.path, entity)); this.entities = entities; } } //# sourceMappingURL=MappingModelCoverageAnalysis.js.map