Module: chiefData

Contains all the functions to manage the loading and processing of data, such as XML files, CSV files or JSON files. Additional file type processing should be added in this module.

Author:
  • Seth Hollingsead
Source:

Requires

Methods

(inner) getAndProcessCsvData(pathAndFilename, contextName) → {object}

Loads the specified file, parses it and converts all the data to the appropriate format.

Parameters:
Name Type Description
pathAndFilename string

The path and file name of the CSV file that should be loaded and parsed into JSON objects.

contextName string

The name that should be used when adding the objects to the D data structure for data-sharing.

Author:
  • Seth Hollingsead
Source:
Returns:

A parsed CSV JSON object where all the values have been converted from their string representation into actual values of appropriate type.

Type
object

(inner) getAndProcessXmlData(pathAndFilename) → {object}

Loads the specified file, parses it and converts all values into their appropriate data types.

Parameters:
Name Type Description
pathAndFilename string

The path and file name of the XML file that should be loaded and parsed into JSON objects.

Author:
  • Seth Hollingsead
Source:
Returns:

A parsed XML JSON object where all the values have been converted from their string representation into actual values of appropriate type.

Type
object

(inner) searchForUniversalDebugConfigSetting(appConfigPathName, frameworkConfigPathName) → {boolean}

Searches all of the config data files for a general solution to the debugSettings configuration setting.

Parameters:
Name Type Description
appConfigPathName string

The name of the configuration setting that has the path for the appConfigPath.

frameworkConfigPathName string

The name of the configuration setting that has the path for the frameworkConfigPath.

Author:
  • Seth Hollingsead
Source:
Returns:

A True or False to indicate if the debugSettings was found to be true in either of the configuration settings (appConfig Or frameworkConfig).

Type
boolean

(inner) setupAllCsvData(dataPathConfigurationName, contextName) → {object}

Sets up all of the specified CSV data.

Parameters:
Name Type Description
dataPathConfigurationName string

The name of the configuration setting that has the path we should search.

contextName string

The context name that should be used when adding data to the D data structure.

Author:
  • Seth Hollingsead
Source:
Returns:

A JSON object that contains all of the data that was loaded from all the CSV files and merged together.

Type
object

(inner) setupAllJsonConfigData(dataPathConfigurationName, contextName) → {object}

Sets up all of the JSON data at the specified configuration path.

Parameters:
Name Type Description
dataPathConfigurationName string

The name of the configuration setting that has the path we should search.

contextName string

The context name that should be used when adding data to the D data structure.

Author:
  • Seth Hollingsead
Source:
Returns:

A JSON object that contains all of the data that was loaded and merged together.

Type
object

(inner) setupAllJsonConfigPluginData(configFilesPath, contextName)

Sets up all of the JSON data at the specified configuration path with regard to plugin configuration data.

Parameters:
Name Type Description
configFilesPath string

The path to the configuration files that should be loaded.

contextName string

The type of configuration data that should be loaded.

Author:
  • Seth Hollingsead
Source:
Returns:

A JSON object that contains all of the data that was loaded and merged together.

(inner) setupAllXmlData(dataPathConfigurationName, contextName) → {object}

Sets up all of the specified XML data.

Parameters:
Name Type Description
dataPathConfigurationName string

The name of the configuration setting that has the path we should search.

contextName string

The context name that should be used when adding data to the D data structure.

Author:
  • Seth Hollingsead
Source:
Returns:

A JSON object that contains all of the data that was loaded from all the XML files and merged together.

Type
object

(inner) setupAllXmlPluginData(dataPath, contextName) → {object}

Sets up all of the specified XML data for the plugin.

Parameters:
Name Type Description
dataPath string

The fully qualified path to the data files that should be loaded and parsed.

contextName string

The context name that should describe the kind of data that is being loaded and parsed.

Author:
  • Seth Hollingsead
Source:
Returns:

A JSON object that contains all of the data that was loaded from all the XML files and merged together.

Type
object