/** * The URI representing the relationship type. * * @param relUri the URI in string form */ public void setRelUri(String relUri) { Assertion.notEmptyOrNull(relUri); this.relUri = relUri; }
/** * Sets the error messages. * * @param errorMessages the error messages, must not be <code>null</code> * @throws IllegalArgumentException if <code>errorMessages</code> are <code>null</code> */ public void setErrorMessages(List<String> errorMessages) { Assertion.notNull(errorMessages); this.errorMessages = errorMessages; }
/** * Serializes the {@code dcp} with the {@code DcsModelBuilder}, and returns an {@code InputStream} to the serialized * byte stream. * * @param dcp the DCP to serialize, must not be null * @param mb the model builder, must not be null * @return an {@code InputStream} to the serialized bytes * @throws IllegalArgumentException if either parameter is {@code null} */ public static InputStream asInputStream(Dcp dcp, DcsModelBuilder mb) { Assertion.notNull(dcp); Assertion.notNull(mb); ByteArray dcp_bytes = new ByteArray(32 * 1024); mb.buildSip(dcp, dcp_bytes.asOutputStream()); return dcp_bytes.asInputStream(); }
public void addTechnicalEnvironment(String... technicalEnvironment) { Assertion.notNull(technicalEnvironment); for (String s : technicalEnvironment) { Assertion.notEmptyOrNull(s); this.technicalEnvironment.add(s); } }
/** * URIs that this license is referenced as. May be internal or external URIs. For example: * "http://creativecommons.org/licenses/by-nc-sa/3.0/" or "urn:dataconservancy.org:license/by-nc-sa/3.0" * * @param uris the uris */ public void setUris(Set<URI> uris) { Assertion.notNull(uris); this.uris = uris; }
/** * Set the identifier for the entity. * * @param id the identifier, must not be <code>null</code> * @throws IllegalArgumentException if <code>id</code> is <code>null</code> */ public void setId(String id) { Assertion.notEmptyOrNull(id); this.id = id; }
/** * Convenience constructor, constructing a reference to <code>ref</code> * * @param ref the reference */ public DcsEntityReference(String ref) { Assertion.notEmptyOrNull(ref); this.ref = ref; }
public void setType(String type) { Assertion.notEmptyOrNull(type); this.type = type; }
/** * Set the entity reference * * @param ref the entity reference, must not be empty or <code>null</code> * @throws IllegalArgumentException if <code>ref</code> is empty or <code>null</code> */ public void setRef(String ref) { Assertion.notEmptyOrNull(ref); this.ref = ref; }
/** * 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(); }
/** * Set the title of the entity. * * @param title the title, must not be an empty string or <code>null</code> * @throws IllegalArgumentException if <code>title</code> is empty or <code>null</code> */ public void setTitle(String title) { Assertion.notEmptyOrNull(title); this.title = title; }
/** * 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()); }
/** * Set the type of the entity * @param type the type */ public void setType(String type) { Assertion.notEmptyOrNull(type); this.type = type; }
/** * Set the path for the manifestation file * * @param path the path, must not be empty or null * @throws IllegalArgumentException if <code>path</code> is the empty string or <code>null</code>. */ public void setPath(String path) { Assertion.notEmptyOrNull(path); this.path = path; }
public void setDeliverableUnit(String deliverableUnit) { Assertion.notEmptyOrNull(deliverableUnit); this.deliverableUnit = deliverableUnit; }
public void setDateCreated(String dateCreated) { Assertion.notEmptyOrNull(dateCreated); this.dateCreated = dateCreated; }