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; } }
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; } }
private Set<String> getManifestationEntities(String entityId, InputStream content, Metadata md, boolean initial) { Set<String> entities = new HashSet<String>(); entities.add(entityId); try { DcsManifestation man = builder.buildManifestation(content); /* * A manifestation's metadata files are significantly related */ for (DcsEntityReference ref : man.getMetadataRef()) { entities.add(ref.getRef()); } /* A manifestation's files are significantly related */ for (DcsManifestationFile f : man.getManifestationFiles()) { entities.add(f.getRef().getRef()); } } catch (InvalidXmlException e) { throw new RuntimeException(e); } finally { try { content.close(); } catch (Exception e) { } } /* A manifestation's events are significantly related */ addRelated(md, entities, EVENT); return entities; }
private Set<String> getManifestationEntities(String entityId, InputStream content, Metadata md, boolean initial) { Set<String> entities = new HashSet<String>(); entities.add(entityId); try { DcsManifestation man = builder.buildManifestation(content); /* * A manifestation's metadata files are significantly related */ for (DcsEntityReference ref : man.getMetadataRef()) { entities.add(ref.getRef()); } /* A manifestation's files are significantly related */ for (DcsManifestationFile f : man.getManifestationFiles()) { entities.add(f.getRef().getRef()); } } catch (InvalidXmlException e) { throw new RuntimeException(e); } finally { try { content.close(); } catch (Exception e) { } } /* A manifestation's events are significantly related */ addRelated(md, entities, EVENT); return entities; }
for (DcsEntityReference ref : man.getMetadataRef()) { entities.add(ref.getRef());
for (DcsEntityReference ref : man.getMetadataRef()) { entities.add(ref.getRef());
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()); } } }
/** * 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(); }
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; }
final Set<DcsMetadata> metadata = man.getMetadata(); final Set<DcsManifestationFile> files = man.getManifestationFiles(); final Set<DcsMetadataRef> metadataRef = man.getMetadataRef(); final Set<String> techenv = man.getTechnicalEnvironment(); final String type = man.getType();
final Collection<DcsMetadata> metadata = man.getMetadata(); final Collection<DcsManifestationFile> files = man.getManifestationFiles(); final Collection<DcsMetadataRef> metadataRef = man.getMetadataRef(); final Collection<String> techenv = man.getTechnicalEnvironment(); final String type = man.getType();