Revision 7046
Added by Chris Jones almost 13 years ago
src/edu/ucsb/nceas/metacat/restservice/CNResourceHandler.java | ||
---|---|---|
1051 | 1051 |
String name = paramlist.nextElement(); |
1052 | 1052 |
String[] value = request.getParameterValues(name); |
1053 | 1053 |
|
1054 |
if (name.equals("startTime") && value != null) {
|
|
1054 |
if (name.equals("fromDate") && value != null) {
|
|
1055 | 1055 |
try { |
1056 | 1056 |
startTime = DateTimeMarshaller |
1057 | 1057 |
.deserializeDateToUTC(value[0]); |
1058 | 1058 |
} catch (Exception e) { |
1059 | 1059 |
// if we can't parse it, just don't use the startTime param |
1060 |
logMetacat.warn("Could not parse startTime: " + value[0]);
|
|
1060 |
logMetacat.warn("Could not parse fromDate: " + value[0]);
|
|
1061 | 1061 |
startTime = null; |
1062 | 1062 |
} |
1063 |
} else if (name.equals("endTime") && value != null) {
|
|
1063 |
} else if (name.equals("toDate") && value != null) {
|
|
1064 | 1064 |
try { |
1065 | 1065 |
endTime = DateTimeMarshaller.deserializeDateToUTC(value[0]); |
1066 | 1066 |
} catch (Exception e) { |
1067 | 1067 |
// if we can't parse it, just don't use the endTime param |
1068 |
logMetacat.warn("Could not parse endTime: " + value[0]);
|
|
1068 |
logMetacat.warn("Could not parse toDate: " + value[0]);
|
|
1069 | 1069 |
endTime = null; |
1070 | 1070 |
} |
1071 | 1071 |
} else if (name.equals("objectFormat") && value != null) { |
... | ... | |
1080 | 1080 |
} |
1081 | 1081 |
} |
1082 | 1082 |
// make the call |
1083 |
logMetacat.debug("session: " + session + " startTime: " + startTime
|
|
1084 |
+ " endtime: " + endTime + " objectFormat: " + objectFormat
|
|
1083 |
logMetacat.debug("session: " + session + " fromDate: " + startTime
|
|
1084 |
+ " toDate: " + endTime + " objectFormat: " + objectFormat
|
|
1085 | 1085 |
+ " replicaStatus: " + replicaStatus + " start: " + start |
1086 | 1086 |
+ " count: " + count); |
1087 | 1087 |
|
Also available in: Unified diff
Use 'fromDate' and 'toDate' as listObject param filters to comply with the API documentation. We had changed this in MNResourceHandler, but somehow missed it in CNResourceHandler.