GraphStore`
GraphStore`

SPARQLQuery

SPARQLQuery[query]

is a query operator that can be applied to an RDFStore.

SPARQLQuery["query"]

uses a SPARQL query string.

更多信息和选项

  • SPARQLQuery can be used in SPARQLExecute to query a SPARQL endpoint.
  • query can be a SPARQLSelect, SPARQLAsk or SPARQLConstruct operator.
  • An aggregate can be specified as SPARQLQuery[SPARQLSelect[]/*SPARQLAggregate[]].
  • The following options can be given:
  • "Base"Automaticbase IRI used to resolve relative IRIs
    "From"Automaticdefault graph to query
    "FromNamed"Automaticlist of named graphs to query
  • With the setting "From"{iri1,iri2,} the RDF merge of the graphs identified by the irii is used as default graph.
  • SPARQLQuery[File[...]] and SPARQLQuery[URL[...]] are also supported.

范例

打开所有单元关闭所有单元

基本范例  (1)

Specify an example RDF graph:

Query all the data associated with a given subject:

Query all the data associated with a given predicate:

Find all the subjects that have a certain value for a given predicate:

Find the values of predicate "a" for subjects that have a certain value for predicate "b":

Aggregate solutions:

Group and aggregate solutions:

Scope  (2)

Specify a query using a SPARQL query string:

Export a SPARQL query:

Import the same query:

Wolfram Research (2019),SPARQLQuery,Wolfram 语言函数,https://reference.wolfram.com/language/GraphStore/ref/SPARQLQuery.html.

文本

Wolfram Research (2019),SPARQLQuery,Wolfram 语言函数,https://reference.wolfram.com/language/GraphStore/ref/SPARQLQuery.html.

CMS

Wolfram 语言. 2019. "SPARQLQuery." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/GraphStore/ref/SPARQLQuery.html.

APA

Wolfram 语言. (2019). SPARQLQuery. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/GraphStore/ref/SPARQLQuery.html 年

BibTeX

@misc{reference.wolfram_2024_sparqlquery, author="Wolfram Research", title="{SPARQLQuery}", year="2019", howpublished="\url{https://reference.wolfram.com/language/GraphStore/ref/SPARQLQuery.html}", note=[Accessed: 22-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_sparqlquery, organization={Wolfram Research}, title={SPARQLQuery}, year={2019}, url={https://reference.wolfram.com/language/GraphStore/ref/SPARQLQuery.html}, note=[Accessed: 22-November-2024 ]}