Skip to content

Use Case: Invoking a VisKo Plan

nicholasdelrio edited this page Jul 10, 2012 · 40 revisions

What is first

VisKo accepts queries, creates a visualization plan, and invokes it by composing web services.

What we will cover

I want to mock this example up in full detail so that we can trace the RDF fragments through the pipeline. From the DataFAQs perspective, http://www.adobetutorialz.com/content_images/AdobeTechnologies/PostScript/manylines.ps is a dcat:Dataset that we're trying to evaluate with services https://raw.github.com/nicholasdelrio/visko/master/rdf/pdf-to-png.owl#pdf-to-png-as-sadi and https://raw.github.com/nicholasdelrio/visko/master/rdf/ps2pdf.owl#ps2pdfService-as-sadi, but I need to add the functionality to grab the output of the former and feed into the input of the latter. Once that's done, we'll have invoked a visko query plan, captured provenance of the invocation (including the original plan), and offered up the results in VoID, SD, and PROV linked data glory.

How to use DataFAQs to implement the VisKo query submission and invocation. This will lead to some new features of DataFAQs.

Let's get to it!

Notes at http://titanpad.com/ZeiMd7cOHj

Nick's planner accepts "visko-query:QueryPlanRequest" and returns a "visko-query:QueryPlan" containing a service composition chain to achieve the requested visualization.

<rdf:RDF xmlns="https://raw.github.com/nicholasdelrio/visko-rdf/master/rdf/queries/manylinesQueryPlanRequest.owl#"
     xml:base="https://raw.github.com/nicholasdelrio/visko-rdf/master/rdf/queries/manylinesQueryPlanRequest.owl"
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
     xmlns:visko-query="https://raw.github.com/nicholasdelrio/visko-rdf/master/rdf/ontology/visko-query.owl#"
     xmlns:prov="http://www.w3.org/ns/prov/"
     xmlns:owl="http://www.w3.org/2002/07/owl#"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:pml-provenance="http://inference-web.org/2.0/pml-provenance.owl#"
     xmlns:dataset="https://raw.github.com/nicholasdelrio/visko-rdf/master/rdf/ontology/dataset.owl#">

    <visko-query:QueryPlanRequest rdf:about="https://raw.github.com/nicholasdelrio/visko-rdf/master/rdf/queries/manylinesQueryPlanRequest.owl#manylinesQueryPlanRequest">
        <prov:wasDerivedFrom>
            <dataset:PSDocument rdf:about="https://raw.github.com/nicholasdelrio/visko-rdf/master/rdf/queries/manylinesQueryPlanRequest.owl#manylines">
                <pml-provenance:hasFormat rdf:resource="https://raw.github.com/nicholasdelrio/visko-rdf/master/rdf/formats/POSTSCRIPT.owl#POSTSCRIPT"/>
                <pml-provenance:hasURL>http://www.adobetutorialz.com/content_images/AdobeTechnologies/PostScript/manylines.ps</pml-provenance:hasURL>
            </dataset:PSDocument>
        </prov:wasDerivedFrom>
        <visko-query:hasResultViewableIn rdf:resource="https://raw.github.com/nicholasdelrio/visko-rdf/master/rdf/mozilla-firefox.owl#mozilla-firefox"/>
    </visko-query:QueryPlanRequest>
</rdf:RDF>
  • Output
<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:j.0="https://raw.github.com/nicholasdelrio/visko-rdf/master/rdf/ontology/visko-query.owl#"
    xmlns:j.1="http://www.w3c.org/ns/prov/"
    xmlns:j.2="http://www.w3.org/ns/prov/">
  <j.0:QueryPlan rdf:about="https://raw.github.com/nicholasdelrio/visko-rdf/master/rdf/queries/manylinesQueryPlanRequest.owl#manylinesQueryPlanRequest">
    <j.2:hadActivity>
      <j.1:Activity rdf:about="http://trust.utep.edu/visko/service-invocation1">
        <j.2:wasInformedBy>
          <j.1:Activity rdf:about="http://trust.utep.edu/visko/service-invocation0">
            <j.2:used>http://www.adobetutorialz.com/content_images/AdobeTechnologies/PostScript/manylines.ps</j.2:used>
            <j.2:wasAttributedTo>https://raw.github.com/nicholasdelrio/visko-rdf/master/rdf/ps2pdf.owl#ps2pdfService</j.2:wasAttributedTo>
          </j.1:Activity>
        </j.2:wasInformedBy>
        <j.2:wasAttributedTo>https://raw.github.com/nicholasdelrio/visko-rdf/master/rdf/pdf2png.owl#pdf2pngService</j.2:wasAttributedTo>
      </j.1:Activity>
    </j.2:hadActivity>
  </j.0:QueryPlan>
</rdf:RDF>

visko-planner.py is a FAqT Selector Service that accepts "VisKo queries" and returns a service composition plan to achieve the requested visualization.

TODO: We want it to return something like:

<service-invocation-2>   # Do this one second.
  a prov:Activity;
  prov:wasAttributedTo <https://raw.github.com/nicholasdelrio/visko/master/rdf/ps2pdf.owl#ps2pdfService-as-sadi>;
  prov:wasInformedBy <service-invocation-1>;
.

<service-invocation-1>   # Do this one first
   a prov:Activity;
     prov:wasAttributedTo <https://raw.github.com/nicholasdelrio/visko/master/rdf/pdf-to-png.owl#pdf-to-png-as-sadi>; 
     prov:used <http://www.adobetutorialz.com/content_images/AdobeTechnologies/PostScript/manylines.ps>;
.

<https://raw.github.com/nicholasdelrio/visko/master/rdf/pdf-to-png.owl#pdf-to-png-as-sadi>        
  a datafaqs:SADIService, OWLS:Service, prov:Agent;
  .
<https://raw.github.com/nicholasdelrio/visko/master/rdf/ps2pdf.owl#ps2pdfService-as-sadi>
  a datafaqs:SADIService, OWLS:Service, prov:Agent;
.

# TODO: plus anything that DataFAQs core needs!

http://iw.cs.utep.edu/visko-web/ViskoServletManager?requestType=query-triple-store&query= sits behind http://iw.cs.utep.edu/visko-web/sparql-query.html

Nick has the ps2pdf and pdf2png services hosted here: http://iw.cs.utep.edu:8080/toolkits-sadi/

What is next

Clone this wiki locally