1
|
/**
|
2
|
* '$RCSfile$'
|
3
|
* Purpose: An Exception thrown when an error occurs because a
|
4
|
* document with a given ID could not be found in the
|
5
|
* metacat database.
|
6
|
* Copyright: 2000 Regents of the University of California and the
|
7
|
* National Center for Ecological Analysis and Synthesis
|
8
|
* Authors: Matt Jones
|
9
|
* Release: @release@
|
10
|
*
|
11
|
* '$Author: tao $'
|
12
|
* '$Date: 2002-07-14 12:33:25 -0700 (Sun, 14 Jul 2002) $'
|
13
|
* '$Revision: 1292 $'
|
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
|
package edu.ucsb.nceas.metacat;
|
31
|
|
32
|
/**
|
33
|
* Exception thrown when an error occurs because a document with a
|
34
|
* given ID could not be found in the metacat database.
|
35
|
*/
|
36
|
public class McdbDocNotFoundException extends McdbException {
|
37
|
|
38
|
// String sto stroe which docid couldn't find
|
39
|
private String unfoundDocId = null;
|
40
|
private String unfoundRevision = null;
|
41
|
/**
|
42
|
* Create a new McdbDocNotFoundException.
|
43
|
*/
|
44
|
public McdbDocNotFoundException() {
|
45
|
super();
|
46
|
unfoundDocId = null;
|
47
|
unfoundRevision = null;
|
48
|
}
|
49
|
|
50
|
/**
|
51
|
* Create a new McdbDocNotFoundException.
|
52
|
*
|
53
|
* @param message The error or warning message.
|
54
|
*/
|
55
|
public McdbDocNotFoundException(String message, String givenDocId,
|
56
|
String givenRevision) {
|
57
|
super(message);
|
58
|
unfoundDocId = givenDocId;
|
59
|
unfoundRevision = givenRevision;
|
60
|
}
|
61
|
|
62
|
/**
|
63
|
* Create a new McdbDocNotFoundException.
|
64
|
*
|
65
|
* @param e The exception to tunnel inside this exception
|
66
|
*/
|
67
|
public McdbDocNotFoundException(Exception e) {
|
68
|
super(e);
|
69
|
}
|
70
|
|
71
|
/**
|
72
|
* Create a new McdbDocNotFoundException.
|
73
|
*
|
74
|
* @param message The error or warning message.
|
75
|
* @param e The exception to tunnel inside this exception
|
76
|
*/
|
77
|
public McdbDocNotFoundException(String message, Exception e) {
|
78
|
super(message, e);
|
79
|
}
|
80
|
|
81
|
/**
|
82
|
* Method to get the docid which couldn't be found
|
83
|
*/
|
84
|
public String getUnfoundDocId ()
|
85
|
{
|
86
|
return unfoundDocId;
|
87
|
}// getUnfoundDocid
|
88
|
|
89
|
/**
|
90
|
* Method to get the docid's revsion which couldn't be found
|
91
|
*/
|
92
|
public String getUnfoundRevision ()
|
93
|
{
|
94
|
return unfoundRevision;
|
95
|
}// getUnfoundDocid
|
96
|
}
|