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

client de lecture des fichier XML faisant appel aux clients d'analyse Lors de la lecture d'un fichier XML, les clients d'analyse sont appelés en fonction des tags trouvés. More...

#include <linguisticProcessing/core/CoreXmlReaderClient.h>

Inheritance diagram for Lima::XmlReader::CoreXmlReaderClient:
Lima::XmlReader::AbstractXmlReaderClient Lima::StructuredXmlDocumentHandler Lima::AbstractProcessingClient

Public Member Functions

 CoreXmlReaderClient (Lima::Common::XMLConfigurationFiles::XMLConfigurationFileParser &configuration)
 constructeur
 
 ~CoreXmlReaderClient ()
 destructeur
 
std::shared_ptr< AnalysisContent > analyze (const std::string &content, const std::map< std::string, std::string > &metaData, const std::string &pipeline, const std::map< std::string, Lima::AbstractAnalysisHandler * > &handlers=std::map< std::string, Lima::AbstractAnalysisHandler * >(), const std::set< std::string > &inactiveUnits=std::set< std::string >()) const override
 analyse effective d'un fichier XML.
 
void setAnalysisHandler (const std::string &handlerId, Lima::AbstractAnalysisHandler *handler) override
 associe un handler recupérant l'analyse XML
 
void releaseAnalysisHandler (const std::string &handlerId) override
 deletes the analysis handler with the given id and removes it
 
void startHierarchy (const DocumentsReader::ContentStructuredDocument &contentDocument) override
 
void endHierarchy (const DocumentsReader::ContentStructuredDocument &contentDocument) override
 
void startIndexing (const DocumentsReader::ContentStructuredDocument &contentDocument) override
 
void endIndexing (const DocumentsReader::ContentStructuredDocument &contentDocument) override
 
void handle (const DocumentsReader::ContentStructuredDocument &contentDocument, const Lima::LimaString &text, unsigned long int offset, const std::string tagName) override
 callback to the handler.
 
void handleProperty (const DocumentsReader::DocumentPropertyType &property, const std::string &data) override
 
- Public Member Functions inherited from Lima::XmlReader::AbstractXmlReaderClient
virtual ~AbstractXmlReaderClient ()
 define a virtual destructor to ensure concrete client destructors to be called
 
void setMapTagMedia (const std::map< std::string, std::string > &Ids)
 
void setDefaultMedia (const std::string &media)
 
void setDocumentPropertyConfiguration (Lima::Common::XMLConfigurationFiles::XMLConfigurationFileParser *configuration)
 Extract from configuration the subset of document property attributes from both standard-properties-list and extended-properties-list.
 
void getDocumentPropertyConfiguration (DocPropertyPublicInfoMap &standardPrprtyInfos, DocPropertyPublicInfoMap &extendedPrprtyInfos) const
 Retrieve the document property attributes for both standard and extended properties-list.
 
- Public Member Functions inherited from Lima::AbstractProcessingClient
virtual ~AbstractProcessingClient ()
 Define the destructor virtual to ensure concrete client destructors to be called.
 
- Public Member Functions inherited from Lima::StructuredXmlDocumentHandler
virtual ~StructuredXmlDocumentHandler ()
 

Additional Inherited Members

- Public Types inherited from Lima::XmlReader::AbstractXmlReaderClient
using DocPropertyPublicInfoMap = std::map< std::string, DocPropertyPublicInfo >
 Store the association of a document property name and its subset of attributes.
 
- Public Attributes inherited from Lima::XmlReader::AbstractXmlReaderClient
Lima::AbstractProcessingClientHandler m_processingClientHandler
 
- Protected Attributes inherited from Lima::XmlReader::AbstractXmlReaderClient
std::map< std::string, std::string > m_mapTagMedia
 
std::string m_defaultMedia
 
DocPropertyPublicInfoMap m_standardPrprtyInfos
 
DocPropertyPublicInfoMap m_extendedPrprtyInfos
 

Detailed Description

client de lecture des fichier XML faisant appel aux clients d'analyse Lors de la lecture d'un fichier XML, les clients d'analyse sont appelés en fonction des tags trouvés.

Par exemple: <ima> appel à l'analyse d'images fixes <fre> appel à l'analyse linguistique en français <eng> appel à l'analyse linguistique en fanglais Ce client de lecture étant donné en handler (StructuredXmlDocumentHandler) au programme de lecture XML (DocumentReader) il est a nouveau appelé pour effectuer certaines actions quand des noeuds sont lus.

Definition at line 35 of file CoreXmlReaderClient.h.

Constructor & Destructor Documentation

◆ CoreXmlReaderClient()

Lima::XmlReader::CoreXmlReaderClient::CoreXmlReaderClient ( Lima::Common::XMLConfigurationFiles::XMLConfigurationFileParser &  configuration)

constructeur

Parameters
configurationTODO decrire

Definition at line 40 of file CoreXmlReaderClient.cpp.

◆ ~CoreXmlReaderClient()

Lima::XmlReader::CoreXmlReaderClient::~CoreXmlReaderClient ( )

destructeur

Definition at line 54 of file CoreXmlReaderClient.cpp.

Member Function Documentation

◆ analyze()

std::shared_ptr< AnalysisContent > Lima::XmlReader::CoreXmlReaderClient::analyze ( const std::string &  content,
const std::map< std::string, std::string > &  metaData,
const std::string &  pipeline,
const std::map< std::string, Lima::AbstractAnalysisHandler * > &  handlers = std::map<std::string, Lima::AbstractAnalysisHandler*>(),
const std::set< std::string > &  inactiveUnits = std::set<std::string>() 
) const
overridevirtual

analyse effective d'un fichier XML.

analyse effective d'un fichier XML Fait appel a m_handler (type xmlDocumentHandler)

Parameters
textle texte (xml) a analyser
metaDataTODO decrire
pipelineTODO decrire
inactiveUnitsTODO decrire

Implements Lima::XmlReader::AbstractXmlReaderClient.

Definition at line 257 of file CoreXmlReaderClient.cpp.

◆ endHierarchy()

void Lima::XmlReader::CoreXmlReaderClient::endHierarchy ( const DocumentsReader::ContentStructuredDocument &  contentDocument)
overridevirtual

Implements Lima::StructuredXmlDocumentHandler.

Definition at line 69 of file CoreXmlReaderClient.cpp.

◆ endIndexing()

void Lima::XmlReader::CoreXmlReaderClient::endIndexing ( const DocumentsReader::ContentStructuredDocument &  contentDocument)
overridevirtual

Implements Lima::StructuredXmlDocumentHandler.

Definition at line 104 of file CoreXmlReaderClient.cpp.

◆ handle()

void Lima::XmlReader::CoreXmlReaderClient::handle ( const DocumentsReader::ContentStructuredDocument &  contentDocument,
const Lima::LimaString &  text,
unsigned long int  offset,
const std::string  tagName 
)
overridevirtual

callback to the handler.

Actually run the adapted analyzers.

Parameters
contentDocumentstructure of the document
texttext content to analyze (may an image path...)
offset??? unused ?
tagNameXML tag for the text analysed: should specify the content type (freText, image...)

Implements Lima::StructuredXmlDocumentHandler.

Definition at line 143 of file CoreXmlReaderClient.cpp.

◆ handleProperty()

void Lima::XmlReader::CoreXmlReaderClient::handleProperty ( const DocumentsReader::DocumentPropertyType &  property,
const std::string &  data 
)
overridevirtual

Implements Lima::StructuredXmlDocumentHandler.

Definition at line 226 of file CoreXmlReaderClient.cpp.

◆ releaseAnalysisHandler()

void Lima::XmlReader::CoreXmlReaderClient::releaseAnalysisHandler ( const std::string &  handlerId)
overridevirtual

deletes the analysis handler with the given id and removes it

Implements Lima::XmlReader::AbstractXmlReaderClient.

Definition at line 409 of file CoreXmlReaderClient.cpp.

◆ setAnalysisHandler()

void Lima::XmlReader::CoreXmlReaderClient::setAnalysisHandler ( const std::string &  handlerId,
Lima::AbstractAnalysisHandler *  handler 
)
overridevirtual

associe un handler recupérant l'analyse XML

Implements Lima::XmlReader::AbstractXmlReaderClient.

Definition at line 379 of file CoreXmlReaderClient.cpp.

◆ startHierarchy()

void Lima::XmlReader::CoreXmlReaderClient::startHierarchy ( const DocumentsReader::ContentStructuredDocument &  contentDocument)
overridevirtual

Implements Lima::StructuredXmlDocumentHandler.

Definition at line 59 of file CoreXmlReaderClient.cpp.

◆ startIndexing()

void Lima::XmlReader::CoreXmlReaderClient::startIndexing ( const DocumentsReader::ContentStructuredDocument &  contentDocument)
overridevirtual

Implements Lima::StructuredXmlDocumentHandler.

Definition at line 98 of file CoreXmlReaderClient.cpp.


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