Ontology Views Update Marianne Shaw 03042008 Overview Sub
Ontology Views Update Marianne Shaw 03/04/2008
Overview Sub and recursive queries on DB model ds-config. ttl Demo: Liver part TC Skolem Functions Syntax & result Status Demo: CONSTRUCT query Next up
Sub & recursive queries on DB Problem: Need to be able to specify data sources in subquery Currently can only specify DB model programmatically Solution: Support ds-config. ttl file that provides data source bindings to Assembler. Models Builds on top of Todd's work with Assembler. Models
ds-config. ttl @prefix rdf: <http: //www. w 3. org/1999/02/22 -rdf-syntax-ns#>. @prefix rdfs: <http: //www. w 3. org/2000/01/rdf-schema#>. @prefix owl: <http: //www. w 3. org/2002/07/owl#>. @prefix ja: <http: //jena. hpl. hp. com/2005/11/Assembler#>. @prefix dsc: <http: //localhost/ds-config#>. <ds: /root> rdf: type dsc: root ; dsc: data. Source _: source 1 ; dsc: data. Source _: source 2. _: source 1 dsc: model. Name "http: //bioontology. org/projects/ontologies/fma. Owl. Full. Component ; dsc: assembler. Model _: model 1. _: source 2 dsc: model. Name "file: ///home/mar/Ontology. Views/sub. Queries/db_subqueries/FMA_OW ; dsc: assembler. Model _: model 2.
Demo: Recursive Query on FMA PREFIX dl: <http: //bioontology. org/projects/ontologies/fma. Owl. Dl. Component_1_4_0#> CONSTRUCT { ? x ? y ? z. } FROM NAMED <liver> [ CONSTRUCT {dl: Liver dl: part ? obj} FROM <http: //bioontology. org/projects/ontologies/fma. Owl. Full. Component_1_4_0> WHERE {dl: Liver dl: part ? obj. } UNION CONSTRUCT {? a ? b ? c dl: part ? d} FROM NAMED <liver> FROM NAMED <http: //bioontology. org/projects/ontologies/fma. Owl. Full. Component_1_4_0> WHERE { GRAPH <liver> { ? a ? b ? c. }. GRAPH <http: //bioontology. org/projects/ontologies/fma. Owl. Full. Component_1_4_0> ? c dl: part ? d. }. }
Skolem Functions Query Syntax: [[ <URL>(arg 1, . . . ) ]] Result URL: <URL? param 1=. . . ¶m 2=. . . &> PREFIX PREFIX xsd: <http: //www. w 3. org/2001/XMLSchema#> dc: <http: //purl. org/dc/elements/1. 1/> ac: <http: //purl. org/ac/elements/1. 1/> bobo: <http: //localhost/bobo/> : <. > CONSTRUCT { [[bobo: skolem(? y)]] ac: booktitle [[bobo: skolem(? z)]] } FROM <skolem. ttl> WHERE { ? x ? y ? z.
Demo: Skolem Function @prefix dc: @prefix bob: <http: //purl. org/dc/elements/1. 1/>. <http: //localhost/bobo/>. [] dc: title "Harry Potter and the Philospher's Stone". [] dc: title "Harry Potter and the Chamber of Secrets". [] dc: title 5. [] dc: title <http: //localhost/bobo/skolem? param 1=5>. [] dc: title PREFIX xsd: <http: //www. w 3. org/2001/XMLSchema#> <http: //localhost/bobo/skolem? param 1=%22 Harry+Potter+and+the+Chamber+of+Secrets%22>. PREFIX dc: <http: //purl. org/dc/elements/1. 1/> PREFIX ac: <http: //purl. org/ac/elements/1. 1/> PREFIX bobo: <http: //localhost/bobo/> PREFIX : <. > CONSTRUCT { [[bobo: skolem(? y)]] ac: booktitle [[bobo: skolem(? z)]] } FROM <skolem. ttl> WHERE {
Skolem Function Status CONSTRUCT queries work Other query forms not yet working SELECT
Next up? Finish Skolem functions; clean up & check in Write Onard's RADLEX queries; run against FMA Generate RADLEX view Onard has provided SAV files (from Gary's software) for small portions of functionality
- Slides: 9