Skip to main content
Version: 3.1

SPARQL search

As the repository natively supports Linked Data, a SPARQL search query interface allows searching all the metadata of the repository. With docuteam box, you can run ad-hoc queries but also save/edit queries for re-use.

To access SPARQL search functions, the user must have the sparql_query role.

Manage/run a search query

The menu entry SPARQL search will take you to the list of saved SPARQL queries. From here, you can both manage and execute an previously saved SPARQL search queries, and create new searches.

index

Edit a search query

When executing a SPARQL search, you can specify the requested output format (e.g. JSON, XML, CSV, ...). The results can then be downloaded using the respective icon in the upper right corner of the results.

edit

Placeholders support

The query editor supports dynamic placeholders that allow users to parameterize queries at runtime.

Placeholders must follow this pattern: \$\{([A-Za-z\d_-]+)\}. It starts with ${ end with } and contains only letters, digits, underscores or hyphens.

Example:

PREFIX rico: <https://www.ica.org/standards/RiC/ontology#>

SELECT ?p ?o
WHERE {
?s ?p ?o .
?pid rico:normalizedValue "${PID}$" ;
rico:isOrWasIdentifierOf/rico:isInstantiationOf ?s ;
rico:hasIdentifierType <http://docuteam.ch/vocab/identifiertypes/pid> .
}

When a user executes a query containing placeholders, the user is prompted to provide values for each placeholder. In the example above, the user will be asked to enter a value for the PID placeholder before the query is executed.

Multiple placeholders are supported.