private String get_business_id(DcsDeliverableUnit du) throws DcpMappingException { java.util.Collection<String> former = du.getFormerExternalRefs(); if (former.size() == 1) { return former.iterator().next(); } throw new DcpMappingException("Unable to retrieve collection id from: " + du); }
private void performFormerSearch(LinkedList<DcsEntity> results, String formerExternalRef) { for (Map.Entry<String, Set<DcsEntity>> entries : archiveUtil.getEntities().entrySet()) { for (DcsEntity entity : entries.getValue()) { if (!(entity instanceof DcsDeliverableUnit)) { continue; } DcsDeliverableUnit du = (DcsDeliverableUnit) entity; if (du.getFormerExternalRefs().contains(formerExternalRef)) { results.add(du); } } } }
/** * Places the supplied entities in the backing map, keyed by their former external references. * * @param entities the entities to add in the backing map */ protected void mapFormerRefs(DcsEntity... entities) { for (DcsEntity e : entities) { if (e instanceof DcsDeliverableUnit) { for (String formerRef : ((DcsDeliverableUnit) e).getFormerExternalRefs()) { Set<DcsEntity> value; if (entityMap.containsKey(formerRef)) { value = entityMap.get(formerRef); } else { value = new HashSet<DcsEntity>(); } value.add(e); entityMap.put(formerRef, value); } } } } }
private void performFormerSearch(LinkedList<DcsEntity> results, String formerExternalRef) { for (Map.Entry<String, Set<DcsEntity>> entries : archiveUtil.getEntities().entrySet()) { for (DcsEntity entity : entries.getValue()) { if (!(entity instanceof DcsDeliverableUnit)) { continue; } DcsDeliverableUnit du = (DcsDeliverableUnit) entity; if (du.getFormerExternalRefs().contains(formerExternalRef)) { results.add(du); } } } }
/** * Places the supplied entities in the backing map, keyed by their former external references. * * @param entities the entities to add in the backing map */ protected void mapFormerRefs(DcsEntity... entities) { for (DcsEntity e : entities) { if (e instanceof DcsDeliverableUnit) { for (String formerRef : ((DcsDeliverableUnit) e).getFormerExternalRefs()) { Set<DcsEntity> value; if (entityMap.containsKey(formerRef)) { value = entityMap.get(formerRef); } else { value = new HashSet<DcsEntity>(); } value.add(e); entityMap.put(formerRef, value); } } } } }
if (du.getFormerExternalRefs().contains(business_id)) { dus.add(du);
if (du.getFormerExternalRefs().contains(business_id)) { dus.add(du);
if (du.getFormerExternalRefs().contains(business_id) && (du.getType().equals(DataItemProfile.DATASET_TYPE) || du.getType().equals(DataItemProfile.DATASET_STATE_TYPE))) { dus.add(du);
format.setName(du.getTitle()); format.setVersion(METADATAFORMAT_VERSION_ONE); if (!du.getFormerExternalRefs().isEmpty()) { format.setId(du.getFormerExternalRefs().iterator().next());
scheme.setSchemaUrl(du.getFormerExternalRefs().iterator().next()); return scheme;
scheme.setSchemaUrl(du.getFormerExternalRefs().iterator().next()); return scheme;
format.setName(du.getTitle()); format.setVersion(METADATAFORMAT_VERSION_ONE); if (!du.getFormerExternalRefs().isEmpty()) { format.setId(du.getFormerExternalRefs().iterator().next());
/** * Copy constructor for a DcsDeliverableUnit. The state of <code>toCopy</code> is copied * to this. * * @param toCopy the deliverable unit to copy, must not be <code>null</code> * @throws IllegalArgumentException if <code>toCopy</code> is <code>null</code> */ public DcsDeliverableUnit(DcsDeliverableUnit toCopy) { super(toCopy); this.coreMd = toCopy.getCoreMd(); this.collections = toCopy.getCollections(); this.metadata = toCopy.getMetadata(); this.metadataRefs = toCopy.getMetadataRef(); this.relations = toCopy.getRelations(); this.formerExternalRefs = toCopy.getFormerExternalRefs(); this.isDigitalSurrogate = toCopy.isDigitalSurrogate(); this.parents = toCopy.getParents(); }
store); addStrings(doc, du.getFormerExternalRefs(),
final Set<DcsMetadata> mds = du.getMetadata(); final Set<String> creators = du.getCreators(); final Set<String> extRefs = du.getFormerExternalRefs(); final Set<DcsRelation> relations = du.getRelations(); final Set<String> subjects = du.getSubjects();
final Collection<DcsMetadata> mds = du.getMetadata(); final Collection<String> creators = du.getCreators(); final Collection<String> extRefs = du.getFormerExternalRefs(); // Being deprecated, use AltIds DWD final Collection<DcsRelation> relations = du.getRelations(); final Collection<String> subjects = du.getSubjects();