maplib 0.19.10__tar.gz → 0.19.11__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {maplib-0.19.10 → maplib-0.19.11}/Cargo.lock +1 -1
- {maplib-0.19.10 → maplib-0.19.11}/PKG-INFO +1 -1
- {maplib-0.19.10 → maplib-0.19.11}/lib/maplib/src/model.rs +42 -5
- {maplib-0.19.10 → maplib-0.19.11}/lib/representation/src/constants.rs +4 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/shacl/src/lib.rs +27 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/map_json.rs +61 -91
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/triples_write/pretty_turtle.rs +346 -77
- {maplib-0.19.10 → maplib-0.19.11}/maplib/__init__.pyi +1 -3
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/Cargo.toml +1 -1
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/maplib/__init__.pyi +1 -3
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/src/lib.rs +18 -10
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/test_json.py +52 -59
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/test_pretty_turtle.py +3 -3
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/testdata/read_lists.ttl +2 -0
- {maplib-0.19.10 → maplib-0.19.11}/Cargo.toml +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/LICENSE +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/README.md +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/cimxml/Cargo.toml +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/cimxml/src/export.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/cimxml/src/lib.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/datalog/Cargo.toml +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/datalog/src/ast.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/datalog/src/inference.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/datalog/src/lib.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/datalog/src/parser.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/datalog/src/python.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/file_io/Cargo.toml +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/file_io/src/lib.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/fts/Cargo.toml +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/fts/src/lib.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/maplib/Cargo.toml +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/maplib/src/errors.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/maplib/src/lib.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/maplib/src/model/constant_terms.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/maplib/src/model/default.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/maplib/src/model/errors.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/maplib/src/model/expansion/validation.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/maplib/src/model/expansion.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/pydf_io/Cargo.toml +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/pydf_io/LICENSE +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/pydf_io/README.md +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/pydf_io/licensing/POLARS_LICENSE +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/pydf_io/src/lib.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/pydf_io/src/to_python.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/pydf_io/src/to_rust.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/query_processing/Cargo.toml +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/query_processing/LICENSE +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/query_processing/README.md +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/query_processing/src/aggregates.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/query_processing/src/cats.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/query_processing/src/constants.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/query_processing/src/errors.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/query_processing/src/exists_helper.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/query_processing/src/expressions/comparisons.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/query_processing/src/expressions/functions.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/query_processing/src/expressions/operations.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/query_processing/src/expressions.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/query_processing/src/find_query_variables.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/query_processing/src/graph_patterns/cats.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/query_processing/src/graph_patterns/group.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/query_processing/src/graph_patterns/join.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/query_processing/src/graph_patterns/order.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/query_processing/src/graph_patterns/union.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/query_processing/src/graph_patterns/values.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/query_processing/src/graph_patterns.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/query_processing/src/lib.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/query_processing/src/pushdowns.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/query_processing/src/type_constraints.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/report_mapping/Cargo.toml +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/report_mapping/src/lib.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/representation/Cargo.toml +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/representation/LICENSE +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/representation/README.md +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/representation/src/base_rdf_type.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/representation/src/cats/decode.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/representation/src/cats/encode.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/representation/src/cats/globalize.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/representation/src/cats/image.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/representation/src/cats/maps/in_memory.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/representation/src/cats/maps/on_disk.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/representation/src/cats/maps.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/representation/src/cats/re_encode.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/representation/src/cats.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/representation/src/dataset.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/representation/src/debug.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/representation/src/errors.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/representation/src/formatting.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/representation/src/lib.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/representation/src/literals.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/representation/src/multitype.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/representation/src/polars_to_rdf.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/representation/src/prefixes.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/representation/src/python.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/representation/src/query_context.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/representation/src/rdf_state.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/representation/src/rdf_to_polars.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/representation/src/rdf_type.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/representation/src/solution_mapping.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/representation/src/subtypes.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/shacl/Cargo.toml +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/shacl/src/errors.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/shacl/src/storage.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/spargebra/Cargo.toml +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/spargebra/LICENSE +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/spargebra/README.md +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/spargebra/src/algebra.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/spargebra/src/lib.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/spargebra/src/parser.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/spargebra/src/query.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/spargebra/src/query_context.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/spargebra/src/remove_sugar.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/spargebra/src/term.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/spargebra/src/treehouse.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/spargebra/src/update.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/templates/Cargo.toml +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/templates/src/ast.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/templates/src/compatible.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/templates/src/dataset/errors.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/templates/src/dataset.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/templates/src/document.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/templates/src/lib.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/templates/src/parsing.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/templates/src/python/owl.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/templates/src/python/rdf.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/templates/src/python/rdfs.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/templates/src/python/xsd.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/templates/src/python.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/templates/src/subtypes_ext.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/Cargo.toml +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/cats.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/dblf.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/errors.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/io_funcs.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/lib.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/native_parquet_write.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/query_solutions.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/rdfs_inferencing.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/sparql/debug.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/sparql/delete.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/sparql/errors.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/sparql/insert.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/sparql/lazy_aggregate.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/sparql/lazy_expressions.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/sparql/lazy_graph_patterns/distinct.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/sparql/lazy_graph_patterns/extend.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/sparql/lazy_graph_patterns/filter.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/sparql/lazy_graph_patterns/graph.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/sparql/lazy_graph_patterns/group.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/sparql/lazy_graph_patterns/join.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/sparql/lazy_graph_patterns/left_join.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/sparql/lazy_graph_patterns/minus.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/sparql/lazy_graph_patterns/order_by.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/sparql/lazy_graph_patterns/path.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/sparql/lazy_graph_patterns/project.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/sparql/lazy_graph_patterns/pvalues.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/sparql/lazy_graph_patterns/triple.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/sparql/lazy_graph_patterns/triples_ordering.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/sparql/lazy_graph_patterns/union.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/sparql/lazy_graph_patterns/values.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/sparql/lazy_graph_patterns.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/sparql/lazy_order.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/sparql/rewrite/rewrite_cse.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/sparql/rewrite/rewrite_pushdown.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/sparql/rewrite.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/sparql.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/storage/deduplication.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/storage/so_index.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/storage.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/triples_read.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/triples_write/fast_ntriples.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/triples_write/serializers.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/triplestore/src/triples_write.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/utils/Cargo.toml +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/utils/src/lib.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/lib/utils/src/polars.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/maplib/__init__.py +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/maplib/adding_triples.py +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/maplib/py.typed +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/maplib/template_generator/__init__.py +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/maplib/template_generator/generate.py +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/maplib/template_generator/ordering.py +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/LICENSE +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/README.md +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/maplib/.gitignore +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/maplib/__init__.py +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/maplib/adding_triples.py +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/maplib/py.typed +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/maplib/template_generator/__init__.py +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/maplib/template_generator/generate.py +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/maplib/template_generator/ordering.py +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/src/error.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/src/shacl.rs +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/.gitignore +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/__init__.py +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/out.ttl +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/requirements.txt +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/test_basics.py +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/test_blank_nodes_multi.py +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/test_data_validation.py +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/test_exceptions.py +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/test_integration.py +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/test_multi_expressions.py +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/test_named_graphs.py +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/test_pizza_example.py +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/test_programmatic_pizza_example.py +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/test_rdf_parser.py +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/test_read_write.py +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/test_stottr.py +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/test_validate_iris.py +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/testdata/expected_easy_case.ttl +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/testdata/iterated_property_path_constant_object_query.csv +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/testdata/iterated_property_path_constant_subject_query.csv +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/testdata/iterated_property_path_query.csv +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/testdata/iterated_property_path_query_with_bug.csv +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/testdata/jsons/1.json +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/testdata/jsons/2.json +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/testdata/jsons/3.json +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/testdata/larger_ordered_query.csv +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/testdata/larger_query.csv +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/testdata/multi_concat.csv +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/testdata/multi_datatype_join_query.csv +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/testdata/multi_datatype_join_query_two_vars.csv +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/testdata/multi_datatype_leftjoin_query.csv +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/testdata/multi_datatype_query.csv +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/testdata/multi_datatype_query_sorting.csv +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/testdata/multi_datatype_union_query.csv +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/testdata/multi_datatype_union_query_native_df.parquet +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/testdata/multi_datatype_union_sort_desc1_query.csv +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/testdata/multi_datatype_union_sort_query.csv +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/testdata/multi_many_comp.csv +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/testdata/property_path_query.csv +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/testdata/rdf_parser/date_panic.nt +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/testdata/read_ntriples.csv +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/testdata/read_ntriples.nt +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/testdata/read_ntriples2.csv +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/testdata/simple_construct_query_nothing.csv +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/testdata/simple_construct_query_something.csv +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/testdata/simple_insert_query_nothing.csv +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/testdata/simple_insert_query_something.csv +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/testdata/simple_property_path_query.csv +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/testdata/simple_query.csv +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/testdata/stringfuncs.csv +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/testdata/templates.ttl +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/py_maplib/tests/testdata/write_turtle_newlines_bug.nt +0 -0
- {maplib-0.19.10 → maplib-0.19.11}/pyproject.toml +0 -0
|
@@ -13,7 +13,7 @@ use oxrdfio::RdfFormat;
|
|
|
13
13
|
use polars::prelude::DataFrame;
|
|
14
14
|
use representation::solution_mapping::EagerSolutionMappings;
|
|
15
15
|
use representation::RDFNodeState;
|
|
16
|
-
use shacl::{validate, ValidationReport};
|
|
16
|
+
use shacl::{infer_shacl, validate, ShaclInferenceResult, ValidationReport};
|
|
17
17
|
use std::collections::HashMap;
|
|
18
18
|
use std::fs;
|
|
19
19
|
use std::io::Write;
|
|
@@ -27,6 +27,7 @@ use triplestore::sparql::{QueryResult, QuerySettings, UpdateResult};
|
|
|
27
27
|
use triplestore::{IndexingOptions, NewTriples, Triplestore};
|
|
28
28
|
|
|
29
29
|
use datalog::ast::DatalogRuleset;
|
|
30
|
+
use representation::constants::{FX_PREFIX, FX_PREFIX_IRI, XYZ_PREFIX, XYZ_PREFIX_IRI};
|
|
30
31
|
use representation::dataset::NamedGraph;
|
|
31
32
|
use representation::prefixes::get_default_prefixes;
|
|
32
33
|
use tracing::instrument;
|
|
@@ -173,15 +174,15 @@ impl Model {
|
|
|
173
174
|
pub fn map_json_path(
|
|
174
175
|
&mut self,
|
|
175
176
|
path: &Path,
|
|
176
|
-
prefix: &NamedNode,
|
|
177
177
|
graph: &NamedGraph,
|
|
178
178
|
transient: bool,
|
|
179
179
|
) -> Result<(), MaplibError> {
|
|
180
|
+
self.add_json_prefixes();
|
|
180
181
|
let mut u8s =
|
|
181
182
|
fs::read(path).map_err(|x| TriplestoreError::ReadJSONFileError(x.to_string()))?;
|
|
182
183
|
|
|
183
184
|
self.triplestore
|
|
184
|
-
.map_json(&mut u8s,
|
|
185
|
+
.map_json(&mut u8s, graph, transient)
|
|
185
186
|
.map_err(MaplibError::TriplestoreError)
|
|
186
187
|
}
|
|
187
188
|
|
|
@@ -189,14 +190,14 @@ impl Model {
|
|
|
189
190
|
pub fn map_json_string(
|
|
190
191
|
&mut self,
|
|
191
192
|
mut p: String,
|
|
192
|
-
prefix: &NamedNode,
|
|
193
193
|
graph: &NamedGraph,
|
|
194
194
|
transient: bool,
|
|
195
195
|
) -> Result<(), MaplibError> {
|
|
196
|
+
self.add_json_prefixes();
|
|
196
197
|
//Safety: we are never reading this vec back to a string
|
|
197
198
|
let u8s = unsafe { p.as_mut_vec() };
|
|
198
199
|
self.triplestore
|
|
199
|
-
.map_json(u8s,
|
|
200
|
+
.map_json(u8s, graph, transient)
|
|
200
201
|
.map_err(MaplibError::TriplestoreError)
|
|
201
202
|
}
|
|
202
203
|
|
|
@@ -524,6 +525,31 @@ impl Model {
|
|
|
524
525
|
Ok(res.map_err(|x| MaplibError::DatalogError(x))?)
|
|
525
526
|
}
|
|
526
527
|
|
|
528
|
+
pub fn infer_shacl(
|
|
529
|
+
&mut self,
|
|
530
|
+
data_graph: &NamedGraph,
|
|
531
|
+
shape_graph: &NamedGraph,
|
|
532
|
+
streaming: bool,
|
|
533
|
+
include_transient: bool,
|
|
534
|
+
max_iterations: Option<usize>,
|
|
535
|
+
max_results: Option<usize>,
|
|
536
|
+
max_rows: Option<usize>,
|
|
537
|
+
debug_no_results: bool,
|
|
538
|
+
) -> Result<ShaclInferenceResult, MaplibError> {
|
|
539
|
+
let res = infer_shacl(
|
|
540
|
+
&mut self.triplestore,
|
|
541
|
+
data_graph,
|
|
542
|
+
shape_graph,
|
|
543
|
+
streaming,
|
|
544
|
+
max_iterations,
|
|
545
|
+
max_results,
|
|
546
|
+
include_transient,
|
|
547
|
+
max_rows,
|
|
548
|
+
debug_no_results,
|
|
549
|
+
);
|
|
550
|
+
Ok(res.map_err(|x| MaplibError::ShaclError(x))?)
|
|
551
|
+
}
|
|
552
|
+
|
|
527
553
|
pub fn detach_graph(
|
|
528
554
|
&mut self,
|
|
529
555
|
graph: &NamedGraph,
|
|
@@ -539,4 +565,15 @@ impl Model {
|
|
|
539
565
|
prefixes: self.prefixes.clone(),
|
|
540
566
|
})
|
|
541
567
|
}
|
|
568
|
+
|
|
569
|
+
fn add_json_prefixes(&mut self) {
|
|
570
|
+
self.prefixes.insert(
|
|
571
|
+
XYZ_PREFIX.to_string(),
|
|
572
|
+
NamedNode::new_unchecked(XYZ_PREFIX_IRI),
|
|
573
|
+
);
|
|
574
|
+
self.prefixes.insert(
|
|
575
|
+
FX_PREFIX.to_string(),
|
|
576
|
+
NamedNode::new_unchecked(FX_PREFIX_IRI),
|
|
577
|
+
);
|
|
578
|
+
}
|
|
542
579
|
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
pub const LANG_LANG_FIELD_ALT_NAME: &str = "language";
|
|
2
2
|
pub const LANG_VALUE_FIELD_ALT_NAME: &str = "value";
|
|
3
3
|
|
|
4
|
+
pub const XYZ_PREFIX: &str = "xyz";
|
|
5
|
+
pub const XYZ_PREFIX_IRI: &str = "http://sparql.xyz/facade-x/data/";
|
|
6
|
+
pub const FX_PREFIX: &str = "fx";
|
|
7
|
+
pub const FX_PREFIX_IRI: &str = "http://sparql.xyz/facade-x/ns/";
|
|
4
8
|
pub const OTTR_TRIPLE: &str = "http://ns.ottr.xyz/0.4/Triple";
|
|
5
9
|
pub const OTTR_PREFIX: &str = "ottr";
|
|
6
10
|
pub const OTTR_PREFIX_IRI: &str = "http://ns.ottr.xyz/0.4/";
|
|
@@ -7,12 +7,24 @@ use oxrdf::{NamedNode, NamedOrBlankNode};
|
|
|
7
7
|
use polars::prelude::DataFrame;
|
|
8
8
|
use representation::solution_mapping::SolutionMappings;
|
|
9
9
|
use std::collections::HashMap;
|
|
10
|
+
use std::fmt::Display;
|
|
10
11
|
use std::time::Duration;
|
|
11
12
|
use triplestore::Triplestore;
|
|
12
13
|
|
|
13
14
|
use representation::cats::LockedCats;
|
|
14
15
|
use representation::dataset::NamedGraph;
|
|
15
16
|
|
|
17
|
+
#[derive(Clone)]
|
|
18
|
+
pub struct ShaclInferenceResult {
|
|
19
|
+
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
impl Display for ShaclInferenceResult {
|
|
23
|
+
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
|
24
|
+
Ok(())
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
16
28
|
#[derive(Debug, Clone)]
|
|
17
29
|
pub struct ShapeTargets {
|
|
18
30
|
pub shape_node: NamedOrBlankNode,
|
|
@@ -72,3 +84,18 @@ pub fn validate(
|
|
|
72
84
|
) -> Result<ValidationReport, ShaclError> {
|
|
73
85
|
unimplemented!("Contact Data Treehouse to try")
|
|
74
86
|
}
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
pub fn infer_shacl(
|
|
90
|
+
_triplestore: &mut Triplestore,
|
|
91
|
+
_data_graph: &NamedGraph,
|
|
92
|
+
_shapes_graph: &NamedGraph,
|
|
93
|
+
_streaming: bool,
|
|
94
|
+
_max_iterations: Option<usize>,
|
|
95
|
+
_max_results: Option<usize>,
|
|
96
|
+
_include_transient: bool,
|
|
97
|
+
_max_rows: Option<usize>,
|
|
98
|
+
_debug_no_results: bool,
|
|
99
|
+
) -> Result<ShaclInferenceResult, ShaclError> {
|
|
100
|
+
unimplemented!("Contact Data Treehouse to try")
|
|
101
|
+
}
|
|
@@ -12,6 +12,8 @@ use oxrdf::vocab::{rdf, xsd};
|
|
|
12
12
|
use oxrdf::NamedNode;
|
|
13
13
|
use polars::prelude::PlSmallStr;
|
|
14
14
|
use polars_core::prelude::{AnyValue, Column, DataFrame};
|
|
15
|
+
use query_processing::expressions::named_node;
|
|
16
|
+
use representation::constants::RDF_PREFIX_IRI;
|
|
15
17
|
use representation::dataset::NamedGraph;
|
|
16
18
|
use representation::{BaseRDFNodeType, OBJECT_COL_NAME, SUBJECT_COL_NAME};
|
|
17
19
|
use serde_json::Value;
|
|
@@ -25,18 +27,12 @@ const FLOAT: u8 = 3;
|
|
|
25
27
|
const BLANK: u8 = 4;
|
|
26
28
|
const IRI: u8 = 5;
|
|
27
29
|
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
const JSON_NODE: &str = "urn:maplib_json:Node";
|
|
31
|
-
const JSON_ARRAY: &str = "urn:maplib_json:Array";
|
|
32
|
-
const JSON_ARRAY_ELEMENT: &str = "urn:maplib_json:ArrayElement";
|
|
33
|
-
const JSON_ELEMENT_PROPERTY: &str = "urn:maplib_json:element";
|
|
34
|
-
const JSON_ELEMENT_SEQUENCE: &str = "urn:maplib_json:sequence";
|
|
35
|
-
const JSON_ELEMENT_VALUE: &str = "urn:maplib_json:value";
|
|
30
|
+
const JSON_ROOT: &str = "http://sparql.xyz/facade-x/ns/root";
|
|
31
|
+
const JSON_NULL: &str = "http://sparql.xyz/facade-x/ns/null";
|
|
36
32
|
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
const
|
|
33
|
+
const DEFAULT_JSON_KEYS_PREFIX: &str = "http://sparql.xyz/facade-x/data/";
|
|
34
|
+
|
|
35
|
+
const ROOT_ELEMENT_PROPERTY: &str = "urn:maplib_json:rootElement";
|
|
40
36
|
|
|
41
37
|
struct TripleTableBuilder<'a> {
|
|
42
38
|
map: HashMap<(u8, u8), TypedSubjectObjectBuilder<'a>>,
|
|
@@ -178,45 +174,28 @@ impl Triplestore {
|
|
|
178
174
|
pub fn map_json(
|
|
179
175
|
&mut self,
|
|
180
176
|
u8s: &mut Vec<u8>,
|
|
181
|
-
prefix: &NamedNode,
|
|
182
177
|
named_graph: &NamedGraph,
|
|
183
178
|
transient: bool,
|
|
184
179
|
) -> Result<(), TriplestoreError> {
|
|
185
|
-
NamedNode::
|
|
186
|
-
.map_err(|_| TriplestoreError::InvalidPrefixIRI(prefix.as_str().to_string()))?;
|
|
187
|
-
|
|
180
|
+
let prefix = NamedNode::new_unchecked(DEFAULT_JSON_KEYS_PREFIX);
|
|
188
181
|
let v: Value = simd_json::serde::from_slice(u8s).unwrap();
|
|
189
182
|
|
|
190
183
|
let mut pred_map = HashMap::new();
|
|
191
184
|
let rdf_type = rdf::TYPE.into_owned();
|
|
192
185
|
pred_map.insert(rdf_type.clone(), TripleTableBuilder::new());
|
|
193
186
|
|
|
194
|
-
let doc_subject =
|
|
195
|
-
|
|
196
|
-
let json_contains = NamedNode::new_unchecked(JSON_CONTAINS);
|
|
197
|
-
pred_map.insert(json_contains.clone(), TripleTableBuilder::new());
|
|
187
|
+
let doc_subject = new_blank_typed_subject(JSON_ROOT, &rdf_type, &mut pred_map);
|
|
198
188
|
|
|
199
|
-
let
|
|
200
|
-
pred_map.insert(
|
|
201
|
-
let sequence_property = NamedNode::new_unchecked(JSON_ELEMENT_SEQUENCE);
|
|
202
|
-
pred_map.insert(sequence_property.clone(), TripleTableBuilder::new());
|
|
203
|
-
let value_property = NamedNode::new_unchecked(JSON_ELEMENT_VALUE);
|
|
204
|
-
pred_map.insert(value_property.clone(), TripleTableBuilder::new());
|
|
205
|
-
|
|
206
|
-
pred_map.insert(
|
|
207
|
-
NamedNode::new_unchecked(JSON_KEY_STRING),
|
|
208
|
-
TripleTableBuilder::new(),
|
|
209
|
-
);
|
|
189
|
+
let root_elem_property = NamedNode::new_unchecked(ROOT_ELEMENT_PROPERTY);
|
|
190
|
+
pred_map.insert(root_elem_property.clone(), TripleTableBuilder::new());
|
|
210
191
|
|
|
211
192
|
process_value(
|
|
212
193
|
&doc_subject,
|
|
213
|
-
|
|
214
|
-
prefix,
|
|
194
|
+
None,
|
|
195
|
+
&prefix,
|
|
215
196
|
v,
|
|
216
197
|
&rdf_type,
|
|
217
|
-
&
|
|
218
|
-
&sequence_property,
|
|
219
|
-
&value_property,
|
|
198
|
+
&root_elem_property,
|
|
220
199
|
&mut pred_map,
|
|
221
200
|
);
|
|
222
201
|
let mut triples_to_add = Vec::new();
|
|
@@ -252,22 +231,20 @@ impl Triplestore {
|
|
|
252
231
|
|
|
253
232
|
fn process_value(
|
|
254
233
|
subject: &str,
|
|
255
|
-
property:
|
|
234
|
+
property: Option<&NamedNode>,
|
|
256
235
|
prefix: &NamedNode,
|
|
257
236
|
value: Value,
|
|
258
237
|
rdf_type: &NamedNode,
|
|
259
|
-
|
|
260
|
-
sequence_property: &NamedNode,
|
|
261
|
-
value_property: &NamedNode,
|
|
238
|
+
root_elem_property: &NamedNode,
|
|
262
239
|
map: &mut HashMap<NamedNode, TripleTableBuilder>,
|
|
263
240
|
) {
|
|
264
241
|
match value {
|
|
265
242
|
Value::Bool(b) => {
|
|
266
|
-
let builder = map.get_mut(property).unwrap();
|
|
243
|
+
let builder = map.get_mut(property.unwrap_or(root_elem_property)).unwrap();
|
|
267
244
|
builder.push_blank_bool(subject, b);
|
|
268
245
|
}
|
|
269
246
|
Value::Number(num) => {
|
|
270
|
-
let builder = map.get_mut(property).unwrap();
|
|
247
|
+
let builder = map.get_mut(property.unwrap_or(root_elem_property)).unwrap();
|
|
271
248
|
if let Some(i) = num.as_i64() {
|
|
272
249
|
builder.push_blank_int(subject, i);
|
|
273
250
|
} else if let Some(f) = num.as_f64() {
|
|
@@ -277,63 +254,57 @@ fn process_value(
|
|
|
277
254
|
}
|
|
278
255
|
}
|
|
279
256
|
Value::String(s) => {
|
|
280
|
-
let builder = map.get_mut(property).unwrap();
|
|
257
|
+
let builder = map.get_mut(property.unwrap_or(root_elem_property)).unwrap();
|
|
281
258
|
builder.push_blank_string(subject, s);
|
|
282
259
|
}
|
|
283
260
|
Value::Null => {
|
|
284
|
-
let builder = map.get_mut(property).unwrap();
|
|
261
|
+
let builder = map.get_mut(property.unwrap_or(root_elem_property)).unwrap();
|
|
285
262
|
builder.push_blank_iri(subject, JSON_NULL);
|
|
286
263
|
}
|
|
287
264
|
Value::Object(obj) => {
|
|
288
|
-
let new_subject =
|
|
289
|
-
|
|
290
|
-
|
|
265
|
+
let new_subject = if let Some(property) = property {
|
|
266
|
+
let new_subject = new_blank_subject();
|
|
267
|
+
let builder = map.get_mut(property).unwrap();
|
|
268
|
+
builder.push_blank_blank(subject, &new_subject);
|
|
269
|
+
new_subject
|
|
270
|
+
} else {
|
|
271
|
+
subject.to_string()
|
|
272
|
+
};
|
|
291
273
|
|
|
292
274
|
for (key, val) in obj {
|
|
293
|
-
let property =
|
|
275
|
+
let property = new_key_property(key, prefix, map);
|
|
294
276
|
process_value(
|
|
295
277
|
&new_subject,
|
|
296
|
-
&property,
|
|
278
|
+
Some(&property),
|
|
297
279
|
prefix,
|
|
298
280
|
val,
|
|
299
281
|
rdf_type,
|
|
300
|
-
|
|
301
|
-
sequence_property,
|
|
302
|
-
value_property,
|
|
282
|
+
root_elem_property,
|
|
303
283
|
map,
|
|
304
284
|
);
|
|
305
285
|
}
|
|
306
286
|
}
|
|
307
287
|
Value::Array(arr) => {
|
|
308
|
-
let array_subject =
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
.
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
let builder = map.get_mut(element_property).unwrap();
|
|
318
|
-
for element_subject in &element_subjects {
|
|
319
|
-
builder.push_blank_blank(&array_subject, &element_subject);
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
let builder = map.get_mut(sequence_property).unwrap();
|
|
323
|
-
for (i, element_subject) in element_subjects.iter().enumerate() {
|
|
324
|
-
builder.push_blank_int(&element_subject, i as i64);
|
|
325
|
-
}
|
|
288
|
+
let array_subject = if let Some(property) = property {
|
|
289
|
+
let array_subject = new_blank_subject();
|
|
290
|
+
let builder = map.get_mut(property).unwrap();
|
|
291
|
+
builder.push_blank_blank(subject, &array_subject);
|
|
292
|
+
array_subject
|
|
293
|
+
} else {
|
|
294
|
+
subject.to_string()
|
|
295
|
+
};
|
|
326
296
|
|
|
327
|
-
for (
|
|
297
|
+
for (i, value) in arr.into_iter().enumerate() {
|
|
298
|
+
let rdfi_property =
|
|
299
|
+
NamedNode::new(format!("{}_{}", RDF_PREFIX_IRI, i + 1)).unwrap();
|
|
300
|
+
add_new_property(&rdfi_property, map);
|
|
328
301
|
process_value(
|
|
329
|
-
&
|
|
330
|
-
|
|
302
|
+
&array_subject,
|
|
303
|
+
Some(&rdfi_property),
|
|
331
304
|
prefix,
|
|
332
305
|
value,
|
|
333
306
|
rdf_type,
|
|
334
|
-
|
|
335
|
-
sequence_property,
|
|
336
|
-
value_property,
|
|
307
|
+
root_elem_property,
|
|
337
308
|
map,
|
|
338
309
|
);
|
|
339
310
|
}
|
|
@@ -341,17 +312,22 @@ fn process_value(
|
|
|
341
312
|
}
|
|
342
313
|
}
|
|
343
314
|
|
|
344
|
-
fn
|
|
315
|
+
fn new_blank_typed_subject(
|
|
345
316
|
t: &str,
|
|
346
317
|
rdf_type: &NamedNode,
|
|
347
318
|
map: &mut HashMap<NamedNode, TripleTableBuilder>,
|
|
348
319
|
) -> String {
|
|
349
|
-
let bstr =
|
|
320
|
+
let bstr = new_blank_subject();
|
|
350
321
|
map.get_mut(rdf_type).unwrap().push_blank_iri(&bstr, t);
|
|
351
322
|
bstr
|
|
352
323
|
}
|
|
353
324
|
|
|
354
|
-
fn
|
|
325
|
+
fn new_blank_subject() -> String {
|
|
326
|
+
let bstr = format!("b{}", uuid::Uuid::new_v4());
|
|
327
|
+
bstr
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
fn new_key_property(
|
|
355
331
|
key: String,
|
|
356
332
|
prefix: &NamedNode,
|
|
357
333
|
map: &mut HashMap<NamedNode, TripleTableBuilder>,
|
|
@@ -371,18 +347,12 @@ fn new_property(
|
|
|
371
347
|
}
|
|
372
348
|
let keep_key: String = keep_chars.into_iter().collect();
|
|
373
349
|
let key_nn = NamedNode::new(format!("{}{}", prefix.as_str(), keep_key)).unwrap();
|
|
374
|
-
|
|
375
|
-
{
|
|
376
|
-
let type_ttb = map.get_mut(&rdf::TYPE.into_owned()).unwrap();
|
|
377
|
-
type_ttb.push_iri_iri(key_nn.as_str(), JSON_KEY);
|
|
378
|
-
}
|
|
379
|
-
{
|
|
380
|
-
let s_ttb = map
|
|
381
|
-
.get_mut(&NamedNode::new_unchecked(JSON_KEY_STRING))
|
|
382
|
-
.unwrap();
|
|
383
|
-
s_ttb.push_iri_string(key_nn.as_str(), &key);
|
|
384
|
-
}
|
|
385
|
-
map.insert(key_nn.clone(), TripleTableBuilder::new());
|
|
386
|
-
}
|
|
350
|
+
add_new_property(&key_nn, map);
|
|
387
351
|
key_nn
|
|
388
352
|
}
|
|
353
|
+
|
|
354
|
+
fn add_new_property(property: &NamedNode, map: &mut HashMap<NamedNode, TripleTableBuilder>) {
|
|
355
|
+
if !map.contains_key(&property) {
|
|
356
|
+
map.insert(property.clone(), TripleTableBuilder::new());
|
|
357
|
+
}
|
|
358
|
+
}
|