示例#1
0
                 $querystring .= "\r\n {<{$tmp_iri}> <{$annotation_iri}> ?oa{$i} .\r\n ?oa{$i} <http://www.w3.org/2000/01/rdf-schema#label> ?o{$i}}\r\n";
             } else {
                 $querystring .= "\r\n {<{$tmp_iri}> <{$annotation_iri}> ?o{$i}}\r\n";
             }
         }
         if ($includeAllAnnotationProperties) {
             $i++;
             if ($i > 1) {
                 $querystring .= " UNION";
             }
             $querystring .= "\t{<{$tmp_iri}> ?p{$i} ?o{$i}.\r\n?p{$i} <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#AnnotationProperty>}\r\n";
         }
     }
 }
 $querystring .= "\r\n}";
 $querystring = formatQuery($querystring);
 foreach ($iris as $tmp_iri => $label) {
     $processed_iris[$tmp_iri] = $label;
 }
 if ($server_import == 'http://sparql.obo.neurocommons.org/sparql') {
     //$querystring = str_replace('nodeID://b', 'nodeID://', $querystring);
 }
 $fields = array();
 $fields['default-graph-uri'] = $ontology_uri;
 $fields['format'] = 'application/rdf+xml';
 $fields['debug'] = 'on';
 $fields['query'] = $querystring;
 //				print("<!--$querystring-->\n");
 $rdf = curl_post_contents($server_import, $fields);
 //				print("<!--$rdf-->\n");
 //$rdf = preg_replace('/rdf:nodeID="b/', 'rdf:nodeID="', $rdf);
示例#2
0
<?php

require_once 'C:/one45/htdocs/mainline/admin/pages/classes/debugFunctions.php';
$stdin = file_get_contents("php://stdin");
echo formatQuery($stdin);