class JsonCnd {

    public static List<Result<NodeTypeSet>> readNodeTypes(final @NotNull NamespaceMapping mapping,
                                                          final @NotNull List<URL> cndUrls) {
        final List<Result<NodeTypeSet>> results = new ArrayList<>();
        for (URL cndUrl : cndUrls) {
            final CNDReader cndReader = new DefaultCNDReader();
            try (Reader reader = new InputStreamReader(cndUrl.openStream(), StandardCharsets.UTF_8)) {
                cndReader.read(reader, cndUrl.toExternalForm(), mapping);
                results.add(Result.success(cndReader));
            } catch (IOException e) {
                results.add(Result.failure(new RuntimeException(cndUrl.toExternalForm(), e)));
            }
        }
        return results;
    }

    private  JsonCnd();

}