承接 php-task-runner/sparql-robo-tasks 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

php-task-runner/sparql-robo-tasks

Composer 安装命令:

composer require php-task-runner/sparql-robo-tasks

包简介

Provides SPARQL commands for Robo

关键字:

README 文档

README

Build Status

This repository provides SPARQL tasks for Robo.

Install note

Until easyrdf/easyrdf package will get stable 1.0.0 release, the root Composer file will have to explicitly require easyrdf/easyrdf. See this issue for details: easyrdf/easyrdf#320. After EasyRDF will be stabilised, the library will be moved back to require section.

Tasks

Query

$query1 = 'SELECT ?s ?p ?o WHERE { ?s ?p ?o } LIMIT 100';
$query2 = '...';

$result = $this->taskSparqlQuery()
    ->setEndpointUrl('http://example.com/sparql')
    ->addQuery($query1)
    ->addQuery($query2)
    ->run();

// Result of $query1.
$res1 = $result->getData()['result'][$query1];
// Result of $query2.
$res2 = $result->getData()['result'][$query2];

Import triples from strings

$triples1 = <<<TRIPLES
<?xml version="1.0"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:si="https://www.w3schools.com/rdf/">
<rdf:Description rdf:about="https://www.w3schools.com">
  <si:title>W3Schools</si:title>
  <si:author>Jan Egil Refsnes</si:author>
</rdf:Description>
</rdf:RDF>
TRIPLES;
$triples2 = <<<TRIPLES
<?xml version="1.0"?>
<RDF>
  <Description about="https://www.w3schools.com/rdf">
    <author>Jan Egil Refsnes</author>
    <homepage>https://www.w3schools.com</homepage>
  </Description>
</RDF>
TRIPLES;

$this->taskSparqlImportFromString()
    ->setEndpointUrl('http://example.com/sparql-graph-crud')
    ->addTriples('http://example.com/graph1', $triples1)
    ->addTriples('http://example.com/graph2', $triples2)
    ->run();

Import triples from files

$this->taskSparqlImportFromFile()
    ->setEndpointUrl('http://example.com/sparql-graph-crud')
    ->addTriples('http://example.com/graph1', '/path/to/file.rdf')
    ->addTriples('http://example.com/graph2', '/other/path/to/file2.rdf')
    ->run();

统计信息

  • 总下载量: 19.77k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: EUPL-1.2
  • 更新时间: 2020-06-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固