Beispiel #1
0
 public function __construct(URI $subject, $language)
 {
     $this->subject = $subject;
     $this->language = $language;
     $this->use = Options::getOption('Sparql.use');
     if ($this->use == 'odbc') {
         $this->odbc = ODBC::getDefaultConnection();
     } else {
         $this->sparqlEndpoint = SPARQLEndpoint::getDefaultEndpoint();
     }
 }
 private function _testsubject($subject)
 {
     $testquery = $this->_testsubjectQuery($subject);
     $se = SPARQLEndpoint::getDefaultEndpoint();
     return $se->executeCount($testquery, get_class($this), $this->graphURI);
 }
 private function _testsubject($subject, $graphURI)
 {
     $g = '';
     if ($graphURI != false) {
         $g = ' FROM <' . $graphURI . '> ';
     }
     $testquery = 'SELECT count(*) as ?count ' . $g . ' {<' . $subject . '> ?p ?o}';
     //echo $testquery;
     $se = SPARQLEndpoint::getDefaultEndpoint();
     return $se->executeCount($testquery, get_class($this), $graphURI);
 }