private Set<String> getManifestationRefs(DcsEntity manifestation) { Set<String> rels = new HashSet<String>(); DcsManifestation m = (DcsManifestation) manifestation; for (DcsEntityReference ref : m.getMetadataRef()) { rels.add(ref.getRef()); } for (DcsManifestationFile file : m.getManifestationFiles()) { rels.add(file.getRef().getRef()); } if (m.getDeliverableUnit() != null) { rels.add(m.getDeliverableUnit()); } return rels; } }
protected DcsManifestation getFirstManifestationOf(Dcp dcp, DcsDeliverableUnit du, String man_type) { for (DcsManifestation test : dcp.getManifestations()) { if (test.getDeliverableUnit().equals(du.getId()) && test.getType().equals(man_type)) { return test; } } return null; }
private Set<String> getManifestationRefs(DcsEntity manifestation) { Set<String> rels = new HashSet<String>(); DcsManifestation m = (DcsManifestation) manifestation; for (DcsEntityReference ref : m.getMetadataRef()) { rels.add(ref.getRef()); } for (DcsManifestationFile file : m.getManifestationFiles()) { rels.add(file.getRef().getRef()); } if (m.getDeliverableUnit() != null) { rels.add(m.getDeliverableUnit()); } return rels; } }
if (man.getDeliverableUnit() != null) { entities.add(man.getDeliverableUnit());
if (man.getDeliverableUnit() != null) { entities.add(man.getDeliverableUnit());
if (idMap.containsKey(m.getDeliverableUnit())) { m.setDeliverableUnit(idMap.get(m.getDeliverableUnit()));
if (idMap.containsKey(m.getDeliverableUnit())) { m.setDeliverableUnit(idMap.get(m.getDeliverableUnit()));
while (manItr.hasNext() && man == null) { DcsManifestation candidateMan = manItr.next(); if (du.getId().equals(candidateMan.getDeliverableUnit()) && candidateMan.getTechnicalEnvironment().size() > 0 && candidateMan.getTechnicalEnvironment().iterator().next().startsWith(METADATASCHEME_REGISTRY_ENTRY_TYPE)) {
while (manItr.hasNext() && man == null) { DcsManifestation candidateMan = manItr.next(); if (du.getId().equals(candidateMan.getDeliverableUnit()) && candidateMan.getTechnicalEnvironment().size() > 0 && candidateMan.getTechnicalEnvironment().iterator().next().startsWith(METADATASCHEME_REGISTRY_ENTRY_TYPE)) {
if (candidate.getDeliverableUnit().equals(du.getId()) && candidate.getType().equals(SCHEME_FILE_MAN_TYPE)) { man = candidate; break; if (candidate.getDeliverableUnit().equals(du.getId()) && candidate.getType().equals(SCHEME_SERIALIZATION_MAN_TYPE)) { serializationMan = candidate; break;
if (candidate.getDeliverableUnit().equals(du.getId()) && candidate.getType().equals(SCHEME_FILE_MAN_TYPE)) { man = candidate; break; if (candidate.getDeliverableUnit().equals(du.getId()) && candidate.getType().equals(SCHEME_SERIALIZATION_MAN_TYPE)) { serializationMan = candidate; break;
if (test.getType().equals(DATASET_STATE_TYPE) && dataItemMan.getDeliverableUnit().equals(test.getId())) { return test;
private void updateManifestationAncestry( Map<String, List<String>> ancestrymap, Collection<DcsManifestation> set) throws IOException, SolrServerException { for (DcsManifestation man : set) { List<String> ancestors = new ArrayList<String>(2); ancestrymap.put(man.getId(), ancestors); updateAncestry(ancestrymap, man.getId(), man.getDeliverableUnit()); for (DcsManifestationFile mf : man.getManifestationFiles()) { updateAncestry(ancestrymap, mf.getRef(), man.getId()); } for (DcsMetadataRef ref : man.getMetadataRef()) { updateAncestry(ancestrymap, ref, man.getId()); } } }
if (test.getType().equals(DATASET_STATE_TYPE) && dataItemMan.getDeliverableUnit().equals(test.getId())) { return test;
if (candidate.getDeliverableUnit().equals(du.getId())) { man = candidate; break;
DcsManifestation man = (DcsManifestation) entity; if (man.getDeliverableUnit() != null && man.getDeliverableUnit().equals(parent.getId())) { result.add(entity); add_descendants(entity, entities, result);
/** * Copy constructor for a DcsManifestation. The state of <code>toCopy</code> is copied * to this. * * @param toCopy the dcs manifestation to copy */ public DcsManifestation(DcsManifestation toCopy) { super(toCopy); this.deliverableUnit = toCopy.getDeliverableUnit(); this.metadata = toCopy.getMetadata(); this.manifestationFiles = toCopy.getManifestationFiles(); this.metadataRef = toCopy.getMetadataRef(); this.technicalEnvironment = toCopy.getTechnicalEnvironment(); this.type = toCopy.getType(); this.dateCreated = toCopy.getDateCreated(); }
DcsManifestation man = (DcsManifestation) entity; if (man.getDeliverableUnit() != null && man.getDeliverableUnit().equals(parent.getId())) { result.add(entity); add_descendants(entity, entities, result);
private static SolrInputDocument toSolr(DcsManifestation man, ArchiveStore store) throws IOException { SolrInputDocument doc = new SolrInputDocument(); add(doc, EntityField.ID, man.getId()); add(doc, EntityField.TYPE, EntityTypeValue.MANIFESTATION.solrValue()); add(doc, ManifestationField.DELIVERABLE_UNIT, man.getDeliverableUnit()); add(doc, CoreMetadataField.TYPE, man.getType()); add(doc, ManifestationField.DATE_CREATED, man.getDateCreated()); addMetadataSet(doc, man.getMetadata()); addManifestationFileSet(doc, man.getManifestationFiles(), store); addMetadataRefSet(doc, man.getMetadataRef(), EntityField.METADATA_REF, store); addStrings(doc, man.getTechnicalEnvironment(), ManifestationField.TECH); addResourceIdentifierSet(doc, man.getAlternateIds()); return doc; }
if (!isNull(man.getDeliverableUnit())) { writer.startNode(E_DUNIT); writer.addAttribute(A_REF, man.getDeliverableUnit()); writer.endNode();