private Set<String> getDeliverableUnitEntities(String entityId, InputStream content, Metadata md, boolean initial) { Set<String> entities = new HashSet<String>(); entities.add(entityId); try { DcsDeliverableUnit du = builder.buildDeliverableUnit(content); /* A Du's metadata files are significantly related */ for (DcsEntityReference ref : du.getMetadataRef()) { entities.add(ref.getRef()); } } catch (InvalidXmlException e) { throw new RuntimeException(e); } finally { try { content.close(); } catch (Exception e) { } } /* Events and manifestations are significantly related */ addRelated(md, entities, EVENT, MANIFESTATION); return entities; }
private Set<String> getDeliverableUnitEntities(String entityId, InputStream content, Metadata md, boolean initial) { Set<String> entities = new HashSet<String>(); entities.add(entityId); try { DcsDeliverableUnit du = builder.buildDeliverableUnit(content); /* A Du's metadata files are significantly related */ for (DcsEntityReference ref : du.getMetadataRef()) { entities.add(ref.getRef()); } } catch (InvalidXmlException e) { throw new RuntimeException(e); } finally { try { content.close(); } catch (Exception e) { } } /* Events and manifestations are significantly related */ addRelated(md, entities, EVENT, MANIFESTATION); return entities; }
private Set<String> getDeliverableUnitRefs(DcsEntity deliverableUnit) { Set<String> rels = new HashSet<String>(); DcsDeliverableUnit du = (DcsDeliverableUnit) deliverableUnit; for (DcsEntityReference ref : du.getCollections()) { rels.add(ref.getRef()); } for (DcsEntityReference ref : du.getMetadataRef()) { rels.add(ref.getRef()); } for (DcsEntityReference ref : du.getParents()) { rels.add(ref.getRef()); } for (DcsRelation ref : du.getRelations()) { rels.add(ref.getRef().getRef()); } return rels; }
private Set<String> getDeliverableUnitRefs(DcsEntity deliverableUnit) { Set<String> rels = new HashSet<String>(); DcsDeliverableUnit du = (DcsDeliverableUnit) deliverableUnit; for (DcsEntityReference ref : du.getCollections()) { rels.add(ref.getRef()); } for (DcsEntityReference ref : du.getMetadataRef()) { rels.add(ref.getRef()); } for (DcsEntityReference ref : du.getParents()) { rels.add(ref.getRef()); } for (DcsRelation ref : du.getRelations()) { rels.add(ref.getRef().getRef()); } return rels; }
for (DcsEntityReference ref : du.getMetadataRef()) { entities.add(ref.getRef());
for (DcsEntityReference ref : du.getMetadataRef()) { entities.add(ref.getRef());
for (DcsEntityReference ref : du.getMetadataRef()) { updateAncestry(ancestrymap, ref, du.getId());
/** * 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(); }
addMetadataRefSet(doc, du.getMetadataRef(), EntityField.METADATA_REF, store);
final String title = du.getTitle(); final Set<DcsCollectionRef> cRefs = du.getCollections(); final Set<DcsMetadataRef> mdRefs = du.getMetadataRef(); final Set<DcsMetadata> mds = du.getMetadata(); final Set<String> creators = du.getCreators();
final String title = du.getTitle(); final Collection<DcsCollectionRef> cRefs = du.getCollections(); final Collection<DcsMetadataRef> mdRefs = du.getMetadataRef(); final Collection<DcsMetadata> mds = du.getMetadata(); final Collection<String> creators = du.getCreators();