Sponsored by BMBF Logo

# list all Wavetoy simulations (eg. simulations which have "wavetoy" in their
# parameter filenames), along with their run date and
# the value of IO::out_dir (if set)

PREFIX rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX cctk:    <http://www.cct.lsu.edu/~dstark/cctk/0.1/>
PREFIX xsd:     <http://www.w3.org/2001/XMLSchema#>

SELECT ?parfile ?startedAt ?outdir

FROM <http://astrogrid.aei.mpg.de:24002/context>

WHERE {

  ?simulation   cctk:startedAt          ?startedAt .
  ?simulation   cctk:parameterFile      ?parfile .

  FILTER ( REGEX (?parfile, ".*wavetoy.*", "i")) .

  OPTIONAL {
    ?simulation   cctk:hasThornList       ?list .
    ?list         cctk:containsThorn      ?thorn .
    ?thorn        cctk:hasName            'IOUtil' .
    ?thorn        cctk:hasParameter       ?parameter .
    ?parameter    cctk:hasName            'IO::out_dir' .
    ?parameter    cctk:hasValue           ?outdir .
  }
}