本文整理汇总了PHP中Updater::buildDeleteGraph方法的典型用法代码示例。如果您正苦于以下问题:PHP Updater::buildDeleteGraph方法的具体用法?PHP Updater::buildDeleteGraph怎么用?PHP Updater::buildDeleteGraph使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Updater
的用法示例。
在下文中一共展示了Updater::buildDeleteGraph方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: stdClass
<?php
include 'config.php';
include_once 'checkLogin.php';
include ARC_DIR . 'ARC2.php';
include CLASSES_DIR . 'Updater.php';
header("Content-type: application/json");
$testPost['jsonStr'] = '{"old":"{\\"http://code.rubrick-jetpack.org/vocab/Context1\\":{\\"http://rdfs.org/sioc/ns#name\\":[{\\"value\\":\\"Demo\\",\\"type\\":\\"literal\\"}],\\"http://code.rubrick-jetpack.org/vocab/description\\":[{\\"value\\":\\"Just a demo\\",\\"type\\":\\"literal\\"}]}}","new":"{\\"http://code.rubrick-jetpack.org/vocab/Context1\\":{\\"http://rdfs.org/sioc/ns#name\\":[{\\"value\\":\\"Demo\\",\\"type\\":\\"literal\\"}],\\"http://code.rubrick-jetpack.org/vocab/description\\":[{\\"value\\":\\"Just a demo ed\\",\\"type\\":\\"literal\\"}]}}","uri":"http://code.rubrick-jetpack.org/vocab/Context1"}';
$testPost['uri'] = 'http://testURI.org';
$store = ARC2::getStore($config);
$responseObj = new stdClass();
//$postObj = json_decode($_POST['jsonStr']);
$postObj = json_decode($_POST['jsonStr']);
$updater = new Updater($_POST['uri'], array('post' => $postObj));
//print_r($updater->postData);
$updater->buildAddGraph();
$updater->buildDeleteGraph();
$updater->finalizeGraph('add');
$updater->finalizeGraph('delete');
//echo json_encode($updater->deleteGraph->toRDFJSON(true) );
示例2: json_encode
<?php
include 'config.php';
include_once 'checkLogin.php';
include ARC_DIR . 'ARC2.php';
include CLASSES_DIR . 'Updater.php';
header('Content-type: application/json');
$store = ARC2::getStore($config);
$POST['jsonStr'] = '{"new":"{}","old":"{\\"http://data.rubrick-jetpack.org/Rubrics/0280bce1098ee66c35f8027d3a200b9f9d6cc90a\\":{\\"http://www.holygoat.co.uk/owl/redwood/0.1/tags/tag\\":[{\\"value\\":\\"http://data.rubrick-jetpack.org/Tag/tagged_rubric\\",\\"type\\":\\"uri\\"},{\\"value\\":\\"http://data.rubrick-jetpack.org/Tag/woot_tag_2\\",\\"type\\":\\"uri\\"}]}}"}';
$postObj = json_decode($POST['jsonStr']);
/*
$jsonObj = json_decode($jsonStr);
$newIndex = json_decode($jsonObj->new, true);
//print_r($newIndex);
$testT = new Tagging(false, array('properties'=>array('newTagGraph' => $newIndex)) );
$testT->buildUpdateGraph();
echo json_encode($testT->updateGraph->toRDFJSON(true) );
*/
$u = new Updater(false, array('post' => $postObj));
$u->buildDeleteGraph();
echo json_encode($u->deleteGraph->toRDFJSON(true));