Attributes | Values |
---|
type
| |
Date Created
| |
Date Modified
| |
label
| - VirtTipsAndTricksSPARQL11Clear
|
maker
| |
Title
| - VirtTipsAndTricksSPARQL11Clear
|
isDescribedUsing
| |
has creator
| |
content
| - %META:TOPICPARENT{name="VirtTipsAndTricksSPARQL11FeaturesExamplesCollection"}%
---+ Virtuoso SPARQL 1.1. CLEAR Usage Example
---++What?
This guide contains Virtuoso SPARQL 1.1. CLEAR Usage Example which you can run against any SPARQL endpoint that supports SPARQL 1.1 and the ability to allow a verified user perform INSERT operations.
---++Why?
Simple way of clear graph data.
---++How?
Here is example showcasing Virtuoso's support for this functionality:
1 Assume the following Raw Data Representation in Turtle:
<verbatim>
<#alice> <#name> "Alice", "Alice Foo", "A. Foo" .
<#alice> <#knows> <#bob>, <#carol> .
<#bob> <#name> "Bob", "Bob Bar", "B. Bar" .
<#carol> <#name> "Carol", "Carol Baz", "C. Baz" .
</verbatim>
1 Beautified Raw Data Representation in Turtle (from above) using Namespace Prefix:
<verbatim>
<#alice> <#name> "Alice" .
<#alice> <#name> "Alice Foo" .
<#alice> <#name> "A. Foo" .
<#alice> <http://xmlns.com/foaf/0.1/knows> <#bob>, <#carol> .
<#bob> <#name> "Bob" .
<#bob> <#name> "Bob Bar" .
<#bob> <#name> "B. Bar" .
<#carol> <#name> "Carol" .
<#carol> <#name> "Carol Baz" .
<#carol> <#name> "C. Baz" .
</verbatim>
1 Load the sample data:
<verbatim>
INSERT {
GRAPH <urn:sparql:tests:clear>
{
<#alice> <#name> "Alice" .
<#alice> <#name> "Alice Foo" .
<#alice> <#name> "A. Foo" .
<#alice> <http://xmlns.com/foaf/0.1/knows> <#bob>, <#carol> .
<#bob> <#name> "Bob" .
<#bob> <#name> "Bob Bar" .
<#bob> <#name> "B. Bar" .
<#carol> <#name> "Carol" .
<#carol> <#name> "Carol Baz" .
<#carol> <#name> "C. Baz" .
}
}
</verbatim>
1 Clear the inserted data:
<verbatim>
SPARQL CLEAR GRAPH <urn:sparql:tests:clear>;
Query result:
callret-0
ANY
Clear graph <urn:sparql:tests:clear> -- done
No. of rows in result: 1
</verbatim>
---++Related
* [[http://www.w3.org/TR/2012/PR-sparql11-update-20121108/#clear][SPARQL 1.1 CLEAR]]
* [[http://www.w3.org/TR/rdf-sparql-protocol/][SPARQL Protocol (HTTP based Query Service)]]
* [[VirtTipsAndTricksGuide][Virtuoso Tips and Tricks Collection]]
* [[VirtTipsAndTricksSPARQL11FeaturesExamplesCollection][Virtuoso SPARQL 1.1 Usage Examples Collection]]
* [[http://virtuoso.openlinksw.com/tutorials/sparql/SPARQL_Tutorials_Part_9/SPARQL_Tutorials_Part_9.html][Virtuoso SPARQL 1.1 Syntax Tutorial]]
* [[http://docs.openlinksw.com/virtuoso/rdfsparql.html][Virtuoso Documentation]]
|
id
| - 48cae74aad13bb8bcd74a9fd6fe48c07
|
link
| |
has container
| |
http://rdfs.org/si...ices#has_services
| |
atom:title
| - VirtTipsAndTricksSPARQL11Clear
|
links to
| |
atom:source
| |
atom:author
| |
atom:published
| |
atom:updated
| |
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 | |