Class DatasetDb

Description

Dataset implementation.

Superclass of datasetMem and datasetDb which contains shared functionality.

  • author: Chris Bizer <chris@bizer.de>
  • author: Daniel Westphal (http://www.d-westphal.de)
  • version: $Id: DatasetDb.html 443 2007-06-01 16:25:38Z cax $

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

Dataset
   |
   --DatasetDb
Method Summary
DatasetDb DatasetDb (ADODBConnection &$dbConnection, DbStore &$dbStore, string $datasetName)
void addAll (Dataset $otherDataset)
void addNamedGraph (NamedGraphDb &$graph)
void addQuad (Quad &$quad)
void clear ()
boolean containsNamedGraph (string $graphName)
boolean containsQuad (Resource $graphName, Resource $subject, Resource $predicate, Resource $object)
int countGraphs ()
int countQuads ()
NamedGraphDb &createGraph (string $graphName, [string $baseURI = null])
IteratorFindQuadsDb &findInNamedGraphs (Resource $graphName, Resource $subject, Resource $predicate, Resource $object, [ $returnAsTriples = false])
string getDatasetName ()
NamedGraphDb &getNamedGraph (string $graphName)
boolean hasDefaultGraph ()
boolean isEmpty ()
Array listGraphNames ()
void removeNamedGraph (string $graphName)
void removeQuad (Quad $quad)
void setDatasetName (string $datasetName)
void setDefaultGraph (DbModel &$graph)
Methods
Constructor DatasetDb (line 60)

Constructor You can supply a Dataset name.

  • access: public
DatasetDb DatasetDb (ADODBConnection &$dbConnection, DbStore &$dbStore, string $datasetName)
  • ADODBConnection &$dbConnection
  • DbStore &$dbStore
  • string $datasetName
addAll (line 283)

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

void addAll (Dataset $otherDataset)
addNamedGraph (line 123)

Adds a NamedGraph to the set.

void addNamedGraph (NamedGraphDb &$graph)
addQuad (line 305)

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 (Quad &$quad)
clear (line 241)

Deletes all NamedGraphs from the set.

void clear ()
containsNamedGraph (line 179)

Tells wether the Dataset contains a NamedGraph.

boolean containsNamedGraph (string $graphName)
  • string $graphName
containsQuad (line 329)

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

boolean containsQuad (Resource $graphName, Resource $subject, Resource $predicate, Resource $object)
countGraphs (line 251)

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

int countGraphs ()
countQuads (line 375)

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

int countQuads ()
createGraph (line 230)

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 (string $graphName, [string $baseURI = null])
  • string $graphName
  • string $baseURI
findInDefaultGraph (line 426)

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

IteratorFindQuadsDb &findInDefaultGraph (Resource $subject, Resource $predicate, Resource $object)
findInNamedGraphs (line 394)

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

IteratorFindQuadsDb &findInNamedGraphs (Resource $graphName, Resource $subject, Resource $predicate, Resource $object, [ $returnAsTriples = false])
getDatasetName (line 113)

Returns the Datasets name.

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

Returns a reference to the defaultGraph.

NamedGraphDb &getDefaultGraph ()
getNamedGraph (line 192)

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 (string $graphName)
  • string $graphName
hasDefaultGraph (line 157)

Returns true, if a defaultGraph exists. False otherwise.

boolean hasDefaultGraph ()
isEmpty (line 273)

Tells wether the set contains any NamedGraphs.

boolean isEmpty ()
listGraphNames (line 210)

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

Array listGraphNames ()
listNamedGraphs (line 261)

Returns an iterator over all NamedGraphs in the set.

IteratorAllGraphsDb &listNamedGraphs ()
removeNamedGraph (line 168)

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

void removeNamedGraph (string $graphName)
  • string $graphName
removeQuad (line 352)

Deletes a Quad from the RDF dataset.

void removeQuad (Quad $quad)
setDatasetName (line 93)

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

  • access: public
void setDatasetName (string $datasetName)
  • string $datasetName
setDefaultGraph (line 136)

Overwrites the existting default graph.

void setDefaultGraph (DbModel &$graph)

Inherited Methods

Inherited From Dataset

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

Documentation generated on Fri, 1 Jun 2007 16:48:40 +0200 by phpDocumentor 1.3.2