示例#1
0
 /**
  * getSparql
  * build a valid sparql representation of this obj - should be like "GRAPH <http://example.com> {[Triple...]}" or "GRAPH ?graphName {[Triple...]}"
  * @return string
  */
 public function getSparql()
 {
     return 'GRAPH ' . $this->varOrIri->getSparql() . ' ' . substr(parent::getSparql(), 0, -1);
     //subtr is cosmetic for stripping off the last linebreak
 }
 /**
  * getSparql
  * build a valid sparql representation of this obj - should be like 'OPTIONAL {...}'
  * @return string
  */
 public function getSparql()
 {
     return 'OPTIONAL ' . substr(parent::getSparql(), 0, -1);
     //substr is cosmetic for stripping off the last linebreak
 }