Revision 9076
Added by Jing Tao almost 10 years ago
src/edu/ucsb/nceas/metacat/dataone/v1/MNodeService.java | ||
---|---|---|
549 | 549 |
public InputStream view(Session session, String format, Identifier pid) |
550 | 550 |
throws InvalidToken, ServiceFailure, NotAuthorized, InvalidRequest, |
551 | 551 |
NotImplemented, NotFound { |
552 |
|
|
552 |
String serviceFailure = "2831"; |
|
553 |
String notFound = "2835"; |
|
554 |
try { |
|
555 |
impl.checkV1SystemMetaPidExist(pid, serviceFailure, "The system metadata of the object specified by "+pid.getValue()+" couldn't be identified if it exists", notFound, |
|
556 |
"The system metadata of the object specified by "+pid.getValue()+" does not exist at this node."); |
|
557 |
} catch (NotFound e) { |
|
558 |
throw new ServiceFailure(serviceFailure, e.getMessage()); |
|
559 |
} |
|
553 | 560 |
return impl.view(session, format, pid); |
554 | 561 |
} |
555 | 562 |
|
556 | 563 |
public InputStream getPackage(Session session, ObjectFormatIdentifier formatId, |
557 | 564 |
Identifier pid) throws InvalidToken, ServiceFailure, |
558 | 565 |
NotAuthorized, InvalidRequest, NotImplemented, NotFound { |
566 |
String serviceFailure = "2871"; |
|
567 |
String notFound = "2875"; |
|
568 |
try { |
|
569 |
impl.checkV1SystemMetaPidExist(pid, serviceFailure, "The system metadata of the object specified by "+pid.getValue()+" couldn't be identified if it exists", notFound, |
|
570 |
"The system metadata of the object specified by "+pid.getValue()+" does not exist at this node."); |
|
571 |
} catch (NotFound e) { |
|
572 |
throw new ServiceFailure(serviceFailure, e.getMessage()); |
|
573 |
} |
|
559 | 574 |
return impl.getPackage(session, formatId, pid); |
560 | 575 |
} |
561 | 576 |
|
Also available in: Unified diff
Add the code to exclude the sid in the view and getPackage.