#include <vtkTextExtractionStrategy.h>
Concrete derivatives of vtkTextExtractionStrategy implement strategies for extracting text from a resource, given its Mime type and content.
Developed by Timothy M. Shead (tshead@sandia.gov) at Sandia National Laboratories.
Definition at line 47 of file vtkTextExtractionStrategy.h.
Public Types | |
typedef vtkObject | Superclass |
Public Member Functions | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual bool | Extract (const vtkIdType document, const vtkStdString &uri, const vtkStdString &mime_type, const vtkTypeUInt8 *content_begin, const vtkTypeUInt8 *content_end, vtkUnicodeString &text, vtkIdTypeArray *tag_document, vtkIdTypeArray *tag_begin, vtkIdTypeArray *tag_end, vtkStringArray *tag_type)=0 |
Static Public Member Functions | |
static int | IsTypeOf (const char *type) |
static vtkTextExtractionStrategy * | SafeDownCast (vtkObject *o) |
Protected Member Functions | |
vtkTextExtractionStrategy () | |
virtual | ~vtkTextExtractionStrategy () |
Reimplemented from vtkObject.
Reimplemented in vtkPlainTextExtractionStrategy.
Definition at line 51 of file vtkTextExtractionStrategy.h.
vtkTextExtractionStrategy::vtkTextExtractionStrategy | ( | ) | [protected] |
virtual vtkTextExtractionStrategy::~vtkTextExtractionStrategy | ( | ) | [protected, virtual] |
virtual const char* vtkTextExtractionStrategy::GetClassName | ( | ) | [virtual] |
static int vtkTextExtractionStrategy::IsTypeOf | ( | const char * | name | ) | [static] |
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkObject.
Reimplemented in vtkPlainTextExtractionStrategy.
virtual int vtkTextExtractionStrategy::IsA | ( | const char * | name | ) | [virtual] |
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkObject.
Reimplemented in vtkPlainTextExtractionStrategy.
static vtkTextExtractionStrategy* vtkTextExtractionStrategy::SafeDownCast | ( | vtkObject * | o | ) | [static] |
void vtkTextExtractionStrategy::PrintSelf | ( | ostream & | os, | |
vtkIndent | indent | |||
) | [virtual] |
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from vtkObject.
Reimplemented in vtkPlainTextExtractionStrategy.
virtual bool vtkTextExtractionStrategy::Extract | ( | const vtkIdType | document, | |
const vtkStdString & | uri, | |||
const vtkStdString & | mime_type, | |||
const vtkTypeUInt8 * | content_begin, | |||
const vtkTypeUInt8 * | content_end, | |||
vtkUnicodeString & | text, | |||
vtkIdTypeArray * | tag_document, | |||
vtkIdTypeArray * | tag_begin, | |||
vtkIdTypeArray * | tag_end, | |||
vtkStringArray * | tag_type | |||
) | [pure virtual] |
Given a resource Mime type and content, implementations should return 'true' if they can extract text from resources with the given Mime type, otherwise false. If the implementation can handle the resource, it should return any text that can be extracted, and append a set of zero-to-many tags to the given tag arrays. Note that at a minimum, implementations should generate a "TEXT" tag that encloses the body of the text content. A resource URI is provided for reference; in general, implementations shouldn't need to use the URI to access the resource content, since it is already loaded into memory.
Implemented in vtkPlainTextExtractionStrategy.