public static void generate(String path, OutputStream output, FolderGenerators type) throws Folder2XmlException, ParserConfigurationException, TransformerException, SAXException, IOException, JAXBException {
        FolderXmlViewGenerator generator;
        switch (type) {
            case DOM_FOLDER_GENERATOR:
                generator = FolderXmlViewGenerator.getInstance(FolderGenerators.DOM_FOLDER_GENERATOR);
                break;
            case SAX_FOLDER_GENERATOR:
                generator = FolderXmlViewGenerator.getInstance(FolderGenerators.SAX_FOLDER_GENERATOR);
                break;
            case JAXB_FOLDER_GENERATOR:
                generator = FolderXmlViewGenerator.getInstance(FolderGenerators.JAXB_FOLDER_GENERATOR);
                break;
            case XSTREAM_FOLDER_GENERATOR:
                generator = FolderXmlViewGenerator.getInstance(FolderGenerators.XSTREAM_FOLDER_GENERATOR);
                break;
            default:
                throw new Folder2XmlException();
        }
        generator.parse(path, output);
    }