Feature #153

Nodetype resolver should allow access to datatypes

Added by Paula Gearon about 10 years ago.

Status:New Start date:
Priority:High Due date:
Assignee:Paula Gearon % Done:

0%

Category:Mulgara
Target version:-
Resolution:

Description

Need to provide access to datatypes in constraints. This will need to be done with a resolver - probably the nodetype resolver.

Once done, the following TQL query should be possible:

  select $x
  from <some:graph>
  where $x <some:property> $value
    and $value <rdf:type> <xsd:integer> in <sys:type>

In SPARQL, this will be:

  prefix some: <http://some.domain.com/>
  prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
  prefix xsd: <http://www.w3.org/2001/XMLSchema#>

  select $x
  from <urn:some:graph
  where {
    $x some:property $value .
    GRAPH <sys:type> { $value <rdf:type> <xsd:integer> }
  }

This will be the equivalent (though more efficient) to the query:

  prefix some: <http://some.domain.com/>
  prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
  prefix xsd: <http://www.w3.org/2001/XMLSchema#>

  select $x
  from <urn:some:graph
  where {
    $x some:property $value 
    FILTER (datatype($value) = xsd:integer)
  }

Also available in: Atom PDF