23#include <QtCore/QTextStream>
26#ifndef DOCUMENTELEMENTS_H
27#define DOCUMENTELEMENTS_H
30namespace DocumentsReader {
70 unsigned int getOffset(
void)
const {
return second; }
96 unsigned long int getOffset();
99 void setOffset(
unsigned long int offset);
101 void addSpaces(
int nbSpaces);
139 virtual void print(std::ostream&)
const;
140 virtual void print(QTextStream&)
const;
141 virtual void print(QDebug&)
const;
152 const QString& elementName,
153 unsigned int firstBytePos ,
162 void setPropagatedValue(
190 const QString& elementName,
191 unsigned int firstBytePos ,
225 const QString& elementName,
226 unsigned int firstBytePos ,
241 const QString& elementName,
242 unsigned int firstBytePos,
260 const QString& elementName,
261 unsigned int firstBytePos ,
QDebug & operator<<(QDebug &qd, const std::string &str)
virtual bool isDiscarding()
virtual ~AbstractDocumentElement()
virtual bool isPresentation()
virtual FieldType nodeType()
PropagatedProperties m_toBePropagated
Element avec contenu texte.
QString m_elementName
nom du tag de l'element
unsigned long int m_offset
current position during parsing
virtual const QString & getElementName() const
virtual bool hasPropType()
virtual const Lima::LimaString & getPropertyValue() const
DocumentPropertyType m_propType
Lima::LimaString m_propertyValue
virtual const DocumentPropertyType & getPropType()
Partie de texte (contenu dans un element) partageant le meme offset caractere.
unsigned int getOffset(void) const
Lima::LimaString & getText(void)
ContentElementPart(const Lima::LimaString &text, const unsigned int offset)
const Lima::LimaString & getText(void) const
void addText(const Lima::LimaString &text)
Element d'un document Xml discardable Exemple <USELESS>private comment</USELESS> => " ...
bool isDiscarding() override
virtual FieldType nodeType() override
~DiscardableDocumentElement()
Element d'un document XML definissant une propriete du noeud pere Exemple <filename>d1....
bool hasPropType() override
~DocumentPropertyElement()
virtual FieldType nodeType() override
~HierarchyDocumentElement()
virtual FieldType nodeType() override
virtual FieldType nodeType() override
bool hasPropType() override
~IgnoredDocumentElement()
Element d'un document XML dont content est indexee Exemple <section lang="fre">yeah</section> Il peut...
bool hasPropType() override
virtual FieldType nodeType() override
Element d'un document XML de presentation Exemple <BOLD>important</BOLD> => " important " ...
bool isPresentation() override
virtual FieldType nodeType() override
~PresentationDocumentElement()
virtual ~PropagatedProperties()
#define DOCUMENTSREADER_EXPORT
FieldType
a type containing the type of an element
@ NODE_DISCARDABLE
root of XML file
@ NODE_PRESENTATION
node that can contain indexing nodes in its hierarchy.
@ NODE_ROOT
no type: field is ignored
@ NODE_INDEXING
node inside an indexing node whose content (including its children) is replaced by spaces
@ NODE_HIERARCHY
node whose content is analyzed and indexed
@ NODE_PROPERTY
nodes which are not children of hierarchy nodes are ignored
@ NODE_IGNORED
node inside an indexing node with content replaced by spaces, but which content is kept