JSDOCS

Contents

souslesensvocables@2.4.2 tools:jsdoc2md jsdoc2md –configure docs/jsdoc/jsdoc.json –template docs/jsdoc/jsdoc.hbs –no-cache

JSDOCS#

Modules#

Lineage_axioms

Module for managing and visualizing ontological axioms in the lineage graph. Provides functionality for:

  • Visualizing classes with their associated axioms
  • Drawing axiom relationships in the graph
  • Supporting different types of axioms
  • Testing axiom functionality
  • Managing axiom metadata and visualization
Lineage_combine

Module for combining and merging multiple ontology sources in the lineage graph. Provides functionality for:

  • Adding multiple ontology sources to the graph
  • Merging nodes from different sources
  • Managing source visibility and grouping
  • Handling node hierarchies during merges
  • Supporting different merge modes and depths
  • Preserving ontological restrictions during merges
Lineage_common

Common utility functions for the lineage system. Provides functionality for:

  • Managing clipboard operations with nodes
  • Node deletion and manipulation
  • Copy/paste operations between nodes
  • Managing ontology imports
  • Basic node operations and validations
Lineage_createRelation

Module for creating and managing relationships between ontology nodes. Provides functionality for:

  • Creating new relationships between nodes in the ontology
  • Managing relationship types and properties
  • Validating relationship constraints
  • Supporting different types of ontological relationships
  • Managing relationship metadata and restrictions
  • Integrating with the ontology model system
Lineage_createResource

Module for creating new resources (classes, named individuals) in the ontology. Provides functionality for:

  • Creating new classes and named individuals
  • Generating and managing RDF triples
  • Handling resource URIs and labels
  • Managing resource relationships and hierarchies
  • Supporting metadata and provenance information
  • Validating resource creation inputs
Lineage_createSLSVsource

Module for creating new SLSV (Sous Le Sens Vocables) sources in the system. Provides functionality for:

  • Creating and configuring new ontology sources
  • Managing source metadata and configuration
  • Handling source imports and dependencies
  • Managing user permissions and ownership
  • Supporting source validation and persistence
  • Integrating with the SLSV bot system
Lineage_decoration

Module for managing visual decorations and styling of nodes in the lineage graph. Provides functionality for:

  • Managing node colors and styles based on ontology classes
  • Handling legends and visual indicators
  • Supporting different decoration schemes (upper ontology, custom)
  • Managing predefined color schemes
  • Handling node shapes and icons
  • Supporting dynamic visual updates
Lineage_dictionary

Module for managing ontology dictionaries and term mappings. Provides functionality for:

  • Managing term mappings between different ontology sources
  • Supporting dictionary-based operations and queries
  • Handling domain and range source relationships
  • Managing dictionary filters and constraints
  • Supporting dictionary visualization and navigation
  • Handling dictionary metadata and timestamps
  • Supporting dictionary-based search and filtering
Lineage_graphTraversal

Module for managing the shortest path search between nodes in the Lineage graph.

Lineage_properties

Module for managing ontology properties and their relationships. Provides functionality for:

  • Managing object and data properties
  • Visualizing property hierarchies
  • Handling property restrictions and constraints
  • Supporting property domains and ranges
  • Managing property metadata and visualization
  • Supporting property tree operations
  • Handling property-based graph operations
Lineage_reasoner

Module for performing reasoning operations on ontologies. Provides functionality for:

  • Running inference operations on ontologies
  • Checking ontology consistency
  • Detecting unsatisfiable classes
  • Managing inference rules and predicates
  • Visualizing reasoning results
  • Supporting different reasoning operations
  • Handling reasoning errors and results
Lineage_relationFilter

Module for filtering and managing relationships between ontology nodes. Provides functionality for:

  • Creating and applying filters on node relationships
  • Managing property restrictions and constraints
  • Supporting different filter types (string, date, number)
  • Handling domain and range filters
  • Managing filter roles (subject/object)
  • Supporting complex filter conditions
  • Validating filter inputs
Lineage_relationIndividualsFilter

Module for managing filters on individuals in ontology relationships. Provides functionality for:

  • Filtering individuals based on class membership
  • Supporting date-based filtering of individuals
  • Managing advanced search criteria for individuals
  • Handling individual selection and filtering UI
  • Supporting range and domain filtering
  • Managing filter persistence and application
  • Supporting multiple filter types and combinations
  • Coordinating with relation visualization
Lineage_relations

Module for managing and visualizing relationships between nodes in the lineage graph. Provides functionality for:

  • Drawing and filtering relationships between nodes
  • Managing property trees and their visualization
  • Handling relationship queries and filters
  • Managing relationship colors and visual styles
  • Supporting different types of relationships (hierarchical, semantic, etc.)
Lineage_rules

Module for managing ontological rules and constraints. Provides functionality for:

  • Creating and managing ontology rules
  • Handling premises and conclusions
  • Supporting rule-based reasoning
  • Managing rule components and relationships
  • Supporting rule validation and execution
  • Handling rule visualization and editing
  • Managing rule-based constraints
Lineage_selection

Module for managing node selection in the lineage graph. Provides functionality for:

  • Selecting and deselecting nodes
  • Managing multiple node selections
  • Visualizing selected nodes
  • Supporting keyboard modifiers for selection
  • Handling selection events and actions
  • Managing selection trees and hierarchies
  • Supporting selection-based operations
Lineage_similars

Module for finding and visualizing similar nodes across different ontology sources. Provides functionality for:

  • Finding nodes with similar labels or properties
  • Comparing nodes across different sources
  • Visualizing similar nodes in the graph
  • Supporting exact and fuzzy matching
  • Managing source-specific similarity searches
  • Handling node selection and comparison
  • Supporting interactive similarity exploration
Lineage_sources

Module for managing ontology sources in the lineage system. Provides functionality for:

  • Loading and initializing ontology sources
  • Managing source selection and activation
  • Handling source-specific UI elements and themes
  • Supporting source imports and dependencies
  • Managing source metadata and configurations
  • Coordinating source-related operations with other modules
  • Supporting source validation and persistence
Lineage_whiteboard
KGquery

KGquery Module Module for querying and visualizing knowledge graphs. Provides functionality to build and execute queries on knowledge graphs.

KGquery_controlPanel

KGquery_controlPanel Module Handles the user interface control panel for knowledge graph queries.

KGquery_filter

KGquery_filter Module Handles filtering functionality for knowledge graph queries.

KGquery_myQueries

KGquery_myQueries Module Handles saving and loading of knowledge graph queries.

KGquery_nodeSelector

KGquery_nodeSelector Module Module for selecting and managing nodes in knowledge graph queries.

KGquery_paths

Module for managing paths in knowledge graph queries. This module provides functionality for:

  • Configuring and managing paths between nodes
  • Manipulating identifiers and variables in paths
  • Managing graphical display of paths
  • Finding shortest paths between nodes
  • Managing path ambiguities
DataSourceManager

DataSourceManager module Responsible for managing data source configurations and operations.

MappingColumnsGraph

MappingColumnsGraph module. Handles the visualization and management of mapping columns in a graph.

MappingModeler

MappingModeler module. The MappingModeler tool helps creating new mappings from sources, and visualising and editing these mappings.

MappingTransform

Module responsible for generating and managing mappings for the MappingTransform process. It interacts with the Vis.js graph to retrieve mappings and formats them as JSON for use in the application. It also provides functionality for generating SLS mappings and R2ML mappings (coming soon).

MappingsDetails : Object

MappingsDetails manages technical mappings (non structural mappings)

TripleFactory

The TripleFactory module handles the creation, filtering, and writing of RDF triples. It includes functions for generating sample triples, creating all mappings triples, and indexing the graph.

UIcontroller

UIcontroller module manages the display of panels in the mapping modeler interface, handling tab activation and panel visibility for data sources, column mappings, technical mappings, and triples.

Functions#

saveVisjsModelGraph([callback])

Saves the current Vis.js graph model.

Lineage_axioms#

Module for managing and visualizing ontological axioms in the lineage graph. Provides functionality for:

  • Visualizing classes with their associated axioms

  • Drawing axiom relationships in the graph

  • Supporting different types of axioms

  • Testing axiom functionality

  • Managing axiom metadata and visualization

Lineage_axioms.drawClassesWithAxioms([source], [axiomType]) ⇒ void#

Draws classes with associated axioms in a visual graph representation. Retrieves axioms from the specified source and visualizes them using Vis.js.

Kind: static method of Lineage_axioms

Param

Type

Description

[source]

string

The name of the data source. Defaults to the active source if not provided.

[axiomType]

string

The specific type of axiom to filter by (optional).

Lineage_axioms.testAxioms() ⇒ void#

Tests axiom functionalities by initializing a sample node with axiom data. Opens a dialog displaying axioms for the test node.

Kind: static method of Lineage_axioms

Lineage_combine#

Module for combining and merging multiple ontology sources in the lineage graph. Provides functionality for:

  • Adding multiple ontology sources to the graph

  • Merging nodes from different sources

  • Managing source visibility and grouping

  • Handling node hierarchies during merges

  • Supporting different merge modes and depths

  • Preserving ontological restrictions during merges

Lineage_combine.showSourcesDialog() ⇒ void#

Displays a dialog for selecting ontology sources to add to the graph. Supports OWL and SKOS sources.

Kind: static method of Lineage_combine

Lineage_combine.init() ⇒ void#

Initializes the Lineage_combine module by resetting selected sources and hiding action-related UI elements.

Kind: static method of Lineage_combine

Lineage_combine.addSelectedSourcesToGraph() ⇒ void#

Adds selected ontology sources to the graph and updates the UI accordingly. Registers the selected sources, draws their top concepts, and updates menu actions.

Kind: static method of Lineage_combine

Lineage_combine.setGraphPopupMenus() ⇒ void#

Sets the popup menu options for the graph, including actions to hide, show, group, and ungroup sources.

Kind: static method of Lineage_combine

Lineage_combine.showMergeNodesDialog([fromNode], [toNode]) ⇒ void#

Displays a dialog for merging selected ontology nodes. Allows users to specify the target source and node, select merge options, and choose nodes for merging.

Kind: static method of Lineage_combine

Param

Type

Description

[fromNode]

Object

The node from which the merge is initiated.

[toNode]

Object

The target node for the merge.

Lineage_combine.mergeNodesUI([testObj]) ⇒ void#

Handles the UI logic for merging ontology nodes. Gathers user input such as target source, merge mode, and selected nodes before triggering the merge process.

Kind: static method of Lineage_combine

Param

Type

Description

[testObj]

Object

Optional test object for debugging.

Lineage_combine.mergeNodes(jstreeNodes, mergeMode, mergeDepth, mergeRestrictions, mergedNodesType, targetSource, [targetNode], callback) ⇒ void#

Merges multiple ontology nodes into a target source, preserving hierarchy and restrictions. This function retrieves node descendants, applies restrictions, and inserts the merged data into the target source.

Kind: static method of Lineage_combine

Param

Type

Description

jstreeNodes

Array.<Object>

The nodes selected for merging, represented as jstree objects.

mergeMode

string

The merging mode, e.g., “keepUri”.

mergeDepth

string

Defines the depth of the merge operation (“nodeOnly”, “nodeAndDirectChildren”, “nodeDescendantsOnly”).

mergeRestrictions

boolean

Whether to include ontology restrictions in the merge.

mergedNodesType

string

The RDF type of the merged nodes (e.g., “owl:NamedIndividual”, “owl:Class”).

targetSource

string

The target source where merged nodes will be inserted.

[targetNode]

string

The optional parent node under which merged nodes will be placed.

callback

function

A callback function executed after the merge process completes.

Lineage_common#

Common utility functions for the lineage system. Provides functionality for:

  • Managing clipboard operations with nodes

  • Node deletion and manipulation

  • Copy/paste operations between nodes

  • Managing ontology imports

  • Basic node operations and validations

Lineage_common.copyNodeToClipboard(nodeData) ⇒ void#

Copies a node’s data to the clipboard as a JSON string.

Kind: static method of Lineage_common

Param

Type

Description

nodeData

Object

The node data to copy.

Lineage_common.deleteNode(node, jstreeId) ⇒ void#

Deletes a specified ontology node, removing its associated triples. If the node has children, deletion is prevented.

Kind: static method of Lineage_common

Param

Type

Description

node

Object

The node to delete.

jstreeId

string

The ID of the jstree instance where the node is displayed.

Lineage_common.pasteNodeFromClipboard(parentNode) ⇒ void#

Pastes a copied node from the clipboard under a specified parent node. The function ensures that only compatible node types are pasted.

Kind: static method of Lineage_common

Param

Type

Description

parentNode

Object

The parent node under which the copied node will be pasted.

Lineage_common.onshowImportsCBXChange(cbx) ⇒ void#

Toggles the inclusion of ontology imports in SPARQL queries.

Kind: static method of Lineage_common

Param

Type

Description

cbx

HTMLInputElement

The checkbox input element controlling the setting.

Lineage_createRelation#

Module for creating and managing relationships between ontology nodes. Provides functionality for:

  • Creating new relationships between nodes in the ontology

  • Managing relationship types and properties

  • Validating relationship constraints

  • Supporting different types of ontological relationships

  • Managing relationship metadata and restrictions

  • Integrating with the ontology model system

Lineage_createResource#

Module for creating new resources (classes, named individuals) in the ontology. Provides functionality for:

  • Creating new classes and named individuals

  • Generating and managing RDF triples

  • Handling resource URIs and labels

  • Managing resource relationships and hierarchies

  • Supporting metadata and provenance information

  • Validating resource creation inputs

Lineage_createResource~getTriple(resourceUri, predicate, object) ⇒ Object#

Helper function to create a triple object with subject, predicate and object.

Kind: inner method of Lineage_createResource
Returns: Object - Triple object with subject, predicate and object properties

Param

Type

Description

resourceUri

string

The URI of the resource (subject)

predicate

string

The predicate of the triple

object

string

The object of the triple

Lineage_createSLSVsource#

Module for creating new SLSV (Sous Le Sens Vocables) sources in the system. Provides functionality for:

  • Creating and configuring new ontology sources

  • Managing source metadata and configuration

  • Handling source imports and dependencies

  • Managing user permissions and ownership

  • Supporting source validation and persistence

  • Integrating with the SLSV bot system

Lineage_decoration#

Module for managing visual decorations and styling of nodes in the lineage graph. Provides functionality for:

  • Managing node colors and styles based on ontology classes

  • Handling legends and visual indicators

  • Supporting different decoration schemes (upper ontology, custom)

  • Managing predefined color schemes

  • Handling node shapes and icons

  • Supporting dynamic visual updates

Lineage_dictionary#

Module for managing ontology dictionaries and term mappings. Provides functionality for:

  • Managing term mappings between different ontology sources

  • Supporting dictionary-based operations and queries

  • Handling domain and range source relationships

  • Managing dictionary filters and constraints

  • Supporting dictionary visualization and navigation

  • Handling dictionary metadata and timestamps

  • Supporting dictionary-based search and filtering

Lineage_dictionary.onLoaded() ⇒ void#

Callback function executed when the dictionary module is loaded. Shows the TSF dictionary dialog in the Lineage_dictionary context.

Kind: static method of Lineage_dictionary

Lineage_dictionary.showTSFdictionaryDialog(context) ⇒ void#

Displays the TSF dictionary dialog with appropriate configuration based on context.

Kind: static method of Lineage_dictionary

Param

Type

Description

context

string

The context in which to show the dictionary (“Lineage_dictionary”, “Lineage_similars”, or “Lineage_relations”).

Lineage_dictionary.onChangeFilterSelect(value) ⇒ void#

Event handler for changes in filter select elements. Updates dictionary filters based on the selected value.

Kind: static method of Lineage_dictionary

Param

Type

Description

value

string

The selected filter value.

Lineage_dictionary.getDictionarySources(dictionary, [domainSource], [rangeSource], callback) ⇒ void#

Retrieves dictionary sources with their domain and range labels.

Kind: static method of Lineage_dictionary

Param

Type

Description

dictionary

string

The dictionary source to query.

[domainSource]

string

Optional domain source filter.

[rangeSource]

string

Optional range source filter.

callback

function

Callback function with signature (error, results).

Lineage_dictionary.getDictionaryFilters() ⇒ string#

Retrieves current dictionary filters from the UI.

Kind: static method of Lineage_dictionary
Returns: string - SPARQL filter string based on current UI filter values.

Lineage_dictionary.getFilterPredicates(subjectVarname) ⇒ string#

Gets filter predicates for a given subject variable.

Kind: static method of Lineage_dictionary
Returns: string - SPARQL predicates string based on current UI filter values.

Param

Type

Description

subjectVarname

string

The name of the subject variable in the SPARQL query.

Lineage_dictionary.fillDictionaryFilters(filterClassName, source) ⇒ void#

Populates dictionary filter select elements with available values.

Kind: static method of Lineage_dictionary

Param

Type

Description

filterClassName

string

The CSS class name for filter elements.

source

string

The source to query for filter values.

Lineage_dictionary.exportDictionaryToTable(filters) ⇒ void#

Exports dictionary data to a table format based on current filters.

Kind: static method of Lineage_dictionary

Param

Type

Description

filters

Object

Filter criteria for the export.

Lineage_graphTraversal#

Module for managing the shortest path search between nodes in the Lineage graph.

Lineage_properties#

Module for managing ontology properties and their relationships. Provides functionality for:

  • Managing object and data properties

  • Visualizing property hierarchies

  • Handling property restrictions and constraints

  • Supporting property domains and ranges

  • Managing property metadata and visualization

  • Supporting property tree operations

  • Handling property-based graph operations

Lineage_properties.init() ⇒ void#

Initializes the properties module by resetting the graph initialization state.

Kind: static method of Lineage_properties

Lineage_properties.showPropInfos(_event, obj) ⇒ void#

Displays property information in the graph div.

Kind: static method of Lineage_properties

Param

Type

Description

_event

Event

The event object (unused).

obj

Object

Object containing the node information.

obj.node

Object

The node object.

obj.node.id

string

The ID of the node.

Lineage_properties.jstreeContextMenu() ⇒ Object#

Creates the context menu for the jstree nodes.

Kind: static method of Lineage_properties
Returns: Object - Object containing menu items and their actions.

Lineage_properties.onTreeNodeClick(_event, obj) ⇒ void#

Handles click events on tree nodes.

Kind: static method of Lineage_properties

Param

Type

Description

_event

Event

The click event object.

obj

Object

Object containing the clicked node information.

Lineage_properties.openNode(node) ⇒ void#

Opens a node in the property tree and loads its subproperties.

Kind: static method of Lineage_properties

Param

Type

Description

node

Object

The node to open.

node.data

Object

The node’s data.

node.data.id

string

The node’s ID.

node.data.source

string

The node’s source.

Lineage_properties.getPropertiesjsTreeData(source, ids, words, options, callback) ⇒ void#

Generates jstree data structure for object properties.

Kind: static method of Lineage_properties

Param

Type

Description

source

string

The source to query.

ids

Array.<string>

Array of property IDs to filter by.

words

Array.<string>

Array of words to search for in property labels.

options

Object

Additional options for the query.

[options.searchType]

string

Type of search to perform (filters properties on words present in predicate or subject or object label).

callback

function

Callback function with signature (error, jstreeData).

Lineage_reasoner#

Module for performing reasoning operations on ontologies. Provides functionality for:

  • Running inference operations on ontologies

  • Checking ontology consistency

  • Detecting unsatisfiable classes

  • Managing inference rules and predicates

  • Visualizing reasoning results

  • Supporting different reasoning operations

  • Handling reasoning errors and results

Lineage_reasoner.showReasonerDialog() ⇒ void#

Shows the reasoner dialog with options for different reasoning operations.

Kind: static method of Lineage_reasoner

Lineage_reasoner.runOperation(operation) ⇒ void#

Runs a selected reasoning operation (Inference, Consistency, or Unsatisfiable).

Kind: static method of Lineage_reasoner

Param

Type

Description

operation

string

The type of reasoning operation to run.

Lineage_reasoner.runConsistency() ⇒ void#

Runs a consistency check on the current ontology.

Kind: static method of Lineage_reasoner

Lineage_reasoner.runUnsatisfiable() ⇒ void#

Runs an unsatisfiability check on the current ontology.

Kind: static method of Lineage_reasoner

Lineage_reasoner.showInferencePredicates() ⇒ void#

Shows available inference predicates in a tree structure.

Kind: static method of Lineage_reasoner

Lineage_reasoner.runInference(predicates, callback) ⇒ void#

Runs inference on the selected predicates.

Kind: static method of Lineage_reasoner

Param

Type

Description

predicates

Array.<string>

Array of predicates to use for inference.

callback

function

Callback function with signature (error, result).

Lineage_reasoner.execute() ⇒ void#

Executes the selected reasoning operation and displays results.

Kind: static method of Lineage_reasoner

Lineage_reasoner.listInferenceSubjects() ⇒ void#

Lists subjects from inference results in a tree structure.

Kind: static method of Lineage_reasoner

Lineage_reasoner.displayInference() ⇒ void#

Displays inference results in either table or graph format.

Kind: static method of Lineage_reasoner

Lineage_relationFilter#

Module for filtering and managing relationships between ontology nodes. Provides functionality for:

  • Creating and applying filters on node relationships

  • Managing property restrictions and constraints

  • Supporting different filter types (string, date, number)

  • Handling domain and range filters

  • Managing filter roles (subject/object)

  • Supporting complex filter conditions

  • Validating filter inputs

Lineage_relationFilter.showAddFilterDiv(clear) ⇒ void#

Displays the user interface for adding a filter on a relation.

Kind: static method of Lineage_relationFilter

Param

Type

Description

clear

boolean

Indicates if the current property should be reset.

Lineage_relationFilter.onSelectRoleType(role) ⇒ void#

Handles the selection of a role type (subject or object) for the filter.

Kind: static method of Lineage_relationFilter

Param

Type

Description

role

string

The selected role (“subject” or “object”).

Lineage_relationFilter.onCommonUIWidgetSelectObjectValue(value) ⇒ void#

Applies specific formatting to the selected value based on its type.

Kind: static method of Lineage_relationFilter

Param

Type

Description

value

string

The selected value.

Lineage_relationFilter.addFilter() ⇒ void#

Adds a filter based on the selected property and value.

Kind: static method of Lineage_relationFilter

Lineage_relationIndividualsFilter#

Module for managing filters on individuals in ontology relationships. Provides functionality for:

  • Filtering individuals based on class membership

  • Supporting date-based filtering of individuals

  • Managing advanced search criteria for individuals

  • Handling individual selection and filtering UI

  • Supporting range and domain filtering

  • Managing filter persistence and application

  • Supporting multiple filter types and combinations

  • Coordinating with relation visualization

Lineage_relations#

Module for managing and visualizing relationships between nodes in the lineage graph. Provides functionality for:

  • Drawing and filtering relationships between nodes

  • Managing property trees and their visualization

  • Handling relationship queries and filters

  • Managing relationship colors and visual styles

  • Supporting different types of relationships (hierarchical, semantic, etc.)

Lineage_relations.showDrawRelationsDialog(caller) ⇒ void#

Shows the dialog for drawing relations between nodes in the graph.

Kind: static method of Lineage_relations

Param

Type

Description

caller

string

The caller of the function (“Graph”, “Tree”, etc.).

Lineage_relations.getPropertiesJstreeMenu() ⇒ Object#

Returns the context menu for the properties tree.

Kind: static method of Lineage_relations
Returns: Object - The context menu items.

Lineage_relations.onSelectPropertyTreeNode(event, object) ⇒ void#

Handles the selection of a node in the properties tree.

Kind: static method of Lineage_relations

Param

Type

Description

event

Event

The selection event.

object

Object

The object containing node data.

object.node

Object

The selected node.

object.node.parent

string

The parent node ID.

object.node.data

Object

Additional node data.

Lineage_relations.onFilterObjectTypeSelect(role, type) ⇒ void#

Handles the selection of object type for filtering.

Kind: static method of Lineage_relations

Param

Type

Description

role

string

The role of the object (subject or object).

type

string

The selected object type.

Lineage_relations.onshowDrawRelationsDialogValidate(action, [_type]) ⇒ void#

Validates and executes the selected action in the relations dialog.

Kind: static method of Lineage_relations

Param

Type

Description

action

string

The action to execute (“clear” or “draw”).

[_type]

string

The type of relation (unused).

Lineage_relations.outlineWhiteboardNodes(options) ⇒ void#

Outlines nodes in the whiteboard based on their properties.

Kind: static method of Lineage_relations

Param

Type

Description

options

Object

Configuration options for outlining nodes.

options.filter

string

SPARQL filter to apply when querying nodes.

options.output

string

The output format (“outline”).

options.edgesColor

string

Color to use for edges.

Lineage_relations.drawRelations(direction, type, caller, options, [graphDiv]) ⇒ void#

Draws relations between nodes in the graph.

Kind: static method of Lineage_relations

Param

Type

Default

Description

direction

string

Direction of relations (“direct”, “inverse”, or “both”).

type

string

Type of relations to draw (“restrictions”, “dictionary”, etc.).

caller

string

The caller of the function (“Graph”, “Tree”, “leftPanel”, etc.).

options

Object

Configuration options for drawing relations.

[options.skipLiterals]

boolean

true

Whether to skip literal nodes.

[options.source]

string

Source to use for relations.

[options.data]

string | Array

Data to use for relations (node IDs).

[options.output]

string

Output format (“table” or graph).

[options.returnVisjsData]

boolean

Whether to return Vis.js data.

[options.filter]

string

SPARQL filter to apply.

[options.includeSources]

string

Sources to include.

[graphDiv]

string

The div element where to draw the graph.

Lineage_relations.getInferredProperties(source, callback, result) ⇒ void#

Retrieves inferred properties from the ontology model.

Kind: static method of Lineage_relations

Param

Type

Description

source

string

The source from which to get inferred properties.

callback

function

Callback function with signature (error, result).

result

Object

The jstree data structure containing inferred properties.

result.nodes

Array

Array of nodes representing properties and their constraints.

result.nodes[].data

Object

Node data containing property information.

result.nodes[].data.id

string

Property ID.

result.nodes[].data.label

string

Property label.

result.nodes[].data.constraints

Object

Property constraints with domain and range.

Lineage_relations.onCheckNodePropertyTreeNode(event, obj) ⇒ void#

Handles the selection of a node in the properties tree.

Kind: static method of Lineage_relations

Param

Type

Description

event

Event

The selection event.

obj

Object

The object containing node data.

obj.node

Object

The selected node.

obj.node.data

Object

Node data containing property information.

obj.node.data.constraints

Object

Property constraints.

obj.node.data.label

string

Property label.

Lineage_relations.callPreviousQuery() ⇒ void#

Recalls and executes the previous query.

Kind: static method of Lineage_relations

Lineage_relations.loadUserQueries() ⇒ void#

Loads user-saved queries.

Kind: static method of Lineage_relations

Lineage_relations.onSelectSavedQuery(id) ⇒ void#

Handles the selection of a saved query.

Kind: static method of Lineage_relations

Param

Type

Description

id

string

The ID of the saved query to load.

Lineage_relations.saveCurrentQuery() ⇒ void#

Saves the current query configuration.

Kind: static method of Lineage_relations

Lineage_relations.deleteSavedQuery(id) ⇒ void#

Deletes a saved query.

Kind: static method of Lineage_relations

Param

Type

Description

id

string

The ID of the query to delete.

Lineage_relations.drawEquivalentClasses(source, data, callback) ⇒ void#

Draws equivalent classes in the graph.

Kind: static method of Lineage_relations

Param

Type

Description

source

string

The source containing the equivalent classes.

data

Array.<string>

Array of class IDs to find equivalents for.

callback

function

Callback function with signature (error, result).

Lineage_rules#

Module for managing ontological rules and constraints. Provides functionality for:

  • Creating and managing ontology rules

  • Handling premises and conclusions

  • Supporting rule-based reasoning

  • Managing rule components and relationships

  • Supporting rule validation and execution

  • Handling rule visualization and editing

  • Managing rule-based constraints

Lineage_rules.showRulesDialog() ⇒ void#

Displays the rules dialog.

Kind: static method of Lineage_rules

Lineage_rules.onSearchClassKeyDown(event) ⇒ void#

Handles the class search event on key press.

Kind: static method of Lineage_rules

Param

Type

Description

event

Event

The keyboard event.

Lineage_rules.onSearchPropertyKeyDown(event) ⇒ void#

Handles the property search event on key press.

Kind: static method of Lineage_rules

Param

Type

Description

event

Event

The keyboard event.

Lineage_rules.searchItem(term, type) ⇒ void#

Searches for items (classes or properties) in the ontology.

Kind: static method of Lineage_rules

Param

Type

Description

term

string

The search term.

type

string

The type of item to search for (“Class” or “ObjectProperty”).

Lineage_rules.getContextMenu() ⇒ Object#

Returns the context menu for the rules tree.

Kind: static method of Lineage_rules
Returns: Object - The context menu items.

Lineage_rules.selectTreeNodeFn(event, obj) ⇒ void#

Handles the selection of a node in the tree.

Kind: static method of Lineage_rules

Param

Type

Description

event

Event

The selection event.

obj

Object

Object containing the selected node data.

Lineage_rules.addPremiseOrConclusion(node, role) ⇒ void#

Adds a premise or conclusion to the rule.

Kind: static method of Lineage_rules

Param

Type

Description

node

Object

The node to add.

role

string

The role of the node (“premise” or “conclusion”).

Lineage_rules.clearPremise(div) ⇒ void#

Removes a premise from the rule.

Kind: static method of Lineage_rules

Param

Type

Description

div

string

The ID of the div to remove.

Lineage_rules.getImplicitModel() ⇒ void#

Retrieves the implicit model of the ontology.

Kind: static method of Lineage_rules

Lineage_rules.addPropertiesToTree(node) ⇒ void#

Adds properties to the tree for a given node.

Kind: static method of Lineage_rules

Param

Type

Description

node

Object

The node for which to add properties.

Lineage_rules.execRule() ⇒ void#

Exécute la règle définie avec les prémisses et conclusions sélectionnées.

Kind: static method of Lineage_rules

Lineage_selection#

Module for managing node selection in the lineage graph. Provides functionality for:

  • Selecting and deselecting nodes

  • Managing multiple node selections

  • Visualizing selected nodes

  • Supporting keyboard modifiers for selection

  • Handling selection events and actions

  • Managing selection trees and hierarchies

  • Supporting selection-based operations

Lineage_selection.self.filterBy : object#

Filter operations for selected nodes.

Kind: static namespace of Lineage_selection

Lineage_selection.self.decorate : object#

Decoration operations for selected nodes.

Kind: static namespace of Lineage_selection

Lineage_selection.self.classDecorate : object#

Class decoration operations for selected nodes.

Kind: static namespace of Lineage_selection

Lineage_selection.addNodeToSelection(node) ⇒ void#

Adds a node to the current selection and updates its visual appearance.

Kind: static method of Lineage_selection

Param

Type

Description

node

Object

The node to add to the selection.

node.data

Object

The node’s data.

node.data.id

string

The node’s unique identifier.

Lineage_selection.clearNodesSelection([ids]) ⇒ void#

Clears the selection for specified node IDs or all nodes if no IDs are provided.

Kind: static method of Lineage_selection

Param

Type

Description

[ids]

string | Array.<string>

Single ID or array of node IDs to clear from selection.

Lineage_selection.getSelectedNodesTree() ⇒ Array.<Object>#

Creates a jstree data structure from the currently selected nodes.

Kind: static method of Lineage_selection
Returns: Array.<Object> - Array of jstree node objects.

Lineage_selection.showSelectionDialog(allGraphNodes) ⇒ void#

Shows the selection dialog with a tree view of selected nodes.

Kind: static method of Lineage_selection

Param

Type

Description

allGraphNodes

boolean

If true, selects all nodes in the graph.

Lineage_selection.selectNodesOnHover(node, point, options) ⇒ void#

Handles node selection on hover with keyboard modifiers.

Kind: static method of Lineage_selection

Param

Type

Description

node

Object

The node being hovered.

point

Object

The point where the hover occurred.

options

Object

Keyboard modifier options.

options.ctrlKey

boolean

Whether the Ctrl key is pressed.

options.altKey

boolean

Whether the Alt key is pressed.

options.shiftKey

boolean

Whether the Shift key is pressed.

Lineage_selection.onSelectedNodeTreeclick(event, obj) ⇒ void#

Handles click events on nodes in the selection tree.

Kind: static method of Lineage_selection

Param

Type

Description

event

Event

The click event.

obj

Object

Object containing the clicked node data.

Lineage_selection.getSelectedNodes(onlyIds) ⇒ Array.<(string|Object)>#

Gets the currently selected nodes from the selection tree.

Kind: static method of Lineage_selection
Returns: Array.<(string|Object)> - Array of node IDs or node objects.

Param

Type

Description

onlyIds

boolean

If true, returns only node IDs instead of full node objects.

Lineage_selection.onSelectionExecuteAction(action, checkSelected) ⇒ void#

Executes an action on the selected nodes.

Kind: static method of Lineage_selection

Param

Type

Description

action

string

The action to execute (“filterBy”, “decorate”, “classDecorate”, etc.).

checkSelected

boolean

Whether to check if nodes are selected before executing.

Lineage_similars#

Module for finding and visualizing similar nodes across different ontology sources. Provides functionality for:

  • Finding nodes with similar labels or properties

  • Comparing nodes across different sources

  • Visualizing similar nodes in the graph

  • Supporting exact and fuzzy matching

  • Managing source-specific similarity searches

  • Handling node selection and comparison

  • Supporting interactive similarity exploration

Lineage_similars.showDialog(selection) ⇒ void#

Shows the dialog for finding similar nodes.

Kind: static method of Lineage_similars

Param

Type

Description

selection

boolean

Whether to use selected nodes as the source.

Lineage_similars.onChangeSelection(value) ⇒ void#

Handles changes in the selection mode.

Kind: static method of Lineage_similars

Param

Type

Description

value

string

The new selection value.

Lineage_similars.showSourcesTree() ⇒ void#

Displays the tree of available sources for finding similar nodes.

Kind: static method of Lineage_similars

Lineage_similars.onSourceSelected(evt, obj) ⇒ void#

Handles the selection of a source from the sources tree.

Kind: static method of Lineage_similars

Param

Type

Description

evt

Event

The selection event.

obj

Object

Object containing the selected node data.

Lineage_similars.onValidateSources() ⇒ void#

Callback for source selection validation.

Kind: static method of Lineage_similars

Lineage_similars.drawSimilars() ⇒ void#

Initiates the drawing of similar nodes based on the current mode.

Kind: static method of Lineage_similars

Lineage_similars.drawSourceSimilars(source) ⇒ void#

Draws similar nodes from a specific source.

Kind: static method of Lineage_similars

Param

Type

Description

source

string

The source to search for similar nodes.

Lineage_similars.getStartingNodes() ⇒ Array.<Object> | null#

Gets the nodes to use as starting points for similarity search.

Kind: static method of Lineage_similars
Returns: Array.<Object> | null - Array of starting nodes or null if none selected.

Lineage_similars.drawWhiteBoardSimilars([output]) ⇒ void#

Draws similar nodes found within the whiteboard.

Kind: static method of Lineage_similars

Param

Type

Description

[output]

string

Optional output format.

Lineage_sources#

Module for managing ontology sources in the lineage system. Provides functionality for:

  • Loading and initializing ontology sources

  • Managing source selection and activation

  • Handling source-specific UI elements and themes

  • Supporting source imports and dependencies

  • Managing source metadata and configurations

  • Coordinating source-related operations with other modules

  • Supporting source validation and persistence

Lineage_sources.self.menuActions : object#

Collection of menu actions for source management.

Kind: static namespace of Lineage_sources

Lineage_sources.init(showDialog) ⇒ void#

Initializes the lineage sources module, resetting the active source and UI elements. Optionally displays the source selection dialog.

Kind: static method of Lineage_sources

Param

Type

Description

showDialog

boolean

Whether to show the source selection dialog.

Lineage_sources.resetAll(showDialog) ⇒ void#

Resets all loaded sources and unregisters ontology models. Calls the initialization function afterward.

Kind: static method of Lineage_sources

Param

Type

Description

showDialog

boolean

Whether to show the source selection dialog.

Lineage_sources.showSourcesDialog(forceDialog) ⇒ void#

Displays the source selection dialog, allowing users to choose ontology sources. If a source is provided via URL parameters, it is loaded directly.

Kind: static method of Lineage_sources

Param

Type

Description

forceDialog

boolean

Whether to force the display of the selection dialog.

Lineage_sources.loadSources(sources, [callback]) ⇒ void#

Loads the specified sources asynchronously, initializing each if not already loaded. After loading, sets the first source as the current active source.

Kind: static method of Lineage_sources

Param

Type

Description

sources

string | Array.<string>

The source(s) to be loaded.

[callback]

function

Optional callback function executed after loading.

Lineage_sources.setCurrentSource(source) ⇒ void#

Sets the specified source as the current active source. Updates the UI accordingly, initializes the whiteboard, and loads source-specific elements.

Kind: static method of Lineage_sources

Param

Type

Description

source

string

The source to be set as active.

Lineage_sources.initSourcesSearchSelect() ⇒ void#

Initializes the source search selection based on the user’s selected search scope. Updates available class options for searching within the selected source.

Kind: static method of Lineage_sources

Lineage_sources.showHideLineageLeftPanels() ⇒ void#

Shows or hides the left panels in the lineage UI based on the current ontology configuration. Adjusts the display of the legend wrapper section accordingly.

Kind: static method of Lineage_sources

Lineage_sources.showHideEditButtons(source, [hide]) ⇒ void#

Shows or hides edit buttons based on the source’s editability. Disables edit mode for the graph and updates the UI accordingly.

Kind: static method of Lineage_sources

Param

Type

Description

source

string

The source to check for editability.

[hide]

boolean

Optional flag to force hiding the buttons.

Lineage_sources.whiteboard_setGraphOpacity(source) ⇒ void#

Adjusts the opacity of nodes and edges in the whiteboard graph based on the active source. Nodes and edges belonging to the active source remain fully visible, while others become transparent.

Kind: static method of Lineage_sources

Param

Type

Description

source

string

The currently active source.

Lineage_sources.initSource(source, callback) ⇒ void#

Initializes a given source by registering it and setting up ontology imports. Optionally draws top-level concepts if needed.

Kind: static method of Lineage_sources

Param

Type

Description

source

string

The source to initialize.

callback

function

Callback function executed after initialization.

Lineage_sources.indexSourceIfNotIndexed(source) ⇒ void#

Checks if a source is indexed in ElasticSearch. If not, it triggers the indexing process.

Kind: static method of Lineage_sources

Param

Type

Description

source

string

The source to check and index if necessary.

Lineage_sources.registerSource(sourceLabel, [callback]) ⇒ void#

Registers a source, ensuring it is loaded and displayed in the UI.

Kind: static method of Lineage_sources

Param

Type

Description

sourceLabel

string

The label of the source to register.

[callback]

function

Optional callback function to execute after registration.

Lineage_sources.showSourceDivPopupMenu(sourceDivId) ⇒ void#

Displays a contextual popup menu for a source, allowing various actions such as hiding, grouping, or editing.

Kind: static method of Lineage_sources

Param

Type

Description

sourceDivId

string

The ID of the source’s div element.

Lineage_sources.registerSourceImports(sourceLabel, callback) ⇒ void#

Registers all imported sources of a given source.

Kind: static method of Lineage_sources

Param

Type

Description

sourceLabel

string

The label of the source whose imports should be registered.

callback

function

Callback function executed after all imports are registered.

Lineage_sources.setAllWhiteBoardSources(remove) ⇒ void#

Toggles the selection of all whiteboard sources, affecting UI highlighting and opacity settings.

Kind: static method of Lineage_sources

Param

Type

Description

remove

boolean

If true, sets a flag to remove sources from the whiteboard.

Lineage_sources.showHideCurrentSourceNodes(source, hide) ⇒ void#

Toggles the visibility of nodes belonging to a given source in the lineage graph.

Kind: static method of Lineage_sources

Param

Type

Description

source

string

The source whose nodes should be shown or hidden.

hide

boolean

Whether to hide (true) or show (false) the nodes.

Lineage_sources.setTopLevelOntologyFromImports(sourceLabel) ⇒ string | null#

Sets the current top-level ontology based on a source’s imports.

Kind: static method of Lineage_sources
Returns: string | null - The selected top-level ontology or null if none found.

Param

Type

Description

sourceLabel

string

The source label to check for imports.

Lineage_sources.setTopLevelOntologyFromPrefix(prefix) ⇒ string | null#

Sets the current top-level ontology based on a prefix.

Kind: static method of Lineage_sources
Returns: string | null - The selected top-level ontology or null if none found.

Param

Type

Description

prefix

string

The prefix to search for in top-level ontologies.

Lineage_sources.isSourceOwnedByUser(sourceName) ⇒ boolean#

Checks if a source is owned by the current user.

Kind: static method of Lineage_sources
Returns: boolean - True if the source is owned by the current user, false otherwise.

Param

Type

Description

sourceName

string

The name of the source to check.

Lineage_sources.isSourceEditableForUser(source) ⇒ boolean#

Checks if a source is editable by the current user based on access control settings.

Kind: static method of Lineage_sources
Returns: boolean - True if the source is editable by the current user, false otherwise.

Param

Type

Description

source

string

The source to check.

Lineage_sources.clearSource([source]) ⇒ void#

Clears all nodes belonging to a source from the graph.

Kind: static method of Lineage_sources

Param

Type

Description

[source]

string

The source to clear. If not provided, uses the active source.

Lineage_sources.setTheme(theme) ⇒ void#

Sets the theme for the lineage graph, affecting background and text colors.

Kind: static method of Lineage_sources

Param

Type

Description

theme

string

The theme to apply (“white” or other).

Lineage_whiteboard#

Lineage_whiteboard.drawTopConcepts(source, [options], graphDiv, callback) ⇒ void#

Retrieves and displays the top-level concepts for a given ontology source. It ensures that concepts are properly linked to their respective sources and adds them to the graph.

Kind: static method of Lineage_whiteboard

Param

Type

Default

Description

source

string

The ontology source to retrieve top concepts from.

[options]

Object

{}

Configuration options for fetching and displaying concepts.

graphDiv

string

The ID of the div container where the graph will be drawn.

callback

function

Callback function executed after fetching top concepts.

Lineage_whiteboard.isResultAcceptable(result) ⇒ boolean#

Checks if the result set is acceptable based on predefined constraints. If too many nodes are present, an alert is shown, and false is returned. If no data is found, a message is displayed.

Kind: static method of Lineage_whiteboard
Returns: boolean - - Returns true if the result is acceptable, otherwise false.

Param

Type

Description

result

Array

The result array to be evaluated.

Lineage_whiteboard.initWhiteBoard(force) ⇒ void#

Initializes the whiteboard by clearing or redrawing the graph if necessary. If the graph is empty or the force parameter is set to true, a new empty graph is drawn.

Kind: static method of Lineage_whiteboard

Param

Type

Description

force

boolean

If true, forces the graph to reset even if it’s not empty.

Lineage_whiteboard.drawNewGraph(visjsData, graphDiv, [_options]) ⇒ void#

Draws a new graph with provided data and options. Configures visualization settings such as physics, layout, and interaction settings. Also manages node and edge interactions.

Kind: static method of Lineage_whiteboard

Param

Type

Default

Description

visjsData

Object

The data containing nodes and edges to be displayed.

graphDiv

string

The ID of the div container where the graph will be rendered.

[_options]

Object

{}

Optional configuration settings for the graph.

[_options.visjsOptions]

Object

Custom options for the Vis.js graph.

[_options.layoutHierarchical]

boolean

If true, enables hierarchical layout.

[_options.physics]

Object

Custom physics settings for the graph.

[_options.noDecorations]

boolean

If true, skips the decoration step after drawing.

[_options.legendType]

string

Type of legend to be used for decoration.

Lineage_whiteboard.drawDictionarySameAs() ⇒ void#

Draws the sameAs restrictions for the dictionary. This function fetches and visualizes the sameAs properties for the dictionary source, displaying the relationships in a graph format.

Kind: static method of Lineage_whiteboard

Lineage_whiteboard.drawNamedLinkedData([classIds]) ⇒ void#

Draws linked data for named classes. This function fetches named linked data from a source based on the provided class IDs, and visualizes the results in the graph, adding new nodes and edges as necessary.

Kind: static method of Lineage_whiteboard

Param

Type

Description

[classIds]

Array.<any>

The list of class IDs to filter the linked data by. If not provided, it will be retrieved from the active source.

Lineage_whiteboard.collapseNode(nodeId) ⇒ void#

Collapses a node and removes its connected children from the graph. This function collapses the specified node and removes any connected nodes in the “from” direction.

Kind: static method of Lineage_whiteboard

Param

Type

Description

nodeId

any

The ID of the node to collapse.

Lineage_whiteboard.setGraphPopupMenus(node, event) ⇒ void#

Sets the context menu for a graph node based on the node’s type and context. This function generates a dynamic context menu for the clicked node with options such as opening clusters, showing property information, or removing nodes from the graph.

Kind: static method of Lineage_whiteboard

Param

Type

Description

node

Object

The node that was clicked on in the graph.

event

Event

The event triggered by the click, used to set the context menu options.

KGquery#

KGquery Module Module for querying and visualizing knowledge graphs. Provides functionality to build and execute queries on knowledge graphs.

KGquery.unload() ⇒ void#

Unloads the module and restores initial state.

Kind: static method of KGquery

KGquery.init() ⇒ void#

Initializes the module. Draws the graph model and sets up saved queries.

Kind: static method of KGquery

KGquery.initOutputType() ⇒ void#

Initializes the output type selector with available tools.

Kind: static method of KGquery

KGquery.loadSource() ⇒ void#

Loads a source and initializes the graph visualization.

Kind: static method of KGquery

KGquery.addQuerySet(booleanOperator) ⇒ Object#

Adds a new query set with a boolean operator.

Kind: static method of KGquery
Returns: Object - querySet - The newly created query set

Param

Type

Description

booleanOperator

string

The boolean operator to use (AND, OR, etc.)

Properties

Name

Type

Description

querySet.divId

string

The ID of the div containing the query set

querySet.elements

Array

Array of query elements in this set

querySet.color

string

The color assigned to this query set

querySet.booleanOperator

string

The boolean operator for this set

querySet.classFiltersMap

Object

Map of class filters

querySet.index

number

Index of this query set

KGquery.addQueryElementToQuerySet(querySet) ⇒ Object#

Adds a query element to a query set.

Kind: static method of KGquery
Returns: Object - queryElement - The newly created query element

Param

Type

Description

querySet

Object

The query set to add the element to

Properties

Name

Type

Description

queryElement.divId

string

The ID of the div containing this element

queryElement.fromNode

string

The source node

queryElement.toNode

string

The target node

queryElement.paths

Array

Array of paths between fromNode and toNode

queryElement.queryElementDivId

string

The element’s div ID

queryElement.fromNodeDivId

string

The source node’s div ID

queryElement.toNodeDivId

string

The target node’s div ID

queryElement.index

number

Index within the query set

queryElement.setIndex

number

Index of the parent query set

KGquery.addNodeToQueryElement(queryElement, node, role) ⇒ void#

Adds a node to a query element.

Kind: static method of KGquery

Param

Type

Description

queryElement

Object

The query element to add the node to

node

Object

The node to add

role

string

The role of the node (‘fromNode’ or ‘toNode’)

KGquery.addNode(selectedNode, nodeEvent, [callback]) ⇒ void#

Adds a node to the graph.

Kind: static method of KGquery

Param

Type

Description

selectedNode

Object

The node to add

nodeEvent

Object

The event that triggered the addition

[callback]

function

Optional callback after adding

KGquery.addEdgeNodes(fromNode, toNode, edge) ⇒ void#

Adds edge nodes to the graph.

Kind: static method of KGquery

Param

Type

Description

fromNode

Object

The source node

toNode

Object

The target node

edge

Object

The edge data

KGquery.addEdge(edge, evt) ⇒ void#

Adds edges between nodes in the graph.

Kind: static method of KGquery

Param

Type

Description

edge

Object

The edge to add

evt

Object

The event that triggered the addition

KGquery.aggregateQuery() ⇒ void#

Performs aggregation on query results. Shows a dialog for selecting aggregate clauses and validates that variables belong to the same set.

Kind: static method of KGquery

KGquery.queryKG(output, [options], [isVirtualSQLquery]) ⇒ void#

Executes a query on the knowledge graph.

Kind: static method of KGquery
Throws:

  • Error If the query execution fails

Param

Type

Default

Description

output

string

The desired output format (‘table’, ‘Graph’, ‘shacl’, or custom tool name)

[options]

Object

Additional query options

[options.aggregate]

Object

Aggregation settings for the query

[isVirtualSQLquery]

boolean

false

Whether this is a virtual SQL query

KGquery.execPathQuery(options, callback) ⇒ void#

Executes a SPARQL path query based on the provided options. The query is constructed dynamically and executed in multiple steps.

Kind: static method of KGquery

Param

Type

Description

options

Object

The options for query execution

options.output

string

The desired output format (e.g., “shacl”)

[options.aggregate]

Object

Aggregation settings for the query

callback

function

Callback function to handle the query results

callback.err

Error

Error object if the query fails

callback.result

Object

The query results if successful

KGquery.queryResultToVisjsGraph(result) ⇒ void#

Converts query results to a Vis.js graph visualization.

Kind: static method of KGquery
Throws:

  • Error If result size exceeds maxResultSizeforLineageViz

Param

Type

Description

result

Object

The query results to convert

KGquery.queryToTagsGeometry(result) ⇒ void#

Converts query results to a tags geometry visualization.

Kind: static method of KGquery

Param

Type

Description

result

Object

The query results to convert

KGquery.queryToTagsCalendar(result) ⇒ void#

Converts query results to a tags calendar visualization.

Kind: static method of KGquery

Param

Type

Description

result

Object

The query results to convert

KGquery.queryResultToTable(result) ⇒ void#

Converts query results to a table format and displays it in a dialog. Handles large result sets by exporting to CSV if size exceeds 10000 rows.

Kind: static method of KGquery

Param

Type

Description

result

Object

The query results to convert

result.results.bindings

Array

The query result bindings

result.head.vars

Array

The query result variables

KGquery.clearAll([exceptSetQueries]) ⇒ void#

Clears all query sets and resets the graph state. Optionally preserves set queries if specified.

Kind: static method of KGquery

Param

Type

Description

[exceptSetQueries]

boolean

If true, preserves set queries during cleanup

KGquery.getVarName(node, [withoutQuestionMark]) ⇒ string#

Gets the variable name for a node.

Kind: static method of KGquery
Returns: string - The variable name for the node

Param

Type

Description

node

Object

The node to get variable name for

[withoutQuestionMark]

boolean

Whether to omit the question mark prefix

KGquery.getAllQueryPathClasses() ⇒ Array.<Object>#

Gets all classes used in query paths.

Kind: static method of KGquery
Returns: Array.<Object> - Array of class objects used in query paths

KGquery.message(message, [stopWaitImg]) ⇒ void#

Displays a message in the UI and controls the wait image.

Kind: static method of KGquery

Param

Type

Default

Description

message

string

The message to display

[stopWaitImg]

boolean

false

If true, hides the wait image

KGquery.switchRightPanel([forceGraph]) ⇒ void#

Switches the right panel display between graph and other views.

Kind: static method of KGquery

Param

Type

Description

[forceGraph]

boolean

Whether to force graph display

KGquery.onBooleanOperatorChange(querySetDivId, value) ⇒ void#

Handles boolean operator changes for query sets.

Kind: static method of KGquery

Param

Type

Description

querySetDivId

string

ID of the query set div

value

string

New boolean operator value (‘AND’, ‘OR’, ‘Union’, etc.)

KGquery.removeQueryElement(queryElementDivId) ⇒ void#

Removes a query element from the graph.

Kind: static method of KGquery

Param

Type

Description

queryElementDivId

string

ID of the query element div to remove

KGquery.removeSet(querySetDivId) ⇒ void#

Removes a query set from the graph.

Kind: static method of KGquery

Param

Type

Description

querySetDivId

string

ID of the query set div to remove

KGquery.onOutputTypeSelect(output) ⇒ void#

Handles output type selection changes.

Kind: static method of KGquery

Param

Type

Description

output

string

The selected output type

KGquery.addOutputType() ⇒ void#

Adds an output type to the select options.

Kind: static method of KGquery

KGquery.initQuery() ⇒ void#

Initializes the query interface. Loads the query tab HTML if not already loaded.

Kind: static method of KGquery

KGquery.initGraph() ⇒ void#

Initializes the graph interface. Loads the graph tab HTML if not already loaded and initializes the graph visualization.

Kind: static method of KGquery

KGquery.checkRequirements() ⇒ void#

Checks requirements by executing a SHACL query.

Kind: static method of KGquery

KGquery.initMyQuery() ⇒ void#

Initializes the query management interface.

Kind: static method of KGquery

KGquery.onLoaded() ⇒ void#

Called when the module is loaded. Initializes the user interface and loads saved queries.

Kind: static method of KGquery
Category: KGquery
Access: public

KGquery_controlPanel#

KGquery_controlPanel Module Handles the user interface control panel for knowledge graph queries.

KGquery_controlPanel.addQuerySet(toDivId, booleanOperator, label, color) ⇒ string#

Adds a new query set to the interface.

Kind: static method of KGquery_controlPanel
Returns: string - The ID of the created query set div

Param

Type

Description

toDivId

string

The ID of the container div

booleanOperator

string

The boolean operator for the set (Union/Minus)

label

string

The label for the query set

color

string

The color for the query set visualization

KGquery_controlPanel.addQueryElementToCurrentSet(querySetDivId, [color]) ⇒ string#

Adds a query element to the current set.

Kind: static method of KGquery_controlPanel
Returns: string - The ID of the created query element div

Param

Type

Description

querySetDivId

string

The ID of the query set div

[color]

string

Optional color for the query element

KGquery_controlPanel.addNodeToQueryElementDiv(queryElementDivId, role, label) ⇒ string#

Adds a node to a query element div.

Kind: static method of KGquery_controlPanel
Returns: string - The ID of the created node div

Param

Type

Description

queryElementDivId

string

The ID of the query element div

role

string

The role of the node (fromNode/toNode)

label

string

The label for the node

KGquery_controlPanel.addPredicateToQueryElementDiv(queryElementDivId, label) ⇒ void#

Adds a predicate to a query element div.

Kind: static method of KGquery_controlPanel

Param

Type

Description

queryElementDivId

string

The ID of the query element div

label

string

The label for the predicate

KGquery_controlPanel.getQueryElementPredicateLabel(queryElement) ⇒ string#

Gets the predicate label for a query element.

Kind: static method of KGquery_controlPanel
Returns: string - The formatted predicate label

Param

Type

Description

queryElement

Object

The query element

queryElement.paths

Array

Array of paths in the query element

KGquery_filter#

KGquery_filter Module Handles filtering functionality for knowledge graph queries.

KGquery_filter.selectOptionalPredicates(querySets, options, callback) ⇒ void#

Selects optional predicates for the query.

Kind: static method of KGquery_filter

Param

Type

Description

querySets

Object

The query sets to process

options

Object

Options for predicate selection

callback

function

Callback function called with (err, result)

KGquery_filter.getOptionalPredicates(propertyNodes, callback) ⇒ void#

Gets the SPARQL representation of selected optional predicates.

Kind: static method of KGquery_filter

Param

Type

Description

propertyNodes

Array

Array of selected property nodes

callback

function

Callback function called with (err, result)

callback.result

Object

The result object containing:

callback.result.optionalPredicatesSparql

string

The OPTIONAL clauses in SPARQL

callback.result.selectClauseSparql

string

The SELECT clause variables

KGquery_filter.getAggregateFilterOptionalPredicates(querySet, filter) ⇒ string#

Gets optional predicates for aggregate filters.

Kind: static method of KGquery_filter
Returns: string - The filter string with optional predicates

Param

Type

Description

querySet

Object

The query set to process

filter

string

The filter string to check

KGquery_filter.getAggregatePredicates(groupByPredicates, groupByPredicates[key) ⇒ string#

Gets aggregate predicates for grouping.

Kind: static method of KGquery_filter
Returns: string - SPARQL string for aggregate predicates

Param

Type

Description

groupByPredicates

Object

Map of predicates to group by

groupByPredicates[key

Object

A predicate object

KGquery_filter.addNodeFilter(classDivId, addTojsTreeNode, propertyId) ⇒ void#

Adds a filter to a node based on a property.

Kind: static method of KGquery_filter

Param

Type

Description

classDivId

string

The ID of the class div

addTojsTreeNode

string

The node to add the filter to

propertyId

string

The ID of the property to filter on

KGquery_myQueries#

KGquery_myQueries Module Handles saving and loading of knowledge graph queries.

KGquery_myQueries.save(callback) ⇒ void#

Saves the current query state.

Kind: static method of KGquery_myQueries

Param

Type

Description

callback

function

Callback function called with (err, data) where data contains:

callback.data

Object

The data to save

callback.data.querySets

Object

The current query sets

callback.data.sparqlQuery

string

The current SPARQL query

callback.data.optionalPredicatesSparql

string

Optional predicates in SPARQL format

callback.data.selectClauseSparql

string

The SELECT clause in SPARQL format

KGquery_myQueries.load(err, result) ⇒ void#

Loads a saved query state.

Kind: static method of KGquery_myQueries

Param

Type

Description

err

Error

Error object if loading failed

result

Object

The saved query state to load

result.querySets

Object

The saved query sets

result.optionalPredicatesSparql

string

Optional predicates in SPARQL format

result.selectClauseSparql

string

The SELECT clause in SPARQL format

KGquery_nodeSelector#

KGquery_nodeSelector Module Module for selecting and managing nodes in knowledge graph queries.

KGquery_nodeSelector.showImplicitModelInJstree(visjsData) ⇒ void#

Shows the implicit model in a jsTree structure.

Kind: static method of KGquery_nodeSelector

Param

Type

Description

visjsData

Object

The Vis.js graph data containing nodes and edges

visjsData.nodes

Array

Array of nodes in the graph

visjsData.edges

Array

Array of edges in the graph

KGquery_nodeSelector.onSelectNode(node) ⇒ void#

Handles node selection in the jsTree.

Kind: static method of KGquery_nodeSelector

Param

Type

Description

node

Object

The selected node from jsTree

node.id

string

The node ID

node.text

string

The node text/label

node.data

Object

Additional node data

KGquery_paths#

Module for managing paths in knowledge graph queries. This module provides functionality for:

  • Configuring and managing paths between nodes

  • Manipulating identifiers and variables in paths

  • Managing graphical display of paths

  • Finding shortest paths between nodes

  • Managing path ambiguities

Requires: module:shared/common, module:KGquery_graph, module:uiWidgets/simpleListSelectorWidget, module:sparqlProxies/sparql_common

DataSourceManager#

DataSourceManager module Responsible for managing data source configurations and operations.

See: [Tutorial: Overview]{@tutorial overview}

DataSourceManager.getSlsvSourceConfig(source, callback) ⇒ void#

Retrieves the configuration for a given data source. Transfers the “main.json” configuration to the Vis.js graph if not already transferred.

Kind: static method of DataSourceManager

Param

Type

Description

source

string

The source name.

callback

function

The callback function to be executed after the operation.

DataSourceManager.initNewSlsvSource(source, callback) ⇒ void#

Initializes a new data source and sets the current configuration.

Kind: static method of DataSourceManager

Param

Type

Description

source

string

The source name.

callback

function

The callback function to be executed after the initialization.

DataSourceManager.loaDataSourcesJstree(jstreeDiv, callback) ⇒ void#

Loads data sources into a Jstree widget for visualization and interaction.

Kind: static method of DataSourceManager

Param

Type

Description

jstreeDiv

string

The DOM element where the tree should be loaded.

callback

function

The callback function to be executed after loading the data sources.

DataSourceManager.initNewDataSource(name, type, sqlType, table) ⇒ void#

Initializes a new data source, updating the current configuration. This function handles both CSV and non-CSV sources by adding them to the Jstree and updating the current data source configuration.

Kind: static method of DataSourceManager

Param

Type

Description

name

string

The name of the data source.

type

string

The type of the data source (e.g., “csvSource” or other types).

sqlType

string

The SQL type of the data source, relevant for non-CSV sources.

table

string

The initial table to be set for the data source.

DataSourceManager.loadCsvSource(slsvSource, fileName, loadJstree, callback) ⇒ void#

Loads a CSV source by fetching data from the server, including headers and sample data. This function updates the current configuration with the columns of the CSV source and its sample data.

Kind: static method of DataSourceManager

Param

Type

Description

slsvSource

string

The name of the CSV source.

fileName

string

The name of the CSV file to load.

loadJstree

boolean

A flag indicating whether to reload the Jstree.

callback

function

A callback function to be executed after loading the CSV source.

DataSourceManager.loadDataBaseSource(slsvSource, dataSource, sqlType, callback) ⇒ void#

Loads a database source and its associated model by fetching data from the server. This function retrieves the model for a given data source and updates the configuration with its tables. It also updates the Jstree with the available tables for the data source.

Kind: static method of DataSourceManager

Param

Type

Description

slsvSource

string

The name of the source.

dataSource

string

The name of the database source to load.

sqlType

string

The SQL type of the database source.

callback

function

A callback function to be executed after the source is loaded.

DataSourceManager.onDataSourcesJstreeSelect(event, obj) ⇒ void#

Handles the selection of a node in the Jstree, which represents different types of data sources, including databases, CSVs, and tables. It updates the configuration and loads the corresponding data source or table based on the selection. Also handles UI updates for the mapping modeler and left panel tabs.

Kind: static method of DataSourceManager

Param

Type

Description

event

Object

The event object triggered by the selection.

obj

Object

The Jstree node object containing details about the selected node.

DataSourceManager.saveSlsvSourceConfig(callback) ⇒ void#

Saves the current configuration of the SlsvSource by using the MappingColumnsGraph save function. Calls the provided callback once the saving operation is complete.

Kind: static method of DataSourceManager

Param

Type

Description

callback

function

The callback to invoke after saving the configuration.

DataSourceManager.displayUploadApp(displayForm) ⇒ void#

Displays the upload form app for uploading database or CSV sources. Depending on the form type, it loads the appropriate form and handles initialization of the React app.

Kind: static method of DataSourceManager

Param

Type

Description

displayForm

string

The type of form to display (“database” or “file”).

DataSourceManager.createDataBaseSourceMappings() ⇒ void#

Creates mappings for a selected database source. Closes the upload app dialog, adds the selected database source to the current configuration, and saves the updated configuration. Calls the provided callback once the operation is complete.

Kind: static method of DataSourceManager

DataSourceManager.createCsvSourceMappings() ⇒ void#

Creates mappings for a selected CSV source. Closes the upload app dialog, adds the selected CSV source to the current configuration, and saves the updated configuration. Calls the provided callback once the operation is complete.

Kind: static method of DataSourceManager

DataSourceManager.deleteDataSource(jstreeNode) ⇒ void#

Deletes a data source (either database or CSV) from the configuration. Removes the data source from the raw configuration, updates the JSTree, and removes related nodes and edges from the graph. The updated configuration is then saved. If the source is a CSV, additional steps would be taken to remove the file.

Kind: static method of DataSourceManager

Param

Type

Description

jstreeNode

Object

The JSTree node representing the data source to be deleted.

MappingColumnsGraph#

MappingColumnsGraph module. Handles the visualization and management of mapping columns in a graph.

See: [Tutorial: Overview]{@tutorial overview}

MappingColumnsGraph.self.currentOffset : Object#

Current graph node being manipulated.

Kind: static property of MappingColumnsGraph

MappingColumnsGraph.self.currentGraphNode#

Stores the currently selected graph node.

Kind: static property of MappingColumnsGraph

MappingColumnsGraph.self.visjsGraph : Object#

Instance of the Vis.js graph.

Kind: static property of MappingColumnsGraph

MappingColumnsGraph.self.graphDiv#

ID of the HTML container where the graph is rendered.

Kind: static property of MappingColumnsGraph

MappingColumnsGraph.stepX : number#

X-axis step size for node positioning.

Kind: static property of MappingColumnsGraph

MappingColumnsGraph.stepY : number#

Y-axis step size for node positioning.

Kind: static property of MappingColumnsGraph

MappingColumnsGraph.minX : number#

Minimum X position for graph layout adjustments.

Kind: static property of MappingColumnsGraph

MappingColumnsGraph.drawResource(newResource) ⇒ void#

Draws a new resource node in the Vis.js graph. Positions the node dynamically and links it with existing nodes if necessary.

Kind: static method of MappingColumnsGraph

Param

Type

Description

newResource

Object

The resource to be added to the graph.

MappingColumnsGraph.initOffsets() ⇒ void#

Initializes the offset values for positioning nodes in the graph. Ensures that the offset is set correctly before adding new nodes.

Kind: static method of MappingColumnsGraph

MappingColumnsGraph.objectIdExistsInGraph(id) ⇒ boolean#

Checks if a given object ID already exists in the Vis.js graph. Iterates through existing nodes to determine if the ID is present.

Kind: static method of MappingColumnsGraph
Returns: boolean - True if the object exists, otherwise false.

Param

Type

Description

id

string

The ID of the object to check.

MappingColumnsGraph.drawGraphCanvas(graphDiv, visjsData, [callback]) ⇒ void#

Draws the graph canvas using Vis.js with specified options. Configures the graph’s visual settings and event handlers.

Kind: static method of MappingColumnsGraph

Param

Type

Description

graphDiv

string

The ID of the div container for the graph.

visjsData

Object

Data containing nodes and edges for the graph.

[callback]

function

Optional callback function to execute after drawing.

MappingColumnsGraph.onVisjsGraphClick(node, event, options) ⇒ void#

Handles click events on the Vis.js graph. Updates the current selected node and manages relations between columns.

Kind: static method of MappingColumnsGraph

Param

Type

Default

Description

node

Object

The clicked node object.

event

Object

The click event object.

options

Object

Additional event options.

[options.ctrlKey]

boolean

false

Indicates if the Ctrl key was pressed during the click.

[options.shiftKey]

boolean

false

Indicates if the Shift key was pressed during the click.

[options.altKey]

boolean

false

Indicates if the Alt key was pressed during the click.

MappingColumnsGraph.showGraphPopupMenu(node, point, event) ⇒ void#

Displays the context menu for a graph node. Shows relevant options based on the node type (Class, Column, or Edge).

Kind: static method of MappingColumnsGraph

Param

Type

Description

node

Object

The node where the menu should appear.

point

Object

The coordinates for the popup menu.

event

Object

The event triggering the menu.

MappingColumnsGraph.outlineNode(nodeId) ⇒ void#

Outlines a selected node by increasing its border width.

Kind: static method of MappingColumnsGraph

Param

Type

Description

nodeId

string

The ID of the node to highlight.

MappingColumnsGraph.removeNodeFromGraph() ⇒ void#

Removes a node from the graph after user confirmation. Also removes its connected edges.

Kind: static method of MappingColumnsGraph

MappingColumnsGraph.removeNodeEdgeGraph() ⇒ void#

Removes an edge from the graph after user confirmation.

Kind: static method of MappingColumnsGraph

MappingColumnsGraph.addSuperClassToGraph() ⇒ void#

Adds a superclass to the graph for the selected node. Queries the ontology for superclass relationships.

Kind: static method of MappingColumnsGraph

MappingColumnsGraph.drawColumnToClassEdge() ⇒ void#

Draws an edge between a column and a class in the graph.

Kind: static method of MappingColumnsGraph

MappingColumnsGraph.showNodeInfos() ⇒ void#

Displays detailed information about the selected node.

Kind: static method of MappingColumnsGraph

MappingColumnsGraph.showSampledata() ⇒ void#

Displays sample data related to the selected column.

Kind: static method of MappingColumnsGraph

MappingColumnsGraph.showColumnDetails([node]) ⇒ void#

Shows detailed mappings for the selected column in a dialog.

Kind: static method of MappingColumnsGraph

Param

Type

Description

[node]

Object

The node for which details should be displayed. Defaults to the currently selected node.

MappingColumnsGraph.addNodesByDataTableBatch(nodes) ⇒ void#

Adds nodes to the Vis.js graph in batches based on their associated data tables. Nodes are grouped by their dataTable property and added to the graph incrementally. Ensures that the graph layout is adjusted after each batch is added. Permits to have a structured visualisation

Kind: static method of MappingColumnsGraph

Param

Type

Description

nodes

Array.<Object>

The list of nodes to be added to the graph.

MappingColumnsGraph.loadVisjsGraph([callback]) ⇒ void#

Loads the Vis.js graph for the current mapping source. Retrieves graph data from a JSON file and adjusts layout positioning. Clusters nodes based on data tables for better visualization.

Kind: static method of MappingColumnsGraph

Param

Type

Description

[callback]

function

Optional callback function executed after loading the graph.

MappingColumnsGraph.saveVisjsGraph([callback]) ⇒ void#

Saves the current Vis.js graph to a JSON file. Captures nodes, edges, positions, and configuration data before sending it to the backend for storage.

Kind: static method of MappingColumnsGraph

Param

Type

Description

[callback]

function

Optional callback function executed after saving the graph.

MappingColumnsGraph.getDatasourceTablesFromVisjsGraph() ⇒ Array.<string>#

Retrieves distinct data tables from the Vis.js graph nodes. Filters out undefined values and returns a list of unique data tables.

Kind: static method of MappingColumnsGraph
Returns: Array.<string> - List of unique data table names.

MappingColumnsGraph.updateNode(node) ⇒ void#

Updates a node in the Vis.js graph and saves the updated graph.

Kind: static method of MappingColumnsGraph

Param

Type

Description

node

Object

The node to be updated.

MappingColumnsGraph.removeNode(node) ⇒ void#

Removes a node from the Vis.js graph and saves the updated graph.

Kind: static method of MappingColumnsGraph

Param

Type

Description

node

Object

The node to be removed.

MappingColumnsGraph.addNode(node) ⇒ void#

Adds a new node to the Vis.js graph and saves the updated graph.

Kind: static method of MappingColumnsGraph

Param

Type

Description

node

Object

The node to be added.

MappingColumnsGraph.updateEdge(edge) ⇒ void#

Updates an edge in the Vis.js graph and saves the updated graph.

Kind: static method of MappingColumnsGraph

Param

Type

Description

edge

Object

The edge to be updated.

MappingColumnsGraph.removeEdge(edge) ⇒ void#

Removes an edge from the Vis.js graph and saves the updated graph.

Kind: static method of MappingColumnsGraph

Param

Type

Description

edge

Object

The edge to be removed.

MappingColumnsGraph.sortVisjsColumns(nodes) ⇒ void#

Adds a new edge to the Vis.js graph and saves the updated graph.

Kind: static method of MappingColumnsGraph

Param

Type

Description

nodes

array

The nodes to be sorted.

MappingColumnsGraph.addEdge(edge) ⇒ void#

Adds a new edge to the Vis.js graph and saves the updated graph.

Kind: static method of MappingColumnsGraph

Param

Type

Description

edge

Object

The edge to be added.

MappingColumnsGraph.saveVisjsGraphWithConfig(callback) ⇒ void#

Saves the Vis.js graph with the current configuration.

Kind: static method of MappingColumnsGraph

Param

Type

Description

callback

function

Optional callback to execute after saving.

MappingColumnsGraph.clearGraph() ⇒ void#

Clears the current graph, resets offsets, and reinitializes the graph canvas.

Kind: static method of MappingColumnsGraph

MappingColumnsGraph.exportMappings() ⇒ void#

Exports the current mappings from the Vis.js graph to a JSON file. Saves the graph data before exporting Handles errors during the export process and displays appropriate messages.

Kind: static method of MappingColumnsGraph

MappingColumnsGraph.importMappingsFromJSONFile() ⇒ void#

Imports mappings from a JSON file into the Vis.js graph file. Opens a file import dialog, parses the JSON content, and uploads the data to the graphs in instance data repository.

Kind: static method of MappingColumnsGraph

MappingColumnsGraph.exportMappings() ⇒ void#

Exports the current mappings from the Vis.js graph to a JSON file. Saves the graph data before exporting

Kind: static method of MappingColumnsGraph

MappingColumnsGraph~createDataSourcesClusters() ⇒ void#

Creates clusters from the different data sources used in the graph. Groups nodes based on their associated data tables and clusters them for better visualization.

Kind: inner method of MappingColumnsGraph

MappingModeler#

MappingModeler module. The MappingModeler tool helps creating new mappings from sources, and visualising and editing these mappings.

See: [Tutorial: Overview]{@tutorial overview}

MappingModeler.self.jstreeDivId : string#

ID of the tree container.

Kind: static property of MappingModeler

MappingModeler.self.legendGraphDivId : string#

ID of the legend container.

Kind: static property of MappingModeler

MappingModeler.self.legendItemsArray : Array.<{label: string, color: string, shape: string, size: number}>#

Array defining the legend items for the graph. Each item includes label, color, shape, and size properties.

Kind: static property of MappingModeler

MappingModeler.onLoaded() ⇒ void#

Initializes the MappingModeler module.

This method performs the following steps in sequence:

  1. Sets up the current source and initializes the UI menu bar.

  2. Loads the source configuration using DataSourceManager.

  3. Loads the HTML structure for the graph container.

  4. Initializes an empty VisJS graph canvas.

  5. Loads the VisJS mapping graph with data.

  6. Loads and sets up the lateral panel with tabs and the data source tree.

Kind: static method of MappingModeler
Throws:

  • Error If any step in the initialization sequence fails.

MappingModeler.loadSuggestionSelectJstree(objects, parentName)#

Loads and initializes a suggestion tree in the specified container.

Kind: static method of MappingModeler

Param

Type

Description

objects

Array.<Object>

The objects to populate the tree with.

parentName

string

The name of the parent node.

MappingModeler.initActiveLegend(divId)#

Initializes the active legend for a given container.

Kind: static method of MappingModeler

Param

Type

Description

divId

string

The ID of the container where the legend will be displayed.

MappingModeler.hideForbiddenResources(resourceType)#

Hides specific resources in the legend based on the resource type.

Kind: static method of MappingModeler

Param

Type

Description

resourceType

string

The type of resource to hide.

MappingModeler.onSuggestionsSelect(event, obj)#

Handles the selection of a suggestion from the tree.

Kind: static method of MappingModeler

Param

Type

Description

event

Object

The selection event object.

obj

Object

The selected tree node object.

MappingModeler.onLegendNodeClick(node, event)#

Performs actions such as:

  • Creating a specific URI resource.

  • Loading suggestions for columns, classes, or properties.

  • Managing virtual columns or row indices.

Kind: static method of MappingModeler

Param

Type

Description

node

Object

The legend node clicked, containing its ID and properties.

event

Object

The click event triggering the action.

MappingModeler.showLegendGraphPopupMenu()#

Displays the legend graph popup menu (TO DO).

Kind: static method of MappingModeler

MappingModeler.get AllClasses(source, callback)#

  • If the classes are already cached in self.allClasses, returns the cached list.

  • Otherwise, fetches all classes using CommonBotFunctions.listSourceAllClasses.

  • Filters out duplicate class IDs and formats labels with source prefixes.

  • The resulting class list is sorted alphabetically by label.

  • Calls the callback with the formatted list or an error if the API call fails.

Kind: static method of MappingModeler

Param

Type

Description

source

string

The source to retrieve classes from. Defaults to self.currentSource if not provided.

callback

function

Callback function to handle the result. Receives two arguments: error and result.

MappingModeler.getAllProperties(source, callback)#

  • If the properties are already cached in self.allProperties, returns the cached list.

  • Otherwise, fetches all object properties using CommonBotFunctions.listSourceAllObjectProperties.

  • Filters out duplicate property IDs and prepares labels for each property.

  • Sorts the resulting property list alphabetically by label.

  • Calls the callback with the formatted list or an error if the API call fails.

Kind: static method of MappingModeler

Param

Type

Description

source

string

The source to retrieve properties from. Defaults to self.currentSource if not provided.

callback

function

Callback function to handle the result. Receives two arguments: error and result.

Example

self.getAllProperties("mySource", function(err, properties) {
    if (err) {
        console.error(err);
    } else {
        console.log(properties);
    }
});

MappingModeler.hideLegendItems(hiddenNodes)#

  • Retrieves all legend node IDs from Axiom_activeLegend.data.nodes.

  • Iterates through each node ID, marking them as hidden if they are not in the hiddenNodes list.

  • Updates the visibility of legend items using self.updateNode.

Kind: static method of MappingModeler

Param

Type

Description

hiddenNodes

Array

Array of node IDs to keep visible. If not provided, all legend items are hidden.

Example

self.hideLegendItems(["node1", "node2"]);

MappingModeler.initResourcesMap(source, callback)#

  • Initializes self.allResourcesMap as an empty object.

  • Resets self.allClasses and self.allProperties to null.

  • Calls self.getAllClasses to fetch all classes, adding each to the self.allResourcesMap by ID.

  • Calls self.getAllProperties to fetch all properties, adding each to the self.allResourcesMap by ID.

  • If a callback is provided, it is invoked after all resources are processed.

Kind: static method of MappingModeler

Param

Type

Description

source

string

The data source from which resources are fetched.

callback

function

Callback function invoked after resources are initialized. Receives two arguments: error and result.

Example

self.initResourcesMap("mySource", function(err, result) {
    if (err) {
        console.error(err);
    } else {
        console.log("Resources initialized:", self.allResourcesMap);
    }
});

MappingModeler.clearMappings()#

  • Clears the visjsGraph object, which contains the graph visualization data.

  • Removes all content from the graph’s HTML container using its ID.

  • Resets self.visjsGraph to null.

  • Reinitializes an empty graph canvas using self.drawGraphCanvas with empty nodes and edges.

Kind: static method of MappingModeler
Example

self.clearMappings();

MappingModeler.showCreateResourceBot(resourceType, filteredUris)#

  • Initializes the workflow for creating a new resource based on the resource type.

  • If the resource type is “Class”, it uses the workflowNewClass workflow, otherwise, if it’s “ObjectProperty”, it uses the workflowNewObjectProperty workflow.

  • Updates internal data structures (allClasses, allProperties, allResourcesMap) with the newly created resource.

  • Adds the new resource to a suggestion list displayed in a jsTree widget.

  • If the resource type is invalid, it alerts the user.

Kind: static method of MappingModeler

Param

Type

Description

resourceType

string

The type of resource to create (“Class” or “ObjectProperty”).

filteredUris

Array

The URIs to filter the resource creation process.

Example

self.showCreateResourceBot("Class", filteredUris);

MappingModeler.viewSampleTriples(mappings)#

  • Constructs a payload with the current source, data source, table name, and options.

  • Sends a POST request to the server to generate sample triples based on the provided mappings.

  • Displays the generated triples in a data table using TripleFactory.showTriplesInDataTable.

  • Shows a dialog with the generated triples and allows the user to close the dialog.

  • If an error occurs during the request, an alert is shown with the error message.

Kind: static method of MappingModeler

Param

Type

Description

mappings

Object

The mappings to be applied as a filter when generating the sample triples.

Example

self.viewSampleTriples(mappings);

MappingModeler.filterSuggestionTree()#

  • Retrieves the input keyword from the filter field and converts it to lowercase.

  • Checks if the suggestion tree data exists and creates a copy of it if necessary.

  • Filters the nodes in the suggestion tree, only including leaf nodes whose text contains the keyword.

  • Updates the jstree with the filtered nodes using JstreeWidget.updateJstree.

Kind: static method of MappingModeler
Example

self.filterSuggestionTree();

MappingModeler.predicateFunctionShowDialog()#

  • Loads the HTML content from functionDialog.html into the #smallDialogDiv element.

  • Opens the dialog to display the loaded content.

Kind: static method of MappingModeler
Example

self.predicateFunctionShowDialog();

MappingModeler.addPredicateFunction()#

  • Creates an edge with a label “function” and a diamond-shaped arrow pointing to the target node.

  • The edge’s data contains the function body retrieved from the #MappingModeler_fnBody input field.

  • Adds the edge to the graph and then closes the dialog displaying the function input.

Kind: static method of MappingModeler
Example

self.addPredicateFunction();

MappingModeler.loadSource(callback)#

  • Uses Lineage_sources.loadSources to load the current source specified in MainController.currentSource.

  • On success, hides the graph edition buttons and calls the provided callback function.

  • If an error occurs during the loading process, an alert is displayed with the error message.

Kind: static method of MappingModeler

Param

Type

Description

callback

function

The function to be executed once the source is loaded successfully.

Example

self.loadSource(function() {
  console.log("Source loaded successfully");
});

MappingModeler.showSampleData(node, columns, callback)#

  • Checks if columns are specified and prepares the table accordingly.

  • Fetches and displays sample data from either a database or CSV source.

  • For a database source, it fetches the first 200 rows based on a predefined SQL query.

  • Displays the data in a table with the specified columns.

  • Alerts the user if the CSV source is not yet implemented.

Kind: static method of MappingModeler

Param

Type

Description

node

Object

The selected node from which to fetch data.

columns

Array | string

The specific columns to display, can be an array or a single column name.

callback

function

A callback function to be executed after showing the data (optional).

Example

self.showSampleData(node, ['column1', 'column2'], function() {
  console.log("Sample data displayed");
});

MappingTransform#

Module responsible for generating and managing mappings for the MappingTransform process. It interacts with the Vis.js graph to retrieve mappings and formats them as JSON for use in the application. It also provides functionality for generating SLS mappings and R2ML mappings (coming soon).

See: [Tutorial: Overview]{@tutorial overview}

MappingTransform.generateSLSmappings() ⇒ void#

Generates the SLS mappings from the Vis.js graph and displays them in the right panel of the UI. The mappings are formatted as JSON and placed inside a textarea for easy access and copying.

Kind: static method of MappingTransform

MappingTransform.generateR2MLmappings() ⇒ void#

Placeholder function for generating R2ML mappings. Currently displays an alert.

Kind: static method of MappingTransform

MappingTransform.getSLSmappingsFromVisjsGraph([table]) ⇒ Object#

Retrieves the SLS mappings for the current table from the Vis.js graph. Filters nodes that belong to the specified table and exclude those with type “Class” or “table”.

Kind: static method of MappingTransform
Returns: Object - The generated JSON object containing the SLS mappings for the specified table.

Param

Type

Description

[table]

string

The name of the table for which to retrieve the mappings. Defaults to the current table if not provided.

MappingTransform.nodeToKGcreatorColumnName(data) ⇒ string#

Converts a node’s data to a KGcreator-compatible column name based on its URI type and data type. It generates column names based on different conditions such as blankNode, randomIdentifier, or URI. Virtual columns and URI columns have specific suffixes added to the column name

Kind: static method of MappingTransform
Returns: string - The generated column name in KGcreator format.

Param

Type

Description

data

Object

The node’s data containing the URI type and other properties.

MappingTransform.mappingsToKGcreatorJson(columnsMap) ⇒ Array#

Transforms a columns map into KGcreator-compatible JSON format, generating mappings between columns, predicates, and objects. This function handles RDF types, labels, transformations, and other predicates for each column. It also processes connections between nodes and generates appropriate triples for each mapping

Kind: static method of MappingTransform
Returns: Array - An array of mapping objects in KGcreator JSON format.

Param

Type

Description

columnsMap

Object

A map of nodes containing columns to be transformed.

MappingTransform.addMappingsRestrictions(allMappings) ⇒ Array#

Adds restrictions to the mappings if both subject and object are classes and are different from each other. This function checks if the subject and object in a mapping are RDF classes, and if they are, it marks the mapping as a restriction.

Kind: static method of MappingTransform
Returns: Array - The modified array of mappings with restrictions added where applicable.

Param

Type

Description

allMappings

Array

The array of mappings to which restrictions will be added.

MappingTransform.copyKGcreatorMappings()#

Copies the KGcreator mappings from the textarea to the clipboard. It retrieves the current mappings as text from the UI and uses a common utility to copy the content to the clipboard.

Kind: static method of MappingTransform

MappingsDetails : Object#

MappingsDetails manages technical mappings (non structural mappings)

See: [Tutorial: Overview]{@tutorial overview}

MappingsDetails.transform : object#

The transform module handles operations related to transforming columns in the mapping model. It includes functions for displaying a dialog, creating prefix transformation functions, testing the transformation, and saving the transformation.

Kind: static namespace of MappingsDetails

transform.showTansformDialog([column]) ⇒ void#

Displays a dialog for transforming the selected column. If no column is provided, it defaults to the currently selected column.

Kind: static method of transform

Param

Type

Description

[column]

string

The column to transform (optional).

transform.createPrefixTransformFn() ⇒ void#

Creates a prefix transformation function and applies it to the selected column. The user is prompted to enter a prefix, and the function is generated accordingly.

Kind: static method of transform

transform.testTransform() ⇒ void#

Tests the transformation function by applying it to a sample mapping. It checks for any errors in the transformation code and then creates triples using the mapping.

Kind: static method of transform

MappingsDetails.showDetailsDialog([divId]) ⇒ void#

Displays the details dialog for mappings. If no table is selected, an alert is shown. Otherwise, it loads the details dialog HTML and activates the right panel in the UI. It also sets up the detailed mappings tree and graph, and binds the search input to search the mappings in the tree.

Kind: static method of MappingsDetails

Param

Type

Default

Description

[divId]

string

”&quot;mainDialogDiv&quot;”

The ID of the dialog div to display the details in. Default is “mainDialogDiv”.

MappingsDetails.showDetailedMappingsTree([column], [divId], [_options]) ⇒ void#

Displays the detailed mappings tree for the current table. It populates the tree with nodes and mappings related to the selected table and columns. The tree allows search and interaction with mapping nodes.

Kind: static method of MappingsDetails

Param

Type

Default

Description

[column]

Object

Optional column data to filter the tree by.

[divId]

string

”&quot;detailedMappings_jsTreeDiv&quot;”

The ID of the div to display the tree in. Default is “detailedMappings_jsTreeDiv”.

[_options]

Object

{}

Optional configuration options for the tree, such as context menu behavior.

[_options.withoutContextMenu]

boolean

false

If true, disables the context menu.

[_options.searchPlugin]

boolean

true

Enables or disables the search plugin.

[_options.openAll]

boolean

true

If true, expands all nodes by default.

[_options.selectTreeNodeFn]

function

Callback function for when a tree node is selected.

MappingsDetails.saveMappingsDetailsToVisjsGraph(columnId) ⇒ void#

Saves the mapping details to the Vis.js graph for a specific column. It updates the column’s URI type, RDF type, and rdfs:label based on the user’s selection, then saves the updated data to the graph and triggers any necessary transformations.

Kind: static method of MappingsDetails

Param

Type

Description

columnId

string

The ID of the column whose mapping details are to be saved.

MappingsDetails.deleteMappingInVisjsNode(treeNode) ⇒ void#

Deletes a specific mapping from the Vis.js graph node. It identifies the mapping based on the node’s ID and removes the corresponding property or predicate from the node’s data. After deletion, the tree is updated and the graph is re-rendered.

Kind: static method of MappingsDetails

Param

Type

Description

treeNode

Object

The tree node representing the mapping to be deleted.

MappingsDetails.showSpecificMappingsBot(columnId) ⇒ void#

Displays a button for configuring specific mappings for a column. The button initiates a workflow that allows the user to add various predicates (rdf:type, rdfs:subClassOf, non-object properties) to the column’s data in the graph. The changes are applied and saved to the graph upon completion of the workflow.

Kind: static method of MappingsDetails

Param

Type

Description

columnId

string

The ID of the column for which the specific mappings are to be configured.

MappingsDetails.onSelectTreeNode(event, obj) ⇒ void#

Handles the selection of a tree node and displays the corresponding column’s technical details. If the selected node is a column node, it opens the column technical mappings dialog.

Kind: static method of MappingsDetails

Param

Type

Description

event

Object

The event object triggered by the tree node selection.

obj

Object

The selected tree node object containing node details.

MappingsDetails.drawDetailedMappingsGraph([column]) ⇒ void#

Draws a detailed mappings graph based on the column’s mappings. It visualizes the mappings in a graph format, with nodes representing the columns and edges representing the relationships between them. Optionally filters the graph to a specific column if provided.

Kind: static method of MappingsDetails

Param

Type

Description

[column]

string

The column to filter the mappings by (optional).

MappingsDetails.onDetailedMappingsGraphClick(obj, event, options) ⇒ void#

Handles the click event on the detailed mappings graph. Currently, it serves as a placeholder function for handling interactions with the graph.

Kind: static method of MappingsDetails

Param

Type

Description

obj

Object

The clicked object details from the graph.

event

Object

The event object triggered by the click.

options

Object

Additional options for handling the click event.

MappingsDetails.getColumnType(nodeId) ⇒ string | null#

Retrieves the RDF type of a column based on its connected edges in the graph. Searches through the edges to find the rdf:type and returns the type if it’s a valid URI.

Kind: static method of MappingsDetails
Returns: string | null - - The RDF type of the column if found, otherwise null.

Param

Type

Description

nodeId

string

The ID of the node whose type is to be retrieved.

TripleFactory#

The TripleFactory module handles the creation, filtering, and writing of RDF triples. It includes functions for generating sample triples, creating all mappings triples, and indexing the graph.

See: [Tutorial: Overview]{@tutorial overview}

TripleFactory.showTripleSample()#

Displays a dialog with sample triples for the current table. It checks if the current table is valid before proceeding to show the sample triples.

Kind: static method of TripleFactory

TripleFactory.writeTriples()#

Writes the RDF triples for the current table after filtering them based on the user-defined criteria. It checks if the current table is valid before proceeding to write the triples.

Kind: static method of TripleFactory

TripleFactory.createAllMappingsTriples()#

Creates all RDF mappings triples using the KGcreator_run module.

Kind: static method of TripleFactory

TripleFactory.indexGraph()#

Indexes the RDF graph using the KGcreator_run module.

Kind: static method of TripleFactory

TripleFactory.showFilterMappingDialog(isSample)#

Displays a dialog for filtering mappings, allowing the user to choose between sample and actual triples. The dialog is populated with a tree view of detailed mappings that can be filtered by the user.

Kind: static method of TripleFactory

Param

Type

Description

isSample

boolean

If true, the dialog is for displaying sample mappings; if false, for writing actual triples.

TripleFactory.runSlsFilteredMappings()#

Runs the filtered mappings for the SLS (Semantic Linked Set) based on the selected nodes in the tree view. It filters and creates unique mappings by checking the selected attributes and mapping nodes.

Kind: static method of TripleFactory

TripleFactory.checkCurrentTable() ⇒ boolean#

Checks if the current table is valid and if its mappings details are loaded. Prompts the user to select a table or load the mappings details if they are not available.

Kind: static method of TripleFactory
Returns: boolean - - Returns true if the current table is valid and its mappings details are loaded, otherwise false.

TripleFactory.deleteTriples(all, [callback])#

Deletes triples created by KGCreator from the datasource. Confirms with the user before deleting triples, and sends a DELETE request to the API.

Kind: static method of TripleFactory

Param

Type

Description

all

boolean

Indicates whether to delete all triples or just for the current table.

[callback]

function

A callback function to be executed after the deletion process.

TripleFactory.createTriples(sampleData, table, [options], callback)#

Creates triples for a given table using the selected mappings. Confirms with the user before creating triples, and sends a POST request to the API.

Kind: static method of TripleFactory

Param

Type

Default

Description

sampleData

boolean

Indicates whether to create sample data triples or full triples.

table

string

The table for which to create triples.

[options]

Object

Options for creating triples, such as sample size and filter options.

[options.deleteOldGraph]

boolean

false

If true, deletes the existing graph before creating new triples.

[options.sampleSize]

number

500

The number of sample triples to create if sampleData is true.

[options.clientSocketId]

string

The client socket ID for real-time updates.

[options.mappingsFilter]

Object

Filters for selecting specific mappings.

[options.filteredMappings]

Object

Alternative mapping filter.

[options.deleteTriples]

boolean

false

If true, deletes existing triples before creation.

callback

function

A callback function to be executed after the triples creation process.

TripleFactory.createAllMappingsTriples()#

Generates KGcreator triples for the entire datasource, deleting any previous triples before creating new ones. It proceeds with a series of steps: deleting old triples, creating new triples, and reindexing the graph.

Kind: static method of TripleFactory

TripleFactory.showTriplesInDataTable(data, div)#

Displays the triples data in a table format within the specified div element. The table includes columns for subject, predicate, and object, and the data is escaped to prevent HTML injection.

Kind: static method of TripleFactory

Param

Type

Description

data

Array

The triples data to display, each item should contain ‘s’, ‘p’, and ‘o’ properties.

div

string

The ID of the div element where the table should be displayed.

UIcontroller#

UIcontroller module manages the display of panels in the mapping modeler interface, handling tab activation and panel visibility for data sources, column mappings, technical mappings, and triples.

See: [Tutorial: Overview]{@tutorial overview}

UIcontroller.onActivateLeftPanelTab(tabId)#

Handles the activation of left panel tabs in the UI based on the provided tab ID. It shows or hides the corresponding panels based on the selected tab.

Kind: static method of UIcontroller

Param

Type

Description

tabId

string

The ID of the tab to activate.

UIcontroller.switchLeftPanel(target)#

Switches the active left panel tab to the target tab. It also performs necessary UI updates based on the target tab, such as loading columns or technical mappings.

Kind: static method of UIcontroller

Param

Type

Description

target

string

The name of the target tab to activate.

UIcontroller.activateRightPanel(PanelLabel)#

Activates the specified right panel based on the provided panel label. It controls the visibility of different right panels like “Data Sources”, “Column Mappings”, and “Technical Mappings”.

Kind: static method of UIcontroller

Param

Type

Description

PanelLabel

string

The label of the right panel to activate.

saveVisjsModelGraph([callback])#

Saves the current Vis.js graph model.

Kind: global function

Param

Type

Description

[callback]

function

Callback function called after saving