source: Dev/branches/rest-dojo-ui/jQueryUI/server/rdfapi/sparql/ClientQuery.php @ 312

Last change on this file since 312 was 312, checked in by jkraaijeveld, 13 years ago
File size: 1.2 KB
Line 
1<?php
2
3// ----------------------------------------------------------------------------------
4// Class: ClientQuery
5// ----------------------------------------------------------------------------------
6
7/**
8* ClientQuery Object to run a SPARQL Query against a SPARQL server.
9*
10* @version  $Id: ClientQuery.php 465 2007-06-27 16:47:57Z cweiske $
11* @author   Tobias Gauᅵ <tobias.gauss@web.de>
12* @license http://www.gnu.org/licenses/lgpl.html LGPL
13*
14* @package sparql
15*/
16
17class ClientQuery extends Object {
18
19        var $default  = array();
20        var $named    = array();
21        var $prefixes = array();
22        var $query;
23
24        /**
25        * Adds a default graph to the query object.
26        *
27        * @param String  $default  default graph name
28        */
29        function addDefaultGraph($default){
30                if(!in_array($this->named,$this->default))
31                $this->default[] = $default;
32        }
33        /**
34        * Adds a named graph to the query object.
35        *
36        * @param String  $default  named graph name
37        */
38        function addNamedGraph($named){
39                if(!in_array($named,$this->named))
40                $this->named[] = $named;
41        }
42        /**
43        * Adds the SPARQL query string to the query object.
44        *
45        * @param String  $query the query string
46        */
47        function query($query){
48                $this->query = $query;
49        }
50
51}
52
53
54
55
56?>
Note: See TracBrowser for help on using the repository browser.