package org.simantics.spreadsheet.fileimport; import java.nio.file.Path; import java.util.HashMap; import java.util.Map; import java.util.Optional; import org.simantics.db.Resource; import org.simantics.fileimport.SimanticsResourceFileImport; public class ExcelFileImport extends SimanticsResourceFileImport { private static final Map ALLOWED_EXTENSIONS = new HashMap<>(2); static { ALLOWED_EXTENSIONS.put("*.xls", "Excel file *.xls"); ALLOWED_EXTENSIONS.put("*.xlsx", "Excel file *.xlsx"); } @Override public Optional perform(Resource parent, Path file) throws Exception { throw new UnsupportedOperationException("Excel import is not yet supported"); } @Override public Map allowedExtensionsWithFilters() { return ALLOWED_EXTENSIONS; } }