Project

General

Profile

« Previous | Next » 

Revision 3780

Added by daigle over 16 years ago

Changes to remove ANT tokens for the turnkey install project

View differences:

bin/measure-metacat-query-performance.sh
1
#!/bin/bash
2
#Call a java client class to query metacat automatically and metacat server
3
#will record the performance data into a file. Since we need restart postgres,
4
#this script should be run as root user
5
#Note: before running the script, user should run both "ant jar" and "ant clientjar"
6
#in Metacat to get metaca-client.jar and metacat.jar in build directory. 
7

  
8
#variables
9
JUNIT=/usr/local/devtools/apache-ant/lib/junit-4.3.1.jar
10
METACAT=../build/metacat.jar
11
METACAT_CLIENT=../build/metacat-client.jar
12
UTILITIES=../lib/utilities.jar
13
METACATURL=http://chico.dyndns.org:8081/knb/metacat
14
QUERY=../test/performance_measure_query
15
TIME=2
16
TOMCATUSER=tao
17

  
18
#copy the java client to build directory
19
rm -rf ../build/tests/
20
mkdir ../build/tests
21
mkdir ../build/tests/edu
22
mkdir ../build/tests/edu/ucsb
23
mkdir ../build/tests/edu/ucsb/nceas
24
mkdir ../build/tests/edu/ucsb/nceas/metacattest
25
cp ../test/edu/ucsb/nceas/metacattest/MetaCatQueryPerformanceTest.java ../build/tests/edu/ucsb/nceas/metacattest/.
26

  
27
#compile the class
28
javac -classpath $JUNIT:$METACAT:$METACAT_CLIENT:$UTILITIES ../build/tests/edu/ucsb/nceas/metacattest/MetaCatQueryPerformanceTest.java 
29

  
30

  
31

  
32

  
33
#Iterate to restart postgres and tomcat, and call java client class
34
for (( i = 0; i < $TIME; i++))
35
do
36
    #retart postgres
37
    /etc/init.d/postgresql-8.2 restart
38
    #Check if posgres restart successfully
39
    successPQL=false;
40
    while [ $successPQL = false ]
41
    do
42
      #if found netstat command has posgres lisenter is ready,
43
      #reset the success value to jump the while loop.
44
      for fn in `netstat -plt | grep postgres`
45
      do
46
        #reset success value
47
        successPQL=true
48
      done
49
    done
50
    echo "success value for restarting postgres is $successPQL"
51

  
52
    #stop tomcat
53
    su - $TOMCATUSER /usr/local/devtools/apache-tomcat-5.5.23/bin/shutdown.sh
54
     #Check if tomcat start successfully
55
    successStop=false;
56
    tomcatRunning=false
57
    while [ $successStop = false ]
58
    do
59
      #if found netstat command still has tcomat lisenter (port 8005) ,
60
      #reset the tomcatRunning value to true
61
      for fn in `netstat -plt | grep 8005`
62
      do
63
        #reset success value
64
        tomcatRunning=true;
65
      done
66
      if [ $tomcatRunning = true ]
67
         then
68
           successStop=false
69
         else
70
           successStop=true
71
      fi
72
    done
73
    echo "success value for stoping tomcat is $successStop"
74
     
75
    #start tomcat
76
   su - $TOMCATUSER  /usr/local/devtools/apache-tomcat-5.5.23/bin/startup.sh
77
    #Check if tomcat start successfully
78
    successStart=false;
79
    while [ $successStart = false ]
80
    do
81
      #if found netstat command has tcomat lisenter (port 8005) is ready,
82
      #reset the success value to jump the while loop.
83
      for fn in `netstat -plt | grep 8005`
84
      do
85
        #reset success value
86
        successStart=true
87
      done
88
    done
89
    echo "success value for starting tomcat is $successStart"
90

  
91

  
92
    #run the class -- query the remote metacat
93
    java -cp $JUNIT:$METACAT:$METACAT_CLIENT:$UTILITIES:../build/tests edu.ucsb.nceas.metacattest.MetaCatQueryPerformanceTest $METACATURL $QUERY
94
    echo "Successfully query the metacat"
95
done
96 0

  
bin/backup-metacat.sh
1
#!/bin/sh
2

  
3
#
4
# Backup files needed for metacat.  This script creates a temporary directory,
5
# backs up the postgres database, metacat data files, and ldap directory, and 
6
# then creates a gzipped tar file from those files.  It then writes the backup
7
# file to a DVD drive and then cleans up any old backup files.
8
#
9
# To run this file, install it in /usr/sbin or a similar location and add an
10
# entry in the root user's crontab to run the command periodically.  The
11
# following crontab entry would run it every night at 2:00 am
12
# 0 2 * * *       /usr/sbin/backup-metacat.sh >> $HOME/cron-output 2>&1
13
#
14
# This is really just an example script and may not work in your environment
15
# uless you modify it appropriately.
16
#
17
# 13 March 2006 Matt Jones
18

  
19
# Name of the metacat database in postgres to be backed up
20
DBNAME=metacat
21

  
22
# The day of the week on which the DVD is swapped (1-7, 1=Monday)
23
# This must be correct or else the write to DVD will not work
24
SWAPDAY=2
25

  
26
# Number of days of backups to keep online, anything older is removed
27
DAYSTOKEEP=7
28

  
29
# Device to be used for the DVD writer -- this may vary on your system
30
DVD=/dev/dvd
31

  
32
#
33
# Below here lie demons
34
#
35

  
36
# Set up our umask to protect files from prying eyes
37
umask 007
38

  
39
# Make a temp dir for the backed up files
40
TAG=`date +%F-%H%M%S`
41
DATADIR="/var/metacat"
42
ARCHROOT="/var/metacat/metacat-backup"
43
mkdir $ARCHROOT
44
chgrp postgres $ARCHROOT
45
chmod g+rwxs $ARCHROOT
46

  
47
ARCHNAME="metacat-backup-$TAG"
48
ARCHDIR="$ARCHROOT/$ARCHNAME"
49
mkdir $ARCHDIR
50

  
51
# Shut down the tomcat server so nobody else changes anything while we backup
52
/etc/init.d/tomcat stop
53

  
54
# Shut down ldap too
55
/etc/init.d/slapd stop
56

  
57
# Backup postgres
58
su - postgres -c "pg_dump $DBNAME > $ARCHDIR/metacat-postgres-backup.sql"
59

  
60
# Backup the data files
61
tar czf $ARCHDIR/datafiles-backup.tgz --exclude=$ARCHROOT $DATADIR
62

  
63
# Backup LDAP to an LDIF file
64
slapcat -l $ARCHDIR/$DBNAME-ldap.ldif
65

  
66
# Restart LDAP
67
/etc/init.d/slapd start
68

  
69
# Restart tomcat
70
/etc/init.d/tomcat start
71

  
72
# Tar up the archive and copy it to archive media
73
cd $ARCHROOT
74
tar czf $ARCHDIR.tgz $ARCHNAME
75

  
76
# Clean up the temp files
77
rm -rf $ARCHDIR
78

  
79
# Write the backup file to DVD
80
DAY=`date +%u`
81
DVDFLAG=-M
82
if [ $DAY == $SWAPDAY ] ; then
83
  DVDFLAG=-Z
84
fi
85
growisofs $DVDFLAG $DVD -R -J $ARCHDIR.tgz
86

  
87
# clean up any of the backup files that are older than DAYSTOKEEP
88
find $ARCHROOT -mtime +$DAYSTOKEEP -exec rm -f {} \;
89 0

  
bin/measure-metacat-query-performance2.sh
1
#!/bin/bash
2
#Call a java client class to query metacat automatically and metacat server
3
#will record the performance data into a file.  This script will be put in /etc/init.d directory
4
#and called in system booting. After script is down, it will call reboot system too.
5
#So every time to excecute the quyer, memory will be in fresh.
6
#Note: before running the script, user should run both "ant jar" and "ant clientjar"
7
#in Metacat to get metaca-client.jar and metacat.jar in build directory. 
8

  
9
#variables
10
JUNIT=/usr/local/devtools/apache-ant/lib/junit-4.3.1.jar
11
PROJECT=/home/tao/project/metacat
12
METACATURL=http://chico.dyndns.org:8081/knb/metacat
13
TOMCATUSER=tao
14

  
15

  
16
QUERY=$PROJECT/test/performance_measure_query
17
TIMEFILE=$PROJECT/test/times
18
METACAT=$PROJECT/build/metacat.jar
19
METACAT_CLIENT=$PROJECT/build/metacat-client.jar
20
UTILITIES=$PROJECT/lib/utilities.jar
21

  
22
#copy the java client to build directory
23
rm -rf $PROJECT/build/tests/
24
mkdir -p $PROJECT/build/tests/edu/ucsb/nceas/metacattest
25
cp $PROJECT/test/edu/ucsb/nceas/metacattest/MetaCatQueryPerformanceTest.java $PROJECT/build/tests/edu/ucsb/nceas/metacattest/.
26

  
27
#compile the class
28
javac -classpath $JUNIT:$METACAT:$METACAT_CLIENT:$UTILITIES $PROJECT/build/tests/edu/ucsb/nceas/metacattest/MetaCatQueryPerformanceTest.java 
29

  
30

  
31
case "$1" in
32
  start)
33
    echo "Starting running query script"
34
    #Iterate to restart postgres and tomcat, and call java client class
35
    TIMES=`cat $TIMEFILE`
36
    echo "The value from TIMEFILE is $TIMES" 
37
    #if times greater than 0, it will query the metacat
38
    if [ $TIMES -gt 0 ]
39
      then
40
      #Check if postgres start successfully
41
      successPQL=false;
42
      while [ $successPQL = false ]
43
         do
44
             #if found netstat command has posgres lisenter is ready,
45
             #reset the success value to jump the while loop.
46
             for fn in `netstat -plt | grep postgres`
47
               do
48
                 #reset success value
49
                 successPQL=true
50
            done
51
      done
52
      echo "success value for starting postgres is $successPQL"
53
      #Check if tomcat start successfully
54
      successStart=false;
55
      while [ $successStart = false ]
56
        do
57
           #if found netstat command has tcomat lisenter (port 8005) is ready,
58
           #reset the success value to jump the while loop.
59
           for fn in `netstat -plt | grep 8005`
60
             do
61
                #reset success value
62
                successStart=true
63
           done
64
      done
65
     echo "success value for starting tomcat is $successStart"
66
     #run the class -- query the remote metacat
67
      java -cp $JUNIT:$METACAT:$METACAT_CLIENT:$UTILITIES:$PROJECT/build/tests edu.ucsb.nceas.metacattest.MetaCatQueryPerformanceTest $METACATURL $QUERY
68
      echo "Successfully query the metacat"
69
      #Drecease 1 from value of TIMES
70
      TIMES=`expr $TIMES - 1`
71
      echo "The new TIMES value  is $TIMES"
72
      #write the new TIMES to the file
73
      echo $TIMES >$TIMEFILE
74
      #reboot machine
75
      reboot
76
    fi
77
   ;;
78
 stop)
79
    echo "Stopping running query script - do nothing"
80
     ;;
81
  *)
82
    echo "Usage: /etc/init.d/blah {start|stop}"
83
    exit 1
84
    ;;
85
esac
86

  
87
exit 0
88
 
89 0

  
bin/check_shape_file_existence.sh
1
#!/bin/bash
2
#This file will check if shape files exist or not.
3
#If one is deleted and a email will be sent to tao with the tomcat log.
4
#Note: if file eml_message already exists in current dir, email wouldn't send again.
5
#This setting will make sure only one email will sent. Otherwise, my email account will be over quota.
6
target_file1=/var/www/org.ecoinformatics.knb/knb/data/metacat_shps/data_points.dbf
7
target_file2=/var/www/org.ecoinformatics.knb/knb/data/metacat_shps/data_points.shp
8
target_file3=/var/www/org.ecoinformatics.knb/knb/data/metacat_shps/data_points.shx
9
target_file4=/var/www/org.ecoinformatics.knb/knb/data/metacat_shps/data_bounds.dbf
10
target_file5=/var/www/org.ecoinformatics.knb/knb/data/metacat_shps/data_bounds.shp
11
target_file6=/var/www/org.ecoinformatics.knb/knb/data/metacat_shps/data_bounds.shx
12

  
13
log_file=/var/log/tomcat/catalina.out
14
sender_email_address=knb_tomcat@ecoinformatics.org
15
receiver_email_address=tao@nceas.ucsb.edu
16
tmp=/root/email_message
17
if [ ! -e $target_file1 -o ! -e $target_file2 -o ! -e $target_file3 -o ! -e $target_file4 -o ! -e $target_file5 -o ! -e $target_file6 ]
18
 then
19
   if [ ! -e $tmp ]
20
     then
21
       touch $tmp && chmod 600 $tmp
22
       echo -e "subject: Shape file was deleted at `date`\n" > $tmp
23
       echo -e "\n log file info: " >> $tmp
24
       echo -e "\n `tail -300 $log_file`" >> $tmp
25
       /usr/sbin/sendmail -f $sender_email_address $receiver_email_address < $tmp
26
   fi
27
fi
28 0

  
bin/buildIndex.sh
1
#!/bin/sh
2
#This script will send a buildIndex command to 
3
#remote metacat with docid parameter. Then metacat will build index for this docid.
4
#This script will have one argument - it is a text file name which contains docid list.
5
#The text file will look like
6
#nceas.1.1
7
#nceas.2.1
8
#nceas.3.1
9

  
10
if  [ $# -ne 1 ]
11
 then
12
    echo "USAGE: $0 docidfile"
13
    exit 1
14
fi 
15
echo 'Please type metacat url (It should look like "http://pacific.msi.ucsb.edu:8080/knb/metacat")'
16
read metacatBaseURL
17
echo 'Please type KNB user name (It should look like "uid=tao,o=NCEAS,dc=ecoinformatics,dc=org")'
18
read username
19
echo 'Please type password'
20
read password
21
date
22
#login to metacat
23
loginurl="$metacatBaseURL?action=login&username=$username&password=$password"
24
wget -q -O - --save-cookies cookies --keep-session-cookies "$loginurl"
25

  
26
suffix="?action=buildindex"
27
metacatURL="$metacatBaseURL$suffix"
28

  
29
FILE=$1
30
# make sure file exist and readable
31
if [ ! -f $FILE ]; then 
32
  	echo "$FILE : does not exists"
33
  	exit 1
34
elif [ ! -r $FILE ]; then
35
  	echo "$FILE: can not read"
36
  	exit 2
37
fi
38

  
39

  
40
index=0
41
length=3
42
# read $FILE using the file descriptors
43
exec 3<&0
44
exec 0<$FILE
45
while read line
46
do
47
    if [ "$line" != "" ]
48
    then
49
      # construct metacat with given length of docid
50
      metacatURL="$metacatURL&docid=$line"
51
      index=`expr $index + 1`
52
	    if [ $index -eq $length ]
53
	    then
54
	       echo "here is url $metacatURL"
55
	       wget -q -O - --load-cookies cookies "$metacatURL"
56
	       index=0;
57
	       metacatURL="$metacatBaseURL$suffix"
58
	    fi
59
	fi		
60
done
61

  
62
#This will send out some remained docid
63
if [ $index -ne 0 ]
64
then   
65
    echo "here is url $metacatURL"
66
    wget -q -O - --load-cookies cookies "$metacatURL"
67
fi
68

  
69
exec 0<&3
70
date
71
exit 0
72 0

  
lib/style/skins/kepler/index.html
1
<!--
2
  *  '$RCSfile$'
3
  *      Authors: Matt Jones
4
  *    Copyright: 2000 Regents of the University of California and the
5
  *               National Center for Ecological Analysis and Synthesis
6
  *  For Details: http://www.nceas.ucsb.edu/
7
  *
8
  *   '$Author$'
9
  *     '$Date$'
10
  * '$Revision$'
11
  * 
12
  * This is an HTML document for displaying metadata catalog tools
13
  *
14
  * This program is free software; you can redistribute it and/or modify
15
  * it under the terms of the GNU General Public License as published by
16
  * the Free Software Foundation; either version 2 of the License, or
17
  * (at your option) any later version.
18
  *
19
  * This program is distributed in the hope that it will be useful,
20
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22
  * GNU General Public License for more details.
23
  *
24
  * You should have received a copy of the GNU General Public License
25
  * along with this program; if not, write to the Free Software
26
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
27
-->
28
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
29
<html>
30
<head>
31
<title>Kepler Analytical Repository</title>
32
<link rel="stylesheet" href="@html-path@/style/default.css" type="text/css">
33
  <link rel="stylesheet" type="text/css" 
34
        href="@systemidserver@@style-skins-path@/kepler/kepler.css"></link>
35
  <script language="JavaScript" type="text/JavaScript"
36
          src="@systemidserver@@style-skins-path@/kepler/kepler.js"></script>
37
  <script language="JavaScript" type="text/JavaScript"
38
          src="@systemidserver@@style-common-path@/branding.js"></script>
39
</head>
40
<body>
41
      <script language="JavaScript">
42
          insertTemplateOpening();
43
          insertSearchBox();
44
      </script>
45
<table width="760" border="0" cellspacing="0" cellpadding="0">
46
  <tr><td colspan="5">
47
<p>
48
Welcome to the Kepler Analytical Repository.  This repository hosts Kepler
49
analytical components (actors) on the Ecogrid.  You can search for actors,
50
then download and import them into Kepler.  Eventually, you will be able
51
to search this repository directly from Kepler.
52
</p>
53
<p>&nbsp;</p>
54
<p><b>Repository Tools</b></p>
55
<p>
56
<menu>
57
<li><span class="searchbox">Search for Components</span><br />
58
    <menu>
59
<form method="get" action="@servlet-path@" target="_top">
60
  <input value="INTERSECT" name="operator" type="hidden">   
61
  <input size="14" name="anyfield" type="text" value="">
62
  <input name="action" value="query" type="hidden">
63
  <input name="qformat" value="kepler" type="hidden">
64
  <input name="enableediting" value="false" type="hidden">
65
  <input name="operator" value="UNION" type="hidden">
66
  <input name="pagesize" value="10" type="hidden">
67
  <input name="pagestart" value="0" type="hidden">
68
  <input name="returnfield" value="entity/@name" type="hidden">
69
  <input name="returnfield" value="entity/property[@name='karId']/@value" type="hidden">
70
  <input name="returnfield" value="entity/property[@name='KeplerDocumentation']/property[@name='author']/configure" type="hidden">
71
  <input name="returnfield" value="entity/property[@name='KeplerDocumentation']/property[@name='version']/configure" type="hidden">
72
  <input name="returnfield" value="entity/property[@name='KeplerDocumentation']/property[@name='description']/configure" type="hidden">
73
  <input name="returnfield" value="entity/property[@name='KeplerDocumentation']/property[@name='userLevelDocumentation']/configure" type="hidden">
74
  <input name="returndoctype" value="entity" type="hidden">
75
  <input value="Search" type="submit">
76
</form>
77
      The repository search system is used to locate analytical components of interest
78
      by searching through existing registered components.  
79
      Use a '%' symbol as a wildcard in searches
80
      (e.g., '%Constant%' would locate any phrase with the word
81
      'Constant' embedded within it).
82
      </menu>
83
  <p>&nbsp;</p>
84
  <li>
85
  <a href="@servlet-path@?action=query&qformat=kepler&enableediting=false&operator=UNION&returnfield=entity%2F%40name&returnfield=entity%2Fproperty%5B%40name%3D%27karId%27%5D%2F%40value&returnfield=entity%2Fproperty%5B%40name%3D%27KeplerDocumentation%27%5D%2Fproperty%5B%40name%3D%27author%27%5D%2Fconfigure&returnfield=entity%2Fproperty%5B%40name%3D%27KeplerDocumentation%27%5D%2Fproperty%5B%40name%3D%27version%27%5D%2Fconfigure&returnfield=entity%2Fproperty%5B%40name%3D%27KeplerDocumentation%27%5D%2Fproperty%5B%40name%3D%27description%27%5D%2Fconfigure&returnfield=entity%2Fproperty%5B%40name%3D%27KeplerDocumentation%27%5D%2Fproperty%5B%40name%3D%27userLevelDocumentation%27%5D%2Fconfigure&returndoctype=entity&pagestart=0&pagesize=10">Browse existing Kepler analytical components</a>
86
  <br />
87
    <menu>
88
    Browse all existing data sets by title.  This operation can slow as the
89
    number of entries in the repository grows.
90
    </menu>
91
  </li>
92
  <p>&nbsp;</p>
93
  <!--<li>Login
94
  <br />
95
  <menu>
96
  <form name="loginform" method="post" action="@servlet-path@"
97
  target="_top" onsubmit="return submitform(this);" id="loginform">
98
    <input type="hidden" name="action" value="login"> <input type=
99
    "hidden" name="username" value=""> <input type="hidden" name=
100
    "qformat" value="kepler"> <input type="hidden" name=
101
    "enableediting" value="false">
102

  
103
    <table>
104
      <tr valign="middle">
105
        <td align="left" valign="middle" class="text_plain">
106
        username:</td>
107

  
108
        <td width="173" align="left" class="text_plain" style=
109
        "padding-top: 2px; padding-bottom: 2px;"><input name="uid"
110
        type="text" style="width: 140px;" value="kepler"></td>
111
      </tr>
112

  
113
      <tr valign="middle">
114
        <td height="28" align="left" valign="middle" class=
115
        "text_plain">organization:</td>
116

  
117
        <td align="left" class="text_plain" style=
118
        "padding-top: 2px; padding-bottom: 2px;"><select name=
119
        "organization" style="width:140px;">
120
          <option value="unaffiliated">unaffiliated</option>
121
        </select></td>
122
      </tr>
123

  
124
      <tr valign="middle">
125
        <td width="85" align="left" valign="middle" class=
126
        "text_plain">password:</td>
127

  
128
        <td colspan="2" align="left" class="text_plain" style=
129
        "padding-top: 2px; padding-bottom: 2px;">
130
          <table width="100%" border="0" cellpadding="0"
131
          cellspacing="0">
132
            <tr>
133
              <td width="150" align="left"><input name="password"
134
              type="password" maxlength="50" style="width:140px;"
135
              value="kepler"></td>
136

  
137
              <td align="center" class="buttonBG_login">
138
              <input type="submit" name="loginAction" value="Login"
139
              class="button_login"></td>
140

  
141
              <td align="left">&nbsp;</td>
142
            </tr>
143
          </table>
144
        </td>
145
      </tr>
146
    </table>
147
  </form>
148
  </menu>
149
  </li>-->
150
</menu>
151
</p>
152
  </td></tr>
153
</table>
154
<p>&nbsp;</p>
155
<script language="JavaScript">          
156
    insertTemplateClosing();
157
</script>
158
</body>
159
</html>
160 0

  
lib/style/skins/kepler/header.html
1
  <!--
2
    '$RCSfile$'
3
    Copyright: 2003 Regents of the University of California and the
4
               National Center for Ecological Analysis and Synthesis
5
     '$Author$'
6
       '$Date$'
7
   '$Revision$'
8

  
9
   This program is free software; you can redistribute it and/or modify
10
   it under the terms of the GNU General Public License as published by
11
   the Free Software Foundation; either version 2 of the License, or
12
   (at your option) any later version.
13

  
14
   This program is distributed in the hope that it will be useful,
15
   but WITHOUT ANY WARRANTY; without even the implied warranty of
16
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
   GNU General Public License for more details.
18
     
19
   You should have received a copy of the GNU General Public License
20
   along with this program; if not, write to the Free Software
21
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
22
  -->
23
<!--____________________________max_width____________________________________-->
24

  
25
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
26
<html>
27
<head>
28
  <title>Kepler Analytical Repository</title>
29
  <link rel="stylesheet" type="text/css" 
30
        href="@systemidserver@@style-skins-path@/kepler/kepler.css"></link>
31
</head>
32

  
33
<body>
34
<table width="760" border="0" cellspacing="0" cellpadding="0">
35
  <tr> 
36
    <td rowspan="3" width="15%" valign="top"> 
37
      <div align="left"><img src="@systemidserver@@style-skins-path@/kepler/kepler-logo.png"></div>
38
    </td>
39
    <td valign="middle" colspan="4" class="title">Kepler Analytical Component Repository</td>
40
  </tr>
41
  <tr> 
42
    <td class="spacerrow" valign="top" colspan="4">&nbsp;</td>
43
  </tr>
44
  <tr> 
45
    <td valign="top" width="20%"> 
46
      <p><a href="http://www.kepler-project.org/" target="_top">Kepler Home</a></p>
47
    </td>
48
    <td valign="top" width="20%"> 
49
      <p><a href="@systemidserver@@style-skins-path@/kepler/index.html" target="_top">Repository Home</a></p>
50
    </td>
51
<!--
52
    <td valign="top" width="20%"> 
53
      <p><a href="@cgi-prefix@/register-dataset.cgi?cfg=kepler" target="_top">Register New Dataset</a></p>
54
    </td>
55
-->
56
    <td valign="top" width="20%"> 
57
<p class="searchbox">
58
Search for Data<br />
59
<form method="POST" action="@servlet-path@" target="_top">
60
  <input size="14" name="anyfield" type="text" value="">
61
  <input name="action" value="query" type="hidden">
62
  <input name="qformat" value="kepler" type="hidden">
63
  <input name="enableediting" value="false" type="hidden">
64
  <input name="operator" value="UNION" type="hidden">
65
  <input name="returnfield" value="entity/@name" type="hidden">
66
  <input name="returnfield" value="entity/property[@name='KeplerDocumentation']/property[@name='author']/configure" type="hidden">
67
  <input name="returnfield" value="entity/property[@name='karId']/@value" type="hidden">
68
  <input name="returnfield" value="entity/property[@name='KeplerDocumentation']/property[@name='version']/configure" type="hidden">
69
  <input name="returnfield" value="entity/property[@name='KeplerDocumentation']/property[@name='description']/configure" type="hidden">
70
  <input name="returnfield" value="entity/property[@name='KeplerDocumentation']/property[@name='userLevelDocumentation']/configure" type="hidden">
71
  <input name="returndoctype" value="entity" type="hidden">
72
  <input name="pagestart" value="0" type="hidden">
73
  <input name="pagesize" value="10" type="hidden">
74
  <!-- <input value="Start Search" type="submit"> -->
75
</form>
76
</p>
77
    </td>
78
  </tr>
79
</table>
80
</body>
81
</html>
82 0

  
lib/style/skins/kepler/searchform.html
1
<form method="POST" action="@servlet-path@" target="_top">
2
Search for: 
3
  <input value="INTERSECT" name="operator" type="hidden">   
4
  <input size="14" name="anyfield" type="text" value="">
5
  <input name="action" value="query" type="hidden">
6
  <input name="qformat" value="knp" type="hidden">
7
  <input name="enableediting" value="false" type="hidden">
8
  <input name="operator" value="UNION" type="hidden">
9
  <input name="returnfield" value="entity/@name" type="hidden">
10
  <input name="returnfield" value="entity/property[@name='KeplerDocumentation']/property[@name='author']/configure" type="hidden">
11
  <input name="returnfield" value="entity/property[@name='karId']/@value" type="hidden">
12
  <input name="returnfield" value="entity/property[@name='KeplerDocumentation']/property[@name='version']/configure" type="hidden">
13
  <input name="returnfield" value="entity/property[@name='KeplerDocumentation']/property[@name='description']/configure" type="hidden">
14
  <input name="returnfield" value="entity/property[@name='KeplerDocumentation']/property[@name='userLevelDocumentation']/configure" type="hidden">
15
  <input name="returndoctype" value="entity" type="hidden">
16
  <input name="pagestart" value="0" type="hidden">
17
  <input name="pagesize" value="10" type="hidden">
18
  <input value="Start Search" type="submit">
19
</form>
20 0

  
lib/style/skins/ltss/index.html
1
<!--
2
  *  '$RCSfile$'
3
  *    Copyright: 2004 Regents of the University of California and the
4
  *               National Center for Ecological Analysis and Synthesis
5
  *  For Details: http://www.nceas.ucsb.edu/
6
  *
7
  *   '$Author$'
8
  *     '$Date$'
9
  * '$Revision$'
10
  * 
11
  * This is an HTML document for displaying metadata catalog tools
12
  *
13
  * This program is free software; you can redistribute it and/or modify
14
  * it under the terms of the GNU General Public License as published by
15
  * the Free Software Foundation; either version 2 of the License, or
16
  * (at your option) any later version.
17
  *
18
  * This program is distributed in the hope that it will be useful,
19
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
  * GNU General Public License for more details.
22
  *
23
  * You should have received a copy of the GNU General Public License
24
  * along with this program; if not, write to the Free Software
25
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26
-->
27
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
28
<html>
29
<head>
30
<title>LTSS Data Registry</title>
31
<link rel="stylesheet" href="@html-path@/style/default.css" type="text/css">
32
  <link rel="stylesheet" type="text/css" 
33
        href="@systemidserver@@style-skins-path@/ltss/ltss.css"></link>
34
  <script language="JavaScript" type="text/JavaScript"
35
          src="@systemidserver@@style-skins-path@/ltss/ltss.js"></script>
36
  <script language="JavaScript" type="text/JavaScript"
37
          src="@systemidserver@@style-common-path@/branding.js"></script>
38
</head>
39
<body>
40
      <script language="JavaScript">
41
          insertTemplateOpening();
42
          insertSearchBox();
43
      </script>
44
<table width="760" border="0" cellspacing="0" cellpadding="0">
45
  <tr><td colspan="5">
46
<p>
47
Welcome to the Long-term Studies Section Data Registry. This is a publically 
48
accessible registry describing <b>scientific data sets on ecology and the
49
environment</b>.  In this context, we refer to a data set as the collection
50
of data tables and objects that are associated with a study, experiment,
51
or monitoring program.  Exactly what constitutes a data set is determined
52
by each submitter.  Credit for the datasets in this registry goes to the
53
investigators who collected the data (see each individual registry entry
54
for citation and attribution information as well as usage rights).
55
</p>
56
</td></tr>
57
<tr><td colspan="5">
58
<p><b>Registry Tools</b></p>
59
<p>
60
<menu>
61
<li><span class="searchbox">Search for Data</span><br />
62
    <menu>
63
<form method="POST" action="@servlet-path@" target="_top">
64
  <input value="INTERSECT" name="operator" type="hidden">   
65
  <input size="14" name="anyfield" type="text" value="">
66
  <!-- <input name="organizationName" value="Long-term Studies Section" type="hidden">-->
67
  <input name="action" value="query" type="hidden">
68
  <input name="qformat" value="ltss" type="hidden">
69
  <input name="enableediting" value="true" type="hidden">
70
  <input name="operator" value="UNION" type="hidden">
71
  <input name="returnfield" value="originator/individualName/surName" type="hidden">
72
  <input name="returnfield" value="originator/individualName/givenName" type="hidden">
73
  <input name="returnfield" value="creator/individualName/surName" type="hidden">
74
  <input name="returnfield" value="creator/individualName/givenName" type="hidden">
75
  <input name="returnfield" value="originator/organizationName" type="hidden">
76
  <input name="returnfield" value="creator/organizationName" type="hidden">
77
  <input name="returnfield" value="dataset/title" type="hidden">
78
  <input name="returnfield" value="keyword" type="hidden">
79
  <input name="returndoctype" value="eml://ecoinformatics.org/eml-2.0.1" type="hidden">
80
  <input name="returndoctype" value="eml://ecoinformatics.org/eml-2.0.0" type="hidden">
81
  <input name="returndoctype" value="-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN" type="hidden">
82
  <input name="returndoctype" value="-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN" type="hidden">
83
  <input name="returndoctype" value="-//NCEAS//resource//EN" type="hidden">
84
  <input name="returndoctype" value="-//NCEAS//eml-dataset//EN" type="hidden">
85
  <input value="Search" type="submit">
86
</form>
87
      The registry search system is used to locate data sets of interest
88
      by searching through existing registered data sets.  
89
      Presently the search covers all fields, including
90
      author, title, abstract, keywords, and other documentation
91
      for each dataset.  Use a '%' symbol as a wildcard in searches
92
      (e.g., '%biodiversity%' would locate any phrase with the word
93
      biodiversity embedded within it).
94
      </menu>
95
  </li>
96
  <li><a href="@servlet-path@?action=query&amp;operator=INTERSECT&amp;anyfield=%25&amp;qformat=ltss&amp;enableediting=true&amp;returndoctype=eml://ecoinformatics.org/eml-2.0.1&amp;returndoctype=eml://ecoinformatics.org/eml-2.0.0&amp;returndoctype=-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN&amp;returndoctype=-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN&amp;returnfield=dataset/title&amp;returnfield=keyword&amp;returnfield=originator/individualName/surName&amp;returnfield=creator/individualName/surName&amp;returnfield=originator/organizationName&amp;returnfield=creator/organizationName">Browse data sets</a><br />
97
    <menu>
98
    Browse all existing data sets by title.  This operation can be slow as the
99
    number of entries in the registry grows.
100
    </menu>
101
  </li>
102
  <p>&nbsp;</p>
103
  <li><a href="@cgi-prefix@/register-dataset.cgi?cfg=ltss">Register a new 
104
       data set</a><br />
105
    <menu>
106
      The registration page is used to submit information about a <b>new</b>
107
      data set regarding ecology or the environment.  The documentation about 
108
      the data set will be submitted to the Registry.  You (and only
109
      you, or your designee) can return to edit the entry
110
      at a later point in time to add to or correct the
111
      description.  You can also use other tools such as <a
112
      href="http://knb.ecoinformatics.org/morphoportal.jsp">Morpho</a> to
113
      further document the set of data and directly attach the data to the
114
      registry entry.
115
    </menu>
116
  </li>
117
  <p>&nbsp;</p>
118
  <li><a href="@cgi-prefix@/ldapweb.cgi?cfg=ltss">Create a new account</a>
119
    <ul>
120
        <li><a href="@cgi-prefix@/ldapweb.cgi?cfg=ltss&amp;stage=changepass">Change your password</a>
121
        <li><a href="@cgi-prefix@/ldapweb.cgi?cfg=ltss&amp;stage=resetpass">Reset your password</a>
122
    </ul>
123
    <br />
124
    <menu>
125
      The account management tools are used to create and manage registry 
126
      accounts.   Accounts are free, and are used to identify contributors
127
      so that they can maintain their entries in the future.  
128
    </menu>
129
  </li>
130
</menu>
131
</p>
132
  </td></tr>
133
  <tr><td>
134
    <p>
135
    This project is a cooperative effort of the <a
136
    href="http://www.esa.org/longterm/">Long-Term Studies Section (LTSS)</a>
137
    of the ESA, the <a href="http://www.nceas.ucsb.edu">National
138
    Center for Ecological Analysis and Synthesis (NCEAS)</a> and the <a
139
    href="http://www.lternet.edu">Long-Term Ecological Research Network
140
    (LTER)</a>.  The Data Registry is based on software developed by
141
    the <a href="http://knb.ecoinformatics.org">Knowledge Network for
142
    Biocomplexity (KNB)</a>, and houses metadata that are compliant with <a
143
    href="http://knb.ecoinformatics.org/software/eml/">Ecological Metadata
144
    Language (EML)</a>.  Consequently, data registered in this registry
145
    also are accessible from the larger collection of data found in the
146
    <a href="http://knb.ecoinformatics.org">KNB registry</a>.  Other sites
147
    contributing to the KNB registry include:
148
    <ul>
149
    <li><a href="http://knb.ecoinformatics.org/knb/obfs">Organization of
150
    Biological Field Stations registry</a>  </li>
151
    <li><a href="http://knb.ecoinformatics.org/knb/style/skins/nrs">UC
152
    Natural Reserve System registry</a>  </li>
153
    <li><a href="http://knb.ecoinformatics.org/knb/style/skins/nceas">NCEAS
154
    registry</a>  </li>
155
    <li><a href="http://knb.ecoinformatics.org/knb/style/skins/specnet">
156
    SpecNet registry</a>  </li>
157
    </ul>
158
    </p>
159
  </td></tr>
160
</table>
161
<p>&nbsp;</p>
162
<p>&nbsp;</p>
163
<script language="JavaScript">          
164
    insertTemplateClosing();
165
</script>
166
</body>
167
</html>
168 0

  
lib/style/skins/ltss/header.html
1
  <!--
2
    '$RCSfile$'
3
    Copyright: 2004 Regents of the University of California and the
4
               National Center for Ecological Analysis and Synthesis
5
     '$Author$'
6
       '$Date$'
7
   '$Revision$'
8

  
9
   This program is free software; you can redistribute it and/or modify
10
   it under the terms of the GNU General Public License as published by
11
   the Free Software Foundation; either version 2 of the License, or
12
   (at your option) any later version.
13

  
14
   This program is distributed in the hope that it will be useful,
15
   but WITHOUT ANY WARRANTY; without even the implied warranty of
16
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
   GNU General Public License for more details.
18
     
19
   You should have received a copy of the GNU General Public License
20
   along with this program; if not, write to the Free Software
21
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
22
  -->
23
<!--____________________________max_width____________________________________-->
24

  
25
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
26
<html>
27
<head>
28
  <title>LTSS Data Registry</title>
29
  <link rel="stylesheet" type="text/css" 
30
        href="@systemidserver@@style-skins-path@/ltss/ltss.css"></link>
31
</head>
32

  
33
<body>
34
<table width="760" border="0" cellspacing="0" cellpadding="0">
35
  <tr> 
36
    <td rowspan="3" width="20%" valign="top"> 
37
      <div align="left"><img src="@systemidserver@@style-skins-path@/ltss/ltss-logo.gif"></div>
38
    </td>
39
    <td valign="middle" colspan="4" class="title">LTSS Data Registry</td>
40
  </tr>
41
  <tr> 
42
    <td class="spacerrow" valign="top" colspan="4">&nbsp;</td>
43
  </tr>
44
  <tr> 
45
    <td valign="top" width="20%"> 
46
      <p><a href="http://www.esa.org/longterm" target="_top"> LTSS Home</a></p>
47
    </td>
48
    <td valign="top" width="20%"> 
49
      <p><a href="@systemidserver@@style-skins-path@/ltss/index.html" target="_top">Registry Home</a></p>
50
    </td>
51
    <td valign="top" width="20%"> 
52
      <p><a href="@cgi-prefix@/register-dataset.cgi?cfg=ltss" target="_top">Register a <br>New Data Set</a></p>
53
    </td>
54
    <td valign="top" width="20%"> 
55
<p class="searchbox">
56
Search for Data<br />
57
<form method="POST" action="@servlet-path@" target="_top">
58
  <input value="INTERSECT" name="operator" type="hidden">   
59
  <input size="14" name="anyfield" type="text" value="">
60
  <!-- <input name="organizationName" value="Long-term Studies Section" type="hidden">-->
61
  <input name="action" value="query" type="hidden">
62
  <input name="qformat" value="ltss" type="hidden">
63
  <input name="enableediting" value="true" type="hidden">
64
  <input name="operator" value="UNION" type="hidden">
65
  <input name="returnfield" value="originator/individualName/surName" type="hidden">
66
  <input name="returnfield" value="originator/individualName/givenName" type="hidden">
67
  <input name="returnfield" value="creator/individualName/surName" type="hidden">
68
  <input name="returnfield" value="creator/individualName/givenName" type="hidden">
69
  <input name="returnfield" value="originator/organizationName" type="hidden">
70
  <input name="returnfield" value="creator/organizationName" type="hidden">
71
  <input name="returnfield" value="dataset/title" type="hidden">
72
  <input name="returnfield" value="keyword" type="hidden">
73
  <input name="returndoctype" value="eml://ecoinformatics.org/eml-2.0.1" type="hidden">
74
  <input name="returndoctype" value="eml://ecoinformatics.org/eml-2.0.0" type="hidden">
75
  <input name="returndoctype" value="-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN" type="hidden">
76
  <input name="returndoctype" value="-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN" type="hidden">
77
  <input name="returndoctype" value="-//NCEAS//resource//EN" type="hidden">
78
  <input name="returndoctype" value="-//NCEAS//eml-dataset//EN" type="hidden">
79
  <!-- <input value="Start Search" type="submit"> -->
80
</form>
81
</p>
82
    </td>
83
  </tr>
84
</table>
85
</body>
86
</html>
87 0

  
lib/style/skins/ltss/searchform.html
1
<form method="POST" action="@servlet-path@" target="_top">
2
Search for: 
3
  <input value="INTERSECT" name="operator" type="hidden">   
4
  <input size="14" name="anyfield" type="text" value="">
5
  <!--<input name="organizationName" value="Long-term Studies Section" type="hidden">-->
6
  <input name="action" value="query" type="hidden">
7
  <input name="qformat" value="ltss" type="hidden">
8
  <input name="enableediting" value="true" type="hidden">
9
  <input name="operator" value="UNION" type="hidden">
10
  <input name="returnfield" value="originator/individualName/surName" type="hidden">
11
  <input name="returnfield" value="originator/individualName/givenName" type="hidden">
12
  <input name="returnfield" value="creator/individualName/surName" type="hidden">
13
  <input name="returnfield" value="creator/individualName/givenName" type="hidden">
14
  <input name="returnfield" value="originator/organizationName" type="hidden">
15
  <input name="returnfield" value="creator/organizationName" type="hidden">
16
  <input name="returnfield" value="dataset/title" type="hidden">
17
  <input name="returnfield" value="keyword" type="hidden">
18
  <input name="returndoctype" value="eml://ecoinformatics.org/eml-2.0.1" type="hidden">
19
  <input name="returndoctype" value="eml://ecoinformatics.org/eml-2.0.0" type="hidden">
20
  <input name="returndoctype" value="-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN" type="hidden">
21
  <input name="returndoctype" value="-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN" type="hidden">
22
  <input name="returndoctype" value="-//NCEAS//resource//EN" type="hidden">
23
  <input name="returndoctype" value="-//NCEAS//eml-dataset//EN" type="hidden">
24
  <input value="Start Search" type="submit">
25
</form>
26 0

  
lib/style/skins/knp/searchform.html
1
<form method="POST" action="@servlet-path@" target="_top">
2
Search for: 
3
  <input value="INTERSECT" name="operator" type="hidden">   
4
  <input size="14" name="anyfield" type="text" value="">
5
  <!-- <input name="organizationName" value="Kruger National Park" type="hidden"> -->
6
  <input name="action" value="query" type="hidden">
7
  <input name="qformat" value="knp" type="hidden">
8
  <input name="enableediting" value="false" type="hidden">
9
  <input name="operator" value="UNION" type="hidden">
10
  <input name="returnfield" value="originator/individualName/surName" type="hidden">
11
  <input name="returnfield" value="originator/individualName/givenName" type="hidden">
12
  <input name="returnfield" value="creator/individualName/surName" type="hidden">
13
  <input name="returnfield" value="creator/individualName/givenName" type="hidden">
14
  <input name="returnfield" value="originator/organizationName" type="hidden">
15
  <input name="returnfield" value="creator/organizationName" type="hidden">
16
  <input name="returnfield" value="dataset/title" type="hidden">
17
  <input name="returnfield" value="keyword" type="hidden">
18
  <input name="returndoctype" value="eml://ecoinformatics.org/eml-2.0.1" type="hidden">
19
  <input name="returndoctype" value="eml://ecoinformatics.org/eml-2.0.0" type="hidden">
20
  <input name="returndoctype" value="-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN" type="hidden">
21
  <input name="returndoctype" value="-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN" type="hidden">
22
  <input name="returndoctype" value="-//NCEAS//resource//EN" type="hidden">
23
  <input name="returndoctype" value="-//NCEAS//eml-dataset//EN" type="hidden">
24
  <input value="Start Search" type="submit">
25
</form>
26 0

  
lib/style/skins/default/session_vars.jsp
122 122
			
123 123
			} else {   // ...or create it if it doesn't already exist
124 124
				try {
125
					metacat = MetacatFactory.createMetacatConnection(METACAT_URL);
125
					metacat = MetacatFactory.createMetacatConnection(SERVLET_URL);
126 126
				} catch (MetacatInaccessibleException mie) {
127
					throw new ServletException("Metacat connection to "+METACAT_URL
127
					throw new ServletException("Metacat connection to "+SERVLET_URL
128 128
                                                +" failed." + mie.getMessage());
129 129
				}
130 130
				if (metacat==null) {
131
					throw new ServletException("Metacat connection to "+METACAT_URL
131
					throw new ServletException("Metacat connection to "+SERVLET_URL
132 132
                                          +" failed - Metacat object is NULL!");
133 133
				}
134 134
				rfSession.setAttribute("sess_metacatObj", metacat);
......
185 185
	<tr> 
186 186
		<td colspan="4" align="left" valign="top" class="text_plain" bgcolor="#ffff00">
187 187
			<ul>
188
				<li>METACAT_URL:&nbsp;<%=METACAT_URL%></li>
188
				<li>SERVLET_URL:&nbsp;<%=SERVLET_URL%></li>
189 189
				<li>rfSession:&nbsp;<%=rfSession%></li>
190 190
				<li>metacatResponse:&nbsp;<%=metacatResponse%></li>
191 191
				<li>posted_ldapUserName:&nbsp;<%=posted_ldapUserName%></li>
lib/style/skins/default/settings.jsp
1
<%@page import="edu.ucsb.nceas.metacat.MetaCatUtil"%>
2 1
<%@ page errorPage="jsperrorpage.html"  import="javax.servlet.http.*" %>
3
<!--
4
  *   '$RCSfile$'
5
  *     Authors: Matthew Brooke
6
  *   Copyright: 2000 Regents of the University of California and the
7
  *              National Center for Ecological Analysis and Synthesis
8
  * For Details: http://www.nceas.ucsb.edu/
9
  *
10
  *    '$Author$'
11
  *      '$Date$'
12
  *  '$Revision$'
13
  *
14
  * Settings file for the default metacat skin
15
  *
16
  * This program is free software; you can redistribute it and/or modify
17
  * it under the terms of the GNU General Public License as published by
18
  * the Free Software Foundation; either version 2 of the License, or
19
  * (at your option) any later version.
20
  *
21
  * This program is distributed in the hope that it will be useful,
22
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
23
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24
  * GNU General Public License for more details.
25
  *
26
  * You should have received a copy of the GNU General Public License
27
  * along with this program; if not, write to the Free Software
28
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
29
-->
30 2
<%
3
/*
4
 *   '$RCSfile$'
5
 *     Authors: Matthew Brooke
6
 *   Copyright: 2000 Regents of the University of California and the
7
 *              National Center for Ecological Analysis and Synthesis
8
 * For Details: http://www.nceas.ucsb.edu/
9
 *
10
 *    '$Author$'
11
 *      '$Date$'
12
 *  '$Revision$'
13
 *
14
 * Settings file for the default metacat skin
15
 *
16
 * This program is free software; you can redistribute it and/or modify
17
 * it under the terms of the GNU General Public License as published by
18
 * the Free Software Foundation; either version 2 of the License, or
19
 * (at your option) any later version.
20
 *
21
 * This program is distributed in the hope that it will be useful,
22
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24
 * GNU General Public License for more details.
25
 *
26
 * You should have received a copy of the GNU General Public License
27
 * along with this program; if not, write to the Free Software
28
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
29
 */
30
%>
31 31

  
32
// GLOBAL CONSTANTS FOR KNB PORTAL PAGE /////////////////////////////////////
33
   
34
   // CONTEXT NAME of metacat installed:
35
	String      CONTEXT_NAME          = request.getContextPath();
36
	
37
	// URL of SERVER with context (and optional port)
38
	String     SERVER_URL_WITH_CONTEXT =  request.getScheme() + "://" + request.getServerName();
39
	if ( request.getLocalPort() != 80 ) {
40
		SERVER_URL_WITH_CONTEXT += ":" + request.getLocalPort();
41
	}
42
	SERVER_URL_WITH_CONTEXT += CONTEXT_NAME;
32
<%@ include file="../../common/common-settings.jsp"%>
43 33

  
44
	// URL of metacat to be used for login & searching:
45
	String      METACAT_URL           =  SERVER_URL_WITH_CONTEXT+ "/metacat";
46
	
47
	// URL for LDAP login
48
	String LDAP_CGI_PREFIX = MetaCatUtil.getOption("cgi-prefix");
34
<%
49 35

  
50
	// label for logout form button when user *is* logged in:
51
	String      LOGOUT_LABEL          = "Logout";
36
// GLOBAL CONSTANTS FOR KNB PORTAL PAGE /////////////////////////////////////
52 37

  
53
	// label for login form button when user is *not* logged in:
54
	String      LOGIN_LABEL           = "Login";
55

  
56
	// last part of LDAP username to be appended after organization
57
	String      LDAP_DOMAIN           = ",dc=ecoinformatics,dc=org";
58

  
59 38
	// if true, POST variables echoed at bottom of client's browser window in a big yellow box
60
    boolean     DEBUG_TO_BROWSER      = false;
39
    // Set this value to override the global value
40
    // boolean     DEBUG_TO_BROWSER      = false;
61 41

  
42
    // Add any local post fields to COMMON_SEARCH_METACAT_POST_FIELDS, 
43
    // SIMPLE_SEARCH_METACAT_POST_FIELDS, and ADVANCED_SEARCH_METACAT_POST_FIELD here
44
	COMMON_SEARCH_METACAT_POST_FIELDS +=
45
          "<input type=\"hidden\" name=\"qformat\"       value=\"default\"\\>\n";
46
              
47
    SIMPLE_SEARCH_METACAT_POST_FIELDS +=
48
          "<input type=\"hidden\" name=\"qformat\"       value=\"default\"\\>\n";
62 49

  
63
	String      COMMON_SEARCH_METACAT_POST_FIELDS   =
64
							 "<input type=\"hidden\" name=\"action\"        value=\"query\"\\>\n"
65
              +"<input type=\"hidden\" name=\"qformat\"       value=\"default\"\\>\n"
66
              +"<input type=\"hidden\" name=\"returnfield\"   value=\"originator/individualName/surName\"\\>\n"
67
              +"<input type=\"hidden\" name=\"returnfield\"   value=\"originator/individualName/givenName\"\\>\n"
68
              +"<input type=\"hidden\" name=\"returnfield\"   value=\"originator/organizationName\"\\>\n"
69
              +"<input type=\"hidden\" name=\"returnfield\"   value=\"creator/individualName/surName\"\\>\n"
70
              +"<input type=\"hidden\" name=\"returnfield\"   value=\"creator/organizationName\"\\>\n"
71
              +"<input type=\"hidden\" name=\"returnfield\"   value=\"dataset/title\"\\>\n"
72
              +"<input type=\"hidden\" name=\"returnfield\"   value=\"keyword\"\\>\n"
73
              +"<input type=\"hidden\" name=\"returndoctype\" value=\"-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN\"\\>\n"
74
              +"<input type=\"hidden\" name=\"returndoctype\" value=\"-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN\"\\>\n"
75
              +"<input type=\"hidden\" name=\"returndoctype\" value=\"eml://ecoinformatics.org/eml-2.0.0\"\\>\n"
76
              +"<input type=\"hidden\" name=\"returndoctype\" value=\"eml://ecoinformatics.org/eml-2.0.1\"\\>\n"
77
              +"<input type=\"hidden\" name=\"returndoctype\" value=\"-//NCEAS//eml-dataset-2.0//EN\"\\>\n"
78
              +"<input type=\"hidden\" name=\"returndoctype\" value=\"-//NCEAS//resource//EN\"\\>\n";
79

  
80
	String      SIMPLE_SEARCH_METACAT_POST_FIELDS   =
81
							  "<input type=\"hidden\" name=\"operator\"      value=\"UNION\"\\>\n"
82
                +COMMON_SEARCH_METACAT_POST_FIELDS;
83

  
84
	String      ADVANCED_SEARCH_METACAT_POST_FIELDS   =
85
							  "<input type=\"hidden\" name=\"operator\"      value=\"INTERSECT\"\\>\n"
86
                +COMMON_SEARCH_METACAT_POST_FIELDS;
87

  
88
/*******************************************************************************/
89
/*******************************************************************************/
50
    ADVANCED_SEARCH_METACAT_POST_FIELDS +=
51
          "<input type=\"hidden\" name=\"qformat\"       value=\"default\"\\>\n";
52
            	   
90 53
%>
lib/style/skins/ltss/index.jsp
1
<%@ page    language="java" %>
2
<%
3
/**
4
 *  '$RCSfile$'
5
 *    Copyright: 2004 Regents of the University of California and the
6
 *               National Center for Ecological Analysis and Synthesis
7
 *  For Details: http://www.nceas.ucsb.edu/
8
 *
9
 *   '$Author$'
10
 *     '$Date$'
11
 * '$Revision$'
12
 * 
13
 * This is an HTML document for displaying metadata catalog tools
14
 *
15
 * This program is free software; you can redistribute it and/or modify
16
 * it under the terms of the GNU General Public License as published by
17
 * the Free Software Foundation; either version 2 of the License, or
18
 * (at your option) any later version.
19
 *
20
 * This program is distributed in the hope that it will be useful,
21
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23
 * GNU General Public License for more details.
24
 *
25
 * You should have received a copy of the GNU General Public License
26
 * along with this program; if not, write to the Free Software
27
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
28
 */
29
 %>
30

  
31
 <%@ include file="../../common/common-settings.jsp"%>
32

  
33
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
34
<html>
35
<head>
36
<title>LTSS Data Registry</title>
37
  <link rel="stylesheet" type="text/css" 
38
        href="<%=STYLE_SKINS_URL%>/ltss/ltss.css"></link>
39
  <script language="JavaScript" type="text/JavaScript"
40
          src="<%=STYLE_SKINS_URL%>/ltss/ltss.js"></script>
41
  <script language="JavaScript" type="text/JavaScript"
42
          src="<%=STYLE_COMMON_URL%>/branding.js"></script>
43
</head>
44
<body>
45
      <script language="JavaScript">
46
          insertTemplateOpening("<%=SERVER_URL_WITH_CONTEXT%>");
47
          insertSearchBox("<%=SERVER_URL_WITH_CONTEXT%>");
48
      </script>
49
<table width="760" border="0" cellspacing="0" cellpadding="0">
50
  <tr><td colspan="5">
51
<p>
52
Welcome to the Long-term Studies Section Data Registry. This is a publically 
53
accessible registry describing <b>scientific data sets on ecology and the
54
environment</b>.  In this context, we refer to a data set as the collection
55
of data tables and objects that are associated with a study, experiment,
56
or monitoring program.  Exactly what constitutes a data set is determined
57
by each submitter.  Credit for the datasets in this registry goes to the
58
investigators who collected the data (see each individual registry entry
59
for citation and attribution information as well as usage rights).
60
</p>
61
</td></tr>
62
<tr><td colspan="5">
63
<p><b>Registry Tools</b></p>
64
<p>
65
<menu>
66
<li><span class="searchbox">Search for Data</span><br />
67
    <menu>
68
<form method="POST" action="<%=SERVLET_URL%>" target="_top">
69
  <input value="INTERSECT" name="operator" type="hidden">   
70
  <input size="14" name="anyfield" type="text" value="">
71
  <!-- <input name="organizationName" value="Long-term Studies Section" type="hidden">-->
72
  <input name="action" value="query" type="hidden">
73
  <input name="qformat" value="ltss" type="hidden">
74
  <input name="enableediting" value="true" type="hidden">
75
  <input name="operator" value="UNION" type="hidden">
76
  <input name="returnfield" value="originator/individualName/surName" type="hidden">
77
  <input name="returnfield" value="originator/individualName/givenName" type="hidden">
78
  <input name="returnfield" value="creator/individualName/surName" type="hidden">
79
  <input name="returnfield" value="creator/individualName/givenName" type="hidden">
80
  <input name="returnfield" value="originator/organizationName" type="hidden">
81
  <input name="returnfield" value="creator/organizationName" type="hidden">
82
  <input name="returnfield" value="dataset/title" type="hidden">
83
  <input name="returnfield" value="keyword" type="hidden">
84
  <input name="returndoctype" value="eml://ecoinformatics.org/eml-2.0.1" type="hidden">
85
  <input name="returndoctype" value="eml://ecoinformatics.org/eml-2.0.0" type="hidden">
86
  <input name="returndoctype" value="-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN" type="hidden">
87
  <input name="returndoctype" value="-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN" type="hidden">
88
  <input name="returndoctype" value="-//NCEAS//resource//EN" type="hidden">
89
  <input name="returndoctype" value="-//NCEAS//eml-dataset//EN" type="hidden">
90
  <input value="Search" type="submit">
91
</form>
92
      The registry search system is used to locate data sets of interest
93
      by searching through existing registered data sets.  
94
      Presently the search covers all fields, including
95
      author, title, abstract, keywords, and other documentation
96
      for each dataset.  Use a '%' symbol as a wildcard in searches
97
      (e.g., '%biodiversity%' would locate any phrase with the word
98
      biodiversity embedded within it).
99
      </menu>
100
  </li>
101
  <li><a href="<%=SERVLET_URL%>?action=query&amp;operator=INTERSECT&amp;anyfield=%25&amp;qformat=ltss&amp;enableediting=true&amp;returndoctype=eml://ecoinformatics.org/eml-2.0.1&amp;returndoctype=eml://ecoinformatics.org/eml-2.0.0&amp;returndoctype=-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN&amp;returndoctype=-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN&amp;returnfield=dataset/title&amp;returnfield=keyword&amp;returnfield=originator/individualName/surName&amp;returnfield=creator/individualName/surName&amp;returnfield=originator/organizationName&amp;returnfield=creator/organizationName">Browse data sets</a><br />
102
    <menu>
103
    Browse all existing data sets by title.  This operation can be slow as the
104
    number of entries in the registry grows.
105
    </menu>
106
  </li>
107
  <p>&nbsp;</p>
108
  <li><a href="<%=CGI_URL%>/register-dataset.cgi?cfg=ltss">Register a new 
109
       data set</a><br />
110
    <menu>
111
      The registration page is used to submit information about a <b>new</b>
112
      data set regarding ecology or the environment.  The documentation about 
113
      the data set will be submitted to the Registry.  You (and only
114
      you, or your designee) can return to edit the entry
115
      at a later point in time to add to or correct the
116
      description.  You can also use other tools such as <a
117
      href="http://knb.ecoinformatics.org/morphoportal.jsp">Morpho</a> to
118
      further document the set of data and directly attach the data to the
119
      registry entry.
120
    </menu>
121
  </li>
122
  <p>&nbsp;</p>
123
  <li><a href="<%=CGI_URL%>/ldapweb.cgi?cfg=ltss">Create a new account</a>
124
    <ul>
125
        <li><a href="<%=CGI_URL%>/ldapweb.cgi?cfg=ltss&amp;stage=changepass">Change your password</a>
126
        <li><a href="<%=CGI_URL%>/ldapweb.cgi?cfg=ltss&amp;stage=resetpass">Reset your password</a>
127
    </ul>
128
    <br />
129
    <menu>
130
      The account management tools are used to create and manage registry 
131
      accounts.   Accounts are free, and are used to identify contributors
132
      so that they can maintain their entries in the future.  
133
    </menu>
134
  </li>
135
</menu>
136
</p>
137
  </td></tr>
138
  <tr><td>
139
    <p>
140
    This project is a cooperative effort of the <a
141
    href="http://www.esa.org/longterm/">Long-Term Studies Section (LTSS)</a>
142
    of the ESA, the <a href="http://www.nceas.ucsb.edu">National
143
    Center for Ecological Analysis and Synthesis (NCEAS)</a> and the <a
144
    href="http://www.lternet.edu">Long-Term Ecological Research Network
145
    (LTER)</a>.  The Data Registry is based on software developed by
146
    the <a href="http://knb.ecoinformatics.org">Knowledge Network for
147
    Biocomplexity (KNB)</a>, and houses metadata that are compliant with <a
148
    href="http://knb.ecoinformatics.org/software/eml/">Ecological Metadata
149
    Language (EML)</a>.  Consequently, data registered in this registry
150
    also are accessible from the larger collection of data found in the
151
    <a href="http://knb.ecoinformatics.org">KNB registry</a>.  Other sites
152
    contributing to the KNB registry include:
153
    <ul>
154
    <li><a href="http://knb.ecoinformatics.org/knb/obfs">Organization of
155
    Biological Field Stations registry</a>  </li>
156
    <li><a href="http://knb.ecoinformatics.org/knb/style/skins/nrs">UC
157
    Natural Reserve System registry</a>  </li>
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff