From: Dwi M. <edu...@gm...> - 2007-08-14 10:23:54
|
Hi Christian, I just try the example from http://sites.wiwiss.fu-berlin.de/suhl/bizer/rdfapi/tests/test_infmodel.html. No change. I still learn how to use the InfModel. Here is the code that I use: $infModel= ModelFactory::getInfModelF('http://InfModelF.org'); //add new statements $infModel->add(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'),new Resource('http://example.org/bas'))); $infModel->add(new Statement(new Resource('http://example.org/baz1'),new Resource('http://example.org/bat'),new Resource('http://example.org/baz2'))); echo '<B>Added the following Triples:</B><BR>'.htmlentities(' <http://example.org/baz1> <http://example.org/bat> <http://example.org/baz2> .').'<BR>'.htmlentities(' <http://example.org/bat> <http://www.w3.org/2000/01/rdf-schema#subPropertyOf> <http://example.org/bas> . ').'<BR>'; //output the model as HTML table echo $infModel->writeAsHtmlTable(); $infModel->add(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#domain'),new Resource('http://example.org/Domain1'))); $infModel->add(new Statement(new Resource('http://example.org/bat'),new Resource('http://www.w3.org/2000/01/rdf-schema#range'),new Resource('http://example.org/Range1'))); echo '<B>Added the following Triples:</B><BR>'.htmlentities(' <http://example.org/bat> <http://www.w3.org/2000/01/rdf-schema#domain> <http://example.org/Domain1> .').'<BR>'.htmlentities(' <http://example.org/bat> <http://www.w3.org/2000/01/rdf-schema#range> <http://example.org/Range1> . ').'<BR>'; echo $infModel->writeAsHtmlTable(); Best regards, Dwi Christian Weiske schrieb: > Dwi, > > > >> I am doing diploma thesis and using RDF API PHP in my application. I >> try the example of InfModelF and I got error "Notice: "Object of >> class Resource could not be converted to int" in file >> \lib\rdfapi-php\api\infModel\InfRule.php (on line 233)" >> > Could you provide a small test script which reproduces the error? > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > ------------------------------------------------------------------------ > > _______________________________________________ > Rdfapi-php-interest mailing list > Rdf...@li... > https://lists.sourceforge.net/lists/listinfo/rdfapi-php-interest > |