当前位置: 首页>>代码示例>>PHP>>正文


PHP MemModel::setbaseURI方法代码示例

本文整理汇总了PHP中MemModel::setbaseURI方法的典型用法代码示例。如果您正苦于以下问题:PHP MemModel::setbaseURI方法的具体用法?PHP MemModel::setbaseURI怎么用?PHP MemModel::setbaseURI使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MemModel的用法示例。


在下文中一共展示了MemModel::setbaseURI方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testReify

 function testReify()
 {
     $_SESSION['test'] = 'MemModel reify test';
     $model = new MemModel();
     $model->setbaseURI("http://www.bizer.de");
     $myhomepage = new Resource("http://www.bizer.de/welcome.html");
     $creator = new Resource("http://purl.org/dc/elements/1.1/creator");
     $me = new Resource("mailto:chris@bizer.de");
     $model->add(new Statement($myhomepage, $creator, $me));
     $creation_date = new Resource("http://www.example.org/terms/creation-date");
     $August16 = new Literal("August 16, 2002");
     $model->add(new Statement($myhomepage, $creation_date, $August16));
     $language = new Resource("http://www.example.org/terms/language");
     $deutsch = new Literal("Deutsch", "de");
     $model->add(new Statement($myhomepage, $language, $deutsch));
     $model2 =& $model->reify();
     $this->assertEqual(12, $model2->size());
 }
开发者ID:Gigi33,项目名称:exif2rdf,代码行数:18,代码来源:mm_SetOperations_tests.php

示例2: MemModel

	<title>Test Set Operations</title>
</head>

<body>



<?php 
define("RDFAPI_INCLUDE_DIR", "./../api/");
include RDFAPI_INCLUDE_DIR . "RdfAPI.php";
echo "<h3>1. Generate and show two MemModels</h3>";
// Create empty MemModel
$model = new MemModel();
$model->setbaseURI("http://www.bizer.de");
$model2 = new MemModel();
$model2->setbaseURI("http://www.bizer.de/zwei");
// Create nodes and add statements to models
$myhomepage = new Resource("http://www.bizer.de/welcome.html");
$creator = new Resource("http://purl.org/dc/elements/1.1/creator");
$me = new Resource("mailto:chris@bizer.de");
$model->add(new Statement($myhomepage, $creator, $me));
$model2->add(new Statement($myhomepage, $creator, $me));
$creation_date = new Resource("http://www.example.org/terms/creation-date");
$August16 = new Literal("August 16, 2002");
$model->add(new Statement($myhomepage, $creation_date, $August16));
$model2->add(new Statement($myhomepage, $creation_date, $August16));
$language = new Resource("http://www.example.org/terms/language");
$deutsch = new Literal("Deutsch", "de");
$model->add(new Statement($myhomepage, $language, $deutsch));
$name = new Resource("http://www.example.org/terms/Name");
$chrisbizer = new Literal("Chris Bizer");
开发者ID:Gigi33,项目名称:exif2rdf,代码行数:31,代码来源:test_setoperations.php


注:本文中的MemModel::setbaseURI方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。