shaclapi.config module#
- class shaclapi.config.Config(config_dict)[source]#
Bases:
object
- property query#
The query to be executed over the SPARQL endpoint.
- property external_endpoint#
The URL of the SPARQL endpoint, which contains the data to be validated and retrieved.
- property schema_directory#
The directory containing the shape files (.ttl or .json)
- property target_shape#
The target shape selected for the given query and the given shape schema.
- property config#
The path to a json formatted configuration file. Has to be absolute or relative w.r.t. run.py. The file can include all the properties in
shaclapi.config
as configuration options. The options which are specified in the HTTP POST - request will override the options configured in the configuration file.
- property save_outputs#
Whether to save the validation output of the backend to a file.
- property output_directory#
The directory which will be used by the SHACL engine and the shaclAPI to save the validation output and statistics to files (depending on the other configurations)
- property schema_format#
The format of the shape files. Can be JSON or SHACL
- property work_in_parallel#
Whether the SHACL engine should work in parallel
- property use_selective_queries#
Whether the SHACL engine should use more selective queries.
- property max_split_size#
The maximal number of entities in FILTER or VALUES clause of a SPARQL query, used by the SHACL engine.
- property order_by_in_queries#
Whether the SHACL engine should use queries with a ORDER BY clause.
- property backend#
The SHACL engine, which will be used by the shaclAPI. Can be ‘travshacl’ or ‘s2spy’.
- property traversal_strategy#
The traversal strategy used by the backend to reduce the shape graph and by the backend to find the execution order. Can be ‘DFS’ or ‘BFS’.
- property heuristic#
Only if Trav-SHACL is used as backend. The heuristic used to determine the validation order of the shapes.
- property replace_target_query#
Whether the shaclAPI should replace the target query of the target shape.
- property merge_old_target_query#
Whether the shaclAPI should merge the star shaped query with the given target query in the target shape file. If this option is inactive the target query of the target shape is basically replaced with the star shaped query.
- property start_with_target_shape#
Whether the SHACL engine is forced to start the validation process with the target shape.
- property start_shape_for_validation#
The shape which is used as starting point for the validation in the backend. It will override the start point determined by the SHACL engine (in case of Trav-SHACL) and only applies if
start_with_target_shape
is false).
- property remove_constraints#
Whether the shaclAPI should remove constraints of the target shape not mentioned in the query.
- property output_format#
Which output format the shaclAPI should use. This can be ‘test’ or ‘simple’.
- property memory_size#
Number of tuples, which can be stored in main memory during the join process.
- property prune_shape_network#
Whether prune the shape schema to the shapes reachable from the target shapes.
- property test_identifier#
The test identifier will be used in output files identifying the run.
- property run_in_serial#
This option can be turned on to force the steps of the shaclAPI to be executed in serial.
- property reasoning#
This option will turn reasoning in terms of extended output on and off.
- property use_pipes#
Whether to use pipes during the multiprocessing. Otherwise, the shaclAPI will use queues.
- property collect_all_validation_results#
Whether to collect all validation results for each mapping. Otherwise, at least one validation result is collected for each given target_shape. Collecting all results will make the approach blocking.
- property write_stats#
Whether to write statistics to the output directory.
- property query_extension_per_target_shape#
For each given target shape a query extension can be given. The given query is extended, when merged or replaced with the target definition of the target shape. The query is extended by replacing the last ‘}’ in the query with the extension followed by a ‘}’.