public void addWrappedOrForwardedMessage(final Dataset dataset, final Model envelopeGraph,
final Resource envelopeGraphResource, URI messageURI) {
if (this.wrappedMessage != null){
if (this.forwardedMessage != null) throw new IllegalStateException("cannot wrap and forward with the same " +
"builder");
addAsContainedEnvelope(dataset, envelopeGraph, envelopeGraphResource, wrappedMessage, messageURI);
}
if (this.forwardedMessage != null){
if (this.wrappedMessage != null) throw new IllegalStateException("cannot wrap and forward with the same " +
"builder");
addAsContainedEnvelope(dataset, envelopeGraph, envelopeGraphResource, forwardedMessage, messageURI);
}
}