package ConfigURLdictyBase_base;

## Author : Shuai Weng
## Date :   July 2001
## Description : This package is to be used by dictyBase programs to 
##               get urls. It is a subclass of ConfigURL.
## 
## See documentation for the usage details. 
##    
## http:///usr/local/dicty/www_dictybase/db/lib/html/dictyBase/programmer/ConfigURLdictyBase.html
##

use strict;
use vars qw (@ISA);

use lib "/usr/local/dicty/www_dictybase/db/lib/common"; # where to find the parent
use ConfigURL;
@ISA = qw (ConfigURL); # base class

our %dblink = ("SDEV"=>"dictyBaseDEV",
	      uc('dictyBase')=>"dictyBase");

####################################################################
sub dblink {
####################################################################
    my ($self, $database) = @_;
    return $dblink{uc($database)};	
}

####################################################################
sub dictyBaseServerRoot{
####################################################################
# This subroutine returns the root of the server on which the 
# database is running

    my ($self) = @_;

    return $self->wineServerRoot;

}

####################################################################
sub dictyBaseCGIRoot{
####################################################################
# This method returns the root of the cgi-bin directory

    my ($self) = @_;

    return $self->dictyBaseServerRoot."cgi-bin/";

}

####################################################################
sub dictyBaseHtmlRoot{
####################################################################
# This method returns the root for dictyBase html page

    my ($self) = @_;

    return $self->dictyBaseServerRoot."html/";

}

####################################################################
sub dictyBaseImages {
####################################################################
# This method returns the root for dictyBase images page

    my ($self) = @_;

    return $self->dictyBaseHtmlRoot."images/";

}

####################################################################
sub dictyBaseHelp {
####################################################################
# This method returns the root for dictyBase help page

    my ($self) = @_;

    return $self->breadServerRoot."Dictyostelium/help/";

}

####################################################################
sub dictyBaseHtmlTmp{
####################################################################
# This subroutine returns the url to the html tmp directory

    my ($self) = shift;

    return $self->dictyBaseHtmlRoot."tmp/";

}

####################################################################
sub ncbiUrlRoot {
####################################################################
#    my ($self) = @_;
    return "http://www.ncbi.nlm.nih.gov/entrez/";
}

####################################################################
sub ncbiUrlRoot2 {
####################################################################
#    my ($self) = @_;
    return "http://www.ncbi.nlm.nih.gov/htbin-post/Entrez/";
}

####################################################################
sub rcsbRoot {
####################################################################
#    my ($self) = @_;
    return "http://www.rcsb.org/";
}

####################################################################
sub pdbRoot {
####################################################################
    my ($self) = @_;
    return $self->rcsbRoot."pdb/";
}

####################################################################
sub pdbCGIRoot {
####################################################################
    my ($self) = @_;
    return $self->pdbRoot."cgi/";
}

####################################################################
sub pdbImages {
####################################################################    
    my ($self) = @_;
    return $self->pdbRoot."images/";
}

####################################################################
1; # to keep perl happy
####################################################################


=pod

=head1 Name

ConfigURLdictyBase.pm

=head1 Description

The ConfigURLdictyBase object can be used to retrieve various url roots 
that are used by dictyBase.

=head1 Instantiating a New ConfigURLdictyBase Object

To make a ConfigURLdictyBase object you simply:

my $configUrl = ConfigURLdictyBase->new;

=head1 Accessors

Unless noted otherwise, accesors require no arguments.  All
directories returned by accessors will have a trailing slash character (/).

=head2 dictyBaseServerRoot

This method returns the url root of the apache wine server.

=head2 dictyBaseCGIRoot

This method returns the cgi url root of the apache wine server.

=head2 dictyBaseHtmlRoot

This method returns the html url root of the apache wine server.

=head2 dictyBaseImages

This method returns the url root for dictyBase images files.

=head2 dictyBaseHelp

This method returns the url root for dictyBase help files.


=head2 dictyBaseHtmlTmp

This method returns the url root for dictyBase html tmp files.

=head2 ncbiUrlRoot

This method returns the NCBI url root :

http://www.ncbi.nlm.nih.gov/entrez/


=head2 ncbiUrlRoot2

This method returns the another NCBI url root :

http://www.ncbi.nlm.nih.gov/htbin-post/Entrez/


=head2 dblink

Usage :

my $dblink = $configUrl->dblink($database);

This method return the dblink name (dictyBase or dictyBaseDEV) based on the $database (dictyBase or sdev).


=head1 AUTHOR

Shuai Weng

shuai@genome.stanford.edu

=cut









