// OAI hierarchy is flat (no sub-directories) - only allow 'null' as pdURI!
ArrayList<URI> resultList = new ArrayList<URI>();
OaiPmhServer server = new OaiPmhServer(baseURL);
try {
IdentifiersList list;
if (q == null) {
list = server.listIdentifiers(metaDataPrefix);
} else {
if (!(q instanceof QueryDateRange))
throw new QueryValidationException("Unsupported query type");
list = server.listIdentifiers(metaDataPrefix, dateFormat.format(((QueryDateRange) q).getStartDate().getTime()), dateFormat.format(((QueryDateRange) q).getEndDate().getTime()), set);
}
for (Header header : list.asList()) {
try {
resultList.add(new URI(header.getIdentifier()));
} catch (URISyntaxException e) {
log.warning("Illegal identifier returned from " + baseURL + ": " + header.getIdentifier());
}