Not logged in : Login

About: VirtTipsAndTricksGuideAddTriplesNamedGraph     Goto   Sponge   NotDistinct   Permalink

An Entity of Type : atom:Entry, within Data Space : ods.openlinksw.com associated with source document(s)

AttributesValues
type
Date Created
Date Modified
label
  • VirtTipsAndTricksGuideAddTriplesNamedGraph
maker
Title
  • VirtTipsAndTricksGuideAddTriplesNamedGraph
isDescribedUsing
has creator
attachment
  • http://vos.openlinksw.com/wiki/main/VOS/VirtTipsAndTricksGuideAddTriplesNamedGraph/t1.png
  • http://vos.openlinksw.com/wiki/main/VOS/VirtTipsAndTricksGuideAddTriplesNamedGraph/t2.png
content
  • %META:TOPICPARENT{name="VirtTipsAndTricksGuide"}% ---+How can I use SPARUL to add missing triples to a Named Graph? ---++What? Use of SPARUL to add missing triples to a Named Graph. For example, an ontology/vocabulary extension. ---++Why? A lot of ontologies and vocabularies started life prior to emergence of the Linked Data meme. As a result, many do not include <code>rdfs:isDefinedBy</code> relations (via triples) that associate Classes and Properties in an ontology with the ontology itself, using de-referencable URIs. The downside of this pattern is that Linked Data's follow-your-nose pattern isn't exploitable when viewing these ontologies e.g., when using contemporary Linked Data aware browsers, like the [[http://ode.openlinksw.com][OpenLink Data Explorer]], [[http://wikis.openlinksw.com/dataspace/owiki/wiki/OATWikiWeb/InteractiveSparqlQueryBuilderOverview][OpenLink iSPARQL Query Builder]], [[VirtVisualizeWithPivotViewer][Microsoft Pivot Viewer]] and others. ---++How? If SPARUL privileges are assigned to SPARQL or other accounts associated with SPARQL Endpoint. Or via WebID protected SPARQL endpoint with SPARUL is granted to SPARQL or specific accounts or WebIDs in a group. <verbatim> SPARQL INSERT INTO <LocalNamedGraphIRI> { ?s rdfs:DefinedBy <LocalOntologyEntityURI>. ?o rdfs:isDefinedBy <http://www.w3.org/ns/auth/acl>. } FROM <ExtSourceNamedGraphIRI> WHERE { ?s a ?o } </verbatim> ---+++Example 1 Load Quad Named Graph via Sponger based query: <verbatim> DEFINE get:soft "replace" SELECT DISTINCT * FROM <http://www.w3.org/ns/auth/acl#> WHERE { ?s ?p ?o } </verbatim> %BR%%BR%<img src="%ATTACHURLPATH%/t1.png" style="wikiautogen"/>%BR%%BR% 1 Added Triples via SPARUL to Ontology Named Graph: <verbatim> SPARQL INSERT INTO <http://www.w3.org/ns/auth/acl#> { ?s rdfs:DefinedBy <http://www.w3.org/ns/auth/acl>. ?o rdfs:DefinedBy <http://www.w3.org/ns/auth/acl>. } FROM <http://www.w3.org/ns/auth/acl#> WHERE { ?s a ?o } Query result: callret-0 VARCHAR Insert into <http://www.w3.org/ns/auth/acl#>, 110 (or less) triples -- done No. of rows in result: 1 </verbatim> 1 Via Conductor or Command-line iSQL courtesy of SPASQL execute the following statements: 1 Remove an existing graph: <verbatim> SPARQL CLEAR GRAPH <http://www.w3.org/ns/auth/acl/> ; SPARQL CLEAR GRAPH <http://www.w3.org/ns/auth/acl> ; SPARQL CLEAR GRAPH <http://www.w3.org/ns/auth/acl#> ; Query result: callret-0 ANY Clear <http://www.w3.org/ns/auth/acl/> -- done No. of rows in result: 1 Query result: callret-0 ANY Clear <http://www.w3.org/ns/auth/acl> -- done No. of rows in result: 1 Query result: callret-0 ANY Clear <http://www.w3.org/ns/auth/acl#> -- done No. of rows in result: 1 </verbatim> 1 Load a new graph: <verbatim> SPARQL LOAD <http://www.w3.org/ns/auth/acl> ; Query result: callret-0 VARCHAR Load <http://www.w3.org/ns/auth/acl> into graph <http://www.w3.org/ns/auth/acl> -- done No. of rows in result: 1 </verbatim> 1 Add missing rdfs:isDefinedBy triples via SPARUL: <verbatim> SPARQL INSERT INTO <http://www.w3.org/ns/auth/acl> { ?s rdfs:DefinedBy <http://www.w3.org/ns/auth/acl>. ?o rdfs:DefinedBy <http://www.w3.org/ns/auth/acl>. } FROM <http://www.w3.org/ns/auth/acl> WHERE { ?s a ?o } ; Query result: callret-0 ANY Insert into <http://www.w3.org/ns/auth/acl>, 26 (or less) triples -- done No. of rows in result: 1 </verbatim> 1 Verification: Access the following url: <code><nowiki>http://&lt;cname>/describe/?uri=http://www.w3.org/ns/auth/acl</nowiki></code> %BR%%BR%<img src="%ATTACHURLPATH%/t2.png" style="wikiautogen"/>%BR%%BR% ---+++Related * [[VirtTipsAndTricksGuide][Virtuoso Tips and Tricks Collection]] * [[http://docs.openlinksw.com/virtuoso/sparqlextensions.html#rdfsparul][SPARUL -- an Update Language For RDF Graphs]] * [[VirtSponger][Virtuoso Sponger]] * [[http://ode.openlinksw.com][OpenLink Data Explorer]] * [[http://wikis.openlinksw.com/dataspace/owiki/wiki/OATWikiWeb/InteractiveSparqlQueryBuilderOverview][OpenLink iSPARQL Query Builder]] * [[VirtVisualizeWithPivotViewer][Microsoft Pivot Viewer]]
id
  • dccc4536f738f2a3521a6de5cbe92e7d
link
has container
http://rdfs.org/si...ices#has_services
atom:title
  • VirtTipsAndTricksGuideAddTriplesNamedGraph
links to
atom:source
atom:author
atom:published
  • 2017-06-13T05:36:26Z
atom:updated
  • 2017-06-13T05:36:26Z
topic
is made of
is container of of
is link of
is http://rdfs.org/si...vices#services_of of
is links to of
is creator of of
is atom:entry of
is atom:contains of
Faceted Search & Find service v1.17_git132 as of May 12 2023


Alternative Linked Data Documents: iSPARQL | ODE     Content Formats:   [cxml] [csv]     RDF   [text] [turtle] [ld+json] [rdf+json] [rdf+xml]     ODATA   [atom+xml] [odata+json]     Microdata   [microdata+json] [html]    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3238 as of May 23 2023, on Linux (x86_64-generic-linux-glibc25), Single-Server Edition (15 GB total memory, 3 GB memory in use)
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2024 OpenLink Software