ddc
Public Member Functions | Public Attributes | List of all members
TxCab Class Reference

TxCab: HTTP-based term expander using DTA::CAB HTTP protocol I/O format is DTA::CAB::Format::ExpandList (newline- and TAB-separated lists) More...

#include <TermExpander.h>

Inheritance diagram for TxCab:
Inheritance graph
[legend]
Collaboration diagram for TxCab:
Collaboration graph
[legend]

Public Member Functions

 TxCab (const string &label=string("Cab"), const string &param=string(""), int Debug=0, int MapMode=0)
 
virtual ~TxCab (void)
 
virtual CTermExpanderclone (map< CTermExpander *, CTermExpander *> &xlate) const
 clone constructor calls default constructor More...
 
virtual void compile (void)
 
virtual void expand (const set< string > &src, set< string > &dst)
 Expand a set of terms src to a set of terms dst. More...
 
- Public Member Functions inherited from TxCurl
 TxCurl (const string &cls=string("Curl"), const string &label=string("Curl"), const string &param=string(""))
 default constructor; no implicit compilation More...
 
virtual ~TxCurl (void)
 Destructor frees m_Curl if non-NULL. More...
 
virtual bool perform (void)
 Wrapper for m_CCurl.perform_cached() More...
 
- Public Member Functions inherited from CTermExpander
 CTermExpander (const string &cls, const string &label, const string &param)
 Full constructor (abstract base classes only) More...
 
 CTermExpander (const string &label=string("NoLabel"), const string &param=string(""))
 Default constructor, to be overridden by subclasses. More...
 
virtual CTermExpandermapClone (map< CTermExpander *, CTermExpander *> &xlate) const
 clone constructor, handles sub-object cloning according to xlate map */ More...
 
virtual ~CTermExpander (void)
 Default destructor. More...
 
virtual string configString (void) const
 String form of this expander. Default is m_Class + " " + m_Label + " " + m_Param. More...
 
virtual void expand (const string &src, set< string > &dst)
 Expand a single term term to a set of terms dst. More...
 

Public Attributes

string m_UrlBase
 base URL; newline-separated query argument(s) will be appended for each expansion query More...
 
int m_Debug
 debug? More...
 
int m_MapMode
 
- Public Attributes inherited from TxCurl
CCurl m_CCurl
 CCurl object to use for expansion query. More...
 
- Public Attributes inherited from CTermExpander
string m_Class
 class name for this expander More...
 
string m_Label
 unique name for this expander More...
 
string m_Param
 string argument(s) for this expander (parameters, for stringification) More...
 

Detailed Description

TxCab: HTTP-based term expander using DTA::CAB HTTP protocol I/O format is DTA::CAB::Format::ExpandList (newline- and TAB-separated lists)

Constructor & Destructor Documentation

◆ TxCab()

TxCab::TxCab ( const string &  label = string("Cab"),
const string &  param = string(""),
int  Debug = 0,
int  MapMode = 0 
)
inline

◆ ~TxCab()

virtual TxCab::~TxCab ( void  )
inlinevirtual

References CTermExpander::clone(), CTermExpander::compile(), and CTermExpander::expand().

Here is the call graph for this function:

Member Function Documentation

◆ clone()

CTermExpander * TxCab::clone ( map< CTermExpander *, CTermExpander *> &  xlate) const
virtual

clone constructor calls default constructor

Reimplemented from TxCurl.

Reimplemented in TxCabMap.

References compile(), CTermExpander::m_Label, and CTermExpander::m_Param.

Here is the call graph for this function:

◆ compile()

void TxCab::compile ( void  )
virtual

Setup m_Curl object based on object parameters Default parses space-separated m_Param to set m_UrlBase and m_CCurl->timeout()

  • 1st param: base URL (with trailing query parameter name e.g. "qd=")
  • 2nd param: timeout (seconds)
  • 3rd param: debug (int~bool)
  • 4th param: map-mode (int~bool)

Reimplemented from TxCurl.

References TxCurl::compile(), ddcLogDebug, Format(), CTermExpander::m_Label, CTermExpander::m_Param, CCurl::parseUnixSocketUrl(), and stringSplit().

Referenced by clone(), and TxCabMap::clone().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ expand()

void TxCab::expand ( const set< string > &  src,
set< string > &  dst 
)
virtual

Expand a set of terms src to a set of terms dst.

Reimplemented from CTermExpander.

References concord_daemon_log(), errRuntime, escapeUrlString(), and Format().

Here is the call graph for this function:

Member Data Documentation

◆ m_UrlBase

string TxCab::m_UrlBase

base URL; newline-separated query argument(s) will be appended for each expansion query

◆ m_Debug

int TxCab::m_Debug

debug?

◆ m_MapMode

int TxCab::m_MapMode
  • if true ("map-mode"), argument term(s) must occur in the query response to be included in the output set
  • otherwise ("union-mode", default), literal argument term(s) will always be included in output set

The documentation for this class was generated from the following files: