Docstoc

downloading

Document Sample
downloading Powered By Docstoc
					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 AssemblerModels
        Builds on top of Todd's work with AssemblerModels
                             ds-config.ttl
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.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:dataSource _:source1
      ; dsc:dataSource _:source2
         .

_:source1 dsc:modelName "http://bioontology.org/projects/ontologies/fma/fmaOwlFullComponent
       ; dsc:assemblerModel _:model1
       .

_:source2 dsc:modelName "file:///home/mar/OntologyViews/subQueries/db_subqueries/FMA_OW
       ; dsc:assemblerModel _:model2
       .
Demo: Recursive Query on FMA
PREFIX dl: <http://bioontology.org/projects/ontologies/fma/fmaOwlDlComponent_1_4_0#>
CONSTRUCT { ?x ?y ?z .}
FROM NAMED <liver> [
     CONSTRUCT {dl:Liver dl:part ?obj}
     FROM <http://bioontology.org/projects/ontologies/fma/fmaOwlFullComponent_1_4_0>
     WHERE {dl:Liver dl:part ?obj .}

      UNION

        CONSTRUCT {?a ?b ?c . ?c dl:part ?d}
    FROM NAMED <liver>
        FROM NAMED
<http://bioontology.org/projects/ontologies/fma/fmaOwlFullComponent_1_4_0>
     WHERE {
       GRAPH <liver> { ?a ?b ?c . } .
         GRAPH <http://bioontology.org/projects/ontologies/fma/fmaOwlFullComponent_1_4_0>
?c dl:part ?d . } .
     }
              Skolem Functions
   Query Syntax: [[ <URL>(arg1, ...) ]]
   Result URL: <URL?param1=...&param2=...&>

    PREFIX   xsd: <http://www.w3.org/2001/XMLSchema#>
    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 {
      ?x ?y ?z .
          Demo: Skolem Function
@prefix dc:    <http://purl.org/dc/elements/1.1/> .
@prefix bob:   <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?param1=5> .
[] dc:title
              PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
<http://localhost/bobo/skolem?param1=%22Harry+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>
     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

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:0
posted:3/14/2013
language:Unknown
pages:9