public void setDeliverableUnits(Set<DcsDeliverableUnit> deliverableUnits) { Assertion.notNull(deliverableUnits); this.deliverableUnits = new HashSet<DcsDeliverableUnit>(deliverableUnits.size()); for ( DcsDeliverableUnit d : deliverableUnits ) { Assertion.notNull(d); this.deliverableUnits.add(d); } }
public void setManifestationFiles(Set<DcsManifestationFile> manifestationFiles) { Assertion.notNull(manifestationFiles); this.manifestationFiles = new HashSet<DcsManifestationFile>(manifestationFiles.size()); for (DcsManifestationFile mf : manifestationFiles) { Assertion.notNull(mf); this.manifestationFiles.add(new DcsManifestationFile(mf)); } }
/** * Add a relationship to this manifestation file. * * @param rel the relationship, must not be <code>null</code>. */ public void addRel(DcsRelation rel) { Assertion.notNull(rel); this.relSet.add(new DcsRelation(rel)); }
public void addTechnicalEnvironment(String... technicalEnvironment) { Assertion.notNull(technicalEnvironment); for (String s : technicalEnvironment) { Assertion.notEmptyOrNull(s); this.technicalEnvironment.add(s); } }
/** * Copy constructor for a DcsEntity. The state of <code>toCopy</code> is copied * to this. * * @param toCopy the dcs entity to copy, must not be <code>null</code> * @throws IllegalArgumentException if <code>toCopy</code> is <code>null</code> */ public DcsEntity(DcsEntity toCopy) { Assertion.notNull(toCopy); this.id = toCopy.getId(); }
/** * Copies the current node and its children to the <code>writer</code>. * * @param in * @param writer the writer to write to * @throws javax.xml.stream.XMLStreamException */ public void copyNode(XMLStreamReader in, DcsStaxWriter writer) throws XMLStreamException { Assertion.notNull(in); Assertion.notNull(writer); copyNode(in, writer.getXMLStreamWriter()); }
@Override public DcsManifestation buildManifestation(InputStream in) throws InvalidXmlException { Assertion.notNull(in); final DcsManifestation man; try { man = (DcsManifestation) x.fromXML(in); } catch (StreamException e) { log.debug(String.format(DESER_ERR, e.getMessage()), e); throw new InvalidXmlException(e); } return man; }
@Override public DcsFile buildFile(InputStream in) throws InvalidXmlException { Assertion.notNull(in); final DcsFile file; try { file = (DcsFile) x.fromXML(in); } catch (StreamException e) { log.debug(String.format(DESER_ERR, e.getMessage()), e); throw new InvalidXmlException(e); } return file; }