1 |
203
|
jones
|
/**
|
2 |
|
|
* '$RCSfile$'
|
3 |
|
|
* Purpose: An Exception thrown when an error occurs because an
|
4 |
|
|
* AccessionNumber was invalid or used incorrectly
|
5 |
|
|
* Copyright: 2000 Regents of the University of California and the
|
6 |
|
|
* National Center for Ecological Analysis and Synthesis
|
7 |
|
|
* Authors: Matt Jones
|
8 |
|
|
*
|
9 |
|
|
* '$Author$'
|
10 |
|
|
* '$Date$'
|
11 |
|
|
* '$Revision$'
|
12 |
|
|
*/
|
13 |
|
|
|
14 |
|
|
package edu.ucsb.nceas.metacat;
|
15 |
|
|
|
16 |
|
|
/**
|
17 |
|
|
* Exception thrown when an error occurs because an AccessionNumber was
|
18 |
|
|
* invalid or used incorrectly.
|
19 |
|
|
*
|
20 |
|
|
* Accession numbers are invalid under the following conditions:
|
21 |
|
|
* 1) INSERT mode, and the provided accesion # doesn't contain "sep"
|
22 |
|
|
* 2) UPDATE mode, and no accession # provided
|
23 |
|
|
* 3) UPDATE mode, and accession # doesn't exist in xml_documents table
|
24 |
|
|
* 4) DELETE mode, and no accession # provided
|
25 |
|
|
* 5) DELETE mode, and accession # doesn't exist in xml_documents table
|
26 |
|
|
*/
|
27 |
|
|
public class AccessionNumberException extends Exception {
|
28 |
|
|
/**
|
29 |
|
|
* Create a new AccessionNumberException.
|
30 |
|
|
*
|
31 |
|
|
* @param message The error or warning message.
|
32 |
|
|
*/
|
33 |
|
|
public AccessionNumberException(String message) {
|
34 |
|
|
super(message);
|
35 |
|
|
}
|
36 |
|
|
}
|
37 |
|
|
|
38 |
|
|
/**
|
39 |
|
|
* '$Log$
|
40 |
|
|
* 'Revision 1.1.2.1 2000/06/25 23:55:50 jones
|
41 |
|
|
* 'Added AccessionNumberException to provide mechanism for handling
|
42 |
|
|
* 'invalid or inappropriate accession numbers.
|
43 |
|
|
* ''
|
44 |
|
|
*/
|