if (tobeAdapted instanceof Mediator) {
return tobeAdapted;
} else if (tobeAdapted instanceof OMElement) {
/* The mapper that can convert XML into custom object */
XMLToObjectMapper mapper = MediatorFactoryFinder.getInstance();
Object result = mapper.getObjectFromOMNode((OMNode) tobeAdapted,new Properties());
if (result instanceof Mediator) {
return result;
} else {
throw new LoggedRuntimeException("Incompatible value for the sequence " +