Taxi::Mysql::Format::Text - hit list formatter: text |
Taxi::Mysql::Format::Text - hit list formatter: text
##======================================================================== ## PRELIMINARIES
use Taxi::Mysql::Format::Text;
##======================================================================== ## Constructors etc.
$q = $CLASS_OR_OBJ->new(%args);
##======================================================================== ## Text formatting: low-level
{bibl=>\%bibl,toks=>\@toks} = $fmt->prepareHit($hit); \@hitListValues = $fmt->prepareHitList($hitList);
##======================================================================== ## API
$mimeType = $fmt->contentType; $str = $fmt->toString($hl);
Taxi::Mysql::Format::Text is a class for formatting HitList objects as basic raw text.
Taxi::Mysql::Format::Text inherits from and implements the API specified by Taxi::Mysql::Format::Base.
$q = $CLASS_OR_OBJ->new(%args);
Object structure / known %args:
{ ##-- Text formatting biblCols => \@biblCols, ##-- key pseudo-set: bibliographic columns from hit (default=none) textCols => \@textCols, ##-- key pseudo-set: text (value) columns from hit (default=all but biblCols) mark => [$pre,$post], ##-- match highlighting strings
##-- Source data (from ../Format) index => $index, ##-- underlying Taxi::Mysql object }
{bibl=>\%bibl,toks=>\@toks} = $fmt->prepareHit($hit);
Prepares a single hit object $hit for formatting. Returns an informational hash.
\%bibl is a hash-of-hashes (1 key per biblCol => 1 key,val per distinct value)
\@toks is an array of hashes (1 per tok, tok hash has 'textCols' keys, plus '__mark__'=>$bool)
\@hitListValues = $fmt->prepareHitList($hitList);
Calls prepare()
on every hit in the $hitList.
$mimeType = $fmt->contentType;
(undocumented)
$str = $fmt->toString($hl);
(undocumented)
Perl by Larry Wall.
Bryan Jurish <moocow@ling.uni-potsdam.de>
Copyright (C) 2006 by Bryan Jurish
This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or, at your option, any later version of Perl 5 you may have available.
perl(1), Taxi::Mysql(3perl), Taxi::Mysql::Format::Base(3perl), Taxi::Mysql::Format::Text1(3perl), Taxi::Mysql::Format::TextBibl(3perl).
Taxi::Mysql::Format::Text - hit list formatter: text |