Warning:
This wiki has been archived and is now read-only.

TaskForce:PropertyPaths

From SPARQL Working Group
Jump to: navigation, search


Property Paths Task Force

Status

Straw poll summary: 2009JulSep/0469.

Text Design:PropertyPaths

Telecon Availability

Current candidate: Wednesday: 14:00 UTC (16:00, Amsterdam, 15:00 UK, 10:00 Boston)

Andy: Monday, Wednesday or Friday any time up to early evening UK time.

Luke: Monday, Wednesday, or Friday any time between 09:30 until early evening UK time. Also, Thursday morning (UK time).

Lee: Of the above times, Monday and Wednesday US mornings are best for me.

Ivan: Friday would be difficult. Wednesday early afternoon (Amsterdam time, early morning Boston time) is the best. Monday: before 16:00 my time (15:00 UK, 10:00 Boston); I have a regular call at 16:00 that I cannot miss.

Alex: Monday, Tuesday, Wednesday from 15 UK Time, Thursday

Participants

This is the list of people who have expressed an interest. Please add your self if interested in attending telecons or contributing text. Discussions via email will be on the SPARQL-WG mailing list for everyone to contribute to.

Material

Feature:PropertyPaths

Use Cases

In SELECT queries

Walk Two Properties

Get the names of people Alice knows.

PREFIX  foaf: <http://xmlns.com/foaf/0.1/>
SELECT  ?name
WHERE
  { ?x foaf:mbox <mailto:alice@example> .
    ?x foaf:knows/foaf:name ?name
  }
Follow a Property

Follow foaf:knows links (path of length 1 or more), returning the name if found.

SELECT ?x ?name
{
  ?x foaf:knows+ ?y .
  OPTIONAL { ?y foaf:name ?name }
}
Subclass
SELECT ?x ?t 
{ ?x rdf:type/rdfs:subClassOf* ?t }
Subproperty
SELECT ?x ?t 
{ ?x ?p ?v . ?p rdfs:subPropertyOf* :property }
List members

Get me all of the members of an RDF list.

SELECT ?member
{
  ?list rdf:rest*/rdf:first ?member
}
Ancestors

Get me all the people that are my ancestors, given a graph with ex:mother and ex:father predicates.

SELECT ?ancestor
{
   ?ancestor (ex:motherOf|ex:fatherOf)+ <#me>
}

In CONSTRUCT queries

In the template of a CONSTRUCT to mean any path:

CONSTRUCT {
       ?home contact:address ?address .
       ?address .+ ?x
}
WHERE { ... }