3.0.0 • Published 3 months ago

@xhubiotable/file-processor v3.0.0

Weekly downloads
27
License
ISC
Repository
github
Last release
3 months ago

@xhubiotable/file-processor


file-processor

The file processor works on the data imported by an importer to create a table model. For the file processor, it is transparent which importer was used. The importer must implement the importer interface.

ImporterInterface

The importer is responsible for loading data from a spreadsheet. This interface must be implemented to use the custom importer. The Importer is used by a parser to read the files and create the table model. The importer does not care about the content of the spreadsheet - it’s just an abstract spreadsheet reader.

Functions

/**
 * Opens a file and loads it. This could be spreadsheet or whatever
 * file.
 * @param fileName {string} The file to open
 */
async loadFile(fileName) {}

/**
 * Returns all the loaded sheet names
 * @return sheets {array} A list of sheet names
 */
sheetNames() {}

/**
 * Returns the Cell value from the sheet with the given name
 * @param sheetName {string} The name of the sheet
 * @param column {number} The column number start with '0'
 * @param row {number} The row number start with '0'
 * @return value {string} The Cell value
 */
cellValue(sheetName, column, row) {}

/**
 * Deletes all the loaded data in the importer
 */
clear() {}

ParserInterface

For each table type a specific parser is needed. All the Parser must implement this interface.

Functions

/**
 * Parser the sheet with the given name
 * @param sheetName {string} The name of the sheet
 * @param importer {object} The importer
 * @return tableModel {object} The created table model
 */
async parse(sheetName, importer) {}

This module provides the following parsers

  • ParserDecision
    Parses decision tables.

  • ParserMatrix
    Parses matrix tables.

  • ParserSpecification
    Parses specification tables and returns decisionTable models.

3.0.0

3 months ago

2.4.10

4 years ago

2.4.9

4 years ago

2.4.8

5 years ago

2.4.7

5 years ago

2.4.6

5 years ago

2.4.5

5 years ago

2.4.4

5 years ago

2.4.3

5 years ago

2.4.2

5 years ago

2.4.1

6 years ago

2.4.0

6 years ago

2.3.3

6 years ago

2.3.2

6 years ago

2.3.1

6 years ago

2.3.0

6 years ago

2.2.0

6 years ago

2.1.3

6 years ago

2.1.2

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.5

6 years ago

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

7 years ago

1.0.0

7 years ago