Skip to content

Commit

Permalink
Updatses remove_objects SPARQL and corresponding unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-aravind committed Sep 26, 2024
1 parent 049b063 commit 3a98380
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 12 deletions.
22 changes: 19 additions & 3 deletions sparql/remove_objects.sparql
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,23 @@ DELETE {
?s ?p ?o .
}
WHERE {
?s ?p ?o .
?s a ?type .
VALUES ?type { schema:SiteNavigationElement schemaHttps:SiteNavigationElement }
{
?s a ?type ;
?p ?o .
VALUES ?type {
schema:SiteNavigationElement
schemaHttps:SiteNavigationElement
schema:WPHeader
schema:WPFooter
schema:BreadcrumbList
}
}
UNION
{
?s ?predicate ?role ;
?p ?o .
VALUES ?predicate {
<http://www.w3.org/1999/xhtml/vocab#role>
}
}
}
44 changes: 35 additions & 9 deletions tests/fixtures/test_remove_object.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
"@id": "https://example.com/temporary/unique-id-1",
"@type": [
"https://schema.org/SiteNavigationElement"
],
"http://www.w3.org/ns/prov#wasDerivedFrom": [
{
"@id": "https://example.com/source-page-1"
}
]
},
{
Expand All @@ -35,11 +30,42 @@
{
"@id": "https://example.com/login-page"
}
]
},
{
"@id": "https://imperialtheatre.ca/temporary/c8ce434e-9a2e-435e-bfe1-8ca43961f3dd",
"@type": [
"http://schema.org/WPHeader"
]
},
{
"@id": "https://imperialtheatre.ca/temporary/f4f41c51-665f-439e-aff7-b18f9c17f1ae",
"@type": [
"http://schema.org/WPFooter"
]
},
{
"@id": "https://imperialtheatre.ca/temporary/be49193a-3182-429c-ad18-754fa38df039",
"@type": [
"http://schema.org/BreadcrumbList"
],
"http://www.w3.org/ns.prov#wasDerivedFrom": [
{
"@id": "https://example.com/source-page-1"
}
"http://schema.org/itemListElement": [
{
"@id": "_:g469500"
}
]
},
{
"@id": "https://agoradanse.com/evenement/montreal-marrakech/#panel-choregraphe-accordeon0",
"http://www.w3.org/1999/xhtml/vocab#role": [
{
"@id": "http://www.w3.org/1999/xhtml/vocab#tabpanel"
}
],
"http://www.w3.org/ns/prov#wasDerivedFrom": [
{
"@id": "https://agoradanse.com/evenement/montreal-marrakech/"
}
]
}
]
Expand Down

0 comments on commit 3a98380

Please sign in to comment.