Class DatasetDb

Description

Dataset implementation.

Superclass of datasetMem and datasetDb which contains shared functionality.

  • version: $Id: DatasetDb.html,v 1.10 2006/06/26 12:34:19 tgauss Exp $
  • author: Daniel Westphal (http://www.d-westphal.de)
  • author: Chris Bizer <chris@bizer.de>

Located in /dataset/DatasetDb.php (line 19)

Dataset
   |
   --DatasetDb
Variable Summary
resource $dbConnection
$dbStore $dbStore
string $setName
Method Summary
DatasetDb DatasetDb (mixed &$dbConnection, mixed &$dbStore, mixed $datasetName)
void addAll (mixed $otherDataset)
void addNamedGraph (mixed &$graph)
void addQuad (mixed &$quad)
void clear ()
boolean containsNamedGraph (mixed $graphName)
boolean containsQuad (mixed $graphName, mixed $subject, mixed $predicate, mixed $object)
int countGraphs ()
int countQuads ()
NamedGraphDb &createGraph (mixed $graphName, [mixed $baseURI = null])
IteratorFindQuadsDb &findInDefaultGraph (mixed $subject, mixed $predicate, mixed $object)
IteratorFindQuadsDb &findInNamedGraphs (mixed $graphName, mixed $subject, mixed $predicate, mixed $object, [ $returnAsTriples = false])
string getDatasetName ()
NamedGraphDb &getNamedGraph (mixed $graphName)
boolean hasDefaultGraph ()
boolean isEmpty ()
Array listGraphNames ()
void removeNamedGraph (mixed $graphName)
void removeQuad (mixed $quad)
void setDatasetName (mixed $datasetName)
void setDefaultGraph (mixed &$graph)
void _initialize ()
Variables
resource $dbConnection (line 28)

Reference to databse connection.

  • var: dbConnection
  • access: private
$dbStore $dbStore (line 36)

Reference to the dbStore Object.

  • var: dbStore
  • access: private
string $setName (line 45)

Name of the Dataset

  • access: private
Methods
Constructor DatasetDb (line 57)

Constructor You can supply a Dataset name.

  • access: public
DatasetDb DatasetDb (mixed &$dbConnection, mixed &$dbStore, mixed $datasetName)
addAll (line 279)

Add all named graphs of the other dataset to this dataset.

void addAll (mixed $otherDataset)
addNamedGraph (line 120)

Adds a NamedGraph to the set.

void addNamedGraph (mixed &$graph)
addQuad (line 301)

Adds a quad to the Dataset. The argument must not contain any wildcards. If the quad is already present, nothing happens. A new named graph will automatically be created if necessary.

void addQuad (mixed &$quad)
clear (line 238)

Deletes all NamedGraphs from the set.

void clear ()
containsNamedGraph (line 176)

Tells wether the Dataset contains a NamedGraph.

boolean containsNamedGraph (mixed $graphName)
containsQuad (line 325)

Tells wether the Dataset contains a quad or quads matching a pattern.

boolean containsQuad (mixed $graphName, mixed $subject, mixed $predicate, mixed $object)
countGraphs (line 248)

Returns the number of NamedGraphs in the set. Empty graphs are counted.

int countGraphs ()
countQuads (line 371)

Counts the Quads in the RDF dataset. Identical Triples in different NamedGraphs are counted individually.

int countQuads ()
createGraph (line 227)

Creates a new NamedGraph and adds it to the set. An existing graph with the same name will be replaced. But the old namedGraph remains in the database.

NamedGraphDb &createGraph (mixed $graphName, [mixed $baseURI = null])
findInDefaultGraph (line 421)

Finds Statements that match a pattern in the default Graph. The argument may contain wildcards.

IteratorFindQuadsDb &findInDefaultGraph (mixed $subject, mixed $predicate, mixed $object)
findInNamedGraphs (line 390)

Finds Statements that match a quad pattern. The argument may contain wildcards.

IteratorFindQuadsDb &findInNamedGraphs (mixed $graphName, mixed $subject, mixed $predicate, mixed $object, [ $returnAsTriples = false])
  • $returnAsTriples
getDatasetName (line 110)

Returns the Datasets name.

  • access: public
string getDatasetName ()
getDefaultGraph (line 143)

Returns a reference to the defaultGraph.

NamedGraphDb &getDefaultGraph ()
getNamedGraph (line 189)

Returns the NamedGraph with a specific name from the Dataset.

Changes to the graph will be reflected in the set.

  • return: or null
NamedGraphDb &getNamedGraph (mixed $graphName)
hasDefaultGraph (line 154)

Returns true, if a defaultGraph exists. False otherwise.

boolean hasDefaultGraph ()
isEmpty (line 269)

Tells wether the set contains any NamedGraphs.

boolean isEmpty ()
listGraphNames (line 207)

Returns the names of the namedGraphs in this set as strings in an array.

Array listGraphNames ()
listNamedGraphs (line 258)

Returns an iterator over all NamedGraphs in the set.

IteratorAllGraphsDb &listNamedGraphs ()
removeNamedGraph (line 165)

Removes a NamedGraph from the set. Nothing happens if no graph with that name is contained in the set.

void removeNamedGraph (mixed $graphName)
removeQuad (line 348)

Deletes a Quad from the RDF dataset.

void removeQuad (mixed $quad)
setDatasetName (line 90)

Sets the Dataset name. Return true on success, false otherwise.

  • access: public
void setDatasetName (mixed $datasetName)
setDefaultGraph (line 133)

Overwrites the existting default graph.

void setDefaultGraph (mixed &$graph)
_initialize (line 72)

Initialize Read all needed data into the set.

  • access: private
void _initialize ()

Inherited Methods

Inherited From Dataset

Dataset::loadFromFile()
Dataset::loadFromString()
Dataset::serializeToFile()
Dataset::serializeToString()
Dataset::sparqlQuery()

Documentation generated on Mon, 26 Jun 2006 14:25:20 +0200 by phpDocumentor 1.3.0RC6