source: Dev/branches/rest-dojo-ui/jos-branch/server/rdfapi/dataset/NamedGraphDb.php @ 312

Last change on this file since 312 was 312, checked in by jkraaijeveld, 13 years ago
File size: 1.5 KB
Line 
1<?php
2// ----------------------------------------------------------------------------------
3// Class: NamedGraphDb
4// ----------------------------------------------------------------------------------
5
6/**
7* Persistent NamedGraph implementation that extends a {@link DbModel}.
8* The graphName is not stored in the database. As soon as the namedGraph is added
9* to a RDF dataset the graphName is saved.
10*
11* @version  $Id$
12* @author Daniel Westphal (http://www.d-westphal.de)
13*
14* @package      dataset
15* @access       public
16**/
17class NamedGraphDb extends DbModel 
18{
19
20        /**
21        * Name of the NamedGraphDb
22        *
23        * @var          string
24        * @access       private
25        */
26        var $graphName;
27       
28        /**
29        * Constructor
30        * Do not call this directly.
31        * Use the method getModel,getNewModel or putModel of the Class NamedGraphDb instead.
32        *
33        * @param   ADODBConnection
34        * @param   string
35        * @param   string
36        * @param   string
37        * @access       public
38        */             
39        function NamedGraphDb(&$dbConnection, $modelURI, $modelID,$graphName, $baseURI=NULL)
40        {
41                $this->dbConn =& $dbConnection;
42                $this->modelURI = $modelURI;
43                $this->modelID = $modelID;
44                $this->baseURI = $this->_checkBaseURI($baseURI);
45                $this->graphName = $graphName;
46        }
47       
48        /**
49    * Sets the graph name.
50    *
51    * @param string
52        * @access       public
53    */ 
54        function setGraphName($graphName)
55        {
56                $this->graphName=$graphName;
57        }
58       
59        /**
60    * Returns the graph name.
61    *
62    * @return string
63        * @access       public
64    */
65        function getGraphName()
66        {
67                return $this->graphName;
68        }
69}
70?>
Note: See TracBrowser for help on using the repository browser.