# Standards compliance

# SPARQL 1.1

Updated for 5.0.0.

In the following table we present a summary of the compliance of the latest version of Ontop with SPARQL 1.1 (opens new window), where rows correspond to sections of the WC3 recommendation and unsupported features are crossed out. Most of the features are supported, but some are unsupported or only partially supported.

Section in
SPARQL 1.1
Features Coverage
5. Graph Patterns (opens new window) BGP, FILTER 2/2
6. Including Optional Values (opens new window) OPTIONAL 1/1
7. Matching Alternatives (opens new window) UNION 1/1
8. Negation (opens new window) MINUS, FILTER [NOT] EXISTS 1/2
9. Property Paths (opens new window) PredicatePath, InversePath, ZeroOrMorePath, ... 0
10. Assignment (opens new window) BIND, VALUES 2/2
11. Aggregates (opens new window) COUNT, SUM, MIN, MAX, AVG, GROUP_CONCAT, SAMPLE 6/6
12. Subqueries (opens new window) Subqueries 1/1
13. RDF Dataset (opens new window) GRAPH, FROM [NAMED] 2/2
14. Basic Federated Query (opens new window) SERVICE 0
15. Solution Seqs. & Mods. (opens new window) ORDER BY, SELECT, DISTINCT, REDUCED, OFFSET, LIMIT 6/6
16. Query Forms (opens new window) SELECT, CONSTRUCT, ASK, DESCRIBE 4/4
17.4.1. Functional Forms (opens new window) BOUND, IF, COALESCE, EXISTS, NOT EXISTS, || , &&, =, sameTerm, IN, NOT IN 9/11
17.4.2. Functions on RDF Terms (opens new window) isIRI, isBlank, isLiteral, isNumeric, str, lang, datatype, IRI, BNODE, STRDT, STRLANG, UUID, STRUUID 11/13
17.4.3. Functions on Strings (opens new window) STRLEN, SUBSTR, UCASE, LCASE, STRSTARTS, STRENDS, CONTAINS, STRBEFORE, STRAFTER, ENCODE_FOR_URI, CONCAT, langMatches, REGEX, REPLACE 14/14
17.4.4. Functions on Numerics (opens new window) abs, round, ceil, floor, RAND 5/5
17.4.5. Functions on Dates&Times (opens new window) now, year, month, day, hours, minutes, seconds, timezone, tz 8/9
17.4.6. Hash Functions (opens new window) MD5, SHA1, SHA256, SHA384, SHA512 5/5
17.5 XPath Constructor Functions (opens new window) casting 0
17.6 Extensible Value Testing (opens new window) user defined functions 0

# Limitations

  • The 5 hash functions and functions REPLACE and REGEX for regular expressions have limited support because they heavily depend on the DBMS: not all DBMSs provide all hash functions, and many DBMSs have their own regex dialects. Currently, the SPARQL regular expressions of REPLACE and REGEX are simply sent to the DBMS.
  • In the implementation of function langMatches, the second argument has to a be a constant: allowing variables will have a negative impact on the performance in our framework.

# GeoSPARQL 1.0

Starting from 4.1.0.

The following table provides a summary of the compliance of the latest version of Ontop with OGC GeoSPARQL 1.0 (opens new window), the standard for representing and querying geospatial linked data. The summary focuses only on the main geospatial functions and properties and unsupported features are crossed out.

Section in OGC GeoSPARQL 1.0
Features Coverage
7. Topology Vocabulary Extensions - Properties geo:sfEquals, geo:sfDisjoint, geo:sfIntersects, geo:sfTouches, geo:sfCrosses, geo:sfWithin, geo:sfContains, geo:sfOverlaps, geo:ehEquals, geo:ehDisjoint, geo:ehMeet, geo:ehOverlap, geo:ehCovers, geo:ehCoveredBy, geo:ehInside, geo:ehContains, geo:rcc8eq, geo:rcc8dc, geo:rcc8ec, geo:rcc8po, geo:rcc8tppi, geo:rcc8tpp, geo:rcc8ntpp, geo:rcc8ntppi 0
8.4. Standard Properties for Geo:Geometry geo:dimension, geo:coordinateDimension, geo:spatialDimension, geo:isEmpty, geo:isSimple, geo:hasSerialization 0
8.5. WKT Serialization geo:wktLiteral, geo:asWKT 2/2
8.6. GML Serialization geo:gmlLiteral, geo:asGML 0
8.7. Non-Topological Query Functions geof:distance, geof:buffer, geof:convexHull , geof:intersection, geof:union, geof:difference geof:symDifference, geof:envelope, geof:boundary, geof:getSRID, 10/10
9.2. Common Query Functions geof:relate 1/1
9.3. Topological Simple Features Relation Family Query Functions geof:sfEquals, geof:sfDisjoint, geof:sfIntersects, geof:sfTouches, geof:sfCrosses, geof:sfWithin, geof:sfContains, geof:sfOverlaps 8/8
9.4. Topological Egenhofer Relation Family Query Functions geof:ehEquals, geof:ehDisjoint, geof:ehMeet, geof:ehOverlap, geof:ehCovers, geof:ehCoveredBy, geof:ehInside, geof:ehContains 8/8
9.5. Topological RCC8 Relation Family Query Functions geof:rcc8eq, geof:rcc8dc, geof:rcc8ec, geof:rcc8po, geof:rcc8tppi, geof:rcc8tpp, geof:rcc8ntpp, geof:rcc8ntppi 8/8

Several non-topological query functions use a unit of measure URI which OGC defines under a specific namespace e.g. <http://www.opengis.net/def/uom/OGC/1.0/metre>. The latest version of Ontop currently supports the units metre, radian and degree.

# R2RML

Updated for 4.2.0

The latest version of Ontop is almost fully compliant with the R2RML (opens new window) standard.

At the moment, it does NOT support:

For complex SQL queries (e.g. with a GROUP BY) in the mapping, Ontop may not be able to infer the datatype of each column if the option ontop.allowRetrievingBlackBoxViewMetadataFromDB is not enabled (disabled by default). In such a situation, it may not be able to derive the natural RDF datatype (opens new window) of a literal built over a column and may not apply the expected normalization. This can be partially mitigated by expliciting the RDF datatype in the mapping, but normalization would remain unapplied.

# RDF 1.1

Ontop complies with RDF 1.1 (opens new window). It types simple literals (from RDF 1.0) as xsd:string and literals with a language tag as rdf:langString.

# OWL 2 QL

# RDFS

# Time functions

Since 4.2.0.

These functions use the prefix ofn (http://www.ontotext.com/sparql/functions/) and their documentation can be found here (opens new window). They accept both xsd:date and xsd:dateTime as arguments.

Ofn Function
Argument 1 Argument 2
ofn:weeksBetween xsd:date xsd:date
ofn:weeksBetween xsd:dateTime xsd:dateTime
ofn:weeksBetween* xsd:date xsd:dateTime
ofn:weeksBetween* xsd:dateTime xsd:date
ofn:daysBetween xsd:date xsd:date
ofn:daysBetween xsd:dateTime xsd:dateTime
ofn:daysBetween* xsd:date xsd:dateTime
ofn:daysBetween* xsd:dateTime xsd:date
ofn:hoursBetween xsd:dateTime xsd:dateTime
ofn:minutesBetween xsd:dateTime xsd:dateTime
ofn:secondsBetween xsd:dateTime xsd:dateTime
ofn:millisBetween xsd:dateTime xsd:dateTime

Combinations of argument datatypes marked with the symbol * are not supported for queries over the following data sources: Oracle and Microsoft SQL Server.