请输入您要查询的百科知识:

 

词条 SPARUL
释义

  1. Examples

  2. SPARQL/Update implementations

  3. Clients supporting SPARUL

  4. References

  5. External links

SPARUL, or SPARQL/Update, is a declarative data manipulation language that is an extension to the SPARQL query language standard. SPARUL provides the ability to insert, delete and update RDF data held within a triple store or quad store. SPARUL was originally written by Hewlett-Packard and has been used as the foundation for the current W3C recommendation entitled SPARQL 1.1 Update.

Examples

Adding some triples to a graph. The snippet describes two RDF triples to be inserted into the default graph of the RDF store.

PREFIX dc:

INSERT DATA

{ dc:title "A new book" ;

}

This SPARQL/Update request contains a triple to be deleted and a triple to be added (used here to correct a book title). The requested change happens in the named graph identified by the URI http://example/bookStore.

PREFIX dc:

DELETE DATA FROM

{ dc:title "Fundamentals of Compiler Design" }

INSERT DATA INTO

{ dc:title "Fundamentals of Compiler Design" }

The example below has a request to delete all records of old books (with date before year 2000)

PREFIX dc:

PREFIX xsd:

DELETE

WHERE

  { ?book dc:date ?date .    FILTER ( ?date < "2000-01-01T00:00:00"^^xsd:dateTime )    ?book ?p ?v  }

This snippet copies records from one named graph to another named graph based on a pattern.

PREFIX dc:

PREFIX xsd:

INSERT INTO

WHERE

  { GRAPH         { ?book dc:date ?date .         FILTER ( ?date < "2000-01-01T00:00:00"^^xsd:dateTime )         ?book ?p ?v  } }

An example to move records from one named graph to another named graph based on a pattern.

PREFIX dc:

PREFIX xsd:

INSERT INTO

WHERE

  { GRAPH       { ?book dc:date ?date .       FILTER ( ?date < "2000-01-01T00:00:00"^^xsd:dateTime )       ?book ?p ?v     }  }

DELETE FROM

WHERE

  { GRAPH        { ?book dc:date ?date .        FILTER ( ?date < "2000-01-01T00:00:00"^^xsd:dateTime )        ?book ?p ?v      }  }

SPARQL/Update implementations

  • AllegroGraph
  • ARQ
  • D2R Server[1]
  • Jena
  • OntoBroker
  • Ontotext OWLIM
  • Oracle DB Enterprise Ed.
  • Parliament[2]
  • Redland / Redstore
  • StrixDB supports SPARQL/Update 1.0.
  • OpenLink Virtuoso Universal Server

Clients supporting SPARUL

  • tabulator[3]

References

1. ^D2R Server
2. ^Parliament
3. ^"The Tabulator"

External links

  • SPARQL/Update W3C Member Submission
  • SPARQL 1.1 Update Proposed Recommendation from W3C SPARQL Working Group
  • EditingData wiki page - summary (maintained by Tim Berners-Lee) of ways to edit linked data

1 : RDF data access

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/9/22 7:00:15