DependencySet Class Reference

Represents a set of dependency-tuples for a variable. More...

#include <dependencyset.h>

Collaboration diagram for DependencySet:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 DependencySet (unsigned _var)
 Constructor.
virtual ~DependencySet ()
void insertTuple (PathExpression *path, bool pos, bool dos, bool cond)
 Inserts a new tuple to this set of dependency-tuples.
void print (OutputStream &dos)
 Prints this set of dependency-tuples.
unsigned getVar ()
 Returns the variable of this set of dependency-tuples.
vector< DependencyTuple * > * getTuples ()
 Returns all dependency-tuples for this variable.
bool hasTuples ()
 Returns if this variable has a set of dependency-tuples.
void removeSyntacticallyEqualTuple (PassiveProjectionTree *ppt)
 Removes all tuples of this set dependency-tuples that are syntactically equal.
void removeSemanticallyContainedTuple (PassiveProjectionTree *ppt)
 Removes all tuples of this set dependency-tuples that are semantically contained among each other.

Private Attributes

unsigned var
 The entered variable.
vector< DependencyTuple * > tuples
 The set of dependency-tuples for this variable.


Detailed Description

Represents a set of dependency-tuples for a variable.

Represents a set of dependency-tuples for a variable, i.e. a set of DependencyTuple for a variable, e.g. dep($x) = {</bib//book/dos::node(), ri>, </bib/book/title[positions()=1], rj>} (whereas i != j), which are attached to the VariableTree as child nodes of this variable. This attachment together with the extension of all VariableTreeNode by their corresponding PathExpression results in the ProjectionTree.

Note:
Variables are internally represented by numbers!
Author:
Michael Schmidt

Gunnar Jehl

Version:
2.1
License:
Software License Agreement (BSD License)

Definition at line 55 of file dependencyset.h.


Constructor & Destructor Documentation

DependencySet::DependencySet ( unsigned  _var  ) 

Constructor.

Constructor - creating object for a variable (with no DependencyTuple).

Parameters:
[in] _var Variable for which this set of dependency-tuples holds.

Definition at line 37 of file dependencyset.cpp.

DependencySet::~DependencySet (  )  [virtual]

Destructor.

Definition at line 40 of file dependencyset.cpp.

References tuples.


Member Function Documentation

vector< DependencyTuple * > * DependencySet::getTuples (  )  [inline]

Returns all dependency-tuples for this variable.

Returns all dependency-tuples for this variable, i.e. returns the member variable.

Return values:
vector<DependencyTuple*>* Pointer to a vector object containing pointer of DependencyTuple objects.

Definition at line 100 of file dependencyset.h.

unsigned DependencySet::getVar (  )  [inline]

Returns the variable of this set of dependency-tuples.

Returns the variable of this set of dependency-tuples, i.e. returns the member variable.

Return values:
unsigned Variable of this set of dependency-tuples.

Definition at line 93 of file dependencyset.h.

References var.

bool DependencySet::hasTuples (  )  [inline]

Returns if this variable has a set of dependency-tuples.

Returns if this variable has a set of dependency-tuples, i.e. returns true if this variable has at least one DependencyTuple, false otherwise.

Return values:
bool true if this variable has at least one DependencyTuple, false otherwise.

Definition at line 110 of file dependencyset.h.

References tuples.

void DependencySet::insertTuple ( PathExpression path,
bool  pos,
bool  dos,
bool  cond 
)

Inserts a new tuple to this set of dependency-tuples.

Inserts a new tuple to this set of dependency-tuples, i.e. creates a new DependencyTuple for this set of dependency-tuples.

Parameters:
[in] path Pointer to a PathExpression object.
[in] pos true if this new tuple should be a [positions()=1] dependency-tuple, false otherwise.
[in] dos true if this new tuple should be a /dos::node() dependency-tuple, false otherwise.
[in] cond true if this new tuple results from a CondExpression, false otherwise.
Return values:
void 

Definition at line 46 of file dependencyset.cpp.

References PathExpression::addPathStep(), PathExpression::clone(), PathExpression::getTailPathStep(), PathExpression::isEmptyPath(), and tuples.

void DependencySet::print ( OutputStream dos  ) 

Prints this set of dependency-tuples.

Prints this set of dependency-tuples.

Parameters:
[in] dos Pointer to a OutputStream object.
Return values:
void 

Definition at line 62 of file dependencyset.cpp.

References NEWLINE, and tuples.

void DependencySet::removeSemanticallyContainedTuple ( PassiveProjectionTree ppt  ) 

Removes all tuples of this set dependency-tuples that are semantically contained among each other.

Removes all tuples of this set dependency-tuples that are semantically contained among each other, i.e. those tuples are kept that locate a greater or a greater equal set of nodes of an arbitrarily XML tree than any other tuple of this set of dependency-tuples.

Parameters:
[in] ppt Pointer to a PassiveProjectionTree object. All deleted paths are registered to the passive projection tree.
Return values:
void 

Definition at line 85 of file dependencyset.cpp.

References tuples, and var.

void DependencySet::removeSyntacticallyEqualTuple ( PassiveProjectionTree ppt  ) 

Removes all tuples of this set dependency-tuples that are syntactically equal.

Removes all tuples of this set dependency-tuples that are syntactically equal with respect to their paths.

Parameters:
[in] ppt Pointer to a PassiveProjectionTree object. All deleted paths are registered to the passive projection tree.
Return values:
void 

Definition at line 71 of file dependencyset.cpp.

References tuples, and var.


Member Data Documentation

vector< DependencyTuple * > DependencySet::tuples [private]

The set of dependency-tuples for this variable.

The set of dependency-tuples for this variable, which is a set of DependencyTuple.

Definition at line 149 of file dependencyset.h.

Referenced by hasTuples(), insertTuple(), print(), removeSemanticallyContainedTuple(), removeSyntacticallyEqualTuple(), and ~DependencySet().

unsigned DependencySet::var [private]

The entered variable.

The entered variable, which is the argument of the constructor and internally represented by a number.

Definition at line 143 of file dependencyset.h.

Referenced by getVar(), removeSemanticallyContainedTuple(), and removeSyntacticallyEqualTuple().


Generated on Sun May 24 20:20:22 2009 for G(arbage) C(ollected) X(Query) Engine by  doxygen 1.5.9