RDF and SPARQL

This plugin adds RDF and SPARQL support for JetBrains IDEs. Features syntax validation, prefixed name autocompletion, SPARQL query execution, etc.

Smart editor

Supported formats and languages

RDF 1.1 Turtle and RDF 1.1 TriG formats and SPARQL 1.1 language are supported. File extensions: .ttl, .trig, .rq, .ru, .sparql.

Code commenting

After selecting a block, you can apply a block comment (Ctrl+Shift+/) or line comment (Ctrl+/) to it. The same shortcuts will remove existing comments from selected lines too.

Refactoring

Select a variable in a SPARQL query or a prefixed name (prefix label is renamed) and rename it with Refactor / Rename... or Shift+F6.

Code formatter

You can format your file according to pre-defined rules by pressing Ctrl+Alt+L in it. Also press Ctrl+Alt+O to remove unused prefix declarations in SPARQL.

Quick documentation

Press Ctrl+Q to open the quick documentation popup for a prefixed name from an indexed ontology. Also hover the cursor over it to see its IRI.

Inlay hints

Each prefixed name from an indexed ontology has the value of rdfs:label attached on the right.

Code folding

Code folding, auto-insertion of braces, brackets & quotes, matching brace/bracket highlighting, etc.

On-the-fly analysis

Errors are shown as you type. Among others, we catch syntax errors, undeclared prefixes, braces, etc.

Code completion

Turtle code completion
URI prefix declaration

RDF and SPARQL, looks up an URI prefix in prefix.cc or in the list of custom prefix declarations. Call the context actions on a prefixed name with Alt+Enter.

Custom URI prefix declarations

You can override an URI prefix declaration from prefix.cc by registering it in the project settings. Also you can share your custom declaration with team members.

Completion suggestions for prefixed names

Once your declared an URI prefix, you can fetch completion suggestions for corresponding prefix names with Ctrl+Space or just start typing if the prefixed name is from an indexed ontology.

Indexing of RDFS/OWL ontologies

The completion suggestions work the best with ontologies that are indexed locally. Press Alt+Enter on the URI of a prefix declaration to download the ontology.

Query execution

SPARQL query execution
Any of SPARQL 1.1 endpoints

RDF and SPARQL, supports all endpoints that comply with SPARQL 1.1 Protocol standard. They are registered in SPARQL Endpoint tool window on the right.

SELECT and ASK query forms

Currently, the SELECT and ASK query forms are supported. The query results are collected in 8:Services tool window at the bottom.

Cancelable query execution

Any query may be cancelled with the red square button in Query Results tab or 8:Services tool window. The query request will be properly closed.

Query results formatting

URI prefix declarations are considered in the format of query results. RDF Literals are formatted following RDF Turtle 1.1 standard.

HTTP Basic authentication

You can use SPARQL endpoints protected with the HTTP Basic Authentication. Enter username and password when registering an endpoint, they are stored safely with the Intellij IDEA SDK, read more.

Export query results to file

SPARQL query results may be exported into a file. Supported file formats: CSV, TSV, XML, JSON, Apache Thrift, Text.