shaclapi.multiprocessing.functions module#

class shaclapi.multiprocessing.functions.ValReport(value)[source]#

Bases: IntEnum

An enumeration.

SHAPE = 0#
IS_VALID = 1#
REASON = 2#
shaclapi.multiprocessing.functions.mp_post_processing(joined_result_queue, output_queue, timestamp_queue, variables, target_shape, target_var, collect_all_results=False)[source]#

The post-processing collects all the bindings belonging to a SPARQL result mapping.

Example

Joined Result Queue (input):

{‘instance’: ‘http://example.org/testGraph3b#nodeA_0’, ‘validation’: (‘ShapeA’, True, ‘unbound’), ‘var’: ‘x’, ‘id’: 0},… {‘instance’: ‘literal’, ‘validation’: None, ‘var’: ‘lit’, ‘id’: 0} <– without validation result, produced by the xgoptional.

Output:

[{‘instance’: ‘http://example.org/testGraph3b#nodeA_0’, ‘validation’: (‘ShapeA’, True, ‘unbound’), ‘var’: ‘x’}, {‘var’: ‘lit’, ‘instance’: ‘literal’}], …

shaclapi.multiprocessing.functions.mp_validate(out_queue, config, query, result_transmitter)[source]#

Function to be executed with Runner to run the validation process of the backend.

shaclapi.multiprocessing.functions.mp_xjoin(left, right, out_queue, config)[source]#

Function to be executed with Runner to join the instances of the left with the right queue.

shaclapi.multiprocessing.functions.mp_output_completion(input_queue, output_queue, query, target_shape, is_test_output=False)[source]#