Revision 1795
Added by Matt Jones over 20 years ago
Metacat.java | ||
---|---|---|
99 | 99 |
* @param xmlDocument a Reader for accessing the XML text to be updated |
100 | 100 |
* @param schema a Reader for accessing the DTD or XML Schema for |
101 | 101 |
* the document |
102 |
* @return the metacat response message |
|
102 | 103 |
* @throws InsufficientKarmaException when the user has insufficent rights |
103 | 104 |
* for the operation |
105 |
* @throws MetacatInaccessibleException when the metacat server can not be |
|
106 |
* reached or does not respond |
|
107 |
* @throws MetacatException when the metacat server generates another error |
|
108 |
* @throws IOException when there is an error reading the xml document |
|
104 | 109 |
*/ |
105 |
public void update(String docid, Reader xmlDocument, Reader schema) |
|
106 |
throws InsufficientKarmaException; |
|
110 |
public String update(String docid, Reader xmlDocument, Reader schema) |
|
111 |
throws InsufficientKarmaException, MetacatException, IOException, |
|
112 |
MetacatInaccessibleException; |
|
107 | 113 |
|
108 | 114 |
/** |
109 | 115 |
* Delete an XML document in the repository. |
110 | 116 |
* |
111 | 117 |
* @param docid the docid to delete |
118 |
* @return the metacat response message |
|
112 | 119 |
* @throws InsufficientKarmaException when the user has insufficent rights |
113 | 120 |
* for the operation |
121 |
* @throws MetacatInaccessibleException when the metacat server can not be |
|
122 |
* reached or does not respond |
|
123 |
* @throws MetacatException when the metacat server generates another error |
|
114 | 124 |
*/ |
115 |
public void delete(String docid) |
|
116 |
throws InsufficientKarmaException; |
|
125 |
public String delete(String docid) |
|
126 |
throws InsufficientKarmaException, MetacatException, |
|
127 |
MetacatInaccessibleException; |
|
117 | 128 |
|
118 | 129 |
/** |
119 | 130 |
* When the MetacatFactory creates an instance it needs to set the |
Also available in: Unified diff
Implemented the update and delete methods in the interface, along with tests.