diff --git a/main/src/com/google/refine/importers/BinaryFormatGuesser.java b/main/src/com/google/refine/importers/BinaryFormatGuesser.java new file mode 100644 index 000000000..175ee11af --- /dev/null +++ b/main/src/com/google/refine/importers/BinaryFormatGuesser.java @@ -0,0 +1,16 @@ +package com.google.refine.importers; + +import java.io.File; + +import com.google.refine.importing.FormatGuesser; + +public class BinaryFormatGuesser implements FormatGuesser { + + @Override + public String guess(File file, String encoding, String seedFormat) { + + // TODO: Guess based on sniffing magic numbers + + return null; + } +} diff --git a/main/webapp/modules/core/MOD-INF/controller.js b/main/webapp/modules/core/MOD-INF/controller.js index 4528ca2bc..8f180da22 100644 --- a/main/webapp/modules/core/MOD-INF/controller.js +++ b/main/webapp/modules/core/MOD-INF/controller.js @@ -204,11 +204,10 @@ function registerImporting() { IM.registerFormat("text/xml", "XML files", "XmlParserUI", new Packages.com.google.refine.importers.XmlImporter()); IM.registerFormat("text/xml/xlsx", "Excel (.xlsx) files", "ExcelParserUI", new Packages.com.google.refine.importers.ExcelImporter()); - // TODO: Can we get away with just reusing Excel importer UI? IM.registerFormat("text/xml/ods", "Open Document Format spreadsheets (.ods)", "ExcelParserUI", new Packages.com.google.refine.importers.OdsImporter()); IM.registerFormat("text/xml/rdf", "RDF/XML files", "RdfTriplesParserUI", new Packages.com.google.refine.importers.RdfXmlTripleImporter()); IM.registerFormat("text/json", "JSON files", "JsonParserUI", new Packages.com.google.refine.importers.JsonImporter()); - IM.registerFormat("text/marc", "MARC files"); + IM.registerFormat("text/marc", "MARC files", "XmlParserUI", new Packages.com.google.refine.importers.MarcImporter()); IM.registerFormat("binary", "Binary files"); // generic format, no parser to handle it IM.registerFormat("binary/xls", "Excel files", "ExcelParserUI", new Packages.com.google.refine.importers.ExcelImporter());