Parser Matrix
ParserMatrix ⇐ ParserBase
The parser for the matrix tables.
Kind: global class
Extends: ParserBase
- ParserMatrix ⇐
ParserBase- .fieldNameSequence
- .parse(sheetName, importer) ⇒
object - .getFieldName() ⇒
string - ._parseMetaDataColumn(table, sheetName, importer, sheetEndColumn, sheetEndRow)
- ._checkForEmptyColumn(sheetName, importer, column, sheetEndRow)
- ._parseMetaDataRow(table, sheetName, importer, sheetEndColumn, sheetEndRow)
- ._checkForEmptyRow(sheetName, importer, row, sheetEndColumn)
- ._parseFieldData(table, sheetName, importer, sheetEndColumn, sheetEndRow)
parserMatrix.fieldNameSequence
This sequence is used to give each field a unique name.
Kind: instance property of ParserMatrix
parserMatrix.parse(sheetName, importer) ⇒ object
Parses the sheet with the given name und uses the given importer to access the data.
Kind: instance method of ParserMatrix
Returns: object - tableModel The created tablemodel
| Param | Type | Description |
|---|---|---|
| sheetName | string | The name of the sheet |
| importer | object | The importer |
parserMatrix.getFieldName() ⇒ string
Creates a unique field name.
Kind: instance method of ParserMatrix
Returns: string - fieldName New generated fieldName
parserMatrix._parseMetaDataColumn(table, sheetName, importer, sheetEndColumn, sheetEndRow)
Reads the meta data information of each column and stores it in the table object
Kind: instance method of ParserMatrix
| Param | Type | Description |
|---|---|---|
| table | object | The table to store the current sheet data |
| sheetName | string | The name of the sheet |
| importer | object | The importer |
| sheetEndColumn | number | The last column of the sheed (Exclusive) |
| sheetEndRow | number | The last row of the sheet (Exclusive) |
parserMatrix._checkForEmptyColumn(sheetName, importer, column, sheetEndRow)
Checks that the complete row is empty. If the column has no name, then the complete row must be null
Kind: instance method of ParserMatrix
| Param | Type | Description |
|---|---|---|
| sheetName | string | The name of the sheet |
| importer | object | The importer |
| column | number | The current column |
| sheetEndRow | number | The last row of the sheet (Exclusive) |
parserMatrix._parseMetaDataRow(table, sheetName, importer, sheetEndColumn, sheetEndRow)
Reads the meta data information of each row and stores it in the table object
Kind: instance method of ParserMatrix
| Param | Type | Description |
|---|---|---|
| table | object | The table to store the current sheet data |
| sheetName | string | The name of the sheet |
| importer | object | The importer |
| sheetEndColumn | number | The last column of the sheed (Exclusive) |
| sheetEndRow | number | The last row of the sheet (Exclusive) |
parserMatrix._checkForEmptyRow(sheetName, importer, row, sheetEndColumn)
Checks that the complete row is empty. If the column has no name, then the complete row must be null
Kind: instance method of ParserMatrix
| Param | Type | Description |
|---|---|---|
| sheetName | string | The name of the sheet |
| importer | object | The importer |
| row | number | The current row |
| sheetEndColumn | number | The last column of the sheet (Exclusive) |
parserMatrix._parseFieldData(table, sheetName, importer, sheetEndColumn, sheetEndRow)
Reads the data section of the matrix table
Kind: instance method of ParserMatrix
| Param | Type | Description |
|---|---|---|
| table | object | The table to store the current sheet data |
| sheetName | string | The name of the sheet |
| importer | object | The importer |
| sheetEndColumn | number | The last column of the sheed (Exclusive) |
| sheetEndRow | number | The last row of the sheet (Exclusive) |