Revision 6217
Added by ben leinfelder over 13 years ago
src/edu/ucsb/nceas/metacat/dataone/CNodeService.java | ||
---|---|---|
256 | 256 |
} |
257 | 257 |
|
258 | 258 |
/** |
259 |
* Return the system metadata for a given object |
|
260 |
* |
|
261 |
* @param session - the Session object containing the credentials for the Subject |
|
262 |
* @param pid - the object identifier for the given object |
|
263 |
* |
|
264 |
* @return inputStream - the input stream of the given system metadata object |
|
265 |
* |
|
266 |
* @throws InvalidToken |
|
267 |
* @throws ServiceFailure |
|
268 |
* @throws NotAuthorized |
|
269 |
* @throws NotFound |
|
270 |
* @throws InvalidRequest |
|
271 |
* @throws NotImplemented |
|
272 |
*/ |
|
273 |
@Override |
|
274 |
public SystemMetadata getSystemMetadata(Session session, Identifier pid) |
|
275 |
throws InvalidRequest, InvalidToken, ServiceFailure, NotAuthorized, |
|
276 |
NotFound, NotImplemented { |
|
277 |
|
|
278 |
return super.getSystemMetadata(session, pid); |
|
279 |
} |
|
280 |
|
|
281 |
/** |
|
282 | 259 |
* Resolve the location of a given object |
283 | 260 |
* |
284 | 261 |
* @param session - the Session object containing the credentials for the Subject |
src/edu/ucsb/nceas/metacat/dataone/D1NodeService.java | ||
---|---|---|
235 | 235 |
throws InvalidToken, ServiceFailure, NotAuthorized, NotFound, |
236 | 236 |
InvalidRequest, NotImplemented { |
237 | 237 |
|
238 |
return null; |
|
238 |
if (!isAuthorized(session, pid, Permission.READ)) { |
|
239 |
throw new NotAuthorized("1400", Permission.READ + " not allowed on " + pid.getValue()); |
|
240 |
} |
|
241 |
SystemMetadata systemMetadata = null; |
|
242 |
try { |
|
243 |
systemMetadata = IdentifierManager.getInstance().getSystemMetadata(pid.getValue()); |
|
244 |
} catch (McdbDocNotFoundException e) { |
|
245 |
throw new NotFound("1420", "No record found for: " + pid.getValue()); |
|
246 |
} |
|
247 |
|
|
248 |
return systemMetadata; |
|
239 | 249 |
} |
240 | 250 |
|
241 | 251 |
/* End methods common to CNRead and MNRead APIs */ |
Also available in: Unified diff
implement getChecksum() in the superclass