[Bio] / Sprout / SproutLoad.pm Repository:
ViewVC logotype

Diff of /Sprout/SproutLoad.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.24, Tue Jan 17 01:10:54 2006 UTC revision 1.36, Fri May 19 07:26:17 2006 UTC
# Line 80  Line 80 
80  =item subsysFile  =item subsysFile
81    
82  Either the name of the file containing the list of trusted subsystems or a reference  Either the name of the file containing the list of trusted subsystems or a reference
83  to a list of subsystem names. If nothing is specified, all known subsystems will be  to a list of subsystem names. If nothing is specified, all NMPDR subsystems will be
84  considered trusted. Only subsystem data related to the trusted subsystems is loaded.  considered trusted. (A subsystem is considered NMPDR if it has a file named C<NMPDR>
85    in its data directory.) Only subsystem data related to the trusted subsystems is loaded.
86    
87  =item options  =item options
88    
# Line 94  Line 95 
95  sub new {  sub new {
96      # Get the parameters.      # Get the parameters.
97      my ($class, $sprout, $fig, $genomeFile, $subsysFile, $options) = @_;      my ($class, $sprout, $fig, $genomeFile, $subsysFile, $options) = @_;
98      # Load the list of genomes into a hash.      # Create the genome hash.
99      my %genomes;      my %genomes = ();
100        # We only need it if load-only is NOT specified.
101        if (! $options->{loadOnly}) {
102      if (! defined($genomeFile) || $genomeFile eq '') {      if (! defined($genomeFile) || $genomeFile eq '') {
103          # Here we want all the complete genomes and an access code of 1.          # Here we want all the complete genomes and an access code of 1.
104          my @genomeList = $fig->genomes(1);          my @genomeList = $fig->genomes(1);
# Line 129  Line 132 
132              Confess("Invalid genome parameter ($type) in SproutLoad constructor.");              Confess("Invalid genome parameter ($type) in SproutLoad constructor.");
133          }          }
134      }      }
135        }
136      # Load the list of trusted subsystems.      # Load the list of trusted subsystems.
137      my %subsystems = ();      my %subsystems = ();
138        # We only need it if load-only is NOT specified.
139        if (! $options->{loadOnly}) {
140      if (! defined $subsysFile || $subsysFile eq '') {      if (! defined $subsysFile || $subsysFile eq '') {
141          # Here we want all the subsystems.              # Here we want all the NMPDR subsystems. First we get the whole list.
142          %subsystems = map { $_ => 1 } $fig->all_subsystems();              my @subs = $fig->all_subsystems();
143                # Loop through, checking for the NMPDR file.
144                for my $sub (@subs) {
145                    if (-e "$FIG_Config::data/Subsystems/$sub/NMPDR") {
146                        $subsystems{$sub} = 1;
147                    }
148                }
149      } else {      } else {
150          my $type = ref $subsysFile;          my $type = ref $subsysFile;
151          if ($type eq 'ARRAY') {          if ($type eq 'ARRAY') {
# Line 153  Line 165 
165              Confess("Invalid subsystem parameter in SproutLoad constructor.");              Confess("Invalid subsystem parameter in SproutLoad constructor.");
166          }          }
167      }      }
168        }
169      # Get the data directory from the Sprout object.      # Get the data directory from the Sprout object.
170      my ($directory) = $sprout->LoadInfo();      my ($directory) = $sprout->LoadInfo();
171      # Create the Sprout load object.      # Create the Sprout load object.
# Line 184  Line 197 
197      return $self->{options}->{loadOnly};      return $self->{options}->{loadOnly};
198  }  }
199    
200    =head3 PrimaryOnly
201    
202    C<< my $flag = $spl->PrimaryOnly; >>
203    
204    Return TRUE if only the main entity is to be loaded, else FALSE.
205    
206    =cut
207    
208    sub PrimaryOnly {
209        my ($self) = @_;
210        return $self->{options}->{primaryOnly};
211    }
212    
213  =head3 LoadGenomeData  =head3 LoadGenomeData
214    
215  C<< my $stats = $spl->LoadGenomeData(); >>  C<< my $stats = $spl->LoadGenomeData(); >>
# Line 211  Line 237 
237    
238  =back  =back
239    
 B<TO DO>  
   
 Real quality vectors instead of C<unknown> for everything.  
   
 GenomeGroup relation. (The original script took group information from the C<NMPDR> file  
 in each genome's main directory, but no such file exists anywhere in my version of the  
 data store.)  
   
240  =cut  =cut
241  #: Return Type $%;  #: Return Type $%;
242  sub LoadGenomeData {  sub LoadGenomeData {
# Line 231  Line 249 
249      my $genomeCount = (keys %{$genomeHash});      my $genomeCount = (keys %{$genomeHash});
250      # Create load objects for each of the tables we're loading.      # Create load objects for each of the tables we're loading.
251      my $loadGenome = $self->_TableLoader('Genome');      my $loadGenome = $self->_TableLoader('Genome');
252      my $loadHasContig = $self->_TableLoader('HasContig');      my $loadHasContig = $self->_TableLoader('HasContig', $self->PrimaryOnly);
253      my $loadContig = $self->_TableLoader('Contig');      my $loadContig = $self->_TableLoader('Contig', $self->PrimaryOnly);
254      my $loadIsMadeUpOf = $self->_TableLoader('IsMadeUpOf');      my $loadIsMadeUpOf = $self->_TableLoader('IsMadeUpOf', $self->PrimaryOnly);
255      my $loadSequence = $self->_TableLoader('Sequence');      my $loadSequence = $self->_TableLoader('Sequence', $self->PrimaryOnly);
256      if ($self->{options}->{loadOnly}) {      if ($self->{options}->{loadOnly}) {
257          Trace("Loading from existing files.") if T(2);          Trace("Loading from existing files.") if T(2);
258      } else {      } else {
# Line 245  Line 263 
263              $loadGenome->Add("genomeIn");              $loadGenome->Add("genomeIn");
264              # The access code comes in via the genome hash.              # The access code comes in via the genome hash.
265              my $accessCode = $genomeHash->{$genomeID};              my $accessCode = $genomeHash->{$genomeID};
266              # Get the genus, species, and strain from the scientific name. Note that we append              # Get the genus, species, and strain from the scientific name.
             # the genome ID to the strain. In some cases this is the totality of the strain name.  
267              my ($genus, $species, @extraData) = split / /, $self->{fig}->genus_species($genomeID);              my ($genus, $species, @extraData) = split / /, $self->{fig}->genus_species($genomeID);
268              my $extra = join " ", @extraData, "[$genomeID]";              my $extra = join " ", @extraData;
269              # Get the full taxonomy.              # Get the full taxonomy.
270              my $taxonomy = $fig->taxonomy_of($genomeID);              my $taxonomy = $fig->taxonomy_of($genomeID);
271              # Output the genome record.              # Output the genome record.
# Line 329  Line 346 
346      my $featureCount = $genomeCount * 4000;      my $featureCount = $genomeCount * 4000;
347      # Start the loads.      # Start the loads.
348      my $loadCoupling = $self->_TableLoader('Coupling');      my $loadCoupling = $self->_TableLoader('Coupling');
349      my $loadIsEvidencedBy = $self->_TableLoader('IsEvidencedBy');      my $loadIsEvidencedBy = $self->_TableLoader('IsEvidencedBy', $self->PrimaryOnly);
350      my $loadPCH = $self->_TableLoader('PCH');      my $loadPCH = $self->_TableLoader('PCH', $self->PrimaryOnly);
351      my $loadParticipatesInCoupling = $self->_TableLoader('ParticipatesInCoupling');      my $loadParticipatesInCoupling = $self->_TableLoader('ParticipatesInCoupling', $self->PrimaryOnly);
352      my $loadUsesAsEvidence = $self->_TableLoader('UsesAsEvidence');      my $loadUsesAsEvidence = $self->_TableLoader('UsesAsEvidence', $self->PrimaryOnly);
353      if ($self->{options}->{loadOnly}) {      if ($self->{options}->{loadOnly}) {
354          Trace("Loading from existing files.") if T(2);          Trace("Loading from existing files.") if T(2);
355      } else {      } else {
# Line 431  Line 448 
448      FeatureTranslation      FeatureTranslation
449      FeatureUpstream      FeatureUpstream
450      IsLocatedIn      IsLocatedIn
451        HasFeature
452    
453  =over 4  =over 4
454    
# Line 451  Line 469 
469      my $genomeHash = $self->{genomes};      my $genomeHash = $self->{genomes};
470      # Create load objects for each of the tables we're loading.      # Create load objects for each of the tables we're loading.
471      my $loadFeature = $self->_TableLoader('Feature');      my $loadFeature = $self->_TableLoader('Feature');
472      my $loadIsLocatedIn = $self->_TableLoader('IsLocatedIn');      my $loadIsLocatedIn = $self->_TableLoader('IsLocatedIn', $self->PrimaryOnly);
473      my $loadFeatureAlias = $self->_TableLoader('FeatureAlias');      my $loadFeatureAlias = $self->_TableLoader('FeatureAlias');
474      my $loadFeatureLink = $self->_TableLoader('FeatureLink');      my $loadFeatureLink = $self->_TableLoader('FeatureLink');
475      my $loadFeatureTranslation = $self->_TableLoader('FeatureTranslation');      my $loadFeatureTranslation = $self->_TableLoader('FeatureTranslation');
476      my $loadFeatureUpstream = $self->_TableLoader('FeatureUpstream');      my $loadFeatureUpstream = $self->_TableLoader('FeatureUpstream');
477        my $loadHasFeature = $self->_TableLoader('HasFeature');
478      # Get the maximum sequence size. We need this later for splitting up the      # Get the maximum sequence size. We need this later for splitting up the
479      # locations.      # locations.
480      my $chunkSize = $self->{sprout}->MaxSegment();      my $chunkSize = $self->{sprout}->MaxSegment();
# Line 476  Line 495 
495                  my ($featureID, $locations, undef, $type) = @{$featureData};                  my ($featureID, $locations, undef, $type) = @{$featureData};
496                  # Create the feature record.                  # Create the feature record.
497                  $loadFeature->Put($featureID, 1, $type);                  $loadFeature->Put($featureID, 1, $type);
498                    # Link it to the parent genome.
499                    $loadHasFeature->Put($genomeID, $featureID, $type);
500                  # Create the aliases.                  # Create the aliases.
501                  for my $alias ($fig->feature_aliases($featureID)) {                  for my $alias ($fig->feature_aliases($featureID)) {
502                      $loadFeatureAlias->Put($featureID, $alias);                      $loadFeatureAlias->Put($featureID, $alias);
# Line 658  Line 679 
679      # Get the map list.      # Get the map list.
680      my @maps = $fig->all_maps;      my @maps = $fig->all_maps;
681      # Create load objects for each of the tables we're loading.      # Create load objects for each of the tables we're loading.
682      my $loadDiagram = $self->_TableLoader('Diagram');      my $loadDiagram = $self->_TableLoader('Diagram', $self->PrimaryOnly);
683      my $loadRoleOccursIn = $self->_TableLoader('RoleOccursIn');      my $loadRoleOccursIn = $self->_TableLoader('RoleOccursIn', $self->PrimaryOnly);
684      my $loadSubsystem = $self->_TableLoader('Subsystem');      my $loadSubsystem = $self->_TableLoader('Subsystem');
685      my $loadRole = $self->_TableLoader('Role');      my $loadRole = $self->_TableLoader('Role', $self->PrimaryOnly);
686      my $loadRoleEC = $self->_TableLoader('RoleEC');      my $loadRoleEC = $self->_TableLoader('RoleEC', $self->PrimaryOnly);
687      my $loadCatalyzes = $self->_TableLoader('Catalyzes');      my $loadCatalyzes = $self->_TableLoader('Catalyzes', $self->PrimaryOnly);
688      my $loadSSCell = $self->_TableLoader('SSCell');      my $loadSSCell = $self->_TableLoader('SSCell', $self->PrimaryOnly);
689      my $loadContainsFeature = $self->_TableLoader('ContainsFeature');      my $loadContainsFeature = $self->_TableLoader('ContainsFeature', $self->PrimaryOnly);
690      my $loadIsGenomeOf = $self->_TableLoader('IsGenomeOf');      my $loadIsGenomeOf = $self->_TableLoader('IsGenomeOf', $self->PrimaryOnly);
691      my $loadIsRoleOf = $self->_TableLoader('IsRoleOf');      my $loadIsRoleOf = $self->_TableLoader('IsRoleOf', $self->PrimaryOnly);
692      my $loadOccursInSubsystem = $self->_TableLoader('OccursInSubsystem');      my $loadOccursInSubsystem = $self->_TableLoader('OccursInSubsystem', $self->PrimaryOnly);
693      my $loadParticipatesIn = $self->_TableLoader('ParticipatesIn');      my $loadParticipatesIn = $self->_TableLoader('ParticipatesIn', $self->PrimaryOnly);
694      my $loadHasSSCell = $self->_TableLoader('HasSSCell');      my $loadHasSSCell = $self->_TableLoader('HasSSCell', $self->PrimaryOnly);
695      my $loadRoleSubset = $self->_TableLoader('RoleSubset');      my $loadRoleSubset = $self->_TableLoader('RoleSubset', $self->PrimaryOnly);
696      my $loadGenomeSubset = $self->_TableLoader('GenomeSubset');      my $loadGenomeSubset = $self->_TableLoader('GenomeSubset', $self->PrimaryOnly);
697      my $loadConsistsOfRoles = $self->_TableLoader('ConsistsOfRoles');      my $loadConsistsOfRoles = $self->_TableLoader('ConsistsOfRoles', $self->PrimaryOnly);
698      my $loadConsistsOfGenomes = $self->_TableLoader('ConsistsOfGenomes');      my $loadConsistsOfGenomes = $self->_TableLoader('ConsistsOfGenomes', $self->PrimaryOnly);
699      my $loadHasRoleSubset = $self->_TableLoader('HasRoleSubset');      my $loadHasRoleSubset = $self->_TableLoader('HasRoleSubset', $self->PrimaryOnly);
700      my $loadHasGenomeSubset = $self->_TableLoader('HasGenomeSubset');      my $loadHasGenomeSubset = $self->_TableLoader('HasGenomeSubset', $self->PrimaryOnly);
701      if ($self->{options}->{loadOnly}) {      if ($self->{options}->{loadOnly}) {
702          Trace("Loading from existing files.") if T(2);          Trace("Loading from existing files.") if T(2);
703      } else {      } else {
# Line 692  Line 713 
713          my ($genomeID, $roleID);          my ($genomeID, $roleID);
714          my %roleData = ();          my %roleData = ();
715          for my $subsysID (@subsysIDs) {          for my $subsysID (@subsysIDs) {
             Trace("Creating subsystem $subsysID.") if T(3);  
             $loadSubsystem->Add("subsystemIn");  
716              # Get the subsystem object.              # Get the subsystem object.
717              my $sub = $fig->get_subsystem($subsysID);              my $sub = $fig->get_subsystem($subsysID);
718                # Only proceed if the subsystem has a spreadsheet.
719                if (! $sub->{empty_ss}) {
720                    Trace("Creating subsystem $subsysID.") if T(3);
721                    $loadSubsystem->Add("subsystemIn");
722              # Create the subsystem record.              # Create the subsystem record.
723              my $curator = $sub->get_curator();              my $curator = $sub->get_curator();
724              my $notes = $sub->get_notes();              my $notes = $sub->get_notes();
# Line 796  Line 819 
819                  # Connect the subset to the subsystem.                  # Connect the subset to the subsystem.
820                  $loadHasRoleSubset->Put($subsysID, $actualID);                  $loadHasRoleSubset->Put($subsysID, $actualID);
821                  # Connect the subset to its roles.                  # Connect the subset to its roles.
822                  my @roles = $sub->get_subset($subsetID);                      my @roles = $sub->get_subsetC_roles($subsetID);
823                  for my $roleID (@roles) {                  for my $roleID (@roles) {
824                      $loadConsistsOfRoles->Put($actualID, $roleID);                      $loadConsistsOfRoles->Put($actualID, $roleID);
825                  }                  }
# Line 849  Line 872 
872              }              }
873          }          }
874      }      }
875        }
876      # Finish the load.      # Finish the load.
877      my $retVal = $self->_FinishAll();      my $retVal = $self->_FinishAll();
878      return $retVal;      return $retVal;
# Line 892  Line 916 
916      my $genomeHash = $self->{genomes};      my $genomeHash = $self->{genomes};
917      # Create load objects for each of the tables we're loading.      # Create load objects for each of the tables we're loading.
918      my $loadProperty = $self->_TableLoader('Property');      my $loadProperty = $self->_TableLoader('Property');
919      my $loadHasProperty = $self->_TableLoader('HasProperty');      my $loadHasProperty = $self->_TableLoader('HasProperty', $self->PrimaryOnly);
920      if ($self->{options}->{loadOnly}) {      if ($self->{options}->{loadOnly}) {
921          Trace("Loading from existing files.") if T(2);          Trace("Loading from existing files.") if T(2);
922      } else {      } else {
# Line 989  Line 1013 
1013      my $genomeHash = $self->{genomes};      my $genomeHash = $self->{genomes};
1014      # Create load objects for each of the tables we're loading.      # Create load objects for each of the tables we're loading.
1015      my $loadAnnotation = $self->_TableLoader('Annotation');      my $loadAnnotation = $self->_TableLoader('Annotation');
1016      my $loadIsTargetOfAnnotation = $self->_TableLoader('IsTargetOfAnnotation');      my $loadIsTargetOfAnnotation = $self->_TableLoader('IsTargetOfAnnotation', $self->PrimaryOnly);
1017      my $loadSproutUser = $self->_TableLoader('SproutUser');      my $loadSproutUser = $self->_TableLoader('SproutUser', $self->PrimaryOnly);
1018      my $loadUserAccess = $self->_TableLoader('UserAccess');      my $loadUserAccess = $self->_TableLoader('UserAccess', $self->PrimaryOnly);
1019      my $loadMadeAnnotation = $self->_TableLoader('MadeAnnotation');      my $loadMadeAnnotation = $self->_TableLoader('MadeAnnotation', $self->PrimaryOnly);
1020      if ($self->{options}->{loadOnly}) {      if ($self->{options}->{loadOnly}) {
1021          Trace("Loading from existing files.") if T(2);          Trace("Loading from existing files.") if T(2);
1022      } else {      } else {
# Line 1010  Line 1034 
1034          # Loop through the genomes.          # Loop through the genomes.
1035          for my $genomeID (sort keys %{$genomeHash}) {          for my $genomeID (sort keys %{$genomeHash}) {
1036              Trace("Processing $genomeID.") if T(3);              Trace("Processing $genomeID.") if T(3);
1037              # Get the genome's PEGs.              # Get the genome's annotations.
1038              my @pegs = $fig->pegs_of($genomeID);              my @annotations = $fig->read_all_annotations($genomeID);
1039              for my $peg (@pegs) {              Trace("Processing annotations.") if T(2);
1040                  Trace("Processing $peg.") if T(4);              for my $tuple (@annotations) {
1041                  # Create a hash of timestamps. We use this to prevent duplicate time stamps                  # Create a hash of timestamps. We use this to prevent duplicate time stamps
1042                  # from showing up for a single PEG's annotations.                  # from showing up for a single PEG's annotations.
1043                  my %seenTimestamps = ();                  my %seenTimestamps = ();
1044                  # Loop through the annotations.                  # Get the annotation tuple.
1045                  for my $tuple ($fig->feature_annotations($peg, "raw")) {                  my ($peg, $timestamp, $user, $text) = @{$tuple};
                     my ($fid, $timestamp, $user, $text) = @{$tuple};  
1046                      # Here we fix up the annotation text. "\r" is removed,                      # Here we fix up the annotation text. "\r" is removed,
1047                      # and "\t" and "\n" are escaped. Note we use the "s"                      # and "\t" and "\n" are escaped. Note we use the "s"
1048                      # modifier so that new-lines inside the text do not                      # modifier so that new-lines inside the text do not
# Line 1034  Line 1057 
1057                          # Here it's a number. We need to insure the one we use to form                          # Here it's a number. We need to insure the one we use to form
1058                          # the key is unique.                          # the key is unique.
1059                          my $keyStamp = $timestamp;                          my $keyStamp = $timestamp;
1060                          while ($seenTimestamps{$keyStamp}) {                      while ($seenTimestamps{"$peg:$keyStamp"}) {
1061                              $keyStamp++;                              $keyStamp++;
1062                          }                          }
                         $seenTimestamps{$keyStamp} = 1;  
1063                          my $annotationID = "$peg:$keyStamp";                          my $annotationID = "$peg:$keyStamp";
1064                        $seenTimestamps{$annotationID} = 1;
1065                          # Insure the user exists.                          # Insure the user exists.
1066                          if (! $users{$user}) {                          if (! $users{$user}) {
1067                              $loadSproutUser->Put($user, "SEED user");                              $loadSproutUser->Put($user, "SEED user");
# Line 1056  Line 1079 
1079                  }                  }
1080              }              }
1081          }          }
     }  
1082      # Finish the load.      # Finish the load.
1083      my $retVal = $self->_FinishAll();      my $retVal = $self->_FinishAll();
1084      return $retVal;      return $retVal;
# Line 1098  Line 1120 
1120      # Get the genome hash.      # Get the genome hash.
1121      my $genomeHash = $self->{genomes};      my $genomeHash = $self->{genomes};
1122      # Create load objects for each of the tables we're loading.      # Create load objects for each of the tables we're loading.
1123      my $loadComesFrom = $self->_TableLoader('ComesFrom');      my $loadComesFrom = $self->_TableLoader('ComesFrom', $self->PrimaryOnly);
1124      my $loadSource = $self->_TableLoader('Source');      my $loadSource = $self->_TableLoader('Source');
1125      my $loadSourceURL = $self->_TableLoader('SourceURL');      my $loadSourceURL = $self->_TableLoader('SourceURL');
1126      if ($self->{options}->{loadOnly}) {      if ($self->{options}->{loadOnly}) {
# Line 1256  Line 1278 
1278      my $fig = $self->{fig};      my $fig = $self->{fig};
1279      # Create load objects for each of the tables we're loading.      # Create load objects for each of the tables we're loading.
1280      my $loadReaction = $self->_TableLoader('Reaction');      my $loadReaction = $self->_TableLoader('Reaction');
1281      my $loadReactionURL = $self->_TableLoader('ReactionURL');      my $loadReactionURL = $self->_TableLoader('ReactionURL', $self->PrimaryOnly);
1282      my $loadCompound = $self->_TableLoader('Compound');      my $loadCompound = $self->_TableLoader('Compound', $self->PrimaryOnly);
1283      my $loadCompoundName = $self->_TableLoader('CompoundName');      my $loadCompoundName = $self->_TableLoader('CompoundName', $self->PrimaryOnly);
1284      my $loadCompoundCAS = $self->_TableLoader('CompoundCAS');      my $loadCompoundCAS = $self->_TableLoader('CompoundCAS', $self->PrimaryOnly);
1285      my $loadIsAComponentOf = $self->_TableLoader('IsAComponentOf');      my $loadIsAComponentOf = $self->_TableLoader('IsAComponentOf', $self->PrimaryOnly);
1286      if ($self->{options}->{loadOnly}) {      if ($self->{options}->{loadOnly}) {
1287          Trace("Loading from existing files.") if T(2);          Trace("Loading from existing files.") if T(2);
1288      } else {      } else {
# Line 1392  Line 1414 
1414    
1415  Name of the table (relation) being loaded.  Name of the table (relation) being loaded.
1416    
1417    =item ignore
1418    
1419    TRUE if the table should be ignored entirely, else FALSE.
1420    
1421  =item RETURN  =item RETURN
1422    
1423  Returns an ERDBLoad object for loading the specified table.  Returns an ERDBLoad object for loading the specified table.
# Line 1402  Line 1428 
1428    
1429  sub _TableLoader {  sub _TableLoader {
1430      # Get the parameters.      # Get the parameters.
1431      my ($self, $tableName, $loadOnly) = @_;      my ($self, $tableName, $ignore) = @_;
1432      # Create the load object.      # Create the load object.
1433      my $retVal = ERDBLoad->new($self->{erdb}, $tableName, $self->{loadDirectory}, $self->LoadOnly);      my $retVal = ERDBLoad->new($self->{erdb}, $tableName, $self->{loadDirectory}, $self->LoadOnly,
1434                                   $ignore);
1435      # Cache it in the loader list.      # Cache it in the loader list.
1436      push @{$self->{loaders}}, $retVal;      push @{$self->{loaders}}, $retVal;
1437      # Return it to the caller.      # Return it to the caller.
# Line 1441  Line 1468 
1468      # Loop through the list, finishing the loads. Note that if the finish fails, we die      # Loop through the list, finishing the loads. Note that if the finish fails, we die
1469      # ignominiously. At some future point, we want to make the loads restartable.      # ignominiously. At some future point, we want to make the loads restartable.
1470      while (my $loader = pop @{$loadList}) {      while (my $loader = pop @{$loadList}) {
1471          # Trace the fact that we're cleaning up.          # Get the relation name.
1472          my $relName = $loader->RelName;          my $relName = $loader->RelName;
1473            # Check the ignore flag.
1474            if ($loader->Ignore) {
1475                Trace("Relation $relName not loaded.") if T(2);
1476            } else {
1477                # Here we really need to finish.
1478          Trace("Finishing $relName.") if T(2);          Trace("Finishing $relName.") if T(2);
1479          my $stats = $loader->Finish();          my $stats = $loader->Finish();
1480          if ($self->{options}->{dbLoad}) {          if ($self->{options}->{dbLoad}) {
# Line 1455  Line 1487 
1487          $retVal->Accumulate($stats);          $retVal->Accumulate($stats);
1488          Trace("Statistics for $relName:\n" . $stats->Show()) if T(2);          Trace("Statistics for $relName:\n" . $stats->Show()) if T(2);
1489      }      }
1490        }
1491      # Return the load statistics.      # Return the load statistics.
1492      return $retVal;      return $retVal;
1493  }  }

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.36

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3