36 return m_bowstream->str();
44 LDEBUG <<
"BowDocumentHandler::startDocument()";
46 m_bowstream=
new ostringstream();
48 m_writer->setOut(m_bowstream);
49 m_writer->startDocument(props);
55 LDEBUG <<
"BowDocumentHandler::endDocument()";
56 m_writer->endDocument();
62 istringstream in(m_bowstream->str());
85 LDEBUG <<
"BowDocumentHandler::startNode()";
87 m_writer->startNode(elementName, forIndexing );
93 LDEBUG <<
"BowDocumentHandler::endNode()";
94 m_writer->endNode(props);
100 LDEBUG <<
"BowDocumentHandler::startAnalysis()";
101 m_writer->startAnalysis();
107 LDEBUG <<
"BowDocumentHandler::endAnalysis()";
108 m_writer->endAnalysis();
114 LDEBUG <<
"BowDocumentHandler::handleText()";
115 m_writer->handle(buf,length);
#define LPCLIENTSBOWHANDLERLOGINIT
void readHeader(std::istream &file)
BoWBlocType readBoWDocumentBlock(std::istream &file, BoWDocument &document, AbstractBoWDocumentHandler &handler, bool useIterator, bool useIndexIterator)
represent a document as a Bag Of Word, with associated document properties.
void endAnalysis() override
notify the end of an analysis content
std::string getSBoWContent() const
void startNode(const std::string &elementName, bool forIndexing) override
notify the start of a new hierarchyNode
void endNode(const Common::Misc::GenericDocumentProperties &props) override
notify the end of a hierarchyNode
void handle(const char *buf, int length) override
gives content.
virtual ~BowDocumentHandler()
void startAnalysis() override
notify the start of an analysis content
void startDocument(const Common::Misc::GenericDocumentProperties &props) override
notify the start of a new document
void endDocument() override
notify the end of the document