|
From: Chris B. <bi...@ze...> - 2005-11-17 11:00:57
|
Hi, > > I've been playing with RAP recently, and would like to congratulate > you on your efforts. > I've finally spent a couple of hours getting my toy code to use the > DB backend, and this seems to be working nicely so far. > > One thing I did struggle with was the code to get an OntModel from > the DB. Could you tell me whether the below is appropriate: > > $dbURI = "http://www.etc..."; > $mysql_database = ModelFactory::getDbStore('MySQL', 'localhost', > etc...'); > $memModel = $mysql_database->getModel($dbURI); > $ontModel = $memModel->getOntModel(RDFS_VOCABULARY); > Looks fine to me. > This worked to a certain extent, but I was getting an error when > trying to listClasses on the ontModel: > PHP Fatal error: Call to a member function TYPE() on a non-object > in /Users/drummond/Sites/rdfapi-php/api/ontModel/OntModel.php on line > 127 > > So I had a look and fixed the method below, which now works fine - > the getResModel() probably needs the same fix. > > function & getOntModel($vocabulary) > { > require_once( RDFAPI_INCLUDE_DIR . PACKAGE_ONTMODEL); > require_once(RDFAPI_INCLUDE_DIR.'ontModel/'.$vocabulary); > $vocab = new RdfsVocabulary(); > return new OntModel(& $this, $vocab); > } > Thanks for the bug fix. Tobias, could you please submit this fix to the repository. > Also, I keep vaguely aware of development of other APIs and > understand pOWL builds on top of RAP. Does this mean that OWL support > is likely to stay out of RAP itself? > No, RAP's reasoning and ontology features were implemented by Daniel Westphal as part of his diploma thesis which is finished now. So if somebody wants to build on his work and extend RAP further towards OWL, he is highly welcome to do so and we will incorporate the code into the next release. Chris > Thanks for your time. > > Nick > > > ------------------------------------------------------- > This SF.Net email is sponsored by the JBoss Inc. Get Certified Today > Register for a JBoss Training Course. Free Certification Exam > for All Training Attendees Through End of 2005. For more info visit: > http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click > _______________________________________________ > Rdfapi-php-interest mailing list > Rdf...@li... > https://lists.sourceforge.net/lists/listinfo/rdfapi-php-interest |