I am using pOWL to build a content management system of OWL files. I want to be able to query
the OWL files as well as add new instances and classes. However I am stuck. I need to load the OWL file into an OWLModel using pOWL. So I tried:
$base="wine.owl";
$store = new DefaultPOWLStore(ADODB_DB_DRIVER, "localhost", "powl", "root", "password");
$model = ModelFactory::getOntModel('DBModel','RDFS_VOCABULARY', $base);
$model = new OWLModel($store, $base);
$model->load('wine.owl');
$model -> __construct($store, $base);
But I am getting the error:
Fatal error: Call to a member function startTrans() on a non-object in C:\Users\xxx\xxx\powldfapi-php\api\model\DbModel.php on line 878
The code with the error is:
if (is_a($model, 'MemModel')) {
if (is_object($model)){
echo "<pre>";
print_r("!!!!!!!");
echo "</pre>";
}
$this->dbConn->startTrans();
I added the second if clause in an attempt to check if $model
is an object, and it passed the clause. But I am not sure if that is the correct way to check if a variable is an object.
UPDATE: The issue seems to be with dbConn
variable, need to find a way to load the model into the DB for dbConn
to be defined. Will look tomorrow.