Revision 9143
Added by Jing Tao almost 10 years ago
src/edu/ucsb/nceas/metacat/dataone/v1/CNodeService.java | ||
---|---|---|
467 | 467 |
@Override |
468 | 468 |
public ObjectFormat getFormat(ObjectFormatIdentifier fmtid) |
469 | 469 |
throws ServiceFailure, NotFound, NotImplemented, InvalidRequest { |
470 |
return impl.getFormat(fmtid); |
|
470 |
org.dataone.service.types.v2.ObjectFormat format = impl.getFormat(fmtid); |
|
471 |
ObjectFormat v1Format = null; |
|
472 |
try { |
|
473 |
v1Format = TypeMarshaller.convertTypeFromType(format, ObjectFormat.class); |
|
474 |
} catch (Exception e) { |
|
475 |
ServiceFailure sf = new ServiceFailure("4846", e.getMessage()); |
|
476 |
sf.initCause(e); |
|
477 |
throw sf; |
|
478 |
} |
|
479 |
return v1Format; |
|
471 | 480 |
} |
472 | 481 |
|
473 | 482 |
@Override |
Also available in: Unified diff
Transform the ObjectFormat from v2 to v1 in getFormat method.