This HTML5 document contains 53 embedded RDF statements represented using HTML+Microdata notation.

The embedded RDF content will be recognized by any processor of HTML5 Microdata.

PrefixNamespace IRI
dctermshttp://purl.org/dc/terms/
atomhttp://atomowl.org/ontologies/atomrdf#
foafhttp://xmlns.com/foaf/0.1/
n21http://vos.openlinksw.com/dataspace/services/wiki/
oplhttp://www.openlinksw.com/schema/attribution#
n4http://vos.openlinksw.com/dataspace/owiki/wiki/VOS/
dchttp://purl.org/dc/elements/1.1/
n14http://vos.openlinksw.com/dataspace/dav#
rdfshttp://www.w3.org/2000/01/rdf-schema#
n17http://myopenlink.net/
n22http://rdfs.org/sioc/services#
n18http://myopenlink.net:8890/ods.
siocthttp://rdfs.org/sioc/types#
n11http://vos.openlinksw.com/dataspace/person/dav#
n16http://myopenlink.net:8890/sparql/.
n10http://myopenlink.net:8890/sparql/
n2http://vos.openlinksw.com/dataspace/owiki/wiki/
rdfhttp://www.w3.org/1999/02/22-rdf-syntax-ns#
n20http://demo.openlinksw.com/
n8http://vos.openlinksw.com/dataspace/owiki/wiki/VOS/VOSODSSparqlSamples/sioc.
n15http://myopenlink.net:8890/sparql_demo/
n6http://vos.openlinksw.com/dataspace/owiki#
xsdhhttp://www.w3.org/2001/XMLSchema#
n19http://vos.openlinksw.com/dataspace/%28NULL%29/wiki/VOS/
n13http://vos.openlinksw.com/dataspace/person/owiki#
siochttp://rdfs.org/sioc/ns#
Subject Item
n11:this
foaf:made
n4:VOSODSSparqlSamples
Subject Item
n14:this
sioc:creator_of
n4:VOSODSSparqlSamples
Subject Item
n21:item
n22:services_of
n4:VOSODSSparqlSamples
Subject Item
n6:this
sioc:creator_of
n4:VOSODSSparqlSamples
Subject Item
n2:VOS
sioc:container_of
n4:VOSODSSparqlSamples
atom:entry
n4:VOSODSSparqlSamples
atom:contains
n4:VOSODSSparqlSamples
Subject Item
n4:VOSODSSparqlSamples
rdf:type
atom:Entry sioct:Comment
dcterms:created
2017-06-13T05:39:42.626075
dcterms:modified
2017-06-29T07:43:20.730812
rdfs:label
VOSODSSparqlSamples
foaf:maker
n13:this n11:this
dc:title
VOSODSSparqlSamples
opl:isDescribedUsing
n8:rdf
sioc:has_creator
n6:this n14:this
sioc:content
%META:TOPICPARENT{name="VOSSPARQL"}% %VOSNAV% ---++ SPARQL Sample Queries using Live Demonstration Data This page presents examples of querying ODS RDF Graph via SPARQL. ---+++Querying ODS Data via RDF data mapped to SIOC Ontology Graph IRI format: http://&lt;cname&gt;/dataspace Examples: 1 Public Demo Server Instance: http://demo.openlinksw.com/dataspace 1 MyOpenLink Services (a demo instance of ODS): http://myopenlink.net/dataspace ---++++Setup Guide * MyOpenLink.net Service: You can either log on as user: <tt>test1</tt>, pwd: <tt>1</tt> or create a new account at http://myopenlink.net:8890/ods. * Live Demo Server: You can either log on as user: demo, pwd: demo or create a new account at: http://demo.openlinksw.com/ods If you are creating a new account, please perform the following steps: 1 Register under a username of your choosing 1 Create ODS Application instances (aka Data Space Applications) for Briefcase, <nowiki>FeedManager</nowiki>, Mail, Blog, Wiki, Gallery, Bookmarks. 1 Log under new user or use account: <tt>test1</tt> and then proceed to the "My Weblog" 1 Create a few sample blog posts 1 Go to the "My Wiki" tab 1 Create a sample Wiki article: Test1Sample, for instance 1 Go to the Wiki Cluster Settings and press `Turn On' to enable Conversations 1 Verify the "Conversation" feature by going to the "Discussions" tab in your ODS home, to see if a newsgroup has been automatically generated for your Wiki article. It should appear as: "oWiki-test1Wiki" assuming this is the name of your Wiki Data Space Instance 1 From the <nowiki>WelcomeVisitors</nowiki> page clicks the Conversations link and sends one reply with body "This is sample reply" 1 Create Data Space instances for the other ODS applications by clicking on the "My...." tabs which indicate each ODS Data Space 1 Proceed to experiment with the SPARQL queries below. ---++++SPARQL Query Interfaces The SPARQL Sample queries can be executed using Virtuoso's traditional console-based ISQL interface, the Web-based equivalent bundled with the Virtuoso Conductor Admin UI, or by using the iSPARQL Web Query Interface at http://myopenlink.net:8890/sparql_demo/ or exposed via the SPARQL endpoint at: http://myopenlink.net:8890/sparql/ . Of course you can also use the SPARQL Protocol to invoke these queries over HTTP using the SPARQL Query Endpoint at: http://myopenlink.net:8890/sparql/. *Note*: If you are using SQL-based Data Access methods such as ISQL, ODBC, JDBC, ADO.NET, or XMLA , you must prepend each query with <b>sparql</b> which is the convention required for executing SPARQL via Virtuoso SQL. Also do not forget to terminate your queries with semicolons (<b>;</b>) when using the ISQL interface in console mode. ---++++Query Samples Note: Default Graph URI value used in the queries below is: http://myopenlink.net/dataspace * To return a list of all Classes <verbatim> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX sioc: <http://rdfs.org/sioc/ns#> SELECT distinct ?cls WHERE { ?o rdf:type ?cls } ORDER BY ?cls </verbatim> * To return all Spaces <verbatim> PREFIX sioc: <http://rdfs.org/sioc/ns#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> SELECT DISTINCT ?space ?name WHERE { ?space rdf:type sioc:Space. optional { ?site sioc:name ?name } } </verbatim> * To return a list of Predicates/Properties/Attributes <verbatim> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX sioc: <http://rdfs.org/sioc/ns#> PREFIX dct: <http://purl.org/dc/elements/1.1/> PREFIX dcc: <http://purl.org/dc/terms/> SELECT distinct ?Predicate WHERE { ?o ?Predicate ?s . } ORDER BY ?Predicate </verbatim> * To list all posts title, author, reply and post date. <verbatim> PREFIX sioc: <http://rdfs.org/sioc/ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX dct: <http://purl.org/dc/elements/1.1/> PREFIX dcc: <http://purl.org/dc/terms/> SELECT DISTINCT ?post, ?post_sioc, ?post_author, ?post_title, ?post_date, ?reply WHERE { optional { ?post dct:title ?post_title }. optional { ?post dcc:created ?post_date}. optional { ?post sioc:has_creator ?creator}. optional { ?creator rdfs:label ?post_author}. optional { ?post sioc:has_reply ?reply }. optional { ?post rdfs:seeAlso ?post_sioc }. } </verbatim> * To list all blog data spaces which belongs to friends of ODS user _test1_ <verbatim> PREFIX sioc: <http://rdfs.org/sioc/ns#> PREFIX sioct: <http://rdfs.org/sioc/types#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?n, ?knows, ?name WHERE { ?po sioc:account_of ?t . ?t rdf:type foaf:Person . ?t foaf:nick ?n filter regex ('test1', ?n) . ?t foaf:knows ?s . ?s foaf:nick ?knows . ?s foaf:holdsAccount ?xx . ?xx sioc:owner_of ?f . ?f a sioct:Weblog . optional{?f sioc:id ?name}. } </verbatim> * To list all posts from ODS user _test1_'s blogs <verbatim> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX sioc: <http://rdfs.org/sioc/ns#> PREFIX dct: <http://purl.org/dc/elements/1.1/> PREFIX dcc: <http://purl.org/dc/terms/> PREFIX sioct: <http://rdfs.org/sioc/types#> SELECT ?post, ?title ?cr ?name WHERE { optional{ ?post dct:title ?title }. optional{ ?post dcc:created ?cr }. ?post sioc:has_container ?forum . ?forum rdf:type sioct:Weblog . ?forum ?has_member ?member . ?member sioc:id ?name filter regex (?name, 'test1') . } </verbatim> * Find all posts from _test1_'s blogs including post timestamps accurate to the second (as opposed to millisecond) <verbatim> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX sioc: <http://rdfs.org/sioc/ns#> PREFIX sioct: <http://rdfs.org/sioc/types#> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX dct: <http://purl.org/dc/elements/1.1/> PREFIX dcc: <http://purl.org/dc/terms/> SELECT ?title ?cr ?forum WHERE { optional{?post dcc:created ?cr}. optional{?post dct:title ?title }. ?post sioc:has_container ?forum . ?forum rdf:type sioct:Weblog . ?forum ?has_member ?member . ?member sioc:name "test1" . filter (xsd:dateTime (?cr) > xsd:dateTime ("2006-05-01T10:56:00Z")) } ORDER BY ?cr limit 10 </verbatim> * To find all Data Spaces belonging to ODS member: _test1_ <verbatim> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX sioc: <http://rdfs.org/sioc/ns#> SELECT DISTINCT ?u ?name ?group WHERE { ?x rdf:type sioc:User . ?x sioc:name ?name . ?u sioc:has_member ?x . { ?u sioc:id ?group } UNION { ?u sioc:description ?group } . FILTER REGEX(str(?name), "^test1") } </verbatim> * To find all Briefcase Data Spaces owned by friends of user _test1_: <verbatim> PREFIX sioc: <http://rdfs.org/sioc/ns#> PREFIX sioct: <http://rdfs.org/sioc/types#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?n, ?knows, ?name WHERE { ?po sioc:account_of ?t . ?t rdf:type foaf:Person . ?t foaf:nick ?n filter regex ('test1', ?n) . ?t foaf:knows ?s . ?s foaf:nick ?knows . ?s foaf:holdsAccount ?xx . ?xx sioc:owner_of ?f . ?f a sioct:Briefcase. optional{?f sioc:id ?name}. } </verbatim> * To find all ODS Data Spaces belonging to friends of user 'test1': <verbatim> PREFIX sioc: <http://rdfs.org/sioc/ns#> PREFIX sioct: <http://rdfs.org/sioc/types#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?n, ?knows, ?name WHERE { ?po sioc:account_of ?t . ?t rdf:type foaf:Person . ?t foaf:nick ?n filter regex ('test1', ?n) . ?t foaf:knows ?s . ?s foaf:nick ?knows . ?s foaf:holdsAccount ?xx . ?xx sioc:owner_of ?f . optional{?f sioc:id ?name}. } </verbatim> * To find all Feed subscriptions that have ODS member: 'test1' <verbatim> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX sioc: <http://rdfs.org/sioc/ns#> PREFIX sioct: <http://rdfs.org/sioc/types#> SELECT * WHERE { ?f rdf:type sioct:SubscriptionList . optional{?f sioc:has_member ?m}. ?m sioc:id ?name filter regex(?name,'test1') } </verbatim> * To find all Feeds entries/posts/items for ODS member: 'test1': <verbatim> define input:inference "http://myopenlink.net/dataspace" PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX sioc: <http://rdfs.org/sioc/ns#> PREFIX dct: <http://purl.org/dc/elements/1.1/> PREFIX sioct: <http://rdfs.org/sioc/types#> SELECT ?fname ?post ?title WHERE { ?forum rdf:type sioct:SubscriptionList . ?forum sioc:id ?fname . ?forum ?has_member ?member filter regex (?member, "test1"). optional{?forum sioc:parent_of ?parentf }. optional{?parentf sioc:container_of ?post} . optional{ ?post dct:title ?title }. } </verbatim> * To find all Feed Data Spaces hosted by the MyOpenLink.net service: <verbatim> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX sioct: <http://rdfs.org/sioc/types#> SELECT * WHERE { ?f rdf:type sioct:SubscriptionList . } </verbatim> * To find all Blog Data Spaces hosted by the MyOpenLink.net service: <verbatim> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX sioct: <http://rdfs.org/sioc/types#> SELECT * WHERE { ?f rdf:type sioct:Weblog. } </verbatim> * To find all Wiki Data Spaces hosted by the MyOpenLink.net service: <verbatim> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX sioct: <http://rdfs.org/sioc/types#> SELECT * WHERE { ?f rdf:type sioct:Wiki .} </verbatim> * To find all Wiki Data Spaces and their respective owners: <verbatim> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX sioc: <http://rdfs.org/sioc/ns#> PREFIX sioct: <http://rdfs.org/sioc/types#> SELECT * WHERE { ?f rdf:type sioct:Wiki . ?f sioc:has_owner ?owner. ?owner sioc:id ?name . } </verbatim> * To find all ODS Wiki Data Spaces where instance name contains the string pattern: 'test' <verbatim> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX sioc: <http://rdfs.org/sioc/ns#> PREFIX sioct: <http://rdfs.org/sioc/types#> SELECT * WHERE { ?f rdf:type sioct:Wiki . ?f sioc:id ?s. FILTER REGEX(str(?s), "^test") } </verbatim> * To find all Wiki articles created ODS member: 'test1' <verbatim> define input:inference "http://myopenlink.net/dataspace" PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX sioc: <http://rdfs.org/sioc/ns#> PREFIX sioct: <http://rdfs.org/sioc/types#> PREFIX dct: <http://purl.org/dc/elements/1.1/> SELECT * WHERE { ?forum rdf:type sioct:Wiki . ?forum sioc:id ?forum_name. ?forum ?has_member ?member . ?member sioc:id "test1" . ?forum sioc:container_of ?post . optional{?post dct:title ?title}. } </verbatim> * To find all the Wiki articles associated with one or more conversations managed by newsgroup: oWiki-test1Wiki. <verbatim> PREFIX sioc: <http://rdfs.org/sioc/ns#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX dct: <http://purl.org/dc/elements/1.1/> PREFIX dcc: <http://purl.org/dc/terms/> PREFIX sioct: <http://rdfs.org/sioc/types#> SELECT ?title ?created WHERE { graph <http://myopenlink.net/dataspace> { ?forum sioc:id "oWiki-test1WikiEndpoint" . ?forum rdf:type sioct:MessageBoard . ?forum sioc:container_of ?post . optional { ?post sioc:link ?link } . optional { ?post dct:title ?title}. optional { ?post dcc:created ?created }. } } </verbatim> * To find all discussions entries/posts across all conversation enabled ODS Data Spaces: <verbatim> PREFIX sioc: <http://rdfs.org/sioc/ns#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX dct: <http://purl.org/dc/elements/1.1/> PREFIX dcc: <http://purl.org/dc/terms/> PREFIX sioct: <http://rdfs.org/sioc/types#> SELECT ?title ?created WHERE { graph <http://myopenlink.net/dataspace> { ?forum rdf:type sioct:MessageBoard . ?post sioc:has_container ?forum . optional { ?post sioc:link ?link } . optional { ?post dct:title ?title}. optional { ?post dcc:created ?created }. } } ORDER BY DESC (?created) LIMIT 10 </verbatim> * To find all Photo Gallery Data Spaces hosted by the MyOpenLink.net service: <verbatim> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX sioct: <http://rdfs.org/sioc/types#> SELECT * WHERE { ?forum rdf:type sioct:ImageGallery . } </verbatim> ---+++Learn More * [[ODSSIOCRef][ODS SIOC reference]] * [[ODSAtomOWLRef][Query ODS Data Spaces using SPARQL and Atom OWL Ontology]] * [[ODSSKOSRef][Query ODS Data Spaces using SPARQL and SKOS Ontology]] * [[ODSFOAFRef][Query ODS Data Spaces using SPARQL and FOAF Ontology]] * [[ODSAnnoteaRef][Query ODS Data Spaces using SPARQL and Annotea Ontology]] * [[NorthWindREF][Northwind SPARQL Reference]] * [[SIOCRefTutorial][Query Virtuoso Tutorials using SPARQL]] * [[SIOCRefDocs][Query Virtuoso Documentation using SPARQL]] * [[WordPressSIOCRef][WordPress SIOC Reference]] * [[MediaWikiSIOCRef][MedaWiki SIOC Reference]] * [[PHPBB3SIOCRef][PHPBB SIOC Reference]] * [[DrupalSIOCRef][Drupal SIOC Reference]] CategoryWebSite CategoryVirtuoso CategoryOpenSource CategoryVOS CategorySPARQL CategoryRDF CategoryODS CategorySample CategoryDocumentation %VOSCOPY%
sioc:id
72823b64b9d644f7718e3be18db3400d
sioc:link
n4:VOSODSSparqlSamples
sioc:has_container
n2:VOS
n22:has_services
n21:item
atom:title
VOSODSSparqlSamples
sioc:links_to
n4:SIOCRefDocs n4:DrupalSIOCRef n4:CategoryVirtuoso n4:CategorySPARQL n10: n4:CategoryODS n4:CategoryWebSite n15: n16: n4:SIOCRefTutorial n4:CategoryDocumentation n4:NorthWindREF n17:dataspace n18: n19:MyOpenLink n19:CategorySample n4:CategoryRDF n4:PHPBB3SIOCRef n4:MediaWikiSIOCRef n20:ods n4:CategoryOpenSource n4:WordPressSIOCRef n20:dataspace n4:CategoryVOS
atom:source
n2:VOS
atom:author
n11:this
atom:published
2017-06-13T05:39:42Z
atom:updated
2017-06-29T07:43:20Z
sioc:topic
n2:VOS