Project

General

Profile

« Previous | Next » 

Revision 61323

Added by Andreas Czerniak almost 3 years ago

from + until arguments with UTCDatetime

View differences:

OaiCollectorPlugin.java
36 36

  
37 37
		if (mdFormat == null || mdFormat.isEmpty()) { throw new CollectorServiceException("Param 'mdFormat' is null or empty"); }
38 38

  
39
		if (fromDate != null && !fromDate.matches("\\d{4}-\\d{2}-\\d{2}")) { throw new CollectorServiceException("Invalid date (YYYY-MM-DD): " + fromDate); }
39
		if (fromDate != null && !fromDate.matches("\\d{4}-\\d{2}-\\d{2}") && !fromDate.matches("\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z")) { throw new CollectorServiceException("Invalid date (YYYY-MM-DD or YYYY-MM-DDTHH:MM:SSZ): " + fromDate); }
40 40

  
41
		if (untilDate != null && !untilDate.matches("\\d{4}-\\d{2}-\\d{2}")) { throw new CollectorServiceException("Invalid date (YYYY-MM-DD): " + untilDate); }
41
		if (untilDate != null && !untilDate.matches("\\d{4}-\\d{2}-\\d{2}") && !untilDate.matches("\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z")) { throw new CollectorServiceException("Invalid date (YYYY-MM-DD or YYYY-MM-DDTHH:MM:SSZ): " + untilDate); }
42 42

  
43 43
		return () -> Iterators.concat(
44 44
				sets.stream()

Also available in: Unified diff