File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 3434 if "json" not in content_type :
3535 raise ValueError (f"{ url } does not return JSON-LD (Content type: { content_type } )" )
3636
37- for url in profile_urls :
37+ temp_g = Graph ()
3838 base_iri = urljoin (url , '.' ) if url .endswith ("ro-crate-metadata.json" ) else f"{ url .rstrip ('/' )} /"
39- g .parse (url , format = "json-ld" , publicID = base_iri )
39+ temp_g .parse (url , format = "json-ld" , publicID = base_iri )
40+ if any (temp_g .subjects (RDF .type , profile_class )):
41+ g += temp_g
42+ else :
43+ raise ValueError (f"No profile entity found in { url } " )
4044
4145datetime_pattern = re .compile (r"^-?\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(Z|[+-]\d{2}:\d{2})?$" )
4246date_pattern = re .compile (r"^-?\d{4}-\d{2}-\d{2}$" )
Original file line number Diff line number Diff line change 11https://trefx.uk/5s-crate/0.4/ro-crate-metadata.json
22https://www.researchobject.org/workflow-run-crate/profiles/0.5/process_run_crate/ro-crate-metadata.json
33https://www.researchobject.org/workflow-run-crate/profiles/0.5/workflow_run_crate/ro-crate-metadata.json
4- https://about.workflowhub.eu/Workflow-RO-Crate/ro-crate-metadata.json
54https://www.researchobject.org/workflow-run-crate/profiles/0.5/provenance_run_crate/ro-crate-metadata.json
You can’t perform that action at this time.
0 commit comments