热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

org.dataconservancy.ui.model.DataItem.getFiles()方法的使用及代码示例

本文整理了Java中org.dataconservancy.ui.model.DataItem.getFiles()方法的一些代码示例,展示了DataIte

本文整理了Java中org.dataconservancy.ui.model.DataItem.getFiles()方法的一些代码示例,展示了DataItem.getFiles()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DataItem.getFiles()方法的具体详情如下:
包路径:org.dataconservancy.ui.model.DataItem
类名称:DataItem
方法名:getFiles

DataItem.getFiles介绍

[英]Retrieves the list of files associated with the dataset.
[中]检索与数据集关联的文件列表。

代码示例

代码示例来源:origin: org.dataconservancy.ui/dcs-ui-services-impl

private Collection getChildBusinessObjects(BusinessObject businessObject) {
Collection decomposedBusinessObjects = new ArrayList();
if (businessObject instanceof DataItem) {
DataItem dataItem = (DataItem)businessObject;
for (DataFile file : dataItem.getFiles()) {
decomposedBusinessObjects.add(file);
}
}
return decomposedBusinessObjects;
}

代码示例来源:origin: org.dataconservancy.frontend/dcs-ui-services-impl

private Collection getChildBusinessObjects(BusinessObject businessObject) {
Collection decomposedBusinessObjects = new ArrayList();
if (businessObject instanceof DataItem) {
DataItem dataItem = (DataItem)businessObject;
for (DataFile file : dataItem.getFiles()) {
decomposedBusinessObjects.add(file);
}
}
return decomposedBusinessObjects;
}

代码示例来源:origin: org.dataconservancy.ui/dcs-ui-services-impl

@Override
public DataFile getDataFile(String businessId)
throws ArchiveServiceException, BizInternalException {
DataFile expectedFile = null;
if (businessId != null) {
try {
DataItem cOntainingItem= relationshipService.getDataSetForDataFileId(businessId);
for (DataFile file : containingItem.getFiles()) {
if (file.getId().equals(businessId)) {
expectedFile = file;
break;
}
}
} catch (RelationshipConstraintException e) {
throw new BizInternalException("Error retrieving data item for data file id: " + businessId, e);
}
}
return expectedFile;
}

代码示例来源:origin: org.dataconservancy.frontend/dcs-ui-services-impl

@Override
public DataFile getDataFile(String businessId)
throws ArchiveServiceException, BizInternalException {
DataFile expectedFile = null;
if (businessId != null) {
try {
DataItem cOntainingItem= relationshipService.getDataSetForDataFileId(businessId);
for (DataFile file : containingItem.getFiles()) {
if (file.getId().equals(businessId)) {
expectedFile = file;
break;
}
}
} catch (RelationshipConstraintException e) {
throw new BizInternalException("Error retrieving data item for data file id: " + businessId, e);
}
}
return expectedFile;
}

代码示例来源:origin: org.dataconservancy.ui/dcs-ui-mapper

List files = dataItem.getFiles();
dataItem.setFiles(null);
xstream.toXML(dataItem, fos);

代码示例来源:origin: org.dataconservancy.ui/dcs-ui-services-impl

DataItem dataItem = dataSetIter.next();
for (DataFile dsFile : dataItem.getFiles()) {
if (dsFile.getId().equalsIgnoreCase(id)) {
file = dsFile;

代码示例来源:origin: org.dataconservancy.ui/dcs-ui-archive-impl

for (DataFile df : ds.getFiles()) {
final String dfDepositId = deposit(dsDepositId, df);

代码示例来源:origin: org.dataconservancy.frontend/dcs-ui-services-impl

DataItem dataItem = dataSetIter.next();
for (DataFile dsFile : dataItem.getFiles()) {
if (dsFile.getId().equalsIgnoreCase(id)) {
file = dsFile;

代码示例来源:origin: org.dataconservancy.frontend/dcs-ui-archive-impl

for (DataFile df : ds.getFiles()) {
final String dfDepositId = deposit(dsDepositId, df);

代码示例来源:origin: org.dataconservancy.frontend/dcs-ui-services-impl

for (DataFile file : item.getFiles()) {
if (file.getDepositDate() == null) {
file.setDepositDate(DateTime.now());
for (DataFile dataFile : item.getFiles()) {
relationshipService.removeDataFileFromDataSet((DataFile) dataFile, item);
for (DataFile dataFile : item.getFiles()) {
relationshipService.removeDataFileFromDataSet((DataFile) dataFile, item);

代码示例来源:origin: org.dataconservancy.ui/dcs-ui-services-impl

@Override
public void updateDataFileRelationshipForDataSet(DataItem dataItem) throws RelationshipConstraintException {
final Set existingAggreatesRels;
final Set existingIsAggreatedByRels;
synchronized (IdBasedMutexFactory.create(dataItem)) {
existingAggreatesRels = relDao.getRelations(dataItem.getId(), AGGREGATES, RelationshipDAO.RelEnd.SOURCE);
existingIsAggreatedByRels = relDao.getRelations(dataItem.getId(), IS_AGGREGATED_BY,
RelationshipDAO.RelEnd.TARGET);

// Added all relationship anew
for (DataFile file : dataItem.getFiles()) {
if (file instanceof DataFile) {
addDataFileToDataSet((DataFile) file, dataItem);
}
}
// removing existing relationship
if (existingAggreatesRels != null) {
relDao.removeRelations(existingAggreatesRels);
}
if (existingIsAggreatedByRels != null) {
relDao.removeRelations(existingIsAggreatedByRels);
}
}
}

代码示例来源:origin: org.dataconservancy.ui/dcs-ui-services-impl

for (DataFile file : item.getFiles()) {
if (file.getDepositDate() == null) {
file.setDepositDate(DateTime.now());
for (DataFile dataFile : item.getFiles()) {
relationshipService.removeDataFileFromDataSet((DataFile) dataFile, item);
for (DataFile dataFile : item.getFiles()) {
relationshipService.removeDataFileFromDataSet((DataFile) dataFile, item);

代码示例来源:origin: org.dataconservancy.frontend/dcs-ui-services-impl

@Override
public void updateDataFileRelationshipForDataSet(DataItem dataItem) throws RelationshipConstraintException {
final Set existingAggreatesRels;
final Set existingIsAggreatedByRels;
synchronized (IdBasedMutexFactory.create(dataItem)) {
existingAggreatesRels = relDao.getRelations(dataItem.getId(), AGGREGATES, RelationshipDAO.RelEnd.SOURCE);
existingIsAggreatedByRels = relDao.getRelations(dataItem.getId(), IS_AGGREGATED_BY,
RelationshipDAO.RelEnd.TARGET);

// Added all relationship anew
for (DataFile file : dataItem.getFiles()) {
if (file instanceof DataFile) {
addDataFileToDataSet((DataFile) file, dataItem);
}
}
// removing existing relationship
if (existingAggreatesRels != null) {
relDao.removeRelations(existingAggreatesRels);
}
if (existingIsAggreatedByRels != null) {
relDao.removeRelations(existingIsAggreatedByRels);
}
}
}

代码示例来源:origin: org.dataconservancy.frontend/dcs-ui-services-impl

for (DataFile df : di.getFiles()) {
result.getChildren().add(generateMap(df, alternate_id_map, waitForPendingObjects));

代码示例来源:origin: org.dataconservancy.ui/dcs-ui-services-impl

for (DataFile df : di.getFiles()) {
result.getChildren().add(generateMap(df, alternate_id_map, waitForPendingObjects));

代码示例来源:origin: org.dataconservancy.model/dcs-ui-model

/**
* Constructs a DataItem, initializing this state with {@code toCopy}.
*/
public DataItem(DataItem toCopy) {
this.name = toCopy.getName();
this.description = toCopy.getDescription();
this.id = toCopy.getId();
this.depositorID = toCopy.getDepositorId();
this.depositDate = toCopy.getDepositDate();
this.files = toCopy.getFiles();
this.parentId = toCopy.getParentId();
this.alternateIds = toCopy.getAlternateIds();
this.citableLocator = toCopy.getCitableLocator();
this.cOntentModel= toCopy.getContentModel();
this.creators = toCopy.getCreators();
this.cOntactInfos= toCopy.getContactInfos();
this.createdDate = toCopy.getCreatedDate();
this.modifiedDate = toCopy.getModifiedDate();
}

代码示例来源:origin: org.dataconservancy.dcs/dcs-ui-model

/**
* Constructs a DataItem, initializing this state with {@code toCopy}.
*/
public DataItem(DataItem toCopy) {
this.name = toCopy.getName();
this.description = toCopy.getDescription();
this.id = toCopy.getId();
this.depositorID = toCopy.getDepositorId();
this.depositDate = toCopy.getDepositDate();
this.files = toCopy.getFiles();
this.parentId = toCopy.getParentId();
this.alternateIds = toCopy.getAlternateIds();
this.citableLocator = toCopy.getCitableLocator();
this.cOntentModel= toCopy.getContentModel();
this.creators = toCopy.getCreators();
this.cOntactInfos= toCopy.getContactInfos();
this.createdDate = toCopy.getCreatedDate();
this.modifiedDate = toCopy.getModifiedDate();
}

代码示例来源:origin: org.dataconservancy.model/dcs-ui-model-builder-xstream

List fileList = dataItemSource.getFiles();
if (fileList != null && !fileList.isEmpty()) {
((JsonWriter) writer).startNode(E_FILES, fileList.getClass());

代码示例来源:origin: org.dataconservancy.dcs/dcs-ui-model-builder-xstream

List fileList = dataItemSource.getFiles();
if (fileList != null && !fileList.isEmpty()) {
((JsonWriter) writer).startNode(E_FILES, fileList.getClass());

代码示例来源:origin: org.dataconservancy.model/dcs-ui-model-builder-xstream

List fileList = dataItemSource.getFiles();
if (fileList != null && !fileList.isEmpty()) {
writer.startNode(E_FILES);

推荐阅读
author-avatar
東東1959
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有