diff --git a/mks-data-cataloguing/inc/linked-data.inc b/mks-data-cataloguing/inc/linked-data.inc index 5227cf1..7e7d8f8 100644 --- a/mks-data-cataloguing/inc/linked-data.inc +++ b/mks-data-cataloguing/inc/linked-data.inc @@ -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); diff --git a/mks-data-cataloguing/inc/rdf-catalogue-notifier.inc b/mks-data-cataloguing/inc/rdf-catalogue-notifier.inc index b42f4d9..bcc9013 100644 --- a/mks-data-cataloguing/inc/rdf-catalogue-notifier.inc +++ b/mks-data-cataloguing/inc/rdf-catalogue-notifier.inc @@ -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);