[Bio] / FigKernelScripts / load_attributes.pl Repository:
ViewVC logotype

Annotation of /FigKernelScripts/load_attributes.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (view) (download) (as text)

1 : overbeek 1.1
2 :     use FIG;
3 :     my $fig = new FIG;
4 :    
5 :     my $dbf = $fig->{_dbf};
6 :     $dbf->drop_table( tbl => "attribute" );
7 :     $dbf->create_table( tbl => 'attribute',
8 :     flds => "fid varchar(32), tag varchar(64), val text, url text"
9 :     );
10 :     if (opendir(ATTR,"$FIG_Config::global/Attributes"))
11 :     {
12 :     my @files = grep { $_ !~ /^\./ } readdir(ATTR);
13 :     closedir(ATTR);
14 :    
15 :     my $file;
16 :     foreach $file (@files)
17 :     {
18 :     if (-s "$FIG_Config::global/Attributes/$file")
19 :     {
20 :     $dbf->load_table( tbl => "attribute",
21 :     file => "$FIG_Config::global/Attributes/$file" );
22 :     }
23 :     }
24 :     $dbf->create_index( idx => "attribute_fid_ix",
25 :     tbl => "attribute",
26 :     type => "btree",
27 :     flds => "fid" );
28 :     }

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3