23#include <QtCore/QTextStream>
26#ifndef DOCUMENTELEMENTS_H
27#define DOCUMENTELEMENTS_H
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 ,
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()
void addProperty(const DocumentPropertyType &propType, const std::string &value)
AbstractStructuredDocumentElementWithProperties(const QString &elementName, unsigned int firstBytePos, const PropagatedProperties &toBePropagated)
PropagatedProperties m_toBePropagated
void setPropagatedValue(const PropagatedProperties &toBePropagated)
const PropagatedProperties & getPropertyList() const
Element avec contenu texte.
void addPart(const Lima::LimaString &text, const unsigned int offset)
QString m_elementName
nom du tag de l'element
unsigned long int m_offset
current position during parsing
virtual const QString & getElementName() const
AbstractStructuredDocumentElement(const QString &elementName, unsigned int firstBytePos)
virtual bool hasPropType()
virtual const Lima::LimaString & getPropertyValue() const
DocumentPropertyType m_propType
Lima::LimaString m_propertyValue
virtual const DocumentPropertyType & getPropType()
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)
bool isDiscarding() override
virtual FieldType nodeType() override
~DiscardableDocumentElement()
DiscardableDocumentElement(const QString &elementName, unsigned int firstBytePos)
bool hasPropType() override
~DocumentPropertyElement()
DocumentPropertyElement(const QString &elementName, unsigned int firstBytePos, const DocumentPropertyType &propType)
virtual FieldType nodeType() override
~HierarchyDocumentElement()
HierarchyDocumentElement(const QString &elementName, unsigned int firstBytePos, const PropagatedProperties &toBePropagated)
virtual FieldType nodeType() override
virtual FieldType nodeType() override
bool hasPropType() override
~IgnoredDocumentElement()
IgnoredDocumentElement(const QString &elementName, unsigned int firstBytePos, const DocumentPropertyType &propType, const PropagatedProperties &toBePropagated)
bool hasPropType() override
virtual FieldType nodeType() override
IndexingDocumentElement(const QString &elementName, unsigned int firstBytePos, const DocumentPropertyType &propType, const PropagatedProperties &toBePropagated)
bool isPresentation() override
virtual FieldType nodeType() override
~PresentationDocumentElement()
PresentationDocumentElement(const QString &elementName, unsigned int firstBytePos, const PropagatedProperties &toBePropagated)
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