public function searchType(QueryBuilderInterface $query , $class_uri , $recursive = false) {

        $Class    = new \core_kernel_classes_Class($class_uri);
        $rdftypes = [];

        if ($recursive === true) {
            foreach($Class->getSubClasses(true) as $subClass) {
                $rdftypes[] = $subClass->getUri();
            }
        }

        $rdftypes[] = $class_uri;
        
        $criteria = $query->newQuery()
                ->add('http://www.w3.org/1999/02/22-rdf-syntax-ns#type')
                ->in($rdftypes);
        
        return $criteria;
    }
public function searchType(QueryBuilderInterface $query , $class_uri , $recursive = false) {

        $Class    = new \core_kernel_classes_Class($class_uri);
        $rdftypes = [];

        if ($recursive === true) {
            foreach($Class->getSubClasses(true) as $subClass) {
                $rdftypes[] = $subClass->getUri();
            }
        }

        $rdftypes[] = $class_uri;
        
        $criteria = $query->newQuery()
                ->add('http://www.w3.org/1999/02/22-rdf-syntax-ns#type')
                ->in($rdftypes);
        
        return $criteria;
    }
public function searchType ( QueryBuilderInterface $ query , $ class_uri , $ recursive = false ) { $ Class = new \ core_kernel_classes_Class ( $ class_uri ) ; $ rdftypes = [ ] ; if ( $ recursive === true ) { foreach ( $ Class -> getSubClasses ( true ) as $ subClass ) { $ rdftypes [ ] = $ subClass -> getUri ( ) ; } } $ rdftypes [ ] = $ class_uri ; $ criteria = $ query -> newQuery ( ) -> add ( 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type' ) -> in ( $ rdftypes ) ; return $ criteria ; }
return a preset query builder with types
@param QueryBuilderInterface $query
@param string $class_uri
@param boolean $recursive
@return QueryInterface
@throws \common_exception_Error
return a preset query builder with types