final List<CommandKey> keys = new ArrayList<>(targetUriCommandKeyMap.values());
Collections.sort(keys);
for (final CommandKey commandKey : keys) {
final WebRequestCommand<?, ?> command = (WebRequestCommand<?, ?>) commandService.getCommand(commandKey);
if (command.hasXmlSchema()) {
final Include include = new Include();
include.setHref(String.format("%s/command-service/%s/%s.xsd", applicationHttpUrlBase, commandKey.getCatalogName(), commandKey.getCommandName()));
grammars.getInclude().add(include);
}
}
return grammars;
}