|
From: Lars W. <la...@di...> - 2005-09-07 13:23:05
|
Greetings all,
playing around with RAP (V0.9.2) I try to merge two models read from
different files. If I do this with with addModel() on Models created by
getMemModel() everything seems to work as expected. However, the code
below, where I create the models with getOntModel(), gives the following
error:
Fatal error: RDFAPI error (class: Statement; method: new):
Resource expected as subject.
in /usr/local/include/rdfapi-php/api/model/Statement.php on line
61
Here is the code:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Event-Overview</title>
</head>
<body>
<?php
define ("RDFAPI_INCLUDE_DIR",
"/usr/local/include/rdfapi-php/api/");
include (RDFAPI_INCLUDE_DIR . "RdfAPI.php");
$ZInfoOntologyModel =
ModelFactory::getOntModel(INFMODELF,RDFS_VOCABULARY);
$ZInfoOntologyModel->load ("../schemas/zinfo.rdf");
$ZInfoModel =
ModelFactory::getOntModel(INFMODELF,RDFS_VOCABULARY);
$ZInfoModel->load ("zinfo.rdf");
$ZInfoModel->addModel ($ZInfoOntologyModel);
echo $ZInfoModel->writeAsHTMLTable();
?>
</body>
</html>
Since getOntModel() is supoosed to be returning a MemModel as well,
shouldn't I just be able to exchange one for the other? Am i missing
something?
Thanks for any help!
Regards,
Lars
|