public List<ArchiveDepositInfo> listDepositInfo(String object_id, Status status) throws ArchiveServiceException { return archive_service.listDepositInfo(object_id, status); }
public List<ArchiveDepositInfo> listDepositInfo(String object_id, Status status) throws ArchiveServiceException { return archive_service.listDepositInfo(object_id, status); }
private boolean isDeposited(String object_id) throws ArchiveServiceException { if (object_id == null || object_id.isEmpty()) { return false; } List<ArchiveDepositInfo> infoList = archiveService.listDepositInfo(object_id, ArchiveDepositInfo.Status.DEPOSITED); if (infoList == null || infoList.isEmpty()) { return false; } return true; }
private boolean isDeposited(String object_id) throws ArchiveServiceException { if (object_id == null || object_id.isEmpty()) { return false; } List<ArchiveDepositInfo> infoList = archiveService.listDepositInfo(object_id, ArchiveDepositInfo.Status.DEPOSITED); if (infoList == null || infoList.isEmpty()) { return false; } return true; }
DateTime getLastModified(String dataSetId) { List<ArchiveDepositInfo> depositInfo = null; try { depositInfo = archiveService.listDepositInfo(dataSetId, DEPOSITED); } catch (ArchiveServiceException e) { log.warn("Failed to list deposit info for " + dataSetId); } if (depositInfo != null && !depositInfo.isEmpty()) { return depositInfo.get(0).getDepositDateTime(); } return null; }
DateTime getLastModified(String dataSetId) { List<ArchiveDepositInfo> depositInfo = null; try { depositInfo = archiveService.listDepositInfo(dataSetId, DEPOSITED); } catch (ArchiveServiceException e) { log.warn("Failed to list deposit info for " + dataSetId); } if (depositInfo != null && !depositInfo.isEmpty()) { return depositInfo.get(0).getDepositDateTime(); } return null; }
DateTime getLastModified(String collectionId) { List<ArchiveDepositInfo> depositInfo = null; try { depositInfo = archiveService.listDepositInfo(collectionId, DEPOSITED); } catch (ArchiveServiceException e) { log.warn("Failed to list deposit info for " + collectionId); } if (depositInfo != null && !depositInfo.isEmpty()) { return depositInfo.get(0).getDepositDateTime(); } return null; }
@Override public DateTime getLastModifiedDate(String id) throws RelationshipConstraintException { DateTime lastModifiedDate = null; try { List<ArchiveDepositInfo> depositInfo = archiveService.listDepositInfo(id, ArchiveDepositInfo.Status.DEPOSITED); if (depositInfo != null && !depositInfo.isEmpty()) { lastModifiedDate = depositInfo.get(0).getDepositDateTime(); } } catch (ArchiveServiceException e) { log.warn("Failed to list deposit info for " + id); } return lastModifiedDate; }
DateTime getLastModified(String collectionId) { List<ArchiveDepositInfo> depositInfo = null; try { depositInfo = archiveService.listDepositInfo(collectionId, DEPOSITED); } catch (ArchiveServiceException e) { log.warn("Failed to list deposit info for " + collectionId); } if (depositInfo != null && !depositInfo.isEmpty()) { return depositInfo.get(0).getDepositDateTime(); } return null; }
@Override public DateTime getLastModifiedDate(String id) throws RelationshipConstraintException { DateTime lastModifiedDate = null; try { List<ArchiveDepositInfo> depositInfo = archiveService.listDepositInfo(id, ArchiveDepositInfo.Status.DEPOSITED); if (depositInfo != null && !depositInfo.isEmpty()) { lastModifiedDate = depositInfo.get(0).getDepositDateTime(); } } catch (ArchiveServiceException e) { log.warn("Failed to list deposit info for " + id); } return lastModifiedDate; }
@Override public String getDepositId(String object_id) { if (object_id == null || object_id.isEmpty()) { return null; } List<ArchiveDepositInfo> infoList = null; try { infoList = archiveService.listDepositInfo(object_id, ArchiveDepositInfo.Status.DEPOSITED); } catch (ArchiveServiceException e) { log.warn("Failed to list deposit info for " + object_id); } if (infoList == null || infoList.isEmpty()) { return null; } return infoList.get(0).getDepositId(); }
private DateTime retrieveInitialDepositDate(DataItem dataItem) { if (dataItem == null) { return null; } List<ArchiveDepositInfo> infoList = null; try { infoList = archiveService.listDepositInfo(dataItem.getId(), ArchiveDepositInfo.Status.DEPOSITED); } catch (ArchiveServiceException e) { log.warn("Failed to list deposit info for " + dataItem.getId()); } if (infoList == null || infoList.isEmpty()) { return null; } return infoList.get(infoList.size() - 1).getDepositDateTime(); }
private DateTime retrieveInitialDepositDate(DataItem dataItem) { if (dataItem == null) { return null; } List<ArchiveDepositInfo> infoList = null; try { infoList = archiveService.listDepositInfo(dataItem.getId(), ArchiveDepositInfo.Status.DEPOSITED); } catch (ArchiveServiceException e) { log.warn("Failed to list deposit info for " + dataItem.getId()); } if (infoList == null || infoList.isEmpty()) { return null; } return infoList.get(infoList.size() - 1).getDepositDateTime(); }
@Override public DataItem getDataItem(String businessId) throws ArchiveServiceException, BizPolicyException { List<DataItem> result = new ArrayList<DataItem>(); for (ArchiveDepositInfo info : archiveService.listDepositInfo(businessId, Status.DEPOSITED)) { ArchiveSearchResult<DataItem> sr = archiveService.retrieveDataSet(info.getDepositId()); for (DataItem ds : sr.getResults()) { result.add(ds); } } if (result.size() == 0) { return null; } else { // returning the first version of the DataItem. return result.get(0); } }
private DataItem retrieveDataSet(String id) throws ArchiveServiceException { DataItem di = null; archiveService.pollArchiveByBusinessId(id); List<ArchiveDepositInfo> info = archiveService.listDepositInfo(id, Status.DEPOSITED); if (!info.isEmpty()) { ArchiveSearchResult<DataItem> sr = null; sr = archiveService .retrieveDataSet(info.get(0).getDepositId()); if (sr != null && sr.getResults().iterator().hasNext()) { di = sr.getResults().iterator().next(); } } return di; }
private DataItem retrieveDataSet(String id) throws ArchiveServiceException { DataItem di = null; archiveService.pollArchiveByBusinessId(id); List<ArchiveDepositInfo> info = archiveService.listDepositInfo(id, Status.DEPOSITED); if (!info.isEmpty()) { ArchiveSearchResult<DataItem> sr = null; sr = archiveService .retrieveDataSet(info.get(0).getDepositId()); if (sr != null && sr.getResults().iterator().hasNext()) { di = sr.getResults().iterator().next(); } } return di; }
private Collection retrieveCollection(String id) throws ArchiveServiceException { Collection col = null; archiveService.pollArchiveByBusinessId(id); List<ArchiveDepositInfo> info = archiveService.listDepositInfo(id, Status.DEPOSITED); if (!info.isEmpty()) { ArchiveSearchResult<Collection> sr = null; sr = archiveService .retrieveCollection(info.get(0).getDepositId()); if (sr != null && sr.getResults().iterator().hasNext()) { col = sr.getResults().iterator().next(); } } return col; }
private Collection retrieveCollection(String id) throws ArchiveServiceException { Collection col = null; archiveService.pollArchiveByBusinessId(id); List<ArchiveDepositInfo> info = archiveService.listDepositInfo(id, Status.DEPOSITED); if (!info.isEmpty()) { ArchiveSearchResult<Collection> sr = null; sr = archiveService .retrieveCollection(info.get(0).getDepositId()); if (sr != null && sr.getResults().iterator().hasNext()) { col = sr.getResults().iterator().next(); } } return col; }
private ArchiveDepositInfo.Status retrieveDepositStatus(DataItem dataItem) throws ArchiveServiceException { if (dataItem == null) { return null; } archiveService.pollArchiveByBusinessId(dataItem.getId()); List<ArchiveDepositInfo> infoList = archiveService.listDepositInfo(dataItem.getId(), null); if (infoList == null || infoList.isEmpty()) { return null; } return infoList.get(0).getDepositStatus(); }
private ArchiveDepositInfo.Status retrieveDepositStatus(DataItem dataItem) throws ArchiveServiceException { if (dataItem == null) { return null; } archiveService.pollArchiveByBusinessId(dataItem.getId()); List<ArchiveDepositInfo> infoList = archiveService.listDepositInfo(dataItem.getId(), null); if (infoList == null || infoList.isEmpty()) { return null; } return infoList.get(0).getDepositStatus(); }