Search for usage in LXR

KFileMetaData::SimpleExtractionResult Class Reference

#include <KFileMetaData/SimpleExtractionResult>

Inheritance diagram for KFileMetaData::SimpleExtractionResult:

Public Member Functions

 SimpleExtractionResult (const QString &url, const QString &mimetype=QString(), const Flags &flags=Flags{ExtractPlainText|ExtractMetaData})
 SimpleExtractionResult (const SimpleExtractionResult &rhs)
void add (Property::Property property, const QVariant &value) override
void addType (Type::Type type) override
void append (const QString &text) override
SimpleExtractionResultoperator= (const SimpleExtractionResult &rhs)
bool operator== (const SimpleExtractionResult &rhs) const
PropertyMap properties () const
PropertyMultiMap properties (PropertiesMapType) const
QString text () const
QVector< Type::Type > types () const

Additional Inherited Members

Detailed Description

A simple ExtractionResult implementation which stores all the data in memory.

This should ideally not be used in production applications as it holds all of the plain text in memory, and that can get quite large when extracting certain documents.

Definition at line 31 of file simpleextractionresult.h.

Member Function Documentation

◆ add()

void SimpleExtractionResult::add ( Property::Property  property,
const QVariant value 

This function is called by the plugins when they wish to add a key value pair which should be indexed.

This function may be called multiple times for the same key.

property This specifies a property name. It should be one of the properties from the global list of properties.

value The value of the property

Implements KFileMetaData::ExtractionResult.

Definition at line 45 of file simpleextractionresult.cpp.

◆ addType()

void SimpleExtractionResult::addType ( Type::Type  type)

This function is called by the plugins.

A type is a higher level classification of the file. A file can have multiple types, but mostly when it does, those types are related. Eg - Document and Presentation.

Please choose one type from the list of available types

Implements KFileMetaData::ExtractionResult.

Definition at line 50 of file simpleextractionresult.cpp.

◆ append()

void SimpleExtractionResult::append ( const QString text)

This function is called by plugins when they wish for some plain text to be indexed without any property.

This generally corresponds to the text content in a file

Implements KFileMetaData::ExtractionResult.

Definition at line 55 of file simpleextractionresult.cpp.

◆ properties() [1/2]

PropertyMap SimpleExtractionResult::properties ( ) const
Since 5.89, use properties(PropertiesMapType) overload instead

Definition at line 62 of file simpleextractionresult.cpp.

◆ properties() [2/2]

PropertyMultiMap SimpleExtractionResult::properties ( PropertiesMapType  ) const

Returns the properties of the extraction result.

Because QMap::insertMulti is deprecated, this overload returns a QMultiMap. To automaticalls use the overload with the default value, define the KFILEMETADATA_DISABLE_DEPRECATED_BEFORE_AND_AT in the cmake code to the deprecating version of this method or greater. For example:


Definition at line 68 of file simpleextractionresult.cpp.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu May 26 2022 03:46:07 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.