if (wsreq == null) {
throw new CannotTranslateException("wsreq may not be null");
}
final _CreateRequest req = this.repr._newCreateRequest();
final VirtualWorkspace_Type vw = wsreq.getMetadata();
final URI name = vw.getName();
if (name != null) {
req.setName(name.toString());
}
// -------------------------------------------------------------
// Weed out the needed items:
// -------------------------------------------------------------
final Definition def = vw.getDefinition();
if (def == null) {
throw new CannotTranslateException(
"create request definition may not be missing");
}
final VirtualNetwork_Type net;
final Logistics log = vw.getLogistics();
if (log == null) {
net = null;
} else {
net = log.getNetworking();
}