{throw new XPathException(this, "No module found matching namespace URI: " + uri);}
return new StringValue(module.getDescription());
} else if ("is-module-registered".equals(getSignature().getName().getLocalName())) {
final String uri = args[0].getStringValue();
final Module module = context.getModule(uri);
return new BooleanValue(module != null);
} else if ("mapped-modules".equals(getSignature().getName().getLocalName())) {
final ValueSequence resultSeq = new ValueSequence();
for (final Iterator<String> i = context.getMappedModuleURIs(); i.hasNext();) {
resultSeq.add(new StringValue(i.next().toString()));
}
return resultSeq;
} else if ("is-module-mapped".equals(getSignature().getName().getLocalName())) {
final String uri = args[0].getStringValue();
return new BooleanValue(((Map<String, String>)context.getBroker().getConfiguration().getProperty(XQueryContext.PROPERTY_STATIC_MODULE_MAP)).get(uri) != null);
} else if ("map-module".equals(getSignature().getName().getLocalName())) {
if (!context.getSubject().hasDbaRole()) {
final XPathException xPathException = new XPathException(this, "Permission denied, calling user '" + context.getSubject().getName() + "' must be a DBA to call this function.");
logger.error("Invalid user", xPathException);
throw xPathException;