Graph IRI format: http://<cname>/dataspace
Examples:
If you are creating a new account, please perform the following steps:
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 sparql which is the convention required for executing SPARQL via Virtuoso SQL. Also do not forget to terminate your queries with semicolons (;) when using the ISQL interface in console mode.
Note: Default Graph URI value used in the queries below is: http://myopenlink.net/dataspace
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
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 } }
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
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 }. }
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}. }
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') . }
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
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") }
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}. }
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}. }
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') }
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 }. }
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 . }
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. }
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 .}
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 . }
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") }
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}. }
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 }. } }
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
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 . }
CategoryWebSite CategoryVirtuoso CategoryOpenSource CategoryVOS CategorySPARQL CategoryRDF CategoryODS CategorySample? CategoryDocumentation