private function addStatement($modelId, $subject, $predicate, $object, $lang = null) {
        $result = core_kernel_classes_DbWrapper::singleton()->query(
            'SELECT count(*) FROM statements WHERE modelid = ? AND subject = ? AND predicate = ? AND object = ? AND l_language = ?',
            array($modelId, $subject, $predicate, $object, (is_null($lang)) ? '' : $lang)
        );
        
        if (intval($result->fetchColumn()) === 0) {
            $dbWrapper = core_kernel_classes_DbWrapper::singleton();
            $date = $dbWrapper->getPlatForm()->getNowExpression();

            $dbWrapper->insert(
                'statements',
                array(
                    'modelid' =>  $modelId,
                    'subject' =>$subject,
                    'predicate'=> $predicate,
                    'object' => $object,
                    'l_language' => is_null($lang) ? '' : $lang,
                    'author' => 'http://www.tao.lu/Ontologies/TAO.rdf#installator',
                    'epoch' => $date
                )
            );
        }
    }
private function addStatement($modelId, $subject, $predicate, $object, $lang = null) {
        $result = core_kernel_classes_DbWrapper::singleton()->query(
            'SELECT count(*) FROM statements WHERE modelid = ? AND subject = ? AND predicate = ? AND object = ? AND l_language = ?',
            array($modelId, $subject, $predicate, $object, (is_null($lang)) ? '' : $lang)
        );
        
        if (intval($result->fetchColumn()) === 0) {
            $dbWrapper = core_kernel_classes_DbWrapper::singleton();
            $date = $dbWrapper->getPlatForm()->getNowExpression();

            $dbWrapper->insert(
                'statements',
                array(
                    'modelid' =>  $modelId,
                    'subject' =>$subject,
                    'predicate'=> $predicate,
                    'object' => $object,
                    'l_language' => is_null($lang) ? '' : $lang,
                    'author' => 'http://www.tao.lu/Ontologies/TAO.rdf#installator',
                    'epoch' => $date
                )
            );
        }
    }
private function addStatement ( $ modelId , $ subject , $ predicate , $ object , $ lang = null ) { $ result = core_kernel_classes_DbWrapper :: singleton ( ) -> query ( 'SELECT count(*) FROM statements WHERE modelid = ? AND subject = ? AND predicate = ? AND object = ? AND l_language = ?' , array ( $ modelId , $ subject , $ predicate , $ object , ( is_null ( $ lang ) ) ? '' : $ lang ) ) ; if ( intval ( $ result -> fetchColumn ( ) ) === 0 ) { $ dbWrapper = core_kernel_classes_DbWrapper :: singleton ( ) ; $ date = $ dbWrapper -> getPlatForm ( ) -> getNowExpression ( ) ; $ dbWrapper -> insert ( 'statements' , array ( 'modelid' => $ modelId , 'subject' => $ subject , 'predicate' => $ predicate , 'object' => $ object , 'l_language' => is_null ( $ lang ) ? '' : $ lang , 'author' => 'http://www.tao.lu/Ontologies/TAO.rdf#installator' , 'epoch' => $ date ) ) ; } }
Adds a statement to the ontology if it does not exist yet

@author "Joel Bout, <joel@taotesting.com>"
@param int $modelId
@param string $subject
@param string $predicate
@param string $object
@param string $lang
Adds a statement to the ontology if it does not exist yet