import { ParserBase } from './ParserBase.js'; import type { TableInterface } from '../../model/index.js'; import type { SpecificationFieldInterface, SpecificationInterface, SpecificationRuleInterface } from './SpecificationInterface.js'; import type { ImporterInterface } from '../../importer-xlsx/index.js'; import type { ParserParseRequest } from './ParserInterface.js'; /** * The parser implementation to parse specification tables. */ export declare class ParserSpecification extends ParserBase { hasParseErrors: boolean; /** * Parses the sheet with the given name und uses the given importer to access * the data. * @param request - The parameters as defined in @see ParserParseRequest * @returns The created table model */ parse(request: ParserParseRequest): TableInterface | undefined; /** * Parses a single Spreadsheet * @param sheetName - The name of the sheet * @param importer - The importer * @returns The created specification model for the sheet */ parseSpecification(sheetName: string, importer: ImporterInterface): SpecificationModel | undefined; /** * Parses the fields out of the Spreadsheet. This is the section where * the fields of the interface are defined * @param request - The Parameters as defined * @returns An object with the fields and the fieldOrder */ parseFields(request: { /** The name of the sheet */ sheetName: string; /** The importer */ importer: ImporterInterface; /** The start row of the severities */ severityStartRow: number; /** The start row of the rules */ ruleStartRow: number; /** The last column of the sheet */ sheetEndColumn: number; }): { fieldOrder: string[]; fields: Record; }; /** * Load the rules defined in the rule section * @param request - The parameters as defined * @returns An object with the rules */ parseRules(request: { /** The name of the sheet */ sheetName: string; /** The importer */ importer: ImporterInterface; /** The start row of the rules */ ruleStartRow: number; /** The end row of the rules */ endRow: number; }): Record; /** * Load the rules defined in the rule section * @param request - The parameters as defined * @returns A set of the existing severities */ parseSeverities(request: { /** The name of the sheet */ sheetName: string; /** The importer */ importer: ImporterInterface; /** The start row of the severities */ severityStartRow: number; /** The start row of the rules */ ruleStartRow: number; /** The last column of the sheet */ sheetEndColumn: number; }): Set; /** * Each rule defined must be used. Unused rules should be deleted from the table * @param request - The parameters as defined */ checkForUnusedRules(request: { /** The name of the sheet */ sheetName: string; /** The importer */ importer: ImporterInterface; /** The start row of the severities */ severityStartRow: number; /** The last column of the sheet */ sheetEndColumn: number; /** The rules of the sheet */ rules: Record; }): void; /** * Checks that the specification contains all the needed sections * @param sheetName - The name of the sheet * @param importer - The importer * @param sheetEndRow - The last row of the sheet * @returns An Object with the following properties \{severityStartRow, ruleStartRow\} */ checkSheetRows(sheetName: string, importer: ImporterInterface, sheetEndRow: number): { severityStartRow: number; ruleStartRow: number; }; /** * Parses the sheet to get the last row of the table. * @param importer - The importer * @param sheetName - The name of the sheet * @returns The last row of the table */ getEndColumn(importer: ImporterInterface, sheetName: string): number; } /** * The model for a specification object */ export declare class SpecificationModel implements SpecificationInterface { name: string; fieldOrder: string[]; fields: Record; severities: string[]; rules: Record; constructor(name: string); } //# sourceMappingURL=ParserSpecification.d.ts.map