@finos/legend-extension-dsl-data-quality
Version:
Legend extension for Data Quality
33 lines • 1.75 kB
JavaScript
/**
* 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 { makeObservable } from 'mobx';
import { DataQualityServiceValidationConfiguration } from '../../graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.js';
import { DataQualityState } from './DataQualityState.js';
import { guaranteeType } from '@finos/legend-shared';
export class DataQualityServiceValidationState extends DataQualityState {
constructor(editorStore, element) {
super(editorStore, element);
makeObservable(this, {});
}
reprocess(newElement, editorStore) {
const element = guaranteeType(newElement, DataQualityServiceValidationConfiguration, 'Element inside data quality service validation editor state must be a service validation element');
return new DataQualityServiceValidationState(editorStore, element);
}
get constraintsConfigurationElement() {
return guaranteeType(this.element, DataQualityServiceValidationConfiguration, 'Element inside data quality service validation state must be a data quality service validation configuration element');
}
}
//# sourceMappingURL=DataQualityServiceValidationState.js.map