27 #include "../../common/Translator.h" 
   28 #include "../../common/StringUtils.h" 
   29 #include "../../dataaccess/dataset/DataSet.h" 
   30 #include "../../dataaccess/dataset/DataSetType.h" 
   31 #include "../../dataaccess/datasource/DataSource.h" 
   32 #include "../../dataaccess/query_h.h" 
   33 #include "../core/GraphMetadata.h" 
   34 #include "../Config.h" 
   35 #include "../Exception.h" 
   36 #include "../Globals.h" 
   49   if(m_graph == 0 || m_graph->getMetadata() == 0)
 
   51     throw Exception(
TE_TR(
"Invalid graph pointer."));
 
   54   if(m_vertexQuery.get())
 
   56     if(m_vertexQuery->moveFirst())
 
   60       return m_graph->getVertex(
id);
 
   64   if(m_listIsolatedVertex)
 
   67     std::string tableName = m_graph->getMetadata()->getVertexTableName();
 
   79     ob->push_back(obItem);
 
   83     m_vertexQuery.reset(0);
 
   84     m_vertexQuery = m_graph->getMetadata()->getDataSource()->query(select);
 
   89     std::string tableName = m_graph->getMetadata()->getVertexTableName();
 
   90     std::string edgeAttrTable = m_graph->getMetadata()->getEdgeTableName();
 
  102     from->push_back(fiEdge);
 
  104     std::string vertexFrom = 
"edge.";
 
  107     std::string vertexTo = 
"edge.";
 
  110     std::string vId = 
"vertex.";
 
  127     gb->push_back(gbItem);
 
  131     ob->push_back(obItem);
 
  135     m_vertexQuery.reset(0);
 
  136     m_vertexQuery = m_graph->getMetadata()->getDataSource()->query(select);
 
  139   if(m_vertexQuery.get() == 0)
 
  141     throw Exception(
TE_TR(
"Iterator not initialized."));
 
  146   if(m_vertexQuery->moveNext())
 
  155   return m_graph->getVertex(
id);
 
  160   if(m_graph == 0 || m_graph->getMetadata() == 0)
 
  162     throw Exception(
TE_TR(
"Invalid graph pointer."));
 
  165   if(m_edgeQuery.get())
 
  167     if(m_edgeQuery->moveFirst())
 
  171       return m_graph->getEdge(
id);
 
  176   std::string tableName = m_graph->getMetadata()->getEdgeTableName();
 
  180   fields->push_back(f);
 
  188   ob->push_back(obItem);
 
  192   m_edgeQuery.reset(0);
 
  193   m_edgeQuery = m_graph->getMetadata()->getDataSource()->query(select);
 
  195   if(m_edgeQuery.get() == 0)
 
  197     throw Exception(
TE_TR(
"Iterator not initialized."));
 
  202   if(m_edgeQuery->moveNext())
 
  211   return m_graph->getEdge(
id);
 
virtual te::graph::Vertex * getFirstVertex()
It returns a pointer to the first vertex element of a graph. 
 
boost::ptr_vector< GroupByItem > GroupBy
A class that can be used to model a GROUP BY clause. 
 
A class that can be used in a GROUP BY clause. 
 
An abstract class that models a source of data in a query. 
 
The Field class can be used to model an expression that takes part of the output items of a SELECT...
 
static const std::string sm_tableVertexModelAttrId
Attribute id. 
 
A class that models the name of a dataset used in a From clause. 
 
A class that models the name of any property of an object. 
 
Expression * getExpression() const 
It returns the expression set for an output select query. 
 
boost::ptr_vector< OrderByItem > OrderBy
A class that can be used to model an ORDER BY clause. 
 
#define TE_TR(message)
It marks a string in order to get translated. 
 
This is an abstract class that models a query expression. 
 
From the point of view of graph theory, vertices are treated as featureless and indivisible objects...
 
Class used to define the edge struct of a graph. Its compose with a identifier, the vertex origin and...
 
virtual te::graph::Edge * getFirstEdge()
It returns a pointer to the first edge element of a graph. 
 
SequenceIterator(te::graph::AbstractGraph *g)
Default constructor. 
 
static const std::string sm_tableEdgeModelAttrId
Attribute Id. 
 
virtual ~SequenceIterator()
Virtual destructor. 
 
Abstract class used to define the main functions of graph struct. All graph implementations must used...
 
boost::ptr_vector< Field > Fields
Fields is just a boost::ptr_vector of Field pointers. 
 
A class that can be used to model a filter expression that can be applied to a query. 
 
A Select models a query to be used when retrieving data from a DataSource. 
 
boost::ptr_vector< FromItem > From
It models the FROM clause for a query. 
 
This class defines a commun interface to represents a graph iterator class. The main diferency to ano...
 
It models the comparison operator. 
 
This class defines a commun interface to represents a graph iterator class. The main diferency to ano...
 
static const std::string sm_tableEdgeModelAttrVFrom
Attribute Vertex From. 
 
A class that can be used in an ORDER BY clause to sort the items of a resulting query. 
 
static const std::string sm_tableEdgeModelAttrVTo
Attribute Vertex To.