LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
Lima::XmlBowDocumentHandler Class Reference

Manipulation de media ; separation du contenu et de la structure. More...

#include <linguisticProcessing/client/AnalysisHandlers/XmlBowDocumentHandler.h>

Inheritance diagram for Lima::XmlBowDocumentHandler:
Lima::AbstractXmlDocumentHandler Lima::StructureHandler Lima::AbstractXmlAnalysisHandler Lima::AbstractProcessingClientHandler Lima::ContentHandler< Common::Misc::GenericDocumentProperties > Lima::ContentHandler< std::vector< float > > Lima::AbstractAnalysisHandler Lima::AnalysisData

Public Member Functions

 XmlBowDocumentHandler (std::shared_ptr< const ShiftFrom > shiftFrom)
 
 ~XmlBowDocumentHandler ()
 
void handle (const char *buf, int length) override
 gives content.
 
void startAnalysis () override
 function called by the LIMA analyzer on start of a new document
 
void startDocument (const Lima::Common::Misc::GenericDocumentProperties &props) override
 notify the start of a new document, and give its properties
 
void endDocument () override
 called at the end of a document analysis
 
void endAnalysis () override
 notify the end of an analysis content
 
void startNode (const std::string &elementName, bool forIndexing) override
 called by the document analyzer for a new hierarchy node
 
void endNode (const Lima::Common::Misc::GenericDocumentProperties &props) override
 called by the document analyzer at the end of a hierarchy node
 
void setOut (std::ostream *out) override
 set the output stream.
 
- Public Member Functions inherited from Lima::AbstractXmlDocumentHandler
 AbstractXmlDocumentHandler (std::shared_ptr< const ShiftFrom > shiftFrom)
 
virtual ~AbstractXmlDocumentHandler ()
 
NODE_ID get_parentlastOpenedNode () const
 
void set_parentlastOpenedNode (NODE_ID nodeId)
 
void set_lastNodeId (NODE_ID NID)
 
NODE_ID get_lastNodeId () const
 
std::string get_lastUri () const
 
void set_lastUri (std::string uri)
 
void set_lang (std::string lang)
 
std::string get_lang () const
 
virtual void startAnalysis (const std::string &bloc_type)
 
- Public Member Functions inherited from Lima::StructureHandler
 StructureHandler ()
 
virtual ~StructureHandler ()
 
Structure * get_Structures ()
 Récupérer toutes les structures du handler.
 
void set_Structures (Structure *structures)
 Insérer une structure dans le handler.
 
Node * get_Node (CONTENT_ID)
 Récupérer un noeud du handler.
 
void add_Node (const Node &node)
 
STRUCT_ID get_LastStructureId ()
 Accesseur de lastStructureId.
 
void set_LastStructureId (STRUCT_ID)
 
CONTENT_ID get_LastContentId ()
 
void set_LastContentId (CONTENT_ID)
 
void resetStructure ()
 
- Public Member Functions inherited from Lima::AbstractXmlAnalysisHandler
 AbstractXmlAnalysisHandler (std::shared_ptr< const ShiftFrom > shiftFrom)
 
virtual ~AbstractXmlAnalysisHandler ()
 
std::shared_ptr< const ShiftFrom > shiftFrom () const
 
- Public Member Functions inherited from Lima::AbstractAnalysisHandler
virtual ~AbstractAnalysisHandler ()
 
- Public Member Functions inherited from Lima::AnalysisData
virtual ~AnalysisData ()
 
- Public Member Functions inherited from Lima::AbstractProcessingClientHandler
virtual ~AbstractProcessingClientHandler ()
 
virtual void setAnalysisClient (const std::string &clientId, std::shared_ptr< AbstractProcessingClient > client)
 
virtual std::shared_ptr< AbstractProcessingClient > getAnalysisClient (const std::string &clientId)
 
virtual std::map< std::string, std::shared_ptr< AbstractProcessingClient > > getAnalysisClients () const
 
virtual void setAnalysisClients (std::map< std::string, std::shared_ptr< AbstractProcessingClient > > clients)
 
virtual void handleProc (const std::string &tagName, const std::string &content, const std::map< std::string, std::string > &metaData, const std::string &pipeline, const std::map< std::string, AbstractAnalysisHandler * > &handlers=std::map< std::string, AbstractAnalysisHandler * >(), const std::set< std::string > &inactiveUnits=std::set< std::string >())
 
- Public Member Functions inherited from Lima::ContentHandler< Common::Misc::GenericDocumentProperties >
 ContentHandler ()
 
virtual ~ContentHandler ()
 
void addContent (CONTENT_ID ContentId, Common::Misc::GenericDocumentProperties datas)
 Ajouter un contenu au handler.
 
void setContents (const std::map< CONTENT_ID, Common::Misc::GenericDocumentProperties > contents)
 
Common::Misc::GenericDocumentProperties * getContent (CONTENT_ID ContentId)
 Récupérer un contenu du handler.
 
const std::map< CONTENT_ID, Common::Misc::GenericDocumentProperties > & getContents () const
 Récupérer tous les contenus du handler.
 
void resetHandler ()
 Effacer les contenus du handler.
 
- Public Member Functions inherited from Lima::ContentHandler< std::vector< float > >
 ContentHandler ()
 
virtual ~ContentHandler ()
 
void addContent (CONTENT_ID ContentId, std::vector< float > datas)
 Ajouter un contenu au handler.
 
void setContents (const std::map< CONTENT_ID, std::vector< float > > contents)
 
std::vector< float > * getContent (CONTENT_ID ContentId)
 Récupérer un contenu du handler.
 
const std::map< CONTENT_ID, std::vector< float > > & getContents () const
 Récupérer tous les contenus du handler.
 
void resetHandler ()
 Effacer les contenus du handler.
 

Public Attributes

std::ostream * m_out
 
- Public Attributes inherited from Lima::AbstractXmlDocumentHandler
std::vector< NODE_ID > m_openedNodes
 
std::vector< NODE_ID >::iterator m_lastOpenedNode
 
NODE_ID m_parentlastOpenedNode
 
NODE_ID m_lastNode
 
std::map< std::string, std::string > m_metadata
 

Detailed Description

Manipulation de media ; separation du contenu et de la structure.

Definition at line 16 of file XmlBowDocumentHandler.h.

Constructor & Destructor Documentation

◆ XmlBowDocumentHandler()

XmlBowDocumentHandler::XmlBowDocumentHandler ( std::shared_ptr< const ShiftFrom >  shiftFrom)

Definition at line 22 of file XmlBowDocumentHandler.cpp.

◆ ~XmlBowDocumentHandler()

Lima::XmlBowDocumentHandler::~XmlBowDocumentHandler ( )
inline

Definition at line 21 of file XmlBowDocumentHandler.h.

Member Function Documentation

◆ endAnalysis()

void Lima::XmlBowDocumentHandler::endAnalysis ( )
inlineoverridevirtual

notify the end of an analysis content

Implements Lima::AbstractAnalysisHandler.

Definition at line 34 of file XmlBowDocumentHandler.h.

◆ endDocument()

void Lima::XmlBowDocumentHandler::endDocument ( )
inlineoverridevirtual

called at the end of a document analysis

Implements Lima::AbstractXmlAnalysisHandler.

Definition at line 31 of file XmlBowDocumentHandler.h.

◆ endNode()

void XmlBowDocumentHandler::endNode ( const Lima::Common::Misc::GenericDocumentProperties &  props)
overridevirtual

called by the document analyzer at the end of a hierarchy node

Implements Lima::AbstractXmlAnalysisHandler.

Definition at line 120 of file XmlBowDocumentHandler.cpp.

◆ handle()

void XmlBowDocumentHandler::handle ( const char *  buf,
int  length 
)
overridevirtual

gives content.

Content is a serialized form of the expected resultType

Implements Lima::AbstractXmlAnalysisHandler.

Definition at line 41 of file XmlBowDocumentHandler.cpp.

◆ setOut()

void XmlBowDocumentHandler::setOut ( std::ostream *  out)
overridevirtual

set the output stream.

Implementations can be empty if the handler should not write its output to a stream

Implements Lima::AbstractXmlAnalysisHandler.

Definition at line 29 of file XmlBowDocumentHandler.cpp.

◆ startAnalysis()

void XmlBowDocumentHandler::startAnalysis ( )
overridevirtual

function called by the LIMA analyzer on start of a new document

Parameters
propsthe document properties, which can contain some metadata that are automatically generated by the analyzer (such as language, date of analysis etc), and some metadata that are directly extracted from the document to analyze, in case of the analysis of an XML documents (in this case, the configuration of the analysis indicates in which tags the information can be found) function called by the LIMA analyzer on start at end of a document function called by the LIMA analyzer on the start of a text part that is to be analyzed

Reimplemented from Lima::AbstractXmlDocumentHandler.

Definition at line 47 of file XmlBowDocumentHandler.cpp.

◆ startDocument()

void Lima::XmlBowDocumentHandler::startDocument ( const Lima::Common::Misc::GenericDocumentProperties &  props)
inlineoverridevirtual

notify the start of a new document, and give its properties

Implements Lima::AbstractXmlAnalysisHandler.

Definition at line 28 of file XmlBowDocumentHandler.h.

◆ startNode()

void XmlBowDocumentHandler::startNode ( const std::string &  elementName,
bool  forIndexing 
)
overridevirtual

called by the document analyzer for a new hierarchy node

Implements Lima::AbstractXmlAnalysisHandler.

Definition at line 58 of file XmlBowDocumentHandler.cpp.

Member Data Documentation

◆ m_out

std::ostream* Lima::XmlBowDocumentHandler::m_out

Definition at line 46 of file XmlBowDocumentHandler.h.


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