Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is "SPARQL Query" and "Snap SPARQL" tab not supporting "DELETE" still? #1202

Open
yasenstar opened this issue May 10, 2024 · 2 comments
Open

Comments

@yasenstar
Copy link

Hello,

I have several classes in the ontology which I want to remove their subClassOf to one wrongly mapped super class, when I try to use below query - abc:superClassName is the target superClass:

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX abc: <URI#>
SELECT ?subject
    DELETE { ?subject rdfs:subClassOf abc:superClassName . }
    WHERE{ ?subject rdfs:subClassOf abc:superClassName . }

I got below "Syntax error in SPARQL query":

Encountered DELETE at line 7 column 5. Expected one of: Variable WHERE (

However, only use WHERE clause return the correct scope of result.

Read some discussions and looks the SPARQL plugin in Protege forbidden the DELETE (and UPDATE) related command, could anyone help on this and let me know how I can perform those clean-up action instead of manually do that?

Thanks,
Xiaoqi

@ykazakov
Copy link
Contributor

Looks like this question is regarding a Protege plugin, not the Protege itself. I suggest ti move it here:

https://github.com/protegeproject/sparql-query-plugin

Perhaps you could even find the answer in the source code.

@yasenstar
Copy link
Author

Thanks, could you let me know how to move this to another project? Agree it's relating to https://github.com/protegeproject/sparql-query-plugin. Or I need to recreate another post in that plug-in project?

I'll search source code then as well.

Xiaoqi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants