You are here:
/ Dashboard / Main / InteractiveSparqlQueryBuilder / InteractiveSparqlQueryBuilderQueryTutorialConstruct

iSPARQL Querying Tutorial with SPARQL Query type "CONSTRUCT".

In this tutorial we will show how to execute a SPARQL query with type "CONSTRUCT". A rich list of Virtuoso SPARQL Queries you can find in the References section.

Enter a query and execute

  1. Choose a SPARQL query from the References list. For example, let's use the SPARQL query, which dumps all Weblog posts sender nick and name details. You can find this SPARQL Query in the ODS FOAF Queries List.

    prefix sioc: <http://rdfs.org/sioc/ns#> prefix sioct: <http://rdfs.org/sioc/types#> prefix foaf: <http://xmlns.com/foaf/0.1/> CONSTRUCT { ?post foaf:maker ?maker . ?maker foaf:nick ?nick . ?maker foaf:name ?fname . } from <http://demo.openlinksw.com/dataspace> where { ?forum a sioct:Weblog . ?forum sioc:container_of ?post. optional { ?post foaf:maker ?maker }. optional { ?maker foaf:nick ?nick } . optional { ?maker foaf:name ?fname } . }

  2. Go to iSPARQL demo page.
  3. Click "Ok" in the shown Login form. By default should be shown user name demo and password demo.
  4. As result will be shown the iSPARQL home page, with opened tab "QBE" and default graph elements will be shown on the Canvas. Click the "Clear Pane" icon form the toolbar in order to empty the Canvas.
  5. Change the "Data Source URI" field value from the QBE tab to: http://demo.openlinksw.com/dataspace as the query we selected is going to be executed against the database with this Graph.
  6. Go the Advanced tab.
  7. Change the "Graph" value also to: http://demo.openlinksw.com/dataspace and enter in the "SPARQL Query" text-area the query we have chosen above:
  8. Click the "Run Query" button from the Advanced tab.
  9. The Result sub-tab shown bellow the Advanced SPARQL Query Working Canvas will present by default in Navigator Visualization mode the results of executing our SPARQL Query.
  10. You can change the visualization also to:
    1. Browser mode:
    2. Raw Triples mode:
    3. SVG Graph mode:
        1. Show all nodes drop-down list when chosen, offers distance arrange: selected up to distance: from 1(by default) to 4. Select for ex. the value "Selected up to distance 3".
        2. Equal distances drop-down list when chosen, offers depending on the value selected, either the result format page to have "Equal distances" (by default) or "All nodes at once".
        3. Medium distance drop-down list when chosen, offers distance diapason depending on the value selected: "Mediaum distance" (by default), "Close distance" and "Far distance".
        4. Planar drop-down list when chosen, offers model shape depending on the value selected: "Planar" (by default) or "Pseudo-spherical".
        5. Labels only on one element drop-down list when chosen, offers nodes labels diapazon depending on the value selected: "Labels only on one element" (by default), "Up to distance from 1 to 4", "Labels on all elements".
        6. Random drop-down list when chosen, offers nodes positioning depending on the value selected: "Random" (by default) or "Circle". This dtop-down list is active when is chosen the drop-down list "All nodes at once".
    4. Images mode.
    5. Yahoo Map mode:
  11. View the SPARQL Query with type "CONSTRUCT" as Graph model you can do by clicking the "Load Query to QBE" button.

References

List of Virtuoso SPARQL Queries

ODS SPARQL Queries
ODS Applications SPARQL Queries
ODS Application Name SIOC Atom OWL SKOS FOAF
Weblog SIOCRefBlog Query ODS-Weblog Data using SPARQL and Atom OWL Ontology Query ODS-Weblog Data using SPARQL and SKOS Ontology Query ODS-Weblog Data using SPARQL and FOAF Ontology
Briefcase SIOCRefBriefcase Query ODS-Briefcase Data using SPARQL and Atom OWL Ontology Query ODS-Briefcase Data using SPARQL and SKOS Ontology Query ODS-Briefcase Data using SPARQL and FOAF Ontology
Feed Manager SIOCRefFeeds Query ODS-Feed-Manager Data using SPARQL and Atom OWL Ontology Query ODS-Feed-Manager Data using SPARQL and SKOS Ontology Query ODS-Feed-Manager Data using SPARQL and FOAF Ontology
Wiki SIOCRefWiki Query ODS-Wiki Data using SPARQL and Atom OWL Ontology Query ODS-Wiki Data using SPARQL and SKOS Ontology Query ODS-Wiki Data using SPARQL and FOAF Ontology
Calendar SIOCRefCalendar Query ODS-Calendar Data using SPARQL and Atom OWL Ontology Query ODS-Calendar Data using SPARQL and SKOS Ontology Query ODS-Calendar Data using SPARQL and FOAF Ontology
Bookmark Manager SIOCRefBookmark Query ODS-Bookmark-Manager Data using SPARQL and Atom OWL Ontology Query ODS-Bookmark-Manager Data using SPARQL and SKOS Ontology Query ODS-Bookmark-Manager Data using SPARQL and FOAF Ontology
Gallery SIOCRefGallery Query ODS-Gallery Data using SPARQL and Atom OWL Ontology Query ODS-Gallery Data using SPARQL and SKOS Ontology Query ODS-Gallery Data using SPARQL and FOAF Ontology
Polls SIOCRefPolls - Query ODS-Polls Data using SPARQL and SKOS Ontology Query ODS-Polls Data using SPARQL and FOAF Ontology
Addressbook ODSAddressBookRef Query ODS-Addressbook Data using SPARQL and Atom OWL Ontology Query ODS-Addressbook Data using SPARQL and SKOS Ontology Query ODS-Addressbook Data using SPARQL and FOAF Ontology
Discussions SIOCRefDiscussions - Query ODS-Discussions Data using SPARQL and SKOS Ontology Query ODS-Discussions Data using SPARQL and FOAF Ontology
Community SIOCRefCommunity Query ODS-Community Data using SPARQL and Atom OWL Ontology Query ODS-Community Data using SPARQL and SKOS Ontology Query ODS-Community Data using SPARQL and FOAF Ontology
Other Virtuoso SPARQL Queries

Virtuoso and the Virtuoso Website are Copyright (C) OpenLink Software 2006-
SourceForge.net Logo