A table renderer to display the case comparator. It uses library, which supports nested rows and custom renderers for different types of data attributes

Constructors

Properties

attId: undefined | string
data: undefined | any[]
leftCaseId:
    | undefined
    | null
    | string
    | number
remainingAtts: undefined | {}
rightCaseId:
    | undefined
    | null
    | string
    | number
simAtts: undefined | {}
similarity:
    | undefined
    | null
    | string
    | number
similarityColor: undefined | null | string
table: undefined | null | Tabulator

Methods

  • Creates a row data structure in the table for a case attribute using a similarity configuration. If the attribute contains nested data, this function can create several nested rows.

    Parameters

    • attName: string

      The attribute name to create row data for

    • allAtts: Object

      Object containing all attributes and their types

    • simDescription: Object

      Similarity description object (can be null)

    Returns Object

    Row data object with attribute info, cases, value and optional children for nested attributes

  • Creates and initializes a table in the case comparisonpanel.

    This method destroys any existing table, creates a new Tabulator instance with predefined columns for attribute comparison, and sets up event handlers for interactive elements like taxonomy links and pin buttons.

    Parameters

    • theData: any[]

      The data array to populate the table with.

    Returns void

  • Initializes the table with attributes data and similarity configuration. Sets up the data structure for displaying attributes in a tabulator table, separating attributes used in similarity functions from remaining attributes.

    Parameters

    • allAtts: Object

      Object containing all attributes with their types

    • simDescription: Object

      Similarity description object

    • attId: string

      The attribute ID to be used as case identifier

    Returns void

  • Resets the case values for either left or right case in the table. Clears the specified case data and updates the corresponding header

    Parameters

    • leftCase: boolean

      If true, resets left case values; if false, resets right case values

    Returns void

  • Updates the header information with case IDs and similarity value. If a value is null, it resets to empty values.

    Parameters

    • OptionalleftCaseId: null | string = null

      The ID of the left case to display in the header

    • OptionalrightCaseId: null | string = null

      The ID of the right case to display in the header

    • Optionalsimilarity: null | number = null

      The similarity value between the two cases

    Returns void

  • Updates the left case header with the specified ID.

    Parameters

    • id: string | number

      The ID to set for the left case header

    Returns void

  • Updates the right case header with the specified ID.

    Parameters

    • id: string | number

      The ID to set for the left case header

    Returns void

  • Updates rows in the table by setting values for a specific column. Handles both primitive values and nested objects by recursively updating child attributes.

    Parameters

    • item: Object

      The source object containing the data to update with

    • atts: Object

      The attributes object mapping keys to their corresponding rows

    • columnName: string

      The name of the column to update in the target rows

    Returns void

  • Updates the similarity header with a new value and tints the cell background using the corresponding color.

    Parameters

    • value: string | number

      The similarity value to display in the header

    • color: string

      The color to apply to the similarity header

    Returns void

  • Update the similarity value between two cases. It changes the global similarity value on the header and the local similarity values

    Parameters

    • newSimValue: any

      An object that contains the similarity value (with global and local similarity values)

    • color: any

      The color employed for the global similarity value

    Returns void

  • Updates similarity values in an attribute list using a :simvizTypes/SimilarityValue object. If this object is null, then it removes similarity values. This function is used recursively to processes nested attributes.

    Parameters

    • newSimValue: null | Object

      The similarity value (can be null)

    • attList: Object

      The list of attributes that will be updated

    Returns void