You are here

function ARC_sparql_parser::parse in Taxonomy import/export via XML 5.2

Same name and namespace in other branches
  1. 5 arc/ARC_sparql_parser.php \ARC_sparql_parser::parse()
  2. 6.2 arc/ARC_sparql_parser.php \ARC_sparql_parser::parse()
  3. 6 arc/ARC_sparql_parser.php \ARC_sparql_parser::parse()

File

arc/ARC_sparql_parser.php, line 405

Class

ARC_sparql_parser

Code

function parse($q = "") {
  $this->warnings = array();
  $this->errors = array();
  $this->logs = array();
  $this->infos = array(
    "vars" => array(),
    "result_vars" => array(),
  );
  $this->iri_placeholders = array();
  $this->str_placeholders = array();
  $this->iris = array();
  $this
    ->set_bnode_prefix($this->bnode_prefix);
  $this
    ->set_default_prefixes();
  $this->prefixes = array();
  if (!$q) {
    $this->errors[] = "empty query";
    return true;
  }
  $this->q_init = $q;
  $this->q = $q;

  /* substitute iri refs */
  $this->q = $this
    ->substitute_iri_refs($this->q);

  /* substitute strings, remove comments */
  $this->q = $this
    ->substitute_strings($this->q);

  /* parse */
  $this
    ->parse_Query();
}