Revision 6384
Added by Chris Jones over 12 years ago
GenerateSystemMetadata.java | ||
---|---|---|
39 | 39 |
import org.dataone.service.exceptions.NotFound; |
40 | 40 |
import org.dataone.service.exceptions.NotImplemented; |
41 | 41 |
import org.dataone.service.exceptions.ServiceFailure; |
42 |
import org.dataone.service.types.AuthToken;
|
|
42 |
import org.dataone.service.types.v1.Session;
|
|
43 | 43 |
import org.dataone.service.types.v1.SystemMetadata; |
44 | 44 |
|
45 | 45 |
import edu.ucsb.nceas.metacat.AccessionNumberException; |
... | ... | |
93 | 93 |
* @throws McdbDocNotFoundException |
94 | 94 |
* @throws ServiceFailure |
95 | 95 |
*/ |
96 |
public void generateMissingSystemMetadata(AuthToken token)
|
|
96 |
public void generateMissingSystemMetadata(Session session)
|
|
97 | 97 |
throws ServiceFailure, McdbDocNotFoundException, PropertyNotFoundException, InvalidToken, NotAuthorized, |
98 | 98 |
NotFound, NotImplemented, InvalidRequest, NoSuchAlgorithmException, AccessionNumberException, SQLException |
99 | 99 |
{ |
... | ... | |
103 | 103 |
for (String localId : idList) { |
104 | 104 |
//for each id, add a system metadata doc |
105 | 105 |
try { |
106 |
generateMissingSystemMetadata(token, localId);
|
|
106 |
generateMissingSystemMetadata(session, localId);
|
|
107 | 107 |
} catch (Exception e) { |
108 | 108 |
log.error("Error generating system metadata for: " + localId, e); |
109 | 109 |
} |
... | ... | |
132 | 132 |
* @throws PropertyNotFoundException |
133 | 133 |
* @throws McdbDocNotFoundException |
134 | 134 |
*/ |
135 |
public void generateMissingSystemMetadata(AuthToken token, String localId)
|
|
135 |
public void generateMissingSystemMetadata(Session session, String localId)
|
|
136 | 136 |
throws ServiceFailure, McdbDocNotFoundException, PropertyNotFoundException, InvalidToken, NotAuthorized, |
137 | 137 |
NotFound, NotImplemented, InvalidRequest, NoSuchAlgorithmException, AccessionNumberException, SQLException |
138 | 138 |
{ |
Also available in: Unified diff
Update classes to use the DataONE 0.6.4 schema and types. Major changes involve using BigInteger vs long in SystemMetadata.size, and using ObjectFormatIdentifier rather than Object format.