Task #363
refactor handleReadAction() to support GUIDs
100%
Description
handleReadAction() currently operates only on LocalID. Refactor to support GUIDs via lookup to the identifier mapping table.
History
#1 Updated by Matthew Jones almost 15 years ago
The MetacatRest service 'get' operation now supports arbitrary identifiers. The methods to put these identifiers into Metacat are not in place, but get(guid) will read them. The IdentifierManagerTest class has a temporary way of inserting a test document and updating the guid identifier mapping. Currently I'm not returning proper exceptions, because exception handling has not been fully specified for DataONE. For example, the McdbDocNotFoundException should map to a DataONE NotFound exception, but I'm not sure how to represent this (metacat sends an XML error message). Need to fix MetacatRestClientTest so that it will run on any development instance (Serhan's hardcoded values do not work for me). Need to consider whether to support reading arbitrary identifiers from other Metacat read/get methods.
#2 Updated by Matthew Jones almost 15 years ago
MetacatRestClientTest has been rewritten to run from any installed instance, and all 16 tests pass (although some will need to be changed once the rest methods are updated to reflect dataone in their individual stories. Exception handling isn't really part of this task to get global identifiers working in Metacat, so I have added the support for exceptions to the "get() for Metacat" story described in ticket #347. With these changes support for global identifiers is complete as far as the get/read operation is concerned.