本文整理了Java中org.dataconservancy.ui.model.DataItem.addFile()
方法的一些代码示例,展示了DataItem.addFile()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DataItem.addFile()
方法的具体详情如下:
包路径:org.dataconservancy.ui.model.DataItem
类名称:DataItem
方法名:addFile
[英]Adds a file to the data set
[中]将文件添加到数据集中
代码示例来源:origin: org.dataconservancy.frontend/dcs-ui-webapi
for (MultipartFile mpFile : req.getMultiFileMap().get(fileKey)) {
DataFile file = loadDataFile(item.getId(), tmpDir, mpFile);
item.addFile(file);
代码示例来源:origin: org.dataconservancy.ui/dcs-ui-archive-impl
public ArchiveSearchResult<DataItem> retrieveDataSet(String deposit_id)
throws ArchiveServiceException {
ArchiveSearchResult<DataItem> diAsr = retrieve(deposit_id, dataset_mapper);
if (diAsr == null) {
throw new ArchiveServiceException(String.format(ERROR_NULL_ASR, "DataItem", deposit_id));
}
if (diAsr.getResultCount() == 1) {
DataItem di = diAsr.getResults().iterator().next();
if (di == null) {
throw new ArchiveServiceException("Unable to retrieve DataItem with deposit (transaction) id" +
" '" + deposit_id + "'; the DataItem was null.");
}
final List<ArchiveDepositInfo> childAdis = deposit_info_dao.lookupChildren(deposit_id);
if (childAdis != null) {
for (ArchiveDepositInfo dfInfo : childAdis) {
if (dfInfo.getObjectType() == DATA_FILE) {
ArchiveSearchResult<DataFile> dfAsr = retrieveDataFile(dfInfo.getDepositId());
if (dfAsr == null) {
throw new ArchiveServiceException(String.format(ERROR_NULL_ASR, "DataFile", dfInfo.getDepositId()));
}
for (DataFile df : dfAsr.getResults()) {
di.addFile(df);
}
}
}
}
}
return diAsr;
}
代码示例来源:origin: org.dataconservancy.frontend/dcs-ui-archive-impl
public ArchiveSearchResult<DataItem> retrieveDataSet(String deposit_id)
throws ArchiveServiceException {
ArchiveSearchResult<DataItem> diAsr = retrieve(deposit_id, dataset_mapper);
if (diAsr == null) {
throw new ArchiveServiceException(String.format(ERROR_NULL_ASR, "DataItem", deposit_id));
}
if (diAsr.getResultCount() == 1) {
DataItem di = diAsr.getResults().iterator().next();
if (di == null) {
throw new ArchiveServiceException("Unable to retrieve DataItem with deposit (transaction) id" +
" '" + deposit_id + "'; the DataItem was null.");
}
final List<ArchiveDepositInfo> childAdis = deposit_info_dao.lookupChildren(deposit_id);
if (childAdis != null) {
for (ArchiveDepositInfo dfInfo : childAdis) {
if (dfInfo.getObjectType() == DATA_FILE) {
ArchiveSearchResult<DataFile> dfAsr = retrieveDataFile(dfInfo.getDepositId());
if (dfAsr == null) {
throw new ArchiveServiceException(String.format(ERROR_NULL_ASR, "DataFile", dfInfo.getDepositId()));
}
for (DataFile df : dfAsr.getResults()) {
di.addFile(df);
}
}
}
}
}
return diAsr;
}
代码示例来源:origin: org.dataconservancy.ui/dcs-ui-webapi
for (MultipartFile mpFile : req.getMultiFileMap().get(fileKey)) {
DataFile file = loadDataFile(item.getId(), tmpDir, mpFile);
item.addFile(file);
代码示例来源:origin: org.dataconservancy.ui/dcs-ui-archive-impl
di.addFile(childAsr.getResults().iterator().next());
代码示例来源:origin: org.dataconservancy.frontend/dcs-ui-archive-impl
di.addFile(childAsr.getResults().iterator().next());
代码示例来源:origin: org.dataconservancy.ui/dcs-ui-test-support-model
dataFileOne.setDepositDate(new DateTime("2014-06-05"));
dataFileOne.setDescription("This is a test data file");
dataItemOne.addFile(dataFileOne);
dataFileTwo.setDepositDate(new DateTime("2014-06-05"));
dataFileTwo.setDescription("This is a second test data file");
dataItemTwo.addFile(dataFileTwo);
代码示例来源:origin: org.dataconservancy.frontend/dcs-ui-test-support-model
dataFileOne.setDepositDate(new DateTime("2014-06-05"));
dataFileOne.setDescription("This is a test data file");
dataItemOne.addFile(dataFileOne);
dataFileTwo.setDepositDate(new DateTime("2014-06-05"));
dataFileTwo.setDescription("This is a second test data file");
dataItemTwo.addFile(dataFileTwo);
代码示例来源:origin: org.dataconservancy.packaging/dcs-pkg-ingest-services
di.addFile(df);
df.setParentId(di.getId());
} else {
内容来源于网络,如有侵权,请联系作者删除!