Closed edmondchuc closed 11 months ago
To clarify the changes as it is a little different from the initial description now: "annotations are added to the graph object first before the additional predicates from the profiles are added." The annotations for labels, descriptions, provenance, and status are added after the initial RDF response. The issue was that there was no functionality to add annotations (labels in this case) for the annotations themselves.
The change here is to now look for annotations on annotated properties themselves, recursively, until now new annotations are found. This should prevent annotations returning unlabeled URIs.
I don't have time to review this locally right now but don't anticipate any issues. The extensions to the vocprez query will need to be included in refactoring the queries to a common model.
This PR:
reg:status
property to the VocPub profilerdf:type
to the vocabs API responses for clarityAdd temporary fix to ensure additional predicates defined in profiles get added with their annotation propertiesExpand the response graph with annotationsOn the last point, the current issue is, returning a response with the following data does not add the annotation for
<https://linked.data.gov.au/def/reg-statuses/valid>
.This is because the annotations are added to the graph object first before the additional predicates from the profiles are added.
This is essentially a temporary fix right now because I need this functionality to be working for a project with a deadline. Will follow up in a week or two with a refactor of theprez.renderers.renderer.return_annotated_rdf
function.The function has been updated in this commit https://github.com/RDFLib/prez/pull/143/commits/40225bd1cbf4210bd940de2e62ed4e3e01cc5275 to expand the graph with annotations until no new statements are added.