Revision 203
Added by Matt Jones almost 24 years ago
MetaCatUtil.java | ||
---|---|---|
1 | 1 |
/** |
2 |
* Name: MetaCatUtil.java
|
|
3 |
* Purpose: A Class that implements utility methods for a metadata catalog |
|
4 |
* Copyright: 2000 Regents of the University of California and the |
|
5 |
* National Center for Ecological Analysis and Synthesis |
|
6 |
* Authors: Matt Jones |
|
2 |
* '$RCSfile$'
|
|
3 |
* Purpose: A Class that implements utility methods for a metadata catalog
|
|
4 |
* Copyright: 2000 Regents of the University of California and the
|
|
5 |
* National Center for Ecological Analysis and Synthesis
|
|
6 |
* Authors: Matt Jones
|
|
7 | 7 |
* |
8 |
* Version: '$Id$' |
|
8 |
* '$Author$' |
|
9 |
* '$Date$' |
|
10 |
* '$Revision$' |
|
9 | 11 |
*/ |
10 | 12 |
|
11 | 13 |
package edu.ucsb.nceas.metacat; |
... | ... | |
25 | 27 |
|
26 | 28 |
private PropertyResourceBundle options = null; |
27 | 29 |
private static String propertiesFile = "edu.ucsb.nceas.metacat.metacat"; |
30 |
private static boolean debug = false; |
|
28 | 31 |
|
29 | 32 |
/** |
30 | 33 |
* Construct an instance of the utility class |
... | ... | |
103 | 106 |
* |
104 | 107 |
* @param flag an integer indicating the message number |
105 | 108 |
*/ |
106 |
public static void dbg(int flag) { |
|
107 |
System.err.println("DEBUG FLAG: " + flag); |
|
109 |
public static void debugMessage(int flag) { |
|
110 |
if (debug) { |
|
111 |
System.err.println("DEBUG FLAG: " + flag); |
|
112 |
} |
|
108 | 113 |
} |
114 |
|
|
115 |
/** |
|
116 |
* Utility method to print debugging messages |
|
117 |
* |
|
118 |
* @param flag an integer indicating the message number |
|
119 |
*/ |
|
120 |
public static void debugMessage(String msg) { |
|
121 |
if (debug) { |
|
122 |
System.err.println(msg); |
|
123 |
} |
|
124 |
} |
|
109 | 125 |
} |
126 |
|
|
127 |
/** |
|
128 |
* '$Log$ |
|
129 |
* 'Revision 1.9.2.4 2000/06/26 00:51:06 jones |
|
130 |
* 'If docid passed to DBWriter.write() is not unique, classes now generate |
|
131 |
* 'an AccessionNumberException containing the new docid generated as a |
|
132 |
* 'replacement. The docid is then extracted from the exception and |
|
133 |
* 'returned to the calling application for user feedback or client processing. |
|
134 |
* ' |
|
135 |
* 'Revision 1.9.2.3 2000/06/25 23:38:17 jones |
|
136 |
* 'Added RCSfile keyword |
|
137 |
* ' |
|
138 |
* 'Revision 1.9.2.2 2000/06/25 23:34:18 jones |
|
139 |
* 'Changed documentation formatting, added log entries at bottom of source files |
|
140 |
* '' |
|
141 |
*/ |
Also available in: Unified diff
Merged in substantial changes to DBWriter and associated classes and to
the MetaCatServlet in order to accomodate the new UPDATE and DELETE
functions. The command line tools and the parameters for the
servlet have changed substantially.