Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
digit-joinup-reference
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ec-europa
digit-joinup-reference
Commits
cc045f92
Commit
cc045f92
authored
10 months ago
by
Ilias Dimopoulos
Browse files
Options
Downloads
Patches
Plain Diff
ISAICP-8733: Update the predicate and clean up the values from the releases that are not valid.
parent
23c5fc49
No related branches found
Branches containing commit
Tags
v1.112.1
Tags containing commit
1 merge request
!171
ISAICP-8733: Update the predicate and clean up the values from the releases that are not valid.
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
config/sync/field.storage.rdf_entity.field_isr_solution_type.yml
+1
-1
1 addition, 1 deletion
...sync/field.storage.rdf_entity.field_isr_solution_type.yml
web/modules/custom/joinup_rdf/joinup_rdf.install
+52
-0
52 additions, 0 deletions
web/modules/custom/joinup_rdf/joinup_rdf.install
with
53 additions
and
1 deletion
config/sync/field.storage.rdf_entity.field_isr_solution_type.yml
+
1
−
1
View file @
cc045f92
...
...
@@ -8,7 +8,7 @@ third_party_settings:
sparql_entity_storage
:
mapping
:
target_id
:
predicate
:
'
http://
joinup.eu/test_resource_
type'
predicate
:
'
http://
purl.org/dc/terms/
type'
format
:
resource
id
:
rdf_entity.field_isr_solution_type
field_name
:
field_isr_solution_type
...
...
This diff is collapsed.
Click to expand it.
web/modules/custom/joinup_rdf/joinup_rdf.install
+
52
−
0
View file @
cc045f92
...
...
@@ -242,3 +242,55 @@ function joinup_rdf_update_110505(): void {
// Remove provenance records from the RDF backend.
\Drupal
::
getContainer
()
->
get
(
'sparql.endpoint'
)
->
update
(
"CLEAR GRAPH <http://joinup.eu/provenance_activity>;"
);
}
/**
* Clean up invalid release type entries and update the predicate.
*/
function
joinup_rdf_update_110506
():
void
{
$sparql
=
\Drupal
::
getContainer
()
->
get
(
'sparql.endpoint'
);
$cleanup_query
=
<<<SPARQL
DELETE {
GRAPH ?g {
?s <http://joinup.eu/test_resource_type> ?deletedTermUri .
}
}
WHERE {
GRAPH ?g {
?s a <http://www.w3.org/ns/dcat#Dataset> .
?s <http://joinup.eu/test_resource_type> ?deletedTermUri .
FILTER NOT EXISTS {
SELECT ?deletedTermUri
WHERE {
GRAPH <http://data> {
?deletedTermUri <http://www.w3.org/2004/02/skos/core#inScheme> <http://data.europa.eu/dr8> .
}
}
}
}
}
SPARQL;
$sparql
->
update
(
$cleanup_query
);
$update_query
=
<<<SPARQL
DELETE {
GRAPH ?g {
?s <http://joinup.eu/test_resource_type> ?o .
}
}
INSERT {
GRAPH ?g {
?s <http://purl.org/dc/terms/type> ?o .
}
}
WHERE {
GRAPH ?g {
?s a <http://www.w3.org/ns/dcat#Dataset> .
?s <http://joinup.eu/test_resource_type> ?o .
VALUES ?g { <http://joinup.eu/asset_release/published> <http://joinup.eu/asset_release/draft> }
}
}
SPARQL;
$sparql
->
update
(
$update_query
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment