Parser Specification
Classes
- ImporterSpecification ⇐
ParserBase The parser implementation to parse specification tables.
- SpecificationModel
The model for a specification object
ImporterSpecification ⇐ ParserBase
The parser implementation to parse specification tables.
Kind: global class
Extends: ParserBase
- ImporterSpecification ⇐
ParserBase- .parseSpecification(sheetName, importer) ⇒
object - .checkForUnusedRules(sheetName, importer, severityStartRow, sheetEndColumn, rules)
- .parseFields(sheetName, importer, severityStartRow, ruleStartRow, sheetEndColumn) ⇒
object - .parseSeverities(sheetName, importer, severityStartRow, ruleStartRow, sheetEndColumn) ⇒
map - .parseRules(sheetName, importer, ruleStart, endRow) ⇒
object - .checkSheetRows(sheetName, importer) ⇒
object - .getEndColumn(importer, sheetName) ⇒
number
- .parseSpecification(sheetName, importer) ⇒
importerSpecification.parseSpecification(sheetName, importer) ⇒ object
Parses a single Spreadsheet
Kind: instance method of ImporterSpecification
Returns: object - specification The created specification model for the sheet
| Param | Type | Description |
|---|---|---|
| sheetName | string | The name of the sheet |
| importer | object | The importer |
importerSpecification.checkForUnusedRules(sheetName, importer, severityStartRow, sheetEndColumn, rules)
Each rule defined must be used. Unused rules should be deleted from the table
Kind: instance method of ImporterSpecification
| Param | Type | Description |
|---|---|---|
| sheetName | string | The name of the sheet |
| importer | object | The importer |
| severityStartRow | number | The start row of the severities |
| sheetEndColumn | number | The last column of the sheet |
| rules | object | All the existing rules stored by there rule name |
importerSpecification.parseFields(sheetName, importer, severityStartRow, ruleStartRow, sheetEndColumn) ⇒ object
Parses the fields out of the Spreadsheet. This is the section where the fields of the interface are defined
Kind: instance method of ImporterSpecification
Returns: object - data on object with the fields and the fieldOrder
| Param | Type | Description |
|---|---|---|
| sheetName | string | The name of the sheet |
| importer | object | The importer |
| severityStartRow | number | The start row of the severities |
| ruleStartRow | number | The start row of the rules |
| sheetEndColumn | number | The last column of the sheet |
importerSpecification.parseSeverities(sheetName, importer, severityStartRow, ruleStartRow, sheetEndColumn) ⇒ map
Load the rules defined in the rule section
Kind: instance method of ImporterSpecification
Returns: map - severities A map of the existing severities
| Param | Type | Description |
|---|---|---|
| sheetName | string | The name of the sheet |
| importer | object | The importer |
| severityStartRow | number | The severity start row |
| ruleStartRow | number | The rule start row |
| sheetEndColumn | number | The last column of the sheet |
importerSpecification.parseRules(sheetName, importer, ruleStart, endRow) ⇒ object
Load the rules defined in the rule section
Kind: instance method of ImporterSpecification
Returns: object - rules An object with the rules
| Param | Type | Description |
|---|---|---|
| sheetName | string | The name of the sheet |
| importer | object | The importer |
| ruleStart | number | The rule start row |
| endRow | number | The last row of the sheet |
importerSpecification.checkSheetRows(sheetName, importer) ⇒ object
Checks that the specification contains all the needed sections
Kind: instance method of ImporterSpecification
Returns: object - rows The following parameters {severityStartRow, ruleStartRow}
| Param | Type | Description |
|---|---|---|
| sheetName | string | The name of the sheet |
| importer | object | The importer |
importerSpecification.getEndColumn(importer, sheetName) ⇒ number
Parses the sheet to get the last row of the table.
Kind: instance method of ImporterSpecification
Returns: number - endRow The last row of the table
| Param | Type | Description |
|---|---|---|
| importer | object | The importer |
| sheetName | string | The name of the sheet |
SpecificationModel
The model for a specification object
Kind: global class