private DcsDeliverableUnit mapDataSetStateDu(String rootDuId, String predecesorDuId, DataItem dataItem) { final DcsDeliverableUnit dataSetStateDu = new DcsDeliverableUnit(); dataSetStateDu.setId("DataItemStateDu-" + UUID.randomUUID().toString()); dataSetStateDu.addFormerExternalRef(dataItem.getId()); dataSetStateDu.setType(DataItemProfile.DATASET_STATE_TYPE); dataSetStateDu.addParent(new DcsDeliverableUnitRef(rootDuId)); dataSetStateDu.setTitle(dataItem.getName()); if (predecesorDuId != null) { DcsRelation isSuccessorOf = new DcsRelation(DcsRelationship.IS_SUCCESSOR_OF, predecesorDuId); dataSetStateDu.addRelation(isSuccessorOf); } return dataSetStateDu; }
du.setType(METADATAFORMAT_REGISTRY_ENTRY_TYPE); du.setTitle(object.getName()); du.addFormerExternalRef(object.getId());
du.setType(METADATAFORMAT_REGISTRY_ENTRY_TYPE); du.setTitle(object.getName()); du.addFormerExternalRef(object.getId());
statedu.addFormerExternalRef(relSet.getId()); statedu.setTitle("relationshipSet"); dus.add(rootDu); rootDu.addFormerExternalRef(relSet.getId()); rootDu.setTitle("relationshipSet");
du.addFormerExternalRef(registryEntry.getId()); du.setDigitalSurrogate(false);
/** * Maps a DataItem to a Deliverable Unit. * * @param dataItem the DataItem to map * @return the DcsDeliverableUnit representing the DataItem * @throws DcpMappingException */ private DcsDeliverableUnit mapDataSetDu(String collectionId, DataItem dataItem) throws DcpMappingException { // Map DataItem and File identifiers to the DcsDeliverableUnit formerExternalRef final DcsDeliverableUnit dataSetDu = new DcsDeliverableUnit(); dataSetDu.setId(dataItem.getId()); dataSetDu.addFormerExternalRef(dataItem.getId()); // Set the type of the DcsDeliverableUnit, indicating that this DU is carrying business information // for a DataItem object dataSetDu.setType(DataItemProfile.DATASET_TYPE); // Set the title of the DcsDeliverableUnit to the DataItem name dataSetDu.setTitle(dataItem.getName()); // Set the Collection that this dataSetDu belongs to dataSetDu.addParent(new DcsDeliverableUnitRef(collectionId)); return dataSetDu; }
statedu.addFormerExternalRef(collection.getId()); statedu.setTitle(COLLECTION_TITLE); dus.add(rootDu); rootDu.addFormerExternalRef(collection.getId()); rootDu.setTitle(COLLECTION_TITLE);
du.setId(nextId()); du.setType(METADATASCHEME_REGISTRY_ENTRY_TYPE); du.addFormerExternalRef(scheme.getSchemaUrl()); du.setTitle(scheme.getName());
du.setId(nextId()); du.setType(METADATASCHEME_REGISTRY_ENTRY_TYPE); du.addFormerExternalRef(scheme.getSchemaUrl()); du.setTitle(scheme.getName());
statedu.addFormerExternalRef(metadataFile.getId()); DcsDeliverableUnit rootDu = getRootDu(dcp); dus.remove(rootDu); dus.add(rootDu); rootDu.addFormerExternalRef(metadataFile.getId());
statedu.addFormerExternalRef(dataFile.getId()); DcsDeliverableUnit dcpRootDu = getRootDu(dcp); dus.remove(dcpRootDu); dus.add(dcpRootDu); dcpRootDu.addFormerExternalRef(dataFile.getId()); dcpRootDu.addAlternateId( new DcsResourceIdentifier(Id.getAuthority(), dataFile.getId(), Types.DATA_FILE.name()));