File: default.pm

package info (click to toggle)
libace-perl 1.92-12
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,012 kB
  • sloc: perl: 7,763; ansic: 7,420; makefile: 81
file content (155 lines) | stat: -rw-r--r-- 3,906 bytes parent folder | download | duplicates (7)
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
use Ace::Browser::LocalSiteDefs '$HTML_PATH';

# ========= DIRECTORIES =======
# base of all our scripts
$ROOT = '/cgi-bin/ace';

# base of our html files
$DOCROOT = '/ace';

# base of our icons
$ICONS = "$DOCROOT/ico";

# base of our images
$IMAGES = "$DOCROOT/images";

# ========= $HOST  =========
# name of the host to connect to
$HOST = 'stein.cshl.org';

# ========= $PORT  =========
# Port number to connect to
$PORT = 2005;

# ========= $USERNAME  =========
# Username for connections (none)
$USERNAME = '';

# ========= $PASSWORD  =========
# Password for connections (none)
$PASSWORD = '';

# ========= $STYLESHEET =========
# stylesheet to use
$STYLESHEET = "$DOCROOT/stylesheets/aceperl.css";

# ========= $PICTURES ==========
# Where to write temporary picture files to:
#   The URL and the physical location, which must be writable
# by the web server.  This is meaningless under Apache::Modperl.
# Otherwise the value is determined by Makefile.PL
@PICTURES = ($IMAGES => "$HTML_PATH/images");

# ========= @SEARCHES  =========
# search scripts available
# NOTE: the order is important
@SEARCHES   = (
	       text => {
			name   => 'Text Search',
			url    =>"$ROOT/searches/text",
		       },
	       browser => {
			   name => 'Class Browser',
			   url  => "$ROOT/searches/browser",
			  },
	       query => {
			 name => 'Acedb Query',
			 url  => "$ROOT/searches/query",
			 },
	       );
$SEARCH_ICON = "$ICONS/unknown.gif";

# ========= %HOME  =========
# Home page URL
@HOME      = (
	      $DOCROOT => 'Home Page'
	     );

# ========= %DISPLAYS =========
# displays to show
%DISPLAYS = (	
	     tree => {
		      'url'     => "generic/tree",
		      'label'   => 'Tree Display',
		      'icon'    => "$ICONS/text.gif" },
	     pic => {
		     'url'     => "generic/pic",
		     'label'   => 'Graphic Display',
		     'icon'    => "$ICONS/image2.gif" },
	     xml => {
		     'url'     => "generic/xml",
		     'label'   => 'XML Display',
		     'icon'    => "$ICONS/text.gif" },
	     model => {
		     'url'     => "generic/model",
		     'label'   => 'AceDB Schema',
		     'icon'    => "$ICONS/text.gif" },
	    );

# ========= %CLASSES =========
# displays to show
%CLASSES = (	
	    # default is a special "dummy" class to fall back on
	     Default => [ qw/tree pic model xml/ ],
	   );


# ========= &URL_MAPPER  =========
# mapping from object type to URL.  Return empty list to fall through
# to default.
sub URL_MAPPER {
  my ($display,$name,$class) = @_;

  # Small Ace inconsistency: Models named "#name" should be
  # transduced to Models named "?name"
  $name = "?$1" if $class eq 'Model' && $name=~/^\#(.*)/;

  my $n = CGI->escape("$name"); # looks superfluous, but avoids Ace::Object name conversions errors
  my $c = CGI->escape($class);

  # pictures remain pictures
  if ($display eq 'pic') {
    return ('pic' => "name=$n&class=$c");
  }
  # otherwise display it with a tree
  else {
    return ('tree' => "name=$n&class=$c");
  }
}

# ========= $BANNER =========
# Banner HTML
# This will appear at the top of each page. 
$BANNER = <<END;
<font size="+5" color="red">AceDB Database on $HOST:$PORT</font>
END
;

# ========= PRIVACY STATEMENT
$PRINT_PRIVACY_STATEMENT = 1;

# ========= FEEDBACK STATEMENT
@FEEDBACK_RECIPIENTS = (
			[ " $ENV{SERVER_ADMIN}", 'general complaints and suggestions', 1 ]
);

# ========= $FOOTER =========
# Footer HTML
# This will appear at the bottom of each page
$FOOTER = '';

# configuration for the "basic" seqarch script
@BASIC_OBJECTS = 
  ('Any'      =>   '<i>Anything</i>',
   'Locus'    =>   'Confirmed Gene',
   'Predicted_gene'    =>   'Predicted Gene',
   'Sequence' =>   'Sequence (any)',
   'Genome_sequence', => 'Sequence (genomic)',
   'Author'       =>    'Author',
   'Genetic_map'  => 'Genetic Map',
   'Sequence_map' => 'Sequence Map',
   'Strain'       =>  'Worm Strain',
   'Clone'        => 'Clone'
  );

1;