Skip to content
Snippets Groups Projects
Commit 5726d5c4 authored by Web Admin's avatar Web Admin
Browse files

add into get_all_DASFactories call for protdas

parent 6512b2a2
No related branches found
No related tags found
No related merge requests found
......@@ -521,6 +521,23 @@ sub temporary_id {
}
=head2 get_all_DASFactories
Arg [1] : none
Function : Retrieves a listref of registered DAS objects
Returntype: [ DAS_objects ]
Exceptions:
Caller :
Example : $dasref = $prot->get_all_DASFactories
=cut
sub get_all_DASFactories {
my $self = shift;
return [ $self->adaptor()->db()->_each_DASFeatureFactory ];
}
=head2 get_all_DASFeatures
Arg [1] : none
......@@ -537,14 +554,24 @@ sub temporary_id {
=cut
sub get_all_DASFeatures{
my ($self,@args) = @_;
my %das_features;
foreach my $dasfact( $self->adaptor()->db()->_each_DASFeatureFactory ){
my @featref = $dasfact->fetch_all_by_DBLink_Container( $self );
$das_features{$dasfact->_dsn} = [@featref];
my ($self,@args) = @_;
$self->{_das_features} ||= {}; # Cache
my %das_features;
foreach my $dasfact( @{$self->get_all_DASFactories} ){
my $dsn = $dasfact->_dsn;
if( $self->{_das_features}->{$dsn} ){ # Use cached
$das_features{$dsn} = $self->{_das_features}->{$dsn};
next;
}
else{ # Get fresh data
my @featref = $dasfact->fetch_all_by_DBLink_Container( $self );
$self->{_das_features}->{$dsn} = [@featref];
$das_features{$dsn} = [@featref];
}
return \%das_features;
}
return \%das_features;
}
1;
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment