dsp-tools 17.0.0.post14__tar.gz → 17.0.0.post23__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.

Potentially problematic release.


This version of dsp-tools might be problematic. Click here for more details.

Files changed (266) hide show
  1. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/PKG-INFO +1 -1
  2. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/pyproject.toml +5 -2
  3. dsp_tools-17.0.0.post23/src/dsp_tools/clients/metadata_client.py +24 -0
  4. dsp_tools-17.0.0.post23/src/dsp_tools/clients/metadata_client_live.py +42 -0
  5. dsp_tools-17.0.0.post23/src/dsp_tools/clients/ontology_client.py +21 -0
  6. dsp_tools-17.0.0.post23/src/dsp_tools/clients/ontology_client_live.py +139 -0
  7. dsp_tools-17.0.0.post23/src/dsp_tools/commands/create/communicate_problems.py +19 -0
  8. dsp_tools-17.0.0.post23/src/dsp_tools/commands/create/constants.py +7 -0
  9. dsp_tools-17.0.0.post23/src/dsp_tools/commands/create/create_on_server/cardinalities.py +121 -0
  10. dsp_tools-17.0.0.post23/src/dsp_tools/commands/create/create_on_server/mappers.py +12 -0
  11. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/create/models/input_problems.py +11 -2
  12. dsp_tools-17.0.0.post23/src/dsp_tools/commands/create/models/rdf_ontology.py +19 -0
  13. dsp_tools-17.0.0.post23/src/dsp_tools/commands/create/models/server_project_info.py +25 -0
  14. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/create/parsing/parse_ontology.py +7 -7
  15. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/create/parsing/parse_project.py +1 -1
  16. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/create/parsing/parsing_utils.py +2 -2
  17. dsp_tools-17.0.0.post23/src/dsp_tools/commands/create/serialisation/ontology.py +41 -0
  18. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/project/create/project_create_all.py +35 -25
  19. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/project/create/project_create_ontologies.py +39 -89
  20. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/project/legacy_models/resourceclass.py +0 -33
  21. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/validate_data/models/api_responses.py +7 -0
  22. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/validate_data/models/validation.py +1 -0
  23. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/validate_data/prepare_data/make_data_graph.py +4 -1
  24. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/validate_data/prepare_data/prepare_data.py +32 -5
  25. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/validate_data/validate_data.py +1 -1
  26. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/validate_data/validation/get_validation_report.py +2 -1
  27. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/error/exceptions.py +4 -0
  28. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/utils/data_formats/iri_util.py +7 -0
  29. dsp_tools-17.0.0.post23/src/dsp_tools/utils/rdflib_utils.py +10 -0
  30. dsp_tools-17.0.0.post23/src/dsp_tools/xmllib/models/licenses/__init__.py +0 -0
  31. dsp_tools-17.0.0.post14/src/dsp_tools/commands/create/constants.py +0 -4
  32. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/docs/index.md +0 -0
  33. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/__init__.py +0 -0
  34. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/cli/__init__.py +0 -0
  35. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/cli/args.py +0 -0
  36. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/cli/call_action.py +0 -0
  37. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/cli/create_parsers.py +0 -0
  38. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/cli/entry_point.py +0 -0
  39. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/clients/__init__.py +0 -0
  40. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/clients/authentication_client.py +0 -0
  41. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/clients/authentication_client_live.py +0 -0
  42. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/clients/connection.py +0 -0
  43. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/clients/connection_live.py +0 -0
  44. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/clients/fuseki_metrics.py +0 -0
  45. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/clients/legal_info_client.py +0 -0
  46. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/clients/legal_info_client_live.py +0 -0
  47. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/__init__.py +0 -0
  48. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/create/__init__.py +0 -0
  49. {dsp_tools-17.0.0.post14/src/dsp_tools/commands/create/models → dsp_tools-17.0.0.post23/src/dsp_tools/commands/create/create_on_server}/__init__.py +0 -0
  50. {dsp_tools-17.0.0.post14/src/dsp_tools/commands/create/parsing → dsp_tools-17.0.0.post23/src/dsp_tools/commands/create/models}/__init__.py +0 -0
  51. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/create/models/parsed_ontology.py +0 -0
  52. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/create/models/parsed_project.py +0 -0
  53. {dsp_tools-17.0.0.post14/src/dsp_tools/commands/excel2json → dsp_tools-17.0.0.post23/src/dsp_tools/commands/create/parsing}/__init__.py +0 -0
  54. {dsp_tools-17.0.0.post14/src/dsp_tools/commands/excel2json/lists → dsp_tools-17.0.0.post23/src/dsp_tools/commands/create/serialisation}/__init__.py +0 -0
  55. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/excel2json/CLAUDE.md +0 -0
  56. {dsp_tools-17.0.0.post14/src/dsp_tools/commands/excel2json/lists/models → dsp_tools-17.0.0.post23/src/dsp_tools/commands/excel2json}/__init__.py +0 -0
  57. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/excel2json/json_header.py +0 -0
  58. {dsp_tools-17.0.0.post14/src/dsp_tools/commands/excel2json/models → dsp_tools-17.0.0.post23/src/dsp_tools/commands/excel2json/lists}/__init__.py +0 -0
  59. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/excel2json/lists/compliance_checks.py +0 -0
  60. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/excel2json/lists/make_lists.py +0 -0
  61. {dsp_tools-17.0.0.post14/src/dsp_tools/commands/ingest_xmlupload → dsp_tools-17.0.0.post23/src/dsp_tools/commands/excel2json/lists/models}/__init__.py +0 -0
  62. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/excel2json/lists/models/deserialise.py +0 -0
  63. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/excel2json/lists/models/input_error.py +0 -0
  64. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/excel2json/lists/models/serialise.py +0 -0
  65. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/excel2json/lists/utils.py +0 -0
  66. {dsp_tools-17.0.0.post14/src/dsp_tools/commands/ingest_xmlupload/create_resources → dsp_tools-17.0.0.post23/src/dsp_tools/commands/excel2json/models}/__init__.py +0 -0
  67. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/excel2json/models/input_error.py +0 -0
  68. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/excel2json/models/json_header.py +0 -0
  69. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/excel2json/models/list_node_name.py +0 -0
  70. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/excel2json/models/ontology.py +0 -0
  71. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/excel2json/old_lists.py +0 -0
  72. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/excel2json/project.py +0 -0
  73. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/excel2json/properties.py +0 -0
  74. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/excel2json/resources.py +0 -0
  75. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/excel2json/utils.py +0 -0
  76. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/excel2xml/__init__.py +0 -0
  77. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/excel2xml/excel2xml_cli.py +0 -0
  78. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/excel2xml/excel2xml_lib.py +0 -0
  79. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/excel2xml/propertyelement.py +0 -0
  80. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/id2iri.py +0 -0
  81. {dsp_tools-17.0.0.post14/src/dsp_tools/commands/ingest_xmlupload/ingest_files → dsp_tools-17.0.0.post23/src/dsp_tools/commands/ingest_xmlupload}/__init__.py +0 -0
  82. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/ingest_xmlupload/bulk_ingest_client.py +0 -0
  83. {dsp_tools-17.0.0.post14/src/dsp_tools/commands/ingest_xmlupload/upload_files → dsp_tools-17.0.0.post23/src/dsp_tools/commands/ingest_xmlupload/create_resources}/__init__.py +0 -0
  84. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/ingest_xmlupload/create_resources/apply_ingest_id.py +0 -0
  85. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/ingest_xmlupload/create_resources/upload_xml.py +0 -0
  86. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/ingest_xmlupload/create_resources/user_information.py +0 -0
  87. {dsp_tools-17.0.0.post14/src/dsp_tools/commands/project → dsp_tools-17.0.0.post23/src/dsp_tools/commands/ingest_xmlupload/ingest_files}/__init__.py +0 -0
  88. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/ingest_xmlupload/ingest_files/ingest_files.py +0 -0
  89. {dsp_tools-17.0.0.post14/src/dsp_tools/commands/project/create → dsp_tools-17.0.0.post23/src/dsp_tools/commands/ingest_xmlupload/upload_files}/__init__.py +0 -0
  90. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/ingest_xmlupload/upload_files/filechecker.py +0 -0
  91. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/ingest_xmlupload/upload_files/input_error.py +0 -0
  92. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/ingest_xmlupload/upload_files/upload_failures.py +0 -0
  93. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/ingest_xmlupload/upload_files/upload_files.py +0 -0
  94. {dsp_tools-17.0.0.post14/src/dsp_tools/commands/project/get → dsp_tools-17.0.0.post23/src/dsp_tools/commands/project}/__init__.py +0 -0
  95. {dsp_tools-17.0.0.post14/src/dsp_tools/commands/project/legacy_models → dsp_tools-17.0.0.post23/src/dsp_tools/commands/project/create}/__init__.py +0 -0
  96. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/project/create/parse_project.py +0 -0
  97. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/project/create/project_create_default_permissions.py +0 -0
  98. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/project/create/project_create_lists.py +0 -0
  99. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/project/create/project_validate.py +0 -0
  100. {dsp_tools-17.0.0.post14/src/dsp_tools/commands/project/models → dsp_tools-17.0.0.post23/src/dsp_tools/commands/project/get}/__init__.py +0 -0
  101. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/project/get/get.py +0 -0
  102. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/project/get/get_permissions.py +0 -0
  103. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/project/get/get_permissions_legacy.py +0 -0
  104. {dsp_tools-17.0.0.post14/src/dsp_tools/commands/resume_xmlupload → dsp_tools-17.0.0.post23/src/dsp_tools/commands/project/legacy_models}/__init__.py +0 -0
  105. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/project/legacy_models/context.py +0 -0
  106. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/project/legacy_models/group.py +0 -0
  107. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/project/legacy_models/helpers.py +0 -0
  108. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/project/legacy_models/listnode.py +0 -0
  109. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/project/legacy_models/model.py +0 -0
  110. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/project/legacy_models/ontology.py +0 -0
  111. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/project/legacy_models/project.py +0 -0
  112. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/project/legacy_models/propertyclass.py +0 -0
  113. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/project/legacy_models/user.py +0 -0
  114. {dsp_tools-17.0.0.post14/src/dsp_tools/commands/validate_data → dsp_tools-17.0.0.post23/src/dsp_tools/commands/project/models}/__init__.py +0 -0
  115. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/project/models/permissions_client.py +0 -0
  116. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/project/models/permissions_models.py +0 -0
  117. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/project/models/project_definition.py +0 -0
  118. {dsp_tools-17.0.0.post14/src/dsp_tools/commands/validate_data/models → dsp_tools-17.0.0.post23/src/dsp_tools/commands/resume_xmlupload}/__init__.py +0 -0
  119. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/resume_xmlupload/resume_xmlupload.py +0 -0
  120. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/start_stack.py +0 -0
  121. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/validate_data/CLAUDE.md +0 -0
  122. {dsp_tools-17.0.0.post14/src/dsp_tools/commands/validate_data/prepare_data → dsp_tools-17.0.0.post23/src/dsp_tools/commands/validate_data}/__init__.py +0 -0
  123. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/validate_data/api_clients.py +0 -0
  124. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/validate_data/constants.py +0 -0
  125. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/validate_data/mappers.py +0 -0
  126. {dsp_tools-17.0.0.post14/src/dsp_tools/commands/validate_data/process_validation_report → dsp_tools-17.0.0.post23/src/dsp_tools/commands/validate_data/models}/__init__.py +0 -0
  127. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/validate_data/models/input_problems.py +0 -0
  128. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/validate_data/models/rdf_like_data.py +0 -0
  129. {dsp_tools-17.0.0.post14/src/dsp_tools/commands/validate_data/sparql → dsp_tools-17.0.0.post23/src/dsp_tools/commands/validate_data/prepare_data}/__init__.py +0 -0
  130. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/validate_data/prepare_data/get_rdf_like_data.py +0 -0
  131. {dsp_tools-17.0.0.post14/src/dsp_tools/commands/validate_data/validation → dsp_tools-17.0.0.post23/src/dsp_tools/commands/validate_data/process_validation_report}/__init__.py +0 -0
  132. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/validate_data/process_validation_report/get_user_validation_message.py +0 -0
  133. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/validate_data/process_validation_report/query_validation_result.py +0 -0
  134. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/validate_data/process_validation_report/reformat_validation_results.py +0 -0
  135. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/validate_data/shacl_cli_validator.py +0 -0
  136. {dsp_tools-17.0.0.post14/src/dsp_tools/commands/xmlupload → dsp_tools-17.0.0.post23/src/dsp_tools/commands/validate_data/sparql}/__init__.py +0 -0
  137. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/validate_data/sparql/cardinality_shacl.py +0 -0
  138. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/validate_data/sparql/construct_shacl.py +0 -0
  139. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/validate_data/sparql/legal_info_shacl.py +0 -0
  140. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/validate_data/sparql/value_shacl.py +0 -0
  141. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/validate_data/utils.py +0 -0
  142. {dsp_tools-17.0.0.post14/src/dsp_tools/commands/xmlupload/make_rdf_graph → dsp_tools-17.0.0.post23/src/dsp_tools/commands/validate_data/validation}/__init__.py +0 -0
  143. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/validate_data/validation/check_duplicate_files.py +0 -0
  144. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/validate_data/validation/check_for_unknown_classes.py +0 -0
  145. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/validate_data/validation/validate_ontology.py +0 -0
  146. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/xmlupload/CLAUDE.md +0 -0
  147. {dsp_tools-17.0.0.post14/src/dsp_tools/commands/xmlupload/models → dsp_tools-17.0.0.post23/src/dsp_tools/commands/xmlupload}/__init__.py +0 -0
  148. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/xmlupload/iri_resolver.py +0 -0
  149. {dsp_tools-17.0.0.post14/src/dsp_tools/commands/xmlupload/models/processed → dsp_tools-17.0.0.post23/src/dsp_tools/commands/xmlupload/make_rdf_graph}/__init__.py +0 -0
  150. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/xmlupload/make_rdf_graph/constants.py +0 -0
  151. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/xmlupload/make_rdf_graph/jsonld_utils.py +0 -0
  152. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/xmlupload/make_rdf_graph/make_file_value.py +0 -0
  153. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/xmlupload/make_rdf_graph/make_resource_and_values.py +0 -0
  154. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/xmlupload/make_rdf_graph/make_values.py +0 -0
  155. {dsp_tools-17.0.0.post14/src/dsp_tools/commands/xmlupload/prepare_xml_input → dsp_tools-17.0.0.post23/src/dsp_tools/commands/xmlupload/models}/__init__.py +0 -0
  156. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/xmlupload/models/bitstream_info.py +0 -0
  157. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/xmlupload/models/formatted_text_value.py +0 -0
  158. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/xmlupload/models/ingest.py +0 -0
  159. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/xmlupload/models/input_problems.py +0 -0
  160. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/xmlupload/models/lookup_models.py +0 -0
  161. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/xmlupload/models/permission.py +0 -0
  162. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/xmlupload/models/permissions_parsed.py +0 -0
  163. {dsp_tools-17.0.0.post14/src/dsp_tools/commands/xmlupload/stash → dsp_tools-17.0.0.post23/src/dsp_tools/commands/xmlupload/models/processed}/__init__.py +0 -0
  164. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/xmlupload/models/processed/file_values.py +0 -0
  165. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/xmlupload/models/processed/res.py +0 -0
  166. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/xmlupload/models/processed/values.py +0 -0
  167. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/xmlupload/models/rdf_models.py +0 -0
  168. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/xmlupload/models/upload_clients.py +0 -0
  169. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/xmlupload/models/upload_state.py +0 -0
  170. {dsp_tools-17.0.0.post14/src/dsp_tools/config → dsp_tools-17.0.0.post23/src/dsp_tools/commands/xmlupload/prepare_xml_input}/__init__.py +0 -0
  171. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/xmlupload/prepare_xml_input/ark2iri.py +0 -0
  172. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/xmlupload/prepare_xml_input/get_processed_resources.py +0 -0
  173. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/xmlupload/prepare_xml_input/iiif_uri_validator.py +0 -0
  174. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/xmlupload/prepare_xml_input/list_client.py +0 -0
  175. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/xmlupload/prepare_xml_input/prepare_xml_input.py +0 -0
  176. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/xmlupload/prepare_xml_input/read_validate_xml_file.py +0 -0
  177. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/xmlupload/prepare_xml_input/transform_input_values.py +0 -0
  178. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/xmlupload/project_client.py +0 -0
  179. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/xmlupload/resource_create_client.py +0 -0
  180. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/xmlupload/richtext_id2iri.py +0 -0
  181. {dsp_tools-17.0.0.post14/src/dsp_tools/error → dsp_tools-17.0.0.post23/src/dsp_tools/commands/xmlupload/stash}/__init__.py +0 -0
  182. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/xmlupload/stash/analyse_circular_reference_graph.py +0 -0
  183. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/xmlupload/stash/create_info_for_graph.py +0 -0
  184. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/xmlupload/stash/graph_models.py +0 -0
  185. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/xmlupload/stash/stash_circular_references.py +0 -0
  186. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/xmlupload/stash/stash_models.py +0 -0
  187. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/xmlupload/stash/upload_stashed_resptr_props.py +0 -0
  188. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/xmlupload/stash/upload_stashed_xml_texts.py +0 -0
  189. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/xmlupload/upload_config.py +0 -0
  190. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/xmlupload/write_diagnostic_info.py +0 -0
  191. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/commands/xmlupload/xmlupload.py +0 -0
  192. {dsp_tools-17.0.0.post14/src/dsp_tools/legacy_models → dsp_tools-17.0.0.post23/src/dsp_tools/config}/__init__.py +0 -0
  193. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/config/logger_config.py +0 -0
  194. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/config/warnings_config.py +0 -0
  195. {dsp_tools-17.0.0.post14/src/dsp_tools/utils → dsp_tools-17.0.0.post23/src/dsp_tools/error}/__init__.py +0 -0
  196. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/error/custom_warnings.py +0 -0
  197. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/error/problems.py +0 -0
  198. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/error/xmllib_errors.py +0 -0
  199. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/error/xmllib_warnings.py +0 -0
  200. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/error/xmllib_warnings_util.py +0 -0
  201. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/error/xsd_validation_error_msg.py +0 -0
  202. {dsp_tools-17.0.0.post14/src/dsp_tools/utils/data_formats → dsp_tools-17.0.0.post23/src/dsp_tools/legacy_models}/__init__.py +0 -0
  203. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/legacy_models/datetimestamp.py +0 -0
  204. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/legacy_models/langstring.py +0 -0
  205. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/legacy_models/projectContext.py +0 -0
  206. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/py.typed +0 -0
  207. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/resources/schema/data.xsd +0 -0
  208. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/resources/schema/lists-only.json +0 -0
  209. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/resources/schema/project.json +0 -0
  210. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/resources/schema/properties-only.json +0 -0
  211. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/resources/schema/resources-only.json +0 -0
  212. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/resources/start-stack/docker-compose.override-host.j2 +0 -0
  213. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/resources/start-stack/docker-compose.override.yml +0 -0
  214. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/resources/start-stack/docker-compose.yml +0 -0
  215. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/resources/start-stack/dsp-app-config.json +0 -0
  216. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/resources/start-stack/dsp-app-config.override-host.j2 +0 -0
  217. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/resources/validate_data/api-shapes-resource-cardinalities.ttl +0 -0
  218. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/resources/validate_data/api-shapes.ttl +0 -0
  219. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/resources/validate_data/shacl-cli-image.yml +0 -0
  220. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/resources/validate_data/validate-ontology.ttl +0 -0
  221. {dsp_tools-17.0.0.post14/src/dsp_tools/utils/xml_parsing → dsp_tools-17.0.0.post23/src/dsp_tools/utils}/__init__.py +0 -0
  222. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/utils/ansi_colors.py +0 -0
  223. {dsp_tools-17.0.0.post14/src/dsp_tools/utils/xml_parsing/models → dsp_tools-17.0.0.post23/src/dsp_tools/utils/data_formats}/__init__.py +0 -0
  224. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/utils/data_formats/date_util.py +0 -0
  225. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/utils/data_formats/shared.py +0 -0
  226. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/utils/data_formats/uri_util.py +0 -0
  227. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/utils/fuseki_bloating.py +0 -0
  228. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/utils/json_parsing.py +0 -0
  229. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/utils/rdflib_constants.py +0 -0
  230. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/utils/replace_id_with_iri.py +0 -0
  231. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/utils/request_utils.py +0 -0
  232. {dsp_tools-17.0.0.post14/src/dsp_tools/xmllib/internal → dsp_tools-17.0.0.post23/src/dsp_tools/utils/xml_parsing}/__init__.py +0 -0
  233. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/utils/xml_parsing/get_lookups.py +0 -0
  234. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/utils/xml_parsing/get_parsed_resources.py +0 -0
  235. {dsp_tools-17.0.0.post14/src/dsp_tools/xmllib → dsp_tools-17.0.0.post23/src/dsp_tools/utils/xml_parsing}/models/__init__.py +0 -0
  236. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/utils/xml_parsing/models/parsed_resource.py +0 -0
  237. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/utils/xml_parsing/parse_clean_validate_xml.py +0 -0
  238. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/xmllib/CLAUDE.md +0 -0
  239. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/xmllib/__init__.py +0 -0
  240. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/xmllib/general_functions.py +0 -0
  241. {dsp_tools-17.0.0.post14/src/dsp_tools/xmllib/models → dsp_tools-17.0.0.post23/src/dsp_tools/xmllib}/internal/__init__.py +0 -0
  242. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/xmllib/internal/checkers.py +0 -0
  243. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/xmllib/internal/circumvent_circular_imports.py +0 -0
  244. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/xmllib/internal/constants.py +0 -0
  245. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/xmllib/internal/input_converters.py +0 -0
  246. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/xmllib/internal/serialise_file_value.py +0 -0
  247. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/xmllib/internal/serialise_resource.py +0 -0
  248. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/xmllib/internal/serialise_values.py +0 -0
  249. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/xmllib/internal/type_aliases.py +0 -0
  250. {dsp_tools-17.0.0.post14/src/dsp_tools/xmllib/models/licenses → dsp_tools-17.0.0.post23/src/dsp_tools/xmllib/models}/__init__.py +0 -0
  251. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/xmllib/models/config_options.py +0 -0
  252. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/xmllib/models/date_formats.py +0 -0
  253. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/xmllib/models/dsp_base_resources.py +0 -0
  254. /dsp_tools-17.0.0.post14/src/dsp_tools/commands/create/parsing/parse_lists.py → /dsp_tools-17.0.0.post23/src/dsp_tools/xmllib/models/internal/__init__.py +0 -0
  255. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/xmllib/models/internal/file_values.py +0 -0
  256. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/xmllib/models/internal/geometry.py +0 -0
  257. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/xmllib/models/internal/migration_metadata.py +0 -0
  258. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/xmllib/models/internal/serialise_permissions.py +0 -0
  259. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/xmllib/models/internal/values.py +0 -0
  260. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/xmllib/models/licenses/other.py +0 -0
  261. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/xmllib/models/licenses/recommended.py +0 -0
  262. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/xmllib/models/permissions.py +0 -0
  263. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/xmllib/models/res.py +0 -0
  264. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/xmllib/models/root.py +0 -0
  265. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/xmllib/value_checkers.py +0 -0
  266. {dsp_tools-17.0.0.post14 → dsp_tools-17.0.0.post23}/src/dsp_tools/xmllib/value_converters.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: dsp-tools
3
- Version: 17.0.0.post14
3
+ Version: 17.0.0.post23
4
4
  Summary: DSP-TOOLS is a Python package with a command line interface that helps you interact with a DaSCH service platform (DSP) server.
5
5
  Author: DaSCH - Swiss National Data and Service Center for the Humanities
6
6
  Author-email: DaSCH - Swiss National Data and Service Center for the Humanities <info@dasch.swiss>
@@ -2,7 +2,7 @@
2
2
 
3
3
  [project]
4
4
  name = "dsp-tools"
5
- version = "17.0.0.post14"
5
+ version = "17.0.0.post23"
6
6
  description = "DSP-TOOLS is a Python package with a command line interface that helps you interact with a DaSCH service platform (DSP) server."
7
7
  authors = [
8
8
  { name = "DaSCH - Swiss National Data and Service Center for the Humanities", email = "info@dasch.swiss" },
@@ -203,6 +203,9 @@ exclude = [
203
203
  "src/dsp_tools/error/xmllib_warnings_util.py",
204
204
  "src/dsp_tools/commands/excel2xml/",
205
205
  "test/",
206
- "src/dsp_tools/commands/create/", # to be ignored to enable small steps untill the intensive work is completed
206
+ # to enable small PRs the following files and directories are to be ignored until `create` is completely refactored
207
+ "src/dsp_tools/commands/create/",
208
+ "src/dsp_tools/clients/ontology_client_live.py",
209
+ "src/dsp_tools/clients/ontology_client.py",
207
210
  ]
208
211
  sort_by_size = true # sort unused classes and functions by size
@@ -0,0 +1,24 @@
1
+ from dataclasses import dataclass
2
+ from enum import Enum
3
+ from enum import auto
4
+ from typing import Protocol
5
+
6
+ from dsp_tools.clients.authentication_client import AuthenticationClient
7
+
8
+
9
+ class MetadataRetrieval(Enum):
10
+ SUCCESS = auto()
11
+ FAILURE = auto()
12
+
13
+
14
+ @dataclass
15
+ class MetadataClient(Protocol):
16
+ """
17
+ Protocol class/interface for the metadata endpoint in the API.
18
+ """
19
+
20
+ server: str
21
+ authentication_client: AuthenticationClient
22
+
23
+ def get_resource_metadata(self, shortcode: str) -> tuple[MetadataRetrieval, list[dict[str, str]]]:
24
+ """Get all resource metadata from one project."""
@@ -0,0 +1,42 @@
1
+ from dataclasses import dataclass
2
+
3
+ import requests
4
+ from loguru import logger
5
+
6
+ from dsp_tools.clients.authentication_client import AuthenticationClient
7
+ from dsp_tools.clients.metadata_client import MetadataClient
8
+ from dsp_tools.clients.metadata_client import MetadataRetrieval
9
+ from dsp_tools.utils.request_utils import RequestParameters
10
+ from dsp_tools.utils.request_utils import log_request
11
+ from dsp_tools.utils.request_utils import log_response
12
+
13
+ TIMEOUT = 120
14
+
15
+
16
+ @dataclass
17
+ class MetadataClientLive(MetadataClient):
18
+ server: str
19
+ authentication_client: AuthenticationClient
20
+
21
+ def get_resource_metadata(self, shortcode: str) -> tuple[MetadataRetrieval, list[dict[str, str]]]:
22
+ url = f"{self.server}/v2/metadata/projects/{shortcode}/resources?format=JSON"
23
+ header = {"Authorization": f"Bearer {self.authentication_client.get_token()}"}
24
+ params = RequestParameters(method="GET", url=url, timeout=TIMEOUT, headers=header)
25
+ logger.debug("GET Resource Metadata")
26
+ log_request(params)
27
+ try:
28
+ response = requests.get(
29
+ url=params.url,
30
+ headers=params.headers,
31
+ timeout=params.timeout,
32
+ )
33
+ if response.ok:
34
+ # we log the response separately because if it was successful it will be too big
35
+ log_response(response, include_response_content=False)
36
+ return MetadataRetrieval.SUCCESS, response.json()
37
+ # here the response text is important
38
+ log_response(response)
39
+ return MetadataRetrieval.FAILURE, []
40
+ except Exception as err: # noqa: BLE001 (blind exception)
41
+ logger.error(err)
42
+ return MetadataRetrieval.FAILURE, []
@@ -0,0 +1,21 @@
1
+ from typing import Any
2
+ from typing import Protocol
3
+
4
+ from rdflib import Literal
5
+
6
+ from dsp_tools.clients.authentication_client import AuthenticationClient
7
+
8
+
9
+ class OntologyClient(Protocol):
10
+ """
11
+ Protocol class/interface for the ontology endpoint in the API.
12
+ """
13
+
14
+ server: str
15
+ authentication_client: AuthenticationClient
16
+
17
+ def get_last_modification_date(self, project_iri: str, onto_iri: str) -> str:
18
+ """Get the last modification date of an ontology"""
19
+
20
+ def post_resource_cardinalities(self, cardinality_graph: dict[str, Any]) -> Literal | None:
21
+ """Add cardinalities to an existing resource class."""
@@ -0,0 +1,139 @@
1
+ from dataclasses import dataclass
2
+ from http import HTTPStatus
3
+ from typing import Any
4
+
5
+ import requests
6
+ from loguru import logger
7
+ from rdflib import Graph
8
+ from rdflib import Literal
9
+ from rdflib import URIRef
10
+ from requests import ReadTimeout
11
+ from requests import Response
12
+
13
+ from dsp_tools.clients.authentication_client import AuthenticationClient
14
+ from dsp_tools.clients.ontology_client import OntologyClient
15
+ from dsp_tools.error.exceptions import BadCredentialsError
16
+ from dsp_tools.error.exceptions import UnexpectedApiResponseError
17
+ from dsp_tools.utils.rdflib_constants import KNORA_API
18
+ from dsp_tools.utils.request_utils import RequestParameters
19
+ from dsp_tools.utils.request_utils import log_and_raise_timeouts
20
+ from dsp_tools.utils.request_utils import log_request
21
+ from dsp_tools.utils.request_utils import log_response
22
+
23
+ TIMEOUT = 60
24
+
25
+
26
+ @dataclass
27
+ class OntologyClientLive(OntologyClient):
28
+ """
29
+ Client for the ontology endpoint in the API.
30
+ """
31
+
32
+ server: str
33
+ authentication_client: AuthenticationClient
34
+
35
+ def get_last_modification_date(self, project_iri: str, onto_iri: str) -> Literal:
36
+ url = f"{self.server}/v2/ontologies/metadata"
37
+ header = {"X-Knora-Accept-Project": project_iri}
38
+ logger.debug("GET ontology metadata")
39
+ try:
40
+ response = self._get_and_log_request(url, header)
41
+ except (TimeoutError, ReadTimeout) as err:
42
+ log_and_raise_timeouts(err)
43
+ if response.ok:
44
+ date = _parse_last_modification_date(response.text, URIRef(onto_iri))
45
+ if not date:
46
+ raise UnexpectedApiResponseError(
47
+ f"Could not find the last modification date of the ontology '{onto_iri}' "
48
+ f"in the response: {response.text}"
49
+ )
50
+ return date
51
+ if response.status_code == HTTPStatus.FORBIDDEN:
52
+ raise BadCredentialsError("You do not have sufficient credentials to retrieve ontology metadata.")
53
+ else:
54
+ raise UnexpectedApiResponseError(
55
+ f"An unexpected response with the status code {response.status_code} was received from the API. "
56
+ f"Please consult 'warnings.log' for details."
57
+ )
58
+
59
+ def post_resource_cardinalities(self, cardinality_graph: dict[str, Any]) -> Literal | None:
60
+ url = f"{self.server}/v2/ontologies/cardinalities"
61
+
62
+ logger.debug("POST resource cardinalities to ontology")
63
+ try:
64
+ response = self._post_and_log_request(url, cardinality_graph)
65
+ except (TimeoutError, ReadTimeout) as err:
66
+ log_and_raise_timeouts(err)
67
+ if response.ok:
68
+ date = _parse_last_modification_date(response.text)
69
+ if not date:
70
+ raise UnexpectedApiResponseError(
71
+ f"Could not find the last modification date in the response: {response.text}"
72
+ )
73
+ return date
74
+ if response.status_code == HTTPStatus.FORBIDDEN:
75
+ raise BadCredentialsError(
76
+ "Only a project or system administrator can add cardinalities to resource classes. "
77
+ "Your permissions are insufficient for this action."
78
+ )
79
+ else:
80
+ logger.error(
81
+ f"During cardinality creation an unexpected response with the status code {response.status_code} "
82
+ f"was received from the API."
83
+ )
84
+ return None
85
+
86
+ def _post_and_log_request(
87
+ self,
88
+ url: str,
89
+ data: dict[str, Any] | None,
90
+ headers: dict[str, str] | None = None,
91
+ ) -> Response:
92
+ data_dict, generic_headers = self._prepare_request(data, headers)
93
+ params = RequestParameters("POST", url, TIMEOUT, data_dict, generic_headers)
94
+ log_request(params)
95
+ response = requests.post(
96
+ url=params.url,
97
+ headers=params.headers,
98
+ data=params.data_serialized,
99
+ timeout=params.timeout,
100
+ )
101
+ log_response(response)
102
+ return response
103
+
104
+ def _get_and_log_request(
105
+ self,
106
+ url: str,
107
+ headers: dict[str, str] | None = None,
108
+ ) -> Response:
109
+ _, generic_headers = self._prepare_request({}, headers)
110
+ params = RequestParameters(method="GET", url=url, timeout=TIMEOUT, headers=generic_headers)
111
+ log_request(params)
112
+ response = requests.get(
113
+ url=params.url,
114
+ headers=params.headers,
115
+ timeout=params.timeout,
116
+ )
117
+ log_response(response)
118
+ return response
119
+
120
+ def _prepare_request(
121
+ self, data: dict[str, Any] | None, headers: dict[str, str] | None
122
+ ) -> tuple[dict[str, Any] | None, dict[str, str]]:
123
+ generic_headers = {
124
+ "Content-Type": "application/json",
125
+ "Authorization": f"Bearer {self.authentication_client.get_token()}",
126
+ }
127
+ data_dict = data if data else None
128
+ if headers:
129
+ generic_headers.update(headers)
130
+ return data_dict, generic_headers
131
+
132
+
133
+ def _parse_last_modification_date(response_text: str, onto_iri: URIRef | None = None) -> Literal | None:
134
+ g = Graph()
135
+ g.parse(data=response_text, format="json-ld")
136
+ result = next(g.objects(subject=onto_iri, predicate=KNORA_API.lastModificationDate), None)
137
+ if isinstance(result, Literal):
138
+ return result
139
+ return None
@@ -0,0 +1,19 @@
1
+ from loguru import logger
2
+
3
+ from dsp_tools.commands.create.models.input_problems import CollectedProblems
4
+ from dsp_tools.commands.create.models.input_problems import CreateProblem
5
+ from dsp_tools.utils.ansi_colors import BOLD_RED
6
+ from dsp_tools.utils.ansi_colors import RED
7
+ from dsp_tools.utils.ansi_colors import RESET_TO_DEFAULT
8
+
9
+
10
+ def print_problem_collection(problem_collection: CollectedProblems) -> None:
11
+ individual_problems = _create_individual_problem_strings(problem_collection.problems)
12
+ logger.error(problem_collection.header, individual_problems)
13
+ print(BOLD_RED, problem_collection.header, RESET_TO_DEFAULT)
14
+ print(RED, individual_problems, RESET_TO_DEFAULT)
15
+
16
+
17
+ def _create_individual_problem_strings(problems: list[CreateProblem]) -> str:
18
+ str_list = [f"{p.problematic_object}: {p.problem!s}" for p in problems]
19
+ return " - " + "\n - ".join(str_list)
@@ -0,0 +1,7 @@
1
+ from rdflib import Namespace
2
+
3
+ KNORA_API_STR = "http://api.knora.org/ontology/knora-api/v2#"
4
+ SALSAH_GUI_STR = "http://api.knora.org/ontology/salsah-gui/v2#"
5
+ SALSAH_GUI = Namespace(SALSAH_GUI_STR)
6
+
7
+ UNIVERSAL_PREFIXES = {"knora-api": KNORA_API_STR, "salsah-gui": SALSAH_GUI_STR}
@@ -0,0 +1,121 @@
1
+ from typing import Any
2
+
3
+ from loguru import logger
4
+ from rdflib import Literal
5
+ from rdflib import URIRef
6
+
7
+ from dsp_tools.clients.ontology_client import OntologyClient
8
+ from dsp_tools.clients.ontology_client_live import OntologyClientLive
9
+ from dsp_tools.commands.create.models.input_problems import CollectedProblems
10
+ from dsp_tools.commands.create.models.input_problems import CreateProblem
11
+ from dsp_tools.commands.create.models.input_problems import ProblemType
12
+ from dsp_tools.commands.create.models.input_problems import UploadProblem
13
+ from dsp_tools.commands.create.models.parsed_ontology import ParsedClassCardinalities
14
+ from dsp_tools.commands.create.models.parsed_ontology import ParsedOntology
15
+ from dsp_tools.commands.create.models.parsed_ontology import ParsedPropertyCardinality
16
+ from dsp_tools.commands.create.models.server_project_info import CreatedIriCollection
17
+ from dsp_tools.commands.create.models.server_project_info import ProjectIriLookup
18
+ from dsp_tools.commands.create.serialisation.ontology import _make_one_cardinality_graph
19
+ from dsp_tools.commands.create.serialisation.ontology import make_ontology_base_graph
20
+ from dsp_tools.utils.data_formats.iri_util import from_dsp_iri_to_prefixed_iri
21
+ from dsp_tools.utils.rdflib_utils import serialise_json
22
+
23
+
24
+ def add_all_cardinalities(
25
+ ontologies: list[ParsedOntology],
26
+ project_iri_lookup: ProjectIriLookup,
27
+ created_iris: CreatedIriCollection,
28
+ onto_client: OntologyClientLive,
29
+ ) -> CollectedProblems | None:
30
+ all_problems = []
31
+ for onto in ontologies:
32
+ onto_iri = project_iri_lookup.onto_iris.get(onto.name)
33
+ # we do not inform about onto failures here, as it will have been done upstream
34
+ if onto_iri:
35
+ last_mod_date = onto_client.get_last_modification_date(project_iri_lookup.project_iri, onto_iri)
36
+ problems = _add_all_cardinalities_for_one_onto(
37
+ cardinalities=onto.cardinalities,
38
+ onto_iri=URIRef(onto_iri),
39
+ last_modification_date=last_mod_date,
40
+ onto_client=onto_client,
41
+ created_iris=created_iris,
42
+ )
43
+ all_problems.extend(problems)
44
+ if all_problems:
45
+ return CollectedProblems("During the cardinality creation the following problems occurred:", all_problems)
46
+ return None
47
+
48
+
49
+ def _add_all_cardinalities_for_one_onto(
50
+ cardinalities: list[ParsedClassCardinalities],
51
+ onto_iri: URIRef,
52
+ last_modification_date: Literal,
53
+ onto_client: OntologyClient,
54
+ created_iris: CreatedIriCollection,
55
+ ) -> list[CreateProblem]:
56
+ problems: list[CreateProblem] = []
57
+ for c in cardinalities:
58
+ # we do not inform about classes failures here, as it will have been done upstream
59
+ if c.class_iri not in created_iris.classes:
60
+ logger.warning(f"CARDINALITY: Class '{c.class_iri}' not in successes, no cardinalities added.")
61
+ continue
62
+ last_modification_date, creation_problems = _add_cardinalities_for_one_class(
63
+ resource_card=c,
64
+ onto_iri=onto_iri,
65
+ last_modification_date=last_modification_date,
66
+ onto_client=onto_client,
67
+ successful_props=created_iris.properties,
68
+ )
69
+ problems.extend(creation_problems)
70
+ return problems
71
+
72
+
73
+ def _add_cardinalities_for_one_class(
74
+ resource_card: ParsedClassCardinalities,
75
+ onto_iri: URIRef,
76
+ last_modification_date: Literal,
77
+ onto_client: OntologyClient,
78
+ successful_props: set[str],
79
+ ) -> tuple[Literal, list[UploadProblem]]:
80
+ res_iri = URIRef(resource_card.class_iri)
81
+ problems = []
82
+ for one_card in resource_card.cards:
83
+ if one_card.propname not in successful_props:
84
+ logger.warning(f"CARDINALITY: Property '{one_card.propname}' not in successes, no cardinality added.")
85
+ continue
86
+ last_modification_date, problem = _add_one_cardinality(
87
+ one_card, res_iri, onto_iri, last_modification_date, onto_client
88
+ )
89
+ if problem:
90
+ problems.append(problem)
91
+ return last_modification_date, problems
92
+
93
+
94
+ def _add_one_cardinality(
95
+ card: ParsedPropertyCardinality,
96
+ res_iri: URIRef,
97
+ onto_iri: URIRef,
98
+ last_modification_date: Literal,
99
+ onto_client: OntologyClient,
100
+ ) -> tuple[Literal, UploadProblem | None]:
101
+ card_serialised = _serialise_card(card, res_iri, onto_iri, last_modification_date)
102
+ new_mod_date = onto_client.post_resource_cardinalities(card_serialised)
103
+ if not new_mod_date:
104
+ prefixed_cls = from_dsp_iri_to_prefixed_iri(str(res_iri))
105
+ prefixed_prop = from_dsp_iri_to_prefixed_iri(card.propname)
106
+ return last_modification_date, UploadProblem(
107
+ f"{prefixed_cls} / {prefixed_prop}",
108
+ ProblemType.CARDINALITY_COULD_NOT_BE_ADDED,
109
+ )
110
+ return new_mod_date, None
111
+
112
+
113
+ def _serialise_card(
114
+ card: ParsedPropertyCardinality, res_iri: URIRef, onto_iri: URIRef, last_modification_date: Literal
115
+ ) -> dict[str, Any]:
116
+ onto_g = make_ontology_base_graph(onto_iri, last_modification_date)
117
+ onto_serialised = next(iter(serialise_json(onto_g)))
118
+ card_g = _make_one_cardinality_graph(card, res_iri)
119
+ card_serialised = serialise_json(card_g)
120
+ onto_serialised["@graph"] = card_serialised
121
+ return onto_serialised
@@ -0,0 +1,12 @@
1
+ from rdflib import OWL
2
+ from rdflib import Literal
3
+
4
+ from dsp_tools.commands.create.models.parsed_ontology import Cardinality
5
+ from dsp_tools.commands.create.models.rdf_ontology import RdfCardinalityRestriction
6
+
7
+ PARSED_CARDINALITY_TO_RDF = {
8
+ Cardinality.C_1: RdfCardinalityRestriction(OWL.cardinality, Literal(1)),
9
+ Cardinality.C_0_1: RdfCardinalityRestriction(OWL.maxCardinality, Literal(1)),
10
+ Cardinality.C_1_N: RdfCardinalityRestriction(OWL.minCardinality, Literal(1)),
11
+ Cardinality.C_0_N: RdfCardinalityRestriction(OWL.minCardinality, Literal(0)),
12
+ }
@@ -7,17 +7,26 @@ from enum import StrEnum
7
7
  @dataclass
8
8
  class CollectedProblems:
9
9
  header: str
10
- problems: list[InputProblem]
10
+ problems: list[CreateProblem]
11
11
 
12
12
 
13
13
  @dataclass
14
- class InputProblem:
14
+ class CreateProblem:
15
15
  problematic_object: str
16
16
  problem: ProblemType
17
17
 
18
18
 
19
+ @dataclass
20
+ class InputProblem(CreateProblem): ...
21
+
22
+
23
+ @dataclass
24
+ class UploadProblem(CreateProblem): ...
25
+
26
+
19
27
  class ProblemType(StrEnum):
20
28
  PREFIX_COULD_NOT_BE_RESOLVED = (
21
29
  "The prefix used is not defined in the 'prefix' section of the file, "
22
30
  "nor does it belong to one of the project ontologies."
23
31
  )
32
+ CARDINALITY_COULD_NOT_BE_ADDED = "The cardinality could not be added."
@@ -0,0 +1,19 @@
1
+ from __future__ import annotations
2
+
3
+ from dataclasses import dataclass
4
+
5
+ from rdflib import Literal
6
+ from rdflib import URIRef
7
+
8
+
9
+ @dataclass
10
+ class RdfResourceCardinality:
11
+ resource_iri: URIRef
12
+ on_property: URIRef
13
+ cardinality: RdfCardinalityRestriction
14
+
15
+
16
+ @dataclass
17
+ class RdfCardinalityRestriction:
18
+ owl_property: URIRef
19
+ cardinality_value: Literal
@@ -0,0 +1,25 @@
1
+ from dataclasses import dataclass
2
+ from dataclasses import field
3
+
4
+ from dsp_tools.commands.create.constants import KNORA_API_STR
5
+
6
+
7
+ @dataclass
8
+ class ProjectIriLookup:
9
+ project_iri: str
10
+ onto_iris: dict[str, str] = field(default_factory=dict)
11
+
12
+ def add_onto(self, name: str, iri: str) -> None:
13
+ self.onto_iris[name] = iri
14
+
15
+ def get_onto_iri(self, name: str) -> str | None:
16
+ return self.onto_iris.get(name)
17
+
18
+
19
+ @dataclass
20
+ class CreatedIriCollection:
21
+ classes: set[str] = field(default_factory=set)
22
+ properties: set[str] = field(default_factory=set)
23
+
24
+ def __post_init__(self) -> None:
25
+ self.properties.update({f"{KNORA_API_STR}seqnum", f"{KNORA_API_STR}isPartOf"})
@@ -2,7 +2,7 @@ from typing import Any
2
2
  from typing import cast
3
3
 
4
4
  from dsp_tools.commands.create.models.input_problems import CollectedProblems
5
- from dsp_tools.commands.create.models.input_problems import InputProblem
5
+ from dsp_tools.commands.create.models.input_problems import CreateProblem
6
6
  from dsp_tools.commands.create.models.input_problems import ProblemType
7
7
  from dsp_tools.commands.create.models.parsed_ontology import Cardinality
8
8
  from dsp_tools.commands.create.models.parsed_ontology import ParsedClass
@@ -46,7 +46,7 @@ def parse_ontology(ontology_json: dict[str, Any], prefixes: dict[str, str]) -> P
46
46
 
47
47
  def _parse_properties(
48
48
  properties_list: list[dict[str, Any]], current_onto_prefix: str
49
- ) -> tuple[list[ParsedProperty], list[InputProblem]]:
49
+ ) -> tuple[list[ParsedProperty], list[CreateProblem]]:
50
50
  parsed = []
51
51
  for prop in properties_list:
52
52
  parsed.append(ParsedProperty(f"{current_onto_prefix}{prop['name']}", prop))
@@ -55,7 +55,7 @@ def _parse_properties(
55
55
 
56
56
  def _parse_classes(
57
57
  classes_list: list[dict[str, Any]], current_onto_prefix: str
58
- ) -> tuple[list[ParsedClass], list[InputProblem]]:
58
+ ) -> tuple[list[ParsedClass], list[CreateProblem]]:
59
59
  parsed = []
60
60
  for cls in classes_list:
61
61
  parsed.append(ParsedClass(f"{current_onto_prefix}{cls['name']}", cls))
@@ -64,7 +64,7 @@ def _parse_classes(
64
64
 
65
65
  def _parse_cardinalities(
66
66
  classes_list: list[dict[str, Any]], current_onto_prefix: str, prefixes: dict[str, str]
67
- ) -> tuple[list[ParsedClassCardinalities], list[InputProblem]]:
67
+ ) -> tuple[list[ParsedClassCardinalities], list[CreateProblem]]:
68
68
  parsed = []
69
69
  failures = []
70
70
  for c in classes_list:
@@ -79,7 +79,7 @@ def _parse_cardinalities(
79
79
 
80
80
  def _parse_one_class_cardinality(
81
81
  cls_json: dict[str, Any], current_onto_prefix: str, prefixes: dict[str, str]
82
- ) -> ParsedClassCardinalities | list[InputProblem]:
82
+ ) -> ParsedClassCardinalities | list[CreateProblem]:
83
83
  failures = []
84
84
  parsed = []
85
85
  for c in cls_json["cardinalities"]:
@@ -96,10 +96,10 @@ def _parse_one_class_cardinality(
96
96
 
97
97
  def _parse_one_cardinality(
98
98
  card_json: dict[str, str | int], current_onto_prefix: str, prefixes: dict[str, str]
99
- ) -> ParsedPropertyCardinality | InputProblem:
99
+ ) -> ParsedPropertyCardinality | CreateProblem:
100
100
  prp_name = cast(str, card_json["propname"])
101
101
  if not (resolved := resolve_to_absolute_iri(prp_name, current_onto_prefix, prefixes)):
102
- return InputProblem(prp_name, ProblemType.PREFIX_COULD_NOT_BE_RESOLVED)
102
+ return CreateProblem(prp_name, ProblemType.PREFIX_COULD_NOT_BE_RESOLVED)
103
103
  gui = cast(int | None, card_json.get("gui_order"))
104
104
  return ParsedPropertyCardinality(
105
105
  propname=resolved,
@@ -56,7 +56,7 @@ def _parse_metadata(project_json: dict[str, Any]) -> ParsedProjectMetadata:
56
56
  longname=project_json["longname"],
57
57
  descriptions=project_json["descriptions"],
58
58
  keywords=project_json["keywords"],
59
- enabled_licenses=project_json["enabled_licenses"],
59
+ enabled_licenses=project_json.get("enabled_licenses", []),
60
60
  )
61
61
 
62
62
 
@@ -2,7 +2,7 @@ from typing import Any
2
2
 
3
3
  import regex
4
4
 
5
- from dsp_tools.commands.create.constants import KNORA_API
5
+ from dsp_tools.commands.create.constants import KNORA_API_STR
6
6
  from dsp_tools.commands.create.constants import UNIVERSAL_PREFIXES
7
7
  from dsp_tools.utils.data_formats.uri_util import is_uri
8
8
 
@@ -14,7 +14,7 @@ def resolve_to_absolute_iri(prefixed: str, current_onto: str, prefix_lookup: dic
14
14
  return f"{current_onto}{prefixed.lstrip(':')}"
15
15
  segments = prefixed.split(":", maxsplit=1)
16
16
  if len(segments) == 1:
17
- return f"{KNORA_API}{segments[0]}"
17
+ return f"{KNORA_API_STR}{segments[0]}"
18
18
  if not (found := prefix_lookup.get(segments[0])):
19
19
  return None
20
20
  return f"{found}{segments[1]}"
@@ -0,0 +1,41 @@
1
+ from rdflib import OWL
2
+ from rdflib import RDF
3
+ from rdflib import RDFS
4
+ from rdflib import BNode
5
+ from rdflib import Graph
6
+ from rdflib import Literal
7
+ from rdflib import URIRef
8
+
9
+ from dsp_tools.commands.create.constants import SALSAH_GUI
10
+ from dsp_tools.commands.create.create_on_server.mappers import PARSED_CARDINALITY_TO_RDF
11
+ from dsp_tools.commands.create.models.parsed_ontology import ParsedPropertyCardinality
12
+ from dsp_tools.utils.rdflib_constants import KNORA_API
13
+
14
+
15
+ def make_ontology_base_graph(onto_iri: URIRef, last_modification_date: Literal) -> Graph:
16
+ g = Graph()
17
+ g.add((onto_iri, RDF.type, OWL.Ontology))
18
+ g.add((onto_iri, KNORA_API.lastModificationDate, last_modification_date))
19
+ return g
20
+
21
+
22
+ def make_cardinality_graph_for_request(
23
+ card: ParsedPropertyCardinality, res_iri: URIRef, onto_iri: URIRef, last_modification_date: Literal
24
+ ) -> Graph:
25
+ g = make_ontology_base_graph(onto_iri, last_modification_date)
26
+ g += _make_one_cardinality_graph(card, res_iri)
27
+ return g
28
+
29
+
30
+ def _make_one_cardinality_graph(card: ParsedPropertyCardinality, res_iri: URIRef) -> Graph:
31
+ card_info = PARSED_CARDINALITY_TO_RDF[card.cardinality]
32
+ g = Graph()
33
+ bn_card = BNode()
34
+ g.add((res_iri, RDF.type, OWL.Class))
35
+ g.add((res_iri, RDFS.subClassOf, bn_card))
36
+ g.add((bn_card, RDF.type, OWL.Restriction))
37
+ g.add((bn_card, card_info.owl_property, card_info.cardinality_value))
38
+ g.add((bn_card, OWL.onProperty, URIRef(card.propname)))
39
+ if card.gui_order is not None:
40
+ g.add((bn_card, SALSAH_GUI.guiOrder, Literal(card.gui_order)))
41
+ return g