A visitor that converts a OGC Filter Expression to TerraLib Expression. More...
#include <QueryEncoder.h>
Public Member Functions | |
Initializer Methods | |
Methods related to instantiation and destruction of a Filter visitor. | |
QueryEncoder () | |
Default constructor. More... | |
~QueryEncoder () | |
Virtual destructor. More... | |
Conversion Methods | |
te::da::Expression * | getExpression (const te::fe::Filter *f) |
It converts the OGC Filter Expression to a TerraLib Expression. More... | |
Visitor Methods | |
All concrete visitors must implement these methods. | |
void | visit (const te::fe::AbstractOp &visited) |
void | visit (const te::fe::SpatialOp &visited) |
void | visit (const te::fe::ComparisonOp &visited) |
void | visit (const te::fe::LogicOp &visited) |
void | visit (const te::fe::BBOXOp &visited) |
void | visit (const te::fe::BinaryComparisonOp &visited) |
void | visit (const te::fe::BinaryLogicOp &visited) |
void | visit (const te::fe::BinarySpatialOp &visited) |
void | visit (const te::fe::DistanceBuffer &visited) |
void | visit (const te::fe::PropertyIsBetween &visited) |
void | visit (const te::fe::PropertyIsLike &visited) |
void | visit (const te::fe::PropertyIsNull &visited) |
void | visit (const te::fe::UnaryLogicOp &visited) |
void | visit (const te::fe::Expression &visited) |
void | visit (const te::fe::BinaryOperator &visited) |
void | visit (const te::fe::Function &visited) |
void | visit (const te::fe::Literal &visited) |
void | visit (const te::fe::PropertyName &visited) |
Private Member Functions | |
Not Allowed Methods | |
No copy allowed. | |
QueryEncoder (const QueryEncoder &rhs) | |
No copy constructor allowed. More... | |
QueryEncoder & | operator= (const QueryEncoder &rhs) |
No assignment operator allowed. More... | |
Static Private Member Functions | |
static void | initialize () |
Static method to initialize the QueryEncoder. More... | |
Private Attributes | |
te::da::Expression * | m_expression |
Expression used during conversion. More... | |
Static Private Attributes | |
static std::map< std::string, std::string > | sm_fnameMap |
A map that associates Filter Operator names to Query Functions names. More... | |
Friends | |
class | Module |
A visitor that converts a OGC Filter Expression to TerraLib Expression.
Definition at line 53 of file QueryEncoder.h.
te::map::QueryEncoder::QueryEncoder | ( | ) |
Default constructor.
Definition at line 34 of file QueryEncoder.cpp.
te::map::QueryEncoder::~QueryEncoder | ( | ) |
Virtual destructor.
Definition at line 39 of file QueryEncoder.cpp.
|
private |
No copy constructor allowed.
rhs | The other object. |
te::da::Expression * te::map::QueryEncoder::getExpression | ( | const te::fe::Filter * | f | ) |
It converts the OGC Filter Expression to a TerraLib Expression.
f | A valid filter expression. |
Definition at line 43 of file QueryEncoder.cpp.
References te::common::BaseVisitable< T, R >::accept(), te::da::Function::add(), te::fe::ObjectId::getId(), te::fe::Filter::getNumberOfOids(), te::fe::Filter::getOid(), and te::fe::Filter::getOp().
Referenced by te::map::DrawGeometries(), te::map::QueryLayerRenderer::drawLayerGeometries(), and te::map::AbstractLayerRenderer::drawLayerGeometries().
|
staticprivate |
Static method to initialize the QueryEncoder.
Definition at line 261 of file QueryEncoder.cpp.
References te::da::FunctionNames::sm_Add, te::fe::Globals::sm_add, te::da::FunctionNames::sm_And, te::fe::Globals::sm_and, te::fe::Globals::sm_beyond, te::fe::Globals::sm_crosses, te::fe::Globals::sm_disjoint, te::da::FunctionNames::sm_Div, te::fe::Globals::sm_div, te::fe::Globals::sm_dWithin, te::fe::Globals::sm_equals, te::da::FunctionNames::sm_EqualTo, te::da::FunctionNames::sm_GreaterThan, te::da::FunctionNames::sm_GreaterThanOrEqualTo, te::fe::Globals::sm_intersects, te::da::FunctionNames::sm_LessThan, te::da::FunctionNames::sm_LessThanOrEqualTo, te::da::FunctionNames::sm_Mul, te::fe::Globals::sm_mul, te::da::FunctionNames::sm_Not, te::fe::Globals::sm_not, te::da::FunctionNames::sm_Or, te::fe::Globals::sm_or, te::fe::Globals::sm_overlaps, te::fe::Globals::sm_propertyIsEqualTo, te::fe::Globals::sm_propertyIsGreaterThan, te::fe::Globals::sm_propertyIsGreaterThanOrEqualTo, te::fe::Globals::sm_propertyIsLessThan, te::fe::Globals::sm_propertyIsLessThanOrEqualTo, te::da::FunctionNames::sm_ST_Beyond, te::da::FunctionNames::sm_ST_Crosses, te::da::FunctionNames::sm_ST_Disjoint, te::da::FunctionNames::sm_ST_DWithin, te::da::FunctionNames::sm_ST_Equals, te::da::FunctionNames::sm_ST_Intersects, te::da::FunctionNames::sm_ST_Overlaps, te::da::FunctionNames::sm_ST_Touches, te::da::FunctionNames::sm_ST_Within, te::da::FunctionNames::sm_Sub, te::fe::Globals::sm_sub, te::fe::Globals::sm_touches, and te::fe::Globals::sm_within.
Referenced by te::map::Module::initialize().
|
private |
No assignment operator allowed.
rhs | The other object. |
|
virtual |
Implements te::fe::Visitor.
Definition at line 67 of file QueryEncoder.cpp.
|
virtual |
Implements te::fe::Visitor.
Definition at line 72 of file QueryEncoder.cpp.
|
virtual |
Implements te::fe::Visitor.
Definition at line 77 of file QueryEncoder.cpp.
|
virtual |
Implements te::fe::Visitor.
Definition at line 82 of file QueryEncoder.cpp.
|
virtual |
Implements te::fe::Visitor.
Definition at line 87 of file QueryEncoder.cpp.
References te::gml::Envelope::getCoordinates(), te::fe::BBOXOp::getEnvelope(), te::fe::BBOXOp::getProperty(), and te::gml::Envelope::getSRID().
|
virtual |
Implements te::fe::Visitor.
Definition at line 103 of file QueryEncoder.cpp.
References te::common::BaseVisitable< T, R >::accept(), te::da::Function::add(), te::fe::BinaryComparisonOp::getFirst(), te::fe::AbstractOp::getName(), and te::fe::BinaryComparisonOp::getSecond().
|
virtual |
Implements te::fe::Visitor.
Definition at line 118 of file QueryEncoder.cpp.
References te::common::BaseVisitable< T, R >::accept(), te::da::Function::add(), te::fe::AbstractOp::getName(), te::fe::BinaryLogicOp::getOp(), and te::fe::BinaryLogicOp::size().
|
virtual |
Implements te::fe::Visitor.
Definition at line 131 of file QueryEncoder.cpp.
References te::common::BaseVisitable< T, R >::accept(), te::gml::Envelope::getCoordinates(), te::fe::BinarySpatialOp::getEnvelope(), te::fe::BinarySpatialOp::getGeometry(), te::fe::AbstractOp::getName(), te::fe::BinarySpatialOp::getProperty(), and te::gml::Envelope::getSRID().
|
virtual |
Implements te::fe::Visitor.
Definition at line 155 of file QueryEncoder.cpp.
References te::common::BaseVisitable< T, R >::accept(), te::fe::DistanceBuffer::getDistance(), te::fe::DistanceBuffer::getGeometry(), te::fe::AbstractOp::getName(), and te::fe::DistanceBuffer::getProperty().
|
virtual |
Implements te::fe::Visitor.
Definition at line 169 of file QueryEncoder.cpp.
References te::common::BaseVisitable< T, R >::accept(), te::fe::PropertyIsBetween::getExpression(), te::fe::PropertyIsBetween::getLowerBoundary(), and te::fe::PropertyIsBetween::getUpperBoundary().
|
virtual |
Implements te::fe::Visitor.
Definition at line 188 of file QueryEncoder.cpp.
References te::common::BaseVisitable< T, R >::accept(), te::fe::PropertyIsLike::getEscapeChar(), te::fe::PropertyIsLike::getLiteral(), te::fe::PropertyIsLike::getPropertyName(), te::fe::PropertyIsLike::getSingleChar(), te::fe::Literal::getValue(), and te::fe::PropertyIsLike::getWildCard().
|
virtual |
Implements te::fe::Visitor.
Definition at line 206 of file QueryEncoder.cpp.
References te::common::BaseVisitable< T, R >::accept(), and te::fe::PropertyIsNull::getPropertyName().
|
virtual |
Implements te::fe::Visitor.
Definition at line 217 of file QueryEncoder.cpp.
References te::common::BaseVisitable< T, R >::accept(), te::fe::AbstractOp::getName(), and te::fe::UnaryLogicOp::getOp().
|
virtual |
Implements te::fe::Visitor.
Definition at line 226 of file QueryEncoder.cpp.
|
virtual |
Implements te::fe::Visitor.
Definition at line 231 of file QueryEncoder.cpp.
References te::common::BaseVisitable< T, R >::accept(), te::fe::BinaryOperator::getFirst(), te::fe::BinaryOperator::getName(), and te::fe::BinaryOperator::getSecond().
|
virtual |
Implements te::fe::Visitor.
Definition at line 244 of file QueryEncoder.cpp.
|
virtual |
Implements te::fe::Visitor.
Definition at line 249 of file QueryEncoder.cpp.
References te::fe::Literal::getValue().
|
virtual |
Implements te::fe::Visitor.
Definition at line 255 of file QueryEncoder.cpp.
References te::fe::PropertyName::getName().
|
friend |
Definition at line 149 of file QueryEncoder.h.
|
private |
Expression used during conversion.
Definition at line 146 of file QueryEncoder.h.
|
staticprivate |
A map that associates Filter Operator names to Query Functions names.
Definition at line 147 of file QueryEncoder.h.