Skip to content

Commit

Permalink
Datasets: use UUIDs for linked data URIs
Browse files Browse the repository at this point in the history
  • Loading branch information
enridaga committed Jan 13, 2016
1 parent ec43871 commit 7263fc4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions mks-data-cataloguing/inc/linked-data.inc
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,11 @@ END;
if(!is_array($ds)){
$ds = $db->getDataset($ds);
}

$d = new stdClass();
$dp = $ds['post'];
$d->{"@type"} = "dcat:Dataset";
$d->{"@id"} = "dataset:" . $dp->post_name;
$d->{"@id"} = "dataset:" . @$ds['uuid'][0];
$d->{"title"} = $dp->post_title;
$d->{"description"} = get_the_excerpt();
$d->{"landingPage"} = get_permalink($dp->ID);
Expand Down
3 changes: 2 additions & 1 deletion mks-data-cataloguing/inc/rdf-catalogue-notifier.inc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ function mksdc_notify_rdf_catalogue($post_id, $type, $action){
$p = get_post($post_id);
if($type == 'mksdc-datasets'){
$jsonld = MKSDC_JSONLD::dataset($p->post_name);
$graph = MKSDC_Plugin::getLinkedDataURI('dataset/' . $p->post_name);
$uuid = $jsonld->{"@id"};
$graph = MKSDC_Plugin::getLinkedDataURI('dataset/' . $uuid);
}else if($type == 'mksdc-policies'){
$jsonld = MKSDC_JSONLD::policy($p->post_name);
$p = get_post($post_id);
Expand Down

0 comments on commit 7263fc4

Please sign in to comment.