class SolrOperationsService {

    public void createSolrSchema(List<ColumnNameTypeValue> columns, String confpath) throws ParserConfigurationException, URISyntaxException, IOException, SAXException, TransformerException {
        DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
        domFactory.setIgnoringComments(true);
        DocumentBuilder builder = domFactory.newDocumentBuilder();
        Document doc = builder.parse(new File(ClassLoader.getSystemResource("./solr-config/schema.xml").toURI()));
        NodeList nodes = doc.getElementsByTagName("schema");
        for (ColumnNameTypeValue column: columns) {
            Element field = doc.createElement("field");
            field.setAttribute("name", column.getColumn());
            field.setAttribute("type", streamingToSolr(column.getType()));
            field.setAttribute("indexed", "true");
            field.setAttribute("stored", "true");
            nodes.item(0).appendChild(field);
        }
        TransformerFactory transformerFactory = TransformerFactory.newInstance();
        Transformer transformer = transformerFactory.newTransformer();
        DOMSource source = new DOMSource(doc);
        StreamResult streamResult =  new StreamResult(new File(confpath+"/schema.xml"));
        transformer.transform(source, streamResult);
    }

    public  SolrOperationsService(String solrHosts, String zkHosts, String dataDir, Boolean isCloud);

}