-
Notifications
You must be signed in to change notification settings - Fork 2
/
SubparserManager.pm
66 lines (62 loc) · 2.07 KB
/
SubparserManager.pm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
package SubparserManager;
# Handles the subparsers available for doctor files in one convenient location.
use strict;
use Parsers::RateMdsParser;
use Parsers::VitalsParser;
use Parsers::HealthGradesParser;
use Parsers::YelpParser;
use Parsers::YahooLocalParser;
use Parsers::InsiderPagesParser;
use Parsers::WellnessParser;
use Parsers::GoogleMapsParser;
use Parsers::CitySearchParser;
use Parsers::LifescriptParser;
use Parsers::AvvoParser;
use Parsers::VimoParser;
use Parsers::EverydayHealthParser;
use Parsers::ThirdAgeParser;
use Parsers::UCompareParser;
use Parsers::BookHealthcareParser;
use Parsers::ZocDocParser;
use Parsers::SuperPagesParser;
use Parsers::YellowBotParser;
use Parsers::YellowPagesParser;
use Parsers::KudzuParser;
use Parsers::DoctorDotComParser;
sub new {
my $class = shift;
my $self = {};
bless($self, $class);
return $self;
}
sub getSubparsers {
# Gets a hash of subparser name -> subparser for a given directory.
my $self = shift;
my $resultDir = shift;
my %subparsers = (
"ratemds", RateMdsParser->new($resultDir),
"vitals", VitalsParser->new($resultDir),
"healthgrades", HealthGradesParser->new($resultDir),
"yelp", YelpParser->new($resultDir),
"yahoo", YahooLocalParser->new($resultDir),
"insiderpages", InsiderPagesParser->new($resultDir),
"wellness", WellnessParser->new($resultDir),
"googlemaps", GoogleMapsParser->new($resultDir),
"citysearch", CitySearchParser->new($resultDir),
"lifescript", LifescriptParser->new($resultDir),
"avvo", AvvoParser->new($resultDir),
"vimo", VimoParser->new($resultDir),
"everydayhealth", EverydayHealthParser->new($resultDir),
"thirdage", ThirdAgeParser->new($resultDir),
"ucompare", UCompareParser->new($resultDir),
"bookhealthcare", BookHealthcareParser->new($resultDir),
"zocdoc", ZocDocParser->new($resultDir),
"superpages", SuperPagesParser->new($resultDir),
"yellowbot", YellowBotParser->new($resultDir),
"yellowpages", YellowPagesParser->new($resultDir),
"kudzu", KudzuParser->new($resultDir),
"doctordotcom", DoctorDotComParser->new($resultDir)
);
return %subparsers;
}
1;