Project

General

Profile

« Previous | Next » 

Revision 3122

Added by perry over 17 years ago

Minor updates to python module ... default urls and license info

View differences:

src/python/metacat.py
1 1
#!/usr/bin/python
2 2
#
3
#  '$RCSfile$'
4
#  Copyright: 2000 Regents of the University of California
5
#
6
#   '$Author$'
7
#     '$Date$'
8
# '$Revision$'
9
#
10
# This program is free software; you can redistribute it and/or modify
11
# it under the terms of the GNU General Public License as published by
12
# the Free Software Foundation; either version 2 of the License, or
13
# (at your option) any later version.
14
#
15
# This program is distributed in the hope that it will be useful,
16
# but WITHOUT ANY WARRANTY; without even the implied warranty of
17
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
# GNU General Public License for more details.
19
#
20
# You should have received a copy of the GNU General Public License
21
# along with this program; if not, write to the Free Software
22
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23
#
3 24
# TODO:
4 25
#  validate
5 26
#  getNextDocid
......
12 33

  
13 34
class MetacatClient:
14 35

  
15
    def __init__(self, server="pmark.msi.ucsb.edu:8180", urlPath="/knb_test/metacat"):
36
    def __init__(self, server="knb.ecoinformatics.org", urlPath="/knb/metacat"):
16 37
        self.metacatUrlPath = urlPath
17 38
        self.metacatServer = server
18 39
        self.sessionid = None
......
115 136
        if response.status == 200:
116 137
           content = response.read()
117 138
        else:
118
           print " !!! SERVER DID NOT RETURN 'OK'.... STATUS is " + str(response.status) 
139
           print " SERVER DID NOT RETURN 'OK'.... STATUS is " + str(response.status) 
119 140
           content = ""
120 141
        conn.close()
121 142
        return content
src/python/transferEml.py
1 1
#!/usr/bin/python
2
#
3
#  '$RCSfile$'
4
#  Copyright: 2000 Regents of the University of California
5
#
6
#   '$Author$'
7
#     '$Date$'
8
# '$Revision$'
9
#
10
# This program is free software; you can redistribute it and/or modify
11
# it under the terms of the GNU General Public License as published by
12
# the Free Software Foundation; either version 2 of the License, or
13
# (at your option) any later version.
14
#
15
# This program is distributed in the hope that it will be useful,
16
# but WITHOUT ANY WARRANTY; without even the implied warranty of
17
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
# GNU General Public License for more details.
19
#
20
# You should have received a copy of the GNU General Public License
21
# along with this program; if not, write to the Free Software
22
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23
#
2 24
"""
3
 Transfers documents from one metacat server to another
4
 Author: matt perry
5
 Date: 09/28/06
25
 Transfers list of documents from one metacat server to another
6 26
"""
7 27

  
8 28
import metacat

Also available in: Unified diff