SlideShare une entreprise Scribd logo
1  sur  41
Creating web applications
   with LODSPeaKr
           Alvaro Graves
     Tetherless World Constellation
     Rensselaer Polytechnic Institute
            gravea3@rpi.edu
             @alvarograves
                    1
Agenda
• What is Linked Data?
• Why LODSPeaKr?
• Installation and setting up
• Building an app
 • Features of LODSPeaKr
• Future work and Conclusions
                       2
What is Linked Data?
 (you should know by now)




            3
What is Linked Data?
•   Set of best practices (based on Semantic Web
    technologies) to publish structured data on the Web

    •   Use of Web technologies (RDF, HTTP, URIs)

    •   Connect my data to other people’s data by links




                               4
What is Linked Data? (2)
•   Use (HTTP) URIs to identify things


•   When somebody lookup those URIs, provide useful
    information
     •   HTML for humans

     •   RDF for machines



•   Link to other relevant URIs so people can discover more
    data
                              5
Why do we need a XXX
         framework?
•   Lack of tools for using Linked Data

    •   Exploring data

    •   Publishing data

    •   Create applications

•   High quality data is available

    •   Lots of cases where computational complexity is low

    •   Data management complexity is high



                                       6
Linked Open Data Simple Publishing Kit




                  7
Installation



     8
Requirements
• git
• cURL
• SQLite3
• PHP > 5.2 (+ bindings to curl and sqlite)
• Apache mod_rewrite
• bash

                      9
Installation
                (the easy way)
cd /var/www/myapp
bash < <(curl -s http://lodspeakr.org/install)



•Where is LODSPK located? (e.g., http://localhost/myapp/)
•What is the default namespace? (e.g., http://tw.rpi.edu/)
•Where is your endpoint? (http://logd.tw.rpi.edu/sparql)
                               10
Permissions
• Let apache write in
   • cache/
   • meta/
   • meta/db.sqlite
  chown -R www-data cache meta

                        11
Exploring data

• By default LODSPeaKr allow users to
 • Find named graphs in sparql endpoint
 • Classes available
   • Instances available for each class
 • All predicates from/to a URI
                    12
LODSPeaKr installed, no further configuration
By default
  LODSPeaKr serves
• HTML+RDFa
• RDF/XML
• Turtle
• N-Triples
• RDFJSON
Content negotiation
Provides a mechanism for serving documents
    according to what the client accepts
             GET http://example.org/resource
            HTTP Accept: application/rdf+xml




                  HTTP Status: 303 See Other
           Location: http://example.org/resource.rdf   Server




            GET http://example.org/resource.rdf
             HTTP Accept: application/rdf+xml



 User

               http://example.org/resource.rdf
             Content-type: application/rdf+xml
Building a webapp
using LODSPeaKr


        16
Data: TWC People
• Information about
 • People
 • Meetings
 • Publications
 • Projects
 • etc.
                      17
URI Mirroring
• http://theirdomain/data => http://mydomain/data
• Provides dereferenceable URIs in own domain
• Can reuse data structure in a different domain
• When serving RDF, LODSPeaKr provides
 • Data in original form
 • owl:sameAs and con:preferredUri that links
    original and new URI

                           18
Modules in LODSPeaKr


              StaticModule    css, js files

               URIModule      matches particular URIs
  Execution
    order
              TypeModule      matches URIs of a certain type

              ServiceModule   creates new services




                     19
Basic file structure




         20
Model queries

LODSPeaKr uses            sp.query
Haanga, a Django-style SELECT ?s ?p
                            {
                                          WHERE {

template engine that          GRAPH ?g{
                                            ?s ?p <{{uri}}> .
allow developers to           }
                            }UNION{
include values in specific                   ?s ?p <{{uri}}> .
                            }
parts of a document.      }




                              21
View templates
   Templates also uses Haanga for filling results. Results
   are accessed via
         models.[query]+.variable.[value|curie]

             <table>
             {% for row in models.main %}
               <tr>
                 <td><a href='{{row.p1.value}}'>{{row.p1.curie}}</a></td>
                 <td><a href='{{row.s1.value}}'>{{row.s1.curie}}</a></td>
               </tr>
             {% endfor %}
             </table>

<table>
  <tr>
    <td><a   href='http://www.w3.org/1999/02/22-rdf-syntax-ns#type'>rdf:type</a></td>
    <td><a   rel='rdf:type' href='http://www.w3.org/2000/01/rdf-schema#Resource'>rdfs:Resource</a></td>
  </tr>
  <tr>
    <td><a   href='http://www.w3.org/1999/02/22-rdf-syntax-ns#type'>rdf:type</a></td>
    <td><a   rel='rdf:type' href='http://xmlns.com/foaf/0.1/Person'>foaf:Person</a></td>
  </tr>
</table>
                                                    22
View templates (2)
When you know there is only one row of results (or
you will only use the first) you can access it via

    first.[query]+.variable.[value|curie]



     <h1>{{first.main.name.value}}</h1>


                <h1>Foo Bar</h1>


                         23
Templating types
In LODSPeaKr we can define special templates for URIs
of a certain rdf:type (if multiple types you can define
priorities)
 $ utils/lodspk.sh create type foaf:Person
 will produce

 compponents/types/foaf:Person/
                              |-> html.template
                              |-> queries/
                                         |-> main.query


For specific URIs
$ utils/lodspk.sh create uri local:AlvaroGraves
                       24
Customizing types
• You can add all the
queries you want

• You can specify new
endpoints where data
can be fetched from

• Adding a lower level
(subdir) can use
previously fetched
results in their queries
Workflow creation
LODSPeaKr allow users to execute queries to multiple
 endpoints using previously retrieved values. It can be
            multiple queries at each step

                               LOCAL       3
                  1

                                       2
                               2


                                           DBPEDIA
                           LOGD




                          26
Text




 27
$ curl http://alia/twcpeople/instances/AlvaroGraves.ttl
@prefix   rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix   ns0:   <http://dbpedia.org/ontology/> .
@prefix   ns1:   <http://xmlns.com/foaf/0.1/> .
@prefix   ns2:   <http://purl.org/dc/terms/> .
@prefix   ns3:   <http://tw.rpi.edu/schema/> .
@prefix   ns4:   <http://www.w3.org/2002/07/owl#> .
@prefix   ns5:   <http://www.w3.org/2000/10/swap/pim/contact#> .

<http://tw.rpi.edu/instances/AlvaroGraves>
     ns0:birthPlace <http://dbpedia.org/resource/Santiago> ;
     ns1:name "Alvaro Graves"@en ;
     ns1:depiction <http://tw.rpi.edu/wiki.tw/images/2/21/Alvaro.jpg> ;
     ns2:description "PhD student in Cognitive Science. My interests are
Semantic Web, Web Science and cognitive and behavioral aspects of the Web.
Also interested in application of semantic technologies in
eGovernment."@en .

<http://tw.rpi.edu/instances/VIVOHackathon2011>
     ns3:hasAttendee <http://tw.rpi.edu/instances/AlvaroGraves> ,
                     <http://tw.rpi.edu/instances/TimLebo> ;
     ns1:name "VIVO Hackathon 2011"^^<http://www.w3.org/2001/
XMLSchema#string> .

<http://tw.rpi.edu/instances/TWCSpring2011BBQ>
     ns3:hasAttendee <http://tw.rpi.edu/instances/AlvaroGraves> ,
                     <http://tw.rpi.edu/instances/DominicDiFranzo> ,
                     <http://tw.rpi.edu/instances/CameronHelm> ,
                     <http://tw.rpi.edu/instances/PeterFox> ,
                     <http://tw.rpi.edu/instances/ScottYaninas> ,
                     <http://tw.rpi.edu/instances/DanielSouza> ,
                     <http://tw.rpi.edu/instances/PatrickWest> ,

                                        28
Serving multiple
                 representations
•   LODSPeaKr will convert            SELECT DISTINCT ?person ?email ?name
                                      WHERE {
    your SELECT query(*) in             GRAPH ?g {
                                              ?person a foaf:Person ;
    HTML to a CONSTRUCT                               foaf:name ?name ;
                                                      foaf:mbox ?email .
    query for serving RDF               }
                                           FILTER(regex(?name, "^y", "i" ))

                                      }order by ?name

•   You shouldn’t have to worry
    about it, unless you explicitly
    want something different in       CONSTRUCT {
    other representations               ?person a foaf:Person .
                                        ?person foaf:name ?name .
                                        ?person foaf:mbox ?email .
                                      } WHERE ...
Services
  • Allow developers to provide aggregated content
  • Similar structure to types
  • class, instance and namedGraph are services
$ utils/lodspk.sh create service people
will produce

components/services/people/
                          |-> html.template
                          |-> queries/
                                     |-> main.query
Same features as in
      typeModule

• Multiple representations, based on Accept
  HTTP header
• Workflow with multiple queries and
  SPARQL endpoints
http://alia/twcpeople/people
main.query
SELECT DISTINCT ?person ?email ?name
WHERE {
  GRAPH ?g {
    ?person a foaf:Person ;
            foaf:name ?name ;
            foaf:mbox ?email .
  }
}order by ?name


html.template
<ul>
    {% for row in models.main %}
        <li>
             <a href="{{row.people.value}}">{{row.name.value}}
              - {{row.email.value}}</a>
        </li>
    {% endfor %}
</ul>
Arguments in services
Arguments can be passed to a service after its name,
              separated by slashes

http://example.org/myService/arg0/arg1/....

  main.query
  SELECT DISTINCT ?person ?email ?name WHERE {
    GRAPH ?g {
      ?person a foaf:Person ;
              foaf:name ?name ;
             foaf:mbox ?email .
        FILTER(regex(?name, "^{{lodspk.args.arg0}}", "i" ))
    }
  }order by ?name

  http://alia/twcpeople/peopleByName/c
Creating APIs based on
           services
     We can reuse the service to provide a
     JSON-friendly version of the document

json.template
{
    "people": [
       {% for row in models.main %}
           {
             "uri": "{{row.person.value}}",
             "name": "{{row.name.value}}",
             "email": "{{row.email.value}}"
           }{%if ! forloop.last%},{%endif%}
       {% endfor %}
     ]
}
Use of filters

•   Haanga provides lots of useful filters

    •   Capitalize, urlescape, etc.

•   LODSPeaKr includes some handy filters

    •   Right now: Google maps, Google table, D3 graphs,
        gRaphael

    •   Not all are working 100% yet
geo.query
SELECT distinct ?lat ?lon ?name
WHERE {
<{{uri}}> rdfs:label ?name ;
          geo:lat ?lat;
          geo:long ?lon.
}


{{models.geo|googlemaps:"lat,lon,name"}}
Applications
• Farmers Market data
  • http://graves.cl/
 farmersmarket

• ESSI mobile webapp
  • http://essi-lod.org/
• DataFAQs
  • http://bit.ly/datafaqs
Conclusions
• LODSPeaKr allows developers build Linked Data-
  based applications in a rapid, simple way


• It also provides useful features as Content-
  negotiation, workflow execution, filters, etc.


• You can create Open Data portals, APIs, mobile
  webapps, etc.
                          38
Future work
• Improve crawling (single URIs, flow control)
• Add controller for more control over data
  management and flow
• Improve documentation!
• Comments, suggestions and bug reports
  are welcome


                     39
Thanks for testing!


• Eric Rozell
• Tim Lebo


                40
Useful Links
• LODSpeaKr
 • http://lodspeakr.org
•Github
 • http://github.com/alangrafu/lodspeakr
                 Contact
      gravea3@rpi.edu - @alvarograves

                     41

Contenu connexe

Tendances

Validating RDF data: Challenges and perspectives
Validating RDF data: Challenges and perspectivesValidating RDF data: Challenges and perspectives
Validating RDF data: Challenges and perspectivesJose Emilio Labra Gayo
 
Rdf In A Nutshell V1
Rdf In A Nutshell V1Rdf In A Nutshell V1
Rdf In A Nutshell V1Fabien Gandon
 
Intro to Linked, Dutch Ships and Sailors and SPARQL handson
Intro to Linked, Dutch Ships and Sailors and SPARQL handson Intro to Linked, Dutch Ships and Sailors and SPARQL handson
Intro to Linked, Dutch Ships and Sailors and SPARQL handson Victor de Boer
 
Two graph data models : RDF and Property Graphs
Two graph data models : RDF and Property GraphsTwo graph data models : RDF and Property Graphs
Two graph data models : RDF and Property Graphsandyseaborne
 
RDF Tutorial - SPARQL 20091031
RDF Tutorial - SPARQL 20091031RDF Tutorial - SPARQL 20091031
RDF Tutorial - SPARQL 20091031kwangsub kim
 
A Little SPARQL in your Analytics
A Little SPARQL in your AnalyticsA Little SPARQL in your Analytics
A Little SPARQL in your AnalyticsDr. Neil Brittliff
 
Exploring the Semantic Web
Exploring the Semantic WebExploring the Semantic Web
Exploring the Semantic WebRoberto García
 
#sod14 - ok, è un endpoint SPARQL non facciamoci prendere dal panico
#sod14 - ok, è un endpoint SPARQL non facciamoci prendere dal panico#sod14 - ok, è un endpoint SPARQL non facciamoci prendere dal panico
#sod14 - ok, è un endpoint SPARQL non facciamoci prendere dal panicoDiego Valerio Camarda
 
Publishing and Using Linked Open Data - Day 2
Publishing and Using Linked Open Data - Day 2Publishing and Using Linked Open Data - Day 2
Publishing and Using Linked Open Data - Day 2Richard Urban
 
Lita national forum 2012
Lita national forum 2012Lita national forum 2012
Lita national forum 2012Joel Richard
 
SUMMER SCHOOL LEX 2014 - RDF + SPARQL querying the web of (lex)data
SUMMER SCHOOL LEX 2014 - RDF + SPARQL querying the web of (lex)dataSUMMER SCHOOL LEX 2014 - RDF + SPARQL querying the web of (lex)data
SUMMER SCHOOL LEX 2014 - RDF + SPARQL querying the web of (lex)dataDiego Valerio Camarda
 
An introduction to Semantic Web and Linked Data
An introduction to Semantic  Web and Linked DataAn introduction to Semantic  Web and Linked Data
An introduction to Semantic Web and Linked DataGabriela Agustini
 
From the Semantic Web to the Web of Data: ten years of linking up
From the Semantic Web to the Web of Data: ten years of linking upFrom the Semantic Web to the Web of Data: ten years of linking up
From the Semantic Web to the Web of Data: ten years of linking upDavide Palmisano
 

Tendances (17)

Validating RDF data: Challenges and perspectives
Validating RDF data: Challenges and perspectivesValidating RDF data: Challenges and perspectives
Validating RDF data: Challenges and perspectives
 
Rdf In A Nutshell V1
Rdf In A Nutshell V1Rdf In A Nutshell V1
Rdf In A Nutshell V1
 
Intro to Linked, Dutch Ships and Sailors and SPARQL handson
Intro to Linked, Dutch Ships and Sailors and SPARQL handson Intro to Linked, Dutch Ships and Sailors and SPARQL handson
Intro to Linked, Dutch Ships and Sailors and SPARQL handson
 
Two graph data models : RDF and Property Graphs
Two graph data models : RDF and Property GraphsTwo graph data models : RDF and Property Graphs
Two graph data models : RDF and Property Graphs
 
Introduction to SPARQL
Introduction to SPARQLIntroduction to SPARQL
Introduction to SPARQL
 
RDF Tutorial - SPARQL 20091031
RDF Tutorial - SPARQL 20091031RDF Tutorial - SPARQL 20091031
RDF Tutorial - SPARQL 20091031
 
A Little SPARQL in your Analytics
A Little SPARQL in your AnalyticsA Little SPARQL in your Analytics
A Little SPARQL in your Analytics
 
ShEx by Example
ShEx by ExampleShEx by Example
ShEx by Example
 
Exploring the Semantic Web
Exploring the Semantic WebExploring the Semantic Web
Exploring the Semantic Web
 
#sod14 - ok, è un endpoint SPARQL non facciamoci prendere dal panico
#sod14 - ok, è un endpoint SPARQL non facciamoci prendere dal panico#sod14 - ok, è un endpoint SPARQL non facciamoci prendere dal panico
#sod14 - ok, è un endpoint SPARQL non facciamoci prendere dal panico
 
Publishing and Using Linked Open Data - Day 2
Publishing and Using Linked Open Data - Day 2Publishing and Using Linked Open Data - Day 2
Publishing and Using Linked Open Data - Day 2
 
Web of data
Web of dataWeb of data
Web of data
 
Lita national forum 2012
Lita national forum 2012Lita national forum 2012
Lita national forum 2012
 
SUMMER SCHOOL LEX 2014 - RDF + SPARQL querying the web of (lex)data
SUMMER SCHOOL LEX 2014 - RDF + SPARQL querying the web of (lex)dataSUMMER SCHOOL LEX 2014 - RDF + SPARQL querying the web of (lex)data
SUMMER SCHOOL LEX 2014 - RDF + SPARQL querying the web of (lex)data
 
Introduction to RDF
Introduction to RDFIntroduction to RDF
Introduction to RDF
 
An introduction to Semantic Web and Linked Data
An introduction to Semantic  Web and Linked DataAn introduction to Semantic  Web and Linked Data
An introduction to Semantic Web and Linked Data
 
From the Semantic Web to the Web of Data: ten years of linking up
From the Semantic Web to the Web of Data: ten years of linking upFrom the Semantic Web to the Web of Data: ten years of linking up
From the Semantic Web to the Web of Data: ten years of linking up
 

Similaire à Creating web applications with LODSPeaKr

Using Document Databases with TYPO3 Flow
Using Document Databases with TYPO3 FlowUsing Document Databases with TYPO3 Flow
Using Document Databases with TYPO3 FlowKarsten Dambekalns
 
Why do they call it Linked Data when they want to say...?
Why do they call it Linked Data when they want to say...?Why do they call it Linked Data when they want to say...?
Why do they call it Linked Data when they want to say...?Oscar Corcho
 
SemWeb Fundamentals - Info Linking & Layering in Practice
SemWeb Fundamentals - Info Linking & Layering in PracticeSemWeb Fundamentals - Info Linking & Layering in Practice
SemWeb Fundamentals - Info Linking & Layering in PracticeDan Brickley
 
Deploying PHP applications using Virtuoso as Application Server
Deploying PHP applications using Virtuoso as Application ServerDeploying PHP applications using Virtuoso as Application Server
Deploying PHP applications using Virtuoso as Application Serverwebhostingguy
 
Big data, just an introduction to Hadoop and Scripting Languages
Big data, just an introduction to Hadoop and Scripting LanguagesBig data, just an introduction to Hadoop and Scripting Languages
Big data, just an introduction to Hadoop and Scripting LanguagesCorley S.r.l.
 
Hands On Spring Data
Hands On Spring DataHands On Spring Data
Hands On Spring DataEric Bottard
 
Apache Any23 - Anything to Triples
Apache Any23 - Anything to TriplesApache Any23 - Anything to Triples
Apache Any23 - Anything to TriplesMichele Mostarda
 
Rapid API Development ArangoDB Foxx
Rapid API Development ArangoDB FoxxRapid API Development ArangoDB Foxx
Rapid API Development ArangoDB FoxxMichael Hackstein
 
Data Integration And Visualization
Data Integration And VisualizationData Integration And Visualization
Data Integration And VisualizationIvan Ermilov
 
Berlin Buzz Words - Apache Drill by Ted Dunning & Michael Hausenblas
Berlin Buzz Words - Apache Drill by Ted Dunning & Michael HausenblasBerlin Buzz Words - Apache Drill by Ted Dunning & Michael Hausenblas
Berlin Buzz Words - Apache Drill by Ted Dunning & Michael HausenblasMapR Technologies
 
JAX-RS JavaOne Hyderabad, India 2011
JAX-RS JavaOne Hyderabad, India 2011JAX-RS JavaOne Hyderabad, India 2011
JAX-RS JavaOne Hyderabad, India 2011Shreedhar Ganapathy
 
ApacheCon NA 2015 Spark / Solr Integration
ApacheCon NA 2015 Spark / Solr IntegrationApacheCon NA 2015 Spark / Solr Integration
ApacheCon NA 2015 Spark / Solr Integrationthelabdude
 
Elasticsearch, Logstash, Kibana. Cool search, analytics, data mining and more...
Elasticsearch, Logstash, Kibana. Cool search, analytics, data mining and more...Elasticsearch, Logstash, Kibana. Cool search, analytics, data mining and more...
Elasticsearch, Logstash, Kibana. Cool search, analytics, data mining and more...Oleksiy Panchenko
 
IT talk SPb "Full text search for lazy guys"
IT talk SPb "Full text search for lazy guys" IT talk SPb "Full text search for lazy guys"
IT talk SPb "Full text search for lazy guys" DataArt
 
Solr Recipes Workshop
Solr Recipes WorkshopSolr Recipes Workshop
Solr Recipes WorkshopErik Hatcher
 
Introduction to Solr
Introduction to SolrIntroduction to Solr
Introduction to SolrErik Hatcher
 
JAX-RS Creating RESTFul services
JAX-RS Creating RESTFul servicesJAX-RS Creating RESTFul services
JAX-RS Creating RESTFul servicesLudovic Champenois
 
Building Hadoop Data Applications with Kite
Building Hadoop Data Applications with KiteBuilding Hadoop Data Applications with Kite
Building Hadoop Data Applications with Kitehuguk
 

Similaire à Creating web applications with LODSPeaKr (20)

Using Document Databases with TYPO3 Flow
Using Document Databases with TYPO3 FlowUsing Document Databases with TYPO3 Flow
Using Document Databases with TYPO3 Flow
 
Why do they call it Linked Data when they want to say...?
Why do they call it Linked Data when they want to say...?Why do they call it Linked Data when they want to say...?
Why do they call it Linked Data when they want to say...?
 
SemWeb Fundamentals - Info Linking & Layering in Practice
SemWeb Fundamentals - Info Linking & Layering in PracticeSemWeb Fundamentals - Info Linking & Layering in Practice
SemWeb Fundamentals - Info Linking & Layering in Practice
 
Deploying PHP applications using Virtuoso as Application Server
Deploying PHP applications using Virtuoso as Application ServerDeploying PHP applications using Virtuoso as Application Server
Deploying PHP applications using Virtuoso as Application Server
 
Big data, just an introduction to Hadoop and Scripting Languages
Big data, just an introduction to Hadoop and Scripting LanguagesBig data, just an introduction to Hadoop and Scripting Languages
Big data, just an introduction to Hadoop and Scripting Languages
 
Hands On Spring Data
Hands On Spring DataHands On Spring Data
Hands On Spring Data
 
SolrCloud on Hadoop
SolrCloud on HadoopSolrCloud on Hadoop
SolrCloud on Hadoop
 
Danbri Drupalcon Export
Danbri Drupalcon ExportDanbri Drupalcon Export
Danbri Drupalcon Export
 
Apache Any23 - Anything to Triples
Apache Any23 - Anything to TriplesApache Any23 - Anything to Triples
Apache Any23 - Anything to Triples
 
Rapid API Development ArangoDB Foxx
Rapid API Development ArangoDB FoxxRapid API Development ArangoDB Foxx
Rapid API Development ArangoDB Foxx
 
Data Integration And Visualization
Data Integration And VisualizationData Integration And Visualization
Data Integration And Visualization
 
Berlin Buzz Words - Apache Drill by Ted Dunning & Michael Hausenblas
Berlin Buzz Words - Apache Drill by Ted Dunning & Michael HausenblasBerlin Buzz Words - Apache Drill by Ted Dunning & Michael Hausenblas
Berlin Buzz Words - Apache Drill by Ted Dunning & Michael Hausenblas
 
JAX-RS JavaOne Hyderabad, India 2011
JAX-RS JavaOne Hyderabad, India 2011JAX-RS JavaOne Hyderabad, India 2011
JAX-RS JavaOne Hyderabad, India 2011
 
ApacheCon NA 2015 Spark / Solr Integration
ApacheCon NA 2015 Spark / Solr IntegrationApacheCon NA 2015 Spark / Solr Integration
ApacheCon NA 2015 Spark / Solr Integration
 
Elasticsearch, Logstash, Kibana. Cool search, analytics, data mining and more...
Elasticsearch, Logstash, Kibana. Cool search, analytics, data mining and more...Elasticsearch, Logstash, Kibana. Cool search, analytics, data mining and more...
Elasticsearch, Logstash, Kibana. Cool search, analytics, data mining and more...
 
IT talk SPb "Full text search for lazy guys"
IT talk SPb "Full text search for lazy guys" IT talk SPb "Full text search for lazy guys"
IT talk SPb "Full text search for lazy guys"
 
Solr Recipes Workshop
Solr Recipes WorkshopSolr Recipes Workshop
Solr Recipes Workshop
 
Introduction to Solr
Introduction to SolrIntroduction to Solr
Introduction to Solr
 
JAX-RS Creating RESTFul services
JAX-RS Creating RESTFul servicesJAX-RS Creating RESTFul services
JAX-RS Creating RESTFul services
 
Building Hadoop Data Applications with Kite
Building Hadoop Data Applications with KiteBuilding Hadoop Data Applications with Kite
Building Hadoop Data Applications with Kite
 

Plus de Alvaro Graves

Datos malos, robots tristes
Datos malos, robots tristesDatos malos, robots tristes
Datos malos, robots tristesAlvaro Graves
 
Creation of visualizations based on Linked Data
Creation of visualizations based on Linked DataCreation of visualizations based on Linked Data
Creation of visualizations based on Linked DataAlvaro Graves
 
Democratizing Open Data
Democratizing Open DataDemocratizing Open Data
Democratizing Open DataAlvaro Graves
 
Creating visualizations using Linked Data
Creating visualizations using Linked DataCreating visualizations using Linked Data
Creating visualizations using Linked DataAlvaro Graves
 
Creating Visualizations with Linked Open Data
Creating Visualizations with Linked Open DataCreating Visualizations with Linked Open Data
Creating Visualizations with Linked Open DataAlvaro Graves
 
Visualizations using Visualbox
Visualizations using VisualboxVisualizations using Visualbox
Visualizations using VisualboxAlvaro Graves
 
Como crear aplicaciones basadas en linked data usando lods pea kr
Como crear aplicaciones basadas en linked data usando lods pea krComo crear aplicaciones basadas en linked data usando lods pea kr
Como crear aplicaciones basadas en linked data usando lods pea krAlvaro Graves
 
Explotando la Web de Datos: Como crear aplicaciones usando Linked Open Data
Explotando la Web de Datos: Como crear aplicaciones usando Linked Open DataExplotando la Web de Datos: Como crear aplicaciones usando Linked Open Data
Explotando la Web de Datos: Como crear aplicaciones usando Linked Open DataAlvaro Graves
 
Publishing Linked Data with LODSPeaKr
Publishing Linked Data with LODSPeaKrPublishing Linked Data with LODSPeaKr
Publishing Linked Data with LODSPeaKrAlvaro Graves
 
Improving decision-making based on government data and visualizations
Improving decision-making based on government data and visualizationsImproving decision-making based on government data and visualizations
Improving decision-making based on government data and visualizationsAlvaro Graves
 
Publicando RDF y Linked Data con LODSPeaKr
Publicando RDF  y Linked Data con LODSPeaKrPublicando RDF  y Linked Data con LODSPeaKr
Publicando RDF y Linked Data con LODSPeaKrAlvaro Graves
 
Open Data y participación ciudadana
Open Data y participación ciudadanaOpen Data y participación ciudadana
Open Data y participación ciudadanaAlvaro Graves
 
Web semántica y linked data la web como bd
Web semántica y linked data  la web como bdWeb semántica y linked data  la web como bd
Web semántica y linked data la web como bdAlvaro Graves
 
LODSPeaKr - Use cases Lighting Talk
LODSPeaKr - Use cases Lighting TalkLODSPeaKr - Use cases Lighting Talk
LODSPeaKr - Use cases Lighting TalkAlvaro Graves
 
Publishing Linked Open Data in 15 minutes
Publishing Linked Open Data in 15 minutesPublishing Linked Open Data in 15 minutes
Publishing Linked Open Data in 15 minutesAlvaro Graves
 
TWC LOGD: A Portal for Linking Government Data
TWC LOGD: A Portal for Linking Government DataTWC LOGD: A Portal for Linking Government Data
TWC LOGD: A Portal for Linking Government DataAlvaro Graves
 
POMELo: A PML Online Editor
POMELo: A PML Online EditorPOMELo: A PML Online Editor
POMELo: A PML Online EditorAlvaro Graves
 
Integrating and publishing public safety data using semantic technologies
Integrating and publishing public safety data using semantic technologiesIntegrating and publishing public safety data using semantic technologies
Integrating and publishing public safety data using semantic technologiesAlvaro Graves
 
Towards a better understanding of Social Machines
Towards a better understanding of Social MachinesTowards a better understanding of Social Machines
Towards a better understanding of Social MachinesAlvaro Graves
 

Plus de Alvaro Graves (20)

Data Tuesday
Data TuesdayData Tuesday
Data Tuesday
 
Datos malos, robots tristes
Datos malos, robots tristesDatos malos, robots tristes
Datos malos, robots tristes
 
Creation of visualizations based on Linked Data
Creation of visualizations based on Linked DataCreation of visualizations based on Linked Data
Creation of visualizations based on Linked Data
 
Democratizing Open Data
Democratizing Open DataDemocratizing Open Data
Democratizing Open Data
 
Creating visualizations using Linked Data
Creating visualizations using Linked DataCreating visualizations using Linked Data
Creating visualizations using Linked Data
 
Creating Visualizations with Linked Open Data
Creating Visualizations with Linked Open DataCreating Visualizations with Linked Open Data
Creating Visualizations with Linked Open Data
 
Visualizations using Visualbox
Visualizations using VisualboxVisualizations using Visualbox
Visualizations using Visualbox
 
Como crear aplicaciones basadas en linked data usando lods pea kr
Como crear aplicaciones basadas en linked data usando lods pea krComo crear aplicaciones basadas en linked data usando lods pea kr
Como crear aplicaciones basadas en linked data usando lods pea kr
 
Explotando la Web de Datos: Como crear aplicaciones usando Linked Open Data
Explotando la Web de Datos: Como crear aplicaciones usando Linked Open DataExplotando la Web de Datos: Como crear aplicaciones usando Linked Open Data
Explotando la Web de Datos: Como crear aplicaciones usando Linked Open Data
 
Publishing Linked Data with LODSPeaKr
Publishing Linked Data with LODSPeaKrPublishing Linked Data with LODSPeaKr
Publishing Linked Data with LODSPeaKr
 
Improving decision-making based on government data and visualizations
Improving decision-making based on government data and visualizationsImproving decision-making based on government data and visualizations
Improving decision-making based on government data and visualizations
 
Publicando RDF y Linked Data con LODSPeaKr
Publicando RDF  y Linked Data con LODSPeaKrPublicando RDF  y Linked Data con LODSPeaKr
Publicando RDF y Linked Data con LODSPeaKr
 
Open Data y participación ciudadana
Open Data y participación ciudadanaOpen Data y participación ciudadana
Open Data y participación ciudadana
 
Web semántica y linked data la web como bd
Web semántica y linked data  la web como bdWeb semántica y linked data  la web como bd
Web semántica y linked data la web como bd
 
LODSPeaKr - Use cases Lighting Talk
LODSPeaKr - Use cases Lighting TalkLODSPeaKr - Use cases Lighting Talk
LODSPeaKr - Use cases Lighting Talk
 
Publishing Linked Open Data in 15 minutes
Publishing Linked Open Data in 15 minutesPublishing Linked Open Data in 15 minutes
Publishing Linked Open Data in 15 minutes
 
TWC LOGD: A Portal for Linking Government Data
TWC LOGD: A Portal for Linking Government DataTWC LOGD: A Portal for Linking Government Data
TWC LOGD: A Portal for Linking Government Data
 
POMELo: A PML Online Editor
POMELo: A PML Online EditorPOMELo: A PML Online Editor
POMELo: A PML Online Editor
 
Integrating and publishing public safety data using semantic technologies
Integrating and publishing public safety data using semantic technologiesIntegrating and publishing public safety data using semantic technologies
Integrating and publishing public safety data using semantic technologies
 
Towards a better understanding of Social Machines
Towards a better understanding of Social MachinesTowards a better understanding of Social Machines
Towards a better understanding of Social Machines
 

Dernier

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 

Dernier (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 

Creating web applications with LODSPeaKr

  • 1. Creating web applications with LODSPeaKr Alvaro Graves Tetherless World Constellation Rensselaer Polytechnic Institute gravea3@rpi.edu @alvarograves 1
  • 2. Agenda • What is Linked Data? • Why LODSPeaKr? • Installation and setting up • Building an app • Features of LODSPeaKr • Future work and Conclusions 2
  • 3. What is Linked Data? (you should know by now) 3
  • 4. What is Linked Data? • Set of best practices (based on Semantic Web technologies) to publish structured data on the Web • Use of Web technologies (RDF, HTTP, URIs) • Connect my data to other people’s data by links 4
  • 5. What is Linked Data? (2) • Use (HTTP) URIs to identify things • When somebody lookup those URIs, provide useful information • HTML for humans • RDF for machines • Link to other relevant URIs so people can discover more data 5
  • 6. Why do we need a XXX framework? • Lack of tools for using Linked Data • Exploring data • Publishing data • Create applications • High quality data is available • Lots of cases where computational complexity is low • Data management complexity is high 6
  • 7. Linked Open Data Simple Publishing Kit 7
  • 9. Requirements • git • cURL • SQLite3 • PHP > 5.2 (+ bindings to curl and sqlite) • Apache mod_rewrite • bash 9
  • 10. Installation (the easy way) cd /var/www/myapp bash < <(curl -s http://lodspeakr.org/install) •Where is LODSPK located? (e.g., http://localhost/myapp/) •What is the default namespace? (e.g., http://tw.rpi.edu/) •Where is your endpoint? (http://logd.tw.rpi.edu/sparql) 10
  • 11. Permissions • Let apache write in • cache/ • meta/ • meta/db.sqlite chown -R www-data cache meta 11
  • 12. Exploring data • By default LODSPeaKr allow users to • Find named graphs in sparql endpoint • Classes available • Instances available for each class • All predicates from/to a URI 12
  • 13. LODSPeaKr installed, no further configuration
  • 14. By default LODSPeaKr serves • HTML+RDFa • RDF/XML • Turtle • N-Triples • RDFJSON
  • 15. Content negotiation Provides a mechanism for serving documents according to what the client accepts GET http://example.org/resource HTTP Accept: application/rdf+xml HTTP Status: 303 See Other Location: http://example.org/resource.rdf Server GET http://example.org/resource.rdf HTTP Accept: application/rdf+xml User http://example.org/resource.rdf Content-type: application/rdf+xml
  • 16. Building a webapp using LODSPeaKr 16
  • 17. Data: TWC People • Information about • People • Meetings • Publications • Projects • etc. 17
  • 18. URI Mirroring • http://theirdomain/data => http://mydomain/data • Provides dereferenceable URIs in own domain • Can reuse data structure in a different domain • When serving RDF, LODSPeaKr provides • Data in original form • owl:sameAs and con:preferredUri that links original and new URI 18
  • 19. Modules in LODSPeaKr StaticModule css, js files URIModule matches particular URIs Execution order TypeModule matches URIs of a certain type ServiceModule creates new services 19
  • 21. Model queries LODSPeaKr uses sp.query Haanga, a Django-style SELECT ?s ?p { WHERE { template engine that GRAPH ?g{ ?s ?p <{{uri}}> . allow developers to } }UNION{ include values in specific ?s ?p <{{uri}}> . } parts of a document. } 21
  • 22. View templates Templates also uses Haanga for filling results. Results are accessed via models.[query]+.variable.[value|curie] <table> {% for row in models.main %} <tr> <td><a href='{{row.p1.value}}'>{{row.p1.curie}}</a></td> <td><a href='{{row.s1.value}}'>{{row.s1.curie}}</a></td> </tr> {% endfor %} </table> <table> <tr> <td><a href='http://www.w3.org/1999/02/22-rdf-syntax-ns#type'>rdf:type</a></td> <td><a rel='rdf:type' href='http://www.w3.org/2000/01/rdf-schema#Resource'>rdfs:Resource</a></td> </tr> <tr> <td><a href='http://www.w3.org/1999/02/22-rdf-syntax-ns#type'>rdf:type</a></td> <td><a rel='rdf:type' href='http://xmlns.com/foaf/0.1/Person'>foaf:Person</a></td> </tr> </table> 22
  • 23. View templates (2) When you know there is only one row of results (or you will only use the first) you can access it via first.[query]+.variable.[value|curie] <h1>{{first.main.name.value}}</h1> <h1>Foo Bar</h1> 23
  • 24. Templating types In LODSPeaKr we can define special templates for URIs of a certain rdf:type (if multiple types you can define priorities) $ utils/lodspk.sh create type foaf:Person will produce compponents/types/foaf:Person/ |-> html.template |-> queries/ |-> main.query For specific URIs $ utils/lodspk.sh create uri local:AlvaroGraves 24
  • 25. Customizing types • You can add all the queries you want • You can specify new endpoints where data can be fetched from • Adding a lower level (subdir) can use previously fetched results in their queries
  • 26. Workflow creation LODSPeaKr allow users to execute queries to multiple endpoints using previously retrieved values. It can be multiple queries at each step LOCAL 3 1 2 2 DBPEDIA LOGD 26
  • 28. $ curl http://alia/twcpeople/instances/AlvaroGraves.ttl @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix ns0: <http://dbpedia.org/ontology/> . @prefix ns1: <http://xmlns.com/foaf/0.1/> . @prefix ns2: <http://purl.org/dc/terms/> . @prefix ns3: <http://tw.rpi.edu/schema/> . @prefix ns4: <http://www.w3.org/2002/07/owl#> . @prefix ns5: <http://www.w3.org/2000/10/swap/pim/contact#> . <http://tw.rpi.edu/instances/AlvaroGraves> ns0:birthPlace <http://dbpedia.org/resource/Santiago> ; ns1:name "Alvaro Graves"@en ; ns1:depiction <http://tw.rpi.edu/wiki.tw/images/2/21/Alvaro.jpg> ; ns2:description "PhD student in Cognitive Science. My interests are Semantic Web, Web Science and cognitive and behavioral aspects of the Web. Also interested in application of semantic technologies in eGovernment."@en . <http://tw.rpi.edu/instances/VIVOHackathon2011> ns3:hasAttendee <http://tw.rpi.edu/instances/AlvaroGraves> , <http://tw.rpi.edu/instances/TimLebo> ; ns1:name "VIVO Hackathon 2011"^^<http://www.w3.org/2001/ XMLSchema#string> . <http://tw.rpi.edu/instances/TWCSpring2011BBQ> ns3:hasAttendee <http://tw.rpi.edu/instances/AlvaroGraves> , <http://tw.rpi.edu/instances/DominicDiFranzo> , <http://tw.rpi.edu/instances/CameronHelm> , <http://tw.rpi.edu/instances/PeterFox> , <http://tw.rpi.edu/instances/ScottYaninas> , <http://tw.rpi.edu/instances/DanielSouza> , <http://tw.rpi.edu/instances/PatrickWest> , 28
  • 29. Serving multiple representations • LODSPeaKr will convert SELECT DISTINCT ?person ?email ?name WHERE { your SELECT query(*) in GRAPH ?g { ?person a foaf:Person ; HTML to a CONSTRUCT foaf:name ?name ; foaf:mbox ?email . query for serving RDF } FILTER(regex(?name, "^y", "i" )) }order by ?name • You shouldn’t have to worry about it, unless you explicitly want something different in CONSTRUCT { other representations ?person a foaf:Person . ?person foaf:name ?name . ?person foaf:mbox ?email . } WHERE ...
  • 30. Services • Allow developers to provide aggregated content • Similar structure to types • class, instance and namedGraph are services $ utils/lodspk.sh create service people will produce components/services/people/ |-> html.template |-> queries/ |-> main.query
  • 31. Same features as in typeModule • Multiple representations, based on Accept HTTP header • Workflow with multiple queries and SPARQL endpoints
  • 32. http://alia/twcpeople/people main.query SELECT DISTINCT ?person ?email ?name WHERE { GRAPH ?g { ?person a foaf:Person ; foaf:name ?name ; foaf:mbox ?email . } }order by ?name html.template <ul> {% for row in models.main %} <li> <a href="{{row.people.value}}">{{row.name.value}} - {{row.email.value}}</a> </li> {% endfor %} </ul>
  • 33. Arguments in services Arguments can be passed to a service after its name, separated by slashes http://example.org/myService/arg0/arg1/.... main.query SELECT DISTINCT ?person ?email ?name WHERE { GRAPH ?g { ?person a foaf:Person ; foaf:name ?name ; foaf:mbox ?email . FILTER(regex(?name, "^{{lodspk.args.arg0}}", "i" )) } }order by ?name http://alia/twcpeople/peopleByName/c
  • 34. Creating APIs based on services We can reuse the service to provide a JSON-friendly version of the document json.template { "people": [ {% for row in models.main %} { "uri": "{{row.person.value}}", "name": "{{row.name.value}}", "email": "{{row.email.value}}" }{%if ! forloop.last%},{%endif%} {% endfor %} ] }
  • 35. Use of filters • Haanga provides lots of useful filters • Capitalize, urlescape, etc. • LODSPeaKr includes some handy filters • Right now: Google maps, Google table, D3 graphs, gRaphael • Not all are working 100% yet
  • 36. geo.query SELECT distinct ?lat ?lon ?name WHERE { <{{uri}}> rdfs:label ?name ; geo:lat ?lat; geo:long ?lon. } {{models.geo|googlemaps:"lat,lon,name"}}
  • 37. Applications • Farmers Market data • http://graves.cl/ farmersmarket • ESSI mobile webapp • http://essi-lod.org/ • DataFAQs • http://bit.ly/datafaqs
  • 38. Conclusions • LODSPeaKr allows developers build Linked Data- based applications in a rapid, simple way • It also provides useful features as Content- negotiation, workflow execution, filters, etc. • You can create Open Data portals, APIs, mobile webapps, etc. 38
  • 39. Future work • Improve crawling (single URIs, flow control) • Add controller for more control over data management and flow • Improve documentation! • Comments, suggestions and bug reports are welcome 39
  • 40. Thanks for testing! • Eric Rozell • Tim Lebo 40
  • 41. Useful Links • LODSpeaKr • http://lodspeakr.org •Github • http://github.com/alangrafu/lodspeakr Contact gravea3@rpi.edu - @alvarograves 41

Notes de l'éditeur

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n