KFileMetaData::SimpleExtractionResult

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
 
PropertyMultiMap properties () const
 
QString text () const
 
QList< Type::Typetypes () 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 30 of file simpleextractionresult.h.

Constructor & Destructor Documentation

◆ SimpleExtractionResult() [1/2]

SimpleExtractionResult::SimpleExtractionResult ( const QString & url,
const QString & mimetype = QString(),
const Flags & flags = Flags{ExtractPlainText | ExtractMetaData} )

Definition at line 19 of file simpleextractionresult.cpp.

◆ SimpleExtractionResult() [2/2]

SimpleExtractionResult::SimpleExtractionResult ( const SimpleExtractionResult & rhs)

Definition at line 25 of file simpleextractionresult.cpp.

Member Function Documentation

◆ add()

void SimpleExtractionResult::add ( Property::Property property,
const QVariant & value )
overridevirtual

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)
overridevirtual

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)
overridevirtual

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.

◆ operator=()

SimpleExtractionResult & SimpleExtractionResult::operator= ( const SimpleExtractionResult & rhs)

Definition at line 33 of file simpleextractionresult.cpp.

◆ operator==()

bool SimpleExtractionResult::operator== ( const SimpleExtractionResult & rhs) const

Definition at line 39 of file simpleextractionresult.cpp.

◆ properties()

PropertyMultiMap SimpleExtractionResult::properties ( ) const

Returns the properties of the extraction result.

Definition at line 61 of file simpleextractionresult.cpp.

◆ text()

QString SimpleExtractionResult::text ( ) const

Definition at line 66 of file simpleextractionresult.cpp.

◆ types()

QList< Type::Type > SimpleExtractionResult::types ( ) const

Definition at line 71 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-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:41 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.