@Override public RecordSet getRecords(DataLoadingSpec spec) throws MalformedSourceException { //See if the data loading spec requests a specific record. if (spec.getIdentifier() != null) { if(server_ == null) { throw new MalformedSourceException("Connection with server " + server_address_ + " has not been established"); } RecordSet ret = new RecordSet(); try { se.kb.oai.pmh.Record oai_record = server_.getRecord(spec.getIdentifier(), prefix_); Record rec = oai2bte(oai_record); ret.addRecord(rec); } catch (OAIException e) { logger_.info("Caught OAIException " + e.getMessage()); throw new MalformedSourceException(e.getMessage()); } return ret; } return getRecords(); }