vtkPlainTextExtractionStrategy Class Reference

#include <vtkPlainTextExtractionStrategy.h>

Inheritance diagram for vtkPlainTextExtractionStrategy:

Inheritance graph
[legend]
Collaboration diagram for vtkPlainTextExtractionStrategy:

Collaboration graph
[legend]

List of all members.


Detailed Description

text extraction strategy that works with text/* data.

Concrete implementation of vtkTextExtractionStrategy that works with text/* MIME types. vtkPlainTextExtractionStrategy trivially converts the contents of the given resource into text. It is intended mainly as a "strategy of last resort", since more sophisticated strategies may wish to parse-out structured content.

Generates a single "TEXT" tag that incorporates the entire text content.

See also:
vtkTextExtraction, vtkTextExtractionStrategy.

Developed by Timothy M. Shead (tshead@sandia.gov) at Sandia National Laboratories.

Definition at line 44 of file vtkPlainTextExtractionStrategy.h.


Public Types

typedef vtkTextExtractionStrategy 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)

Static Public Member Functions

static
vtkPlainTextExtractionStrategy
New ()
static int IsTypeOf (const char *type)
static
vtkPlainTextExtractionStrategy
SafeDownCast (vtkObject *o)

Protected Member Functions

 vtkPlainTextExtractionStrategy ()
virtual ~vtkPlainTextExtractionStrategy ()

Member Typedef Documentation

Reimplemented from vtkTextExtractionStrategy.

Definition at line 49 of file vtkPlainTextExtractionStrategy.h.


Constructor & Destructor Documentation

vtkPlainTextExtractionStrategy::vtkPlainTextExtractionStrategy (  )  [protected]

virtual vtkPlainTextExtractionStrategy::~vtkPlainTextExtractionStrategy (  )  [protected, virtual]


Member Function Documentation

static vtkPlainTextExtractionStrategy* vtkPlainTextExtractionStrategy::New (  )  [static]

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkObject.

virtual const char* vtkPlainTextExtractionStrategy::GetClassName (  )  [virtual]

Reimplemented from vtkTextExtractionStrategy.

static int vtkPlainTextExtractionStrategy::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 vtkTextExtractionStrategy.

virtual int vtkPlainTextExtractionStrategy::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 vtkTextExtractionStrategy.

static vtkPlainTextExtractionStrategy* vtkPlainTextExtractionStrategy::SafeDownCast ( vtkObject o  )  [static]

Reimplemented from vtkTextExtractionStrategy.

void vtkPlainTextExtractionStrategy::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 vtkTextExtractionStrategy.

virtual bool vtkPlainTextExtractionStrategy::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 
) [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.

Implements vtkTextExtractionStrategy.


The documentation for this class was generated from the following file:

Generated on Wed Aug 24 11:55:10 2011 for VTK by  doxygen 1.5.6