Understanding the Master Index Match Engine

DataSourcesProperties Class

The DataSourcesProcerties interface is used as a parameter to the handleComparatorsDataSources described in Step 4: Define Data Source Handling (Optional). The methods in the class are listed and described below.

getDataSourcesList

Description

The getDataSourcesList returns the comparator's list of associated data source paths.

Syntax

List getDataSourcesList(String codeName)

Parameters

Parameter 

Type 

Description 

codeName 

string 

The name of the comparator. The name is defined in comparatorsList.xml in the name attribute of the code element. In the example below, the comparator's code name is “Exact”.

<code description="New exact comparator" name="Exact" />

Return Value

A list of paths and filenames as specified in comparatorsList.xml.

Throws

None.

isDataSourceLoaded

Description

The isDataSourceLoaded method checks whether a specific file has already been loaded or opened.

Syntax

boolean isDataSourceLoaded(String sourcePath)

Parameters

Parameter 

Type 

Description 

sourcePath 

string 

The path and filename of the file to check. 

Return Value

A boolean indicator of whether the specified file has already been loaded or opened.

Throws

None.

setDataSourceLoaded

Description

The setDataSourceLoaded method sets the loading status of a data source.

Syntax

void setDataSourceLoaded(String sourcePath, boolean status)

Parameters

Parameter 

Type 

Description 

sourcePath 

string 

The path and filename of the file. 

status 

boolean 

The load status of the file. Specify true if the file is loaded; otherwise specify false.

Return Value

None.

Throws

None.

getDataSourceObject

Description

The getDataSourceObject method returns the file located at the specified source path.

Syntax

Object getDataSourceObject(String sourcePath)

Parameters

Parameter 

Type 

Description 

sourcePath 

string 

The path and filename of the file you want to load. 

Return Value

An object containing the data source information.

Throws

None.