Revision 9092
Added by Jing Tao almost 10 years ago
src/edu/ucsb/nceas/metacat/dataone/MNodeService.java | ||
---|---|---|
1647 | 1647 |
*/ |
1648 | 1648 |
public Identifier publish(Session session, Identifier originalIdentifier) throws InvalidToken, ServiceFailure, NotAuthorized, NotImplemented, InvalidRequest, NotFound, IdentifierNotUnique, UnsupportedType, InsufficientResources, InvalidSystemMetadata { |
1649 | 1649 |
|
1650 |
|
|
1650 |
String serviceFailureCode = "1030"; |
|
1651 |
Identifier sid = getPIDForSID(originalIdentifier, serviceFailureCode); |
|
1652 |
if(sid != null) { |
|
1653 |
originalIdentifier = sid; |
|
1654 |
} |
|
1651 | 1655 |
// get the original SM |
1652 | 1656 |
SystemMetadata originalSystemMetadata = this.getSystemMetadata(session, originalIdentifier); |
1653 | 1657 |
|
... | ... | |
1870 | 1874 |
public InputStream getPackage(Session session, ObjectFormatIdentifier formatId, |
1871 | 1875 |
Identifier pid) throws InvalidToken, ServiceFailure, |
1872 | 1876 |
NotAuthorized, InvalidRequest, NotImplemented, NotFound { |
1877 |
|
|
1878 |
String serviceFailureCode = "2871"; |
|
1879 |
Identifier sid = getPIDForSID(pid, serviceFailureCode); |
|
1880 |
if(sid != null) { |
|
1881 |
pid = sid; |
|
1882 |
} |
|
1873 | 1883 |
InputStream bagInputStream = null; |
1874 | 1884 |
BagFactory bagFactory = new BagFactory(); |
1875 | 1885 |
Bag bag = bagFactory.createBag(); |
... | ... | |
2153 | 2163 |
NotImplemented, NotFound { |
2154 | 2164 |
InputStream resultInputStream = null; |
2155 | 2165 |
|
2166 |
String serviceFailureCode = "2831"; |
|
2167 |
Identifier sid = getPIDForSID(pid, serviceFailureCode); |
|
2168 |
if(sid != null) { |
|
2169 |
pid = sid; |
|
2170 |
} |
|
2171 |
|
|
2156 | 2172 |
SystemMetadata sysMeta = this.getSystemMetadata(session, pid); |
2157 | 2173 |
InputStream object = this.get(session, pid); |
2158 | 2174 |
|
Also available in: Unified diff
Add the code transform a sid to a pid in publish, getPackage and view method. Fefer dataONE #6734.