本文整理了Java中org.dataconservancy.ui.model.DataItem.getFiles()
方法的一些代码示例,展示了DataItem.getFiles()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DataItem.getFiles()
方法的具体详情如下:
包路径:org.dataconservancy.ui.model.DataItem
类名称:DataItem
方法名:getFiles
[英]Retrieves the list of files associated with the dataset.
[中]检索与数据集关联的文件列表。
代码示例来源:origin: org.dataconservancy.ui/dcs-ui-services-impl
private Collection
Collection
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
Collection
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
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
final Set
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
final Set
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
if (fileList != null && !fileList.isEmpty()) {
((JsonWriter) writer).startNode(E_FILES, fileList.getClass());
代码示例来源:origin: org.dataconservancy.dcs/dcs-ui-model-builder-xstream
List
if (fileList != null && !fileList.isEmpty()) {
((JsonWriter) writer).startNode(E_FILES, fileList.getClass());
代码示例来源:origin: org.dataconservancy.model/dcs-ui-model-builder-xstream
List
if (fileList != null && !fileList.isEmpty()) {
writer.startNode(E_FILES);