sparql-gui-gh:查看、编辑和执行存储在 Web 上的 SPARQL 查询

  • u2_259629
    了解作者
  • 969.4KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-06-11 23:10
    上传日期
用于来自 Github 和其他 Web 存储库的查询的 SPARQL GUI(用于 SPARQL 实验室的代码) 将查询从网络存储库加载到浏览器中类似IDE的环境中,执行查询-并开始修改和使用它们。 的SPARQL Lab安装主要旨在支持项目,例如和 。 此外,它还 。 随意将公开可用的安装用于其他目的 - 没有任何保证。 本项目主要提供胶水代码。 它大量使用了 Laurens Rietveld 伟大的和 javascript 库,这是他的项目的一部分。 网址参数 该脚本由以下URL参数控制: 争论 描述 端点 SPARQL 端点的 URL(默认为具有 STW 版本历史记录的端点)。 远程端点必须启用 。 询问 URL 编码的查询文本(如果两者都定义,则优先于 queryRef,如果两者都未定义,则默认为 YASQE 内置示例查询)。 查询引用 网上查询的网址(无默认值)。 与
sparql-gui-gh-master.zip
  • sparql-gui-gh-master
  • stw.html
    2KB
  • .htaccess
    43B
  • wd_results.js
    9.5KB
  • result.html
    1.8KB
  • sparql-lab.js
    9.4KB
  • index.html
    1.7KB
  • pm20_result.html
    1.7KB
  • show_result.js
    3.9KB
  • about
  • index.html
    10.2KB
  • styles
  • yasr.min.css
    39.7KB
  • yasqe.min.css
    10.5KB
  • README.md
    5.2KB
  • wd_results.html
    1.9KB
  • scripts
  • jquery.min.js
    93.5KB
  • yasr.bundled.min.js
    933.8KB
  • README.md
    332B
  • yasqe.bundled.min.js
    2.6MB
内容介绍
A SPARQL GUI for Queries from Github and other web repositories (Code used for SPARQL Lab) ============= Load queries from repositories on the web into an IDE-like environment in your browser, execute them - and start modifying and playing with them. The __SPARQL Lab__ installation at __http://zbw.eu/beta/sparql-lab__ primarily aims at supporting [ZBW Labs](http://zbw.eu/labs) projects such as [sparql-queries](../../../sparql-queries) and [skos-history](https://github.com/jneubert/skos-history). Additionally, it is used in [STW Thesaurus for Economics Change Reports (beta)](http://zbw.eu/stw/version/8.14/changes). Feel free to use the publicly available installation for other purposes - without any warranties. This project provides mainly glue code. It makes heavy use of Laurens Rietveld's great [YASQE](http://yasqe.yasgui.org/) and [YASR](http://yasr.yasgui.org/) javascript libraries, part of his [YASGUI](http://yasgui.org) project. ## URL arguments The script is controlled by the following URL arguments: Argument | Description ---------|------------ endpoint | URL of a SPARQL endpoint (defaults to an endpoint with the STW version history). Remote endpoints have to be [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) enabled. query | URL-encoded query text (takes precedence over queryRef if both are defined, defaults to the YASQE built-in example query if neither). queryRef | URL of a query on the web (no default). Works with GitHub API as in the example below, and presumably with other public repository URLs (CORS on the repository server required). hide | With `hide=1`, the query pane is hidden from display (defaults to hide=0). Example: The URL > http://zbw.eu/beta/sparql-lab/?queryRef=https://api.github.com/repos/zbw/sparql-queries/contents/class_overview.rq&endpoint=http://data.nobelprize.org/sparql retrieves and views the query stored at `https://github.com/zbw/sparql-queries/blob/master/class_overview.rq` via the GitHub API and executes it on the endpoint `http://data.nobelprize.org/sparql`. ## VALUES variable replacement in queries If stored SPARQL queries contain a VALUES clause, this can be used to inject variables into the code of queries. URL arguments other than the above listed ones are parsed and replaced, when their names match VALUES variables in the query. This mechanism can be used for providing defaults in queries, which can be overridden by URL arguments. It is supposed to work for a single set of values in a single VALUES clause. To be replaced correctly, literal values in the VALUES clause have be enclosed in double quotes. 'undef' variables are presumed to be literals. Example: The URL > http://zbw.eu/beta/sparql-lab/?queryRef=https://api.github.com/repos/jneubert/skos-history/contents/sparql/added_concepts.rq&language=de loads the query (shown below in a heavily abbreviated form) and replaces the value for the `?language` variable in the VALUES clause. ``` SELECT * WHERE { # parameters VALUES ( ?versionHistoryGraph ?oldVersion ?newVersion ?language ) { ( <http://zbw.eu/stw/version> undef undef "en" ) } # ... # restrict output to a certain language FILTER ( lang(?prefLabel) = ?language ) } ``` # Display of cached result files When the datasets addressed in a query are not available through public endpoints, cached result files can be provided instead of interactively executed queries. The functionality is available via the URI "/result", e.g., __http://zbw.eu/beta/sparql-lab/result__ ## URL arguments The result script is controlled by the following URL arguments: Argument | Description ---------|------------ queryRef | URL of a sparql-json result on the web (no default). Works with GitHub API as in the example below, and presumably with other public repository URLs (CORS on the repository server required). Example: The URL > http://zbw.eu/beta/sparql-lab/result?resultRef=https://api.github.com/repos/zbw/sparql-queries/contents/wikidata/results/count_persons_by_wp_language.wikidata_2016-11-07.json retrieves and views the result stored at `https://github.com/zbw/sparql-queries/blob/master/wikidata/results/count_persons_by_wp_language.wikidata_2016-11-07.json` via the GitHub API. ## Naming convention The following naming convention is used: 1. A result file resides in the same repository as the query in a directory "results" below the directory containing the query. 2. The base name of the result file is equal to the base name of the query. 3. The versions of the datasets, which were queried, should be indicated in further file name parts, with `_` as separator between the dataset name and the version name, and `.` as seperator between multiple dataset_version statements. For example, the result of the `resultRef` in the example above was retrieved by the query `https://github.com/zbw/sparql-queries/blob/master/wikidata/count_persons_by_wp_language.rq` against the dataset `wikidata` in version `2016-11-07`. # Background * [Joachim Neubert: Publishing SPARQL queries live](http://zbw.eu/labs/en/blog/publishing-sparql-queries-live) (ZBW Labs) * [Laurens Rietveld/Rinke Hoekstraa: The YASGUI Family of SPARQL Clients](http://www.semantic-web-journal.net/system/files/swj1001.pdf) (Submission to Semantic Web Journal)
评论
    相关推荐