From: Dwi M. <edu...@gm...> - 2007-08-14 08:47:50
|
Hi All, 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)" Any body can solve this error? Thanks Dwi |
From: Christian W. <cw...@cw...> - 2007-08-14 09:32:32
Attachments:
signature.asc
|
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=20 > \lib\rdfapi-php\api\infModel\InfRule.php (on line 233)" Could you provide a small test script which reproduces the error? --=20 Regards/Mit freundlichen Gr=FC=DFen Christian Weiske |
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 > |
From: Dwi M. <edu...@gm...> - 2007-08-14 12:33:09
|
Hi Christian, Ach so....., I comment out //case E_NOTICE: //case E_USER_NOTICE: // $errortype = "Notice"; in my framework setting. And The InfModelF work well. RDF API PHP is great. Thanks for your help. Best Regards, Dwi Christian Weiske schrieb: > Dwi, > > > >> Here is the code that I use: >> ... >> > I cannot reproduce the notice you are getting. > > Which version of RAP do you use? > The current (svn) version of InfRule.php could never generate this > notice on line 233. > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > 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 > |
From: Christian W. <cw...@cw...> - 2007-08-15 04:45:52
Attachments:
signature.asc
|
Dwi, > Ach so....., > I comment out > //case E_NOTICE: > //case E_USER_NOTICE: > // $errortype =3D "Notice"; >=20 > in my framework setting. >=20 > And The InfModelF work well. This does not fix but merely hides the problem. E_Notices often show a problem with uninitialized variables or other bugs that should be fixed. So, which version of RAP are you using? How does the offending code lines look (at which the error is thrown)? --=20 Regards/Mit freundlichen Gr=FC=DFen Christian Weiske |
From: Christian W. <cw...@cw...> - 2007-08-14 11:31:52
Attachments:
signature.asc
|
Dwi, > Here is the code that I use: > ... I cannot reproduce the notice you are getting. Which version of RAP do you use? The current (svn) version of InfRule.php could never generate this notice on line 233. --=20 Regards/Mit freundlichen Gr=FC=DFen Christian Weiske |